Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

integration - StopIntegration support?

Hi Sages,

Is there a way to specify a stopping rule or condition like r[t] < rmin when integrating? Here's an example in mathematica s = NDSolve[{r''[t] == -GM/r[t]^2,r[0] = 1000s0, r'[0] = 0,WhenEvent[r[t]<rmin,"<strong>StopIntegration"]},r,{t,0,86400*100}]

thanks Pat Browne

integration - StopIntegration support?

Hi Sages,

Is there a way to specify a stopping rule or condition like r[t] < rmin rMin when integrating? integrating?

Here's an example in mathematica Mathematica:

s = NDSolve[{r''[t] == -GM/r[t]^2,r[0] -GM / r[t]^2, r[0] = 1000s0, 1000 * s0, r'[0] = 0,WhenEvent[r[t]<rmin,"<strong>StopIntegration"]},r,{t,0,86400*100}]

thanks Pat Browne

0, WhenEvent[r[t] < rMin, "**StopIntegration**"]}, r, {t, 0, 86400 * 100}]