Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Re: [mg7117] Iterating NDSolve
Replies: 0

 Andrei Constantinescu Posts: 32 Registered: 12/7/04
Re: [mg7117] Iterating NDSolve
Posted: May 13, 1997 1:57 AM

Hi Darmiiss,

I did something similar some time ago using Map. Take a look
a the code below and may be it helps:

tmax = 20;

sol = Map[
NDSolve[ { l'[t] == B[r[t], l[t]] , r'[t] == 0.35 (# - r[t] - l[t]) ,
l[0] == 0, r[0] == 0 },
{r[t],l[t]}, {t, 0, tmax} ] &,
Union[ Table[ i, {i, 2.95, 3.0, 0.002} ], Table[ i, {i, 3.40, 3.45, 0.002} ] ]
]
traj = Map[
ParametricPlot[ {#[[1,1,2]], #[[1,2,2]]} , {t, 0, tmax},
DisplayFunction -> Identity] &, sol ]
b0 = ContourPlot[ B[r,l], {r,0.01,5}, {l,0,5},
Contours -> {0} , ContourShading -> False,
ContourStyle -> {Hue[0]},
PlotPoints -> 25,
DisplayFunction -> Identity]
w0 = ContourPlot[ W[r,l], {r,0.01,4}, {l,0,4},
Contours -> Range[10] , ContourShading -> False,
ContourStyle -> {Hue[0.5]},
PlotPoints -> 25,
DisplayFunction -> Identity]
Show[ b0,w0,Sequence[traj], DisplayFunction -> \$DisplayFunction ,
FrameLabel -> {"r - vitesse d'avancement", "l - lit des debris" , "" , "" } ,
DefaultFont -> {"Helvetica-Bold", 12} ]

Cheers,

Andrei

______________________________________________________________________
Andrei Constantinescu constant@athena.polytechnique.fr

LMS Ecole Polytechnique tel: (33)-1-69.33.33.30
91128 PALAISEAU cedex - FRANCE fax: (33)-1-69.33.30.26