Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Change a parameter during NDSolve' topicStudent Support Forum > General > Archives > "Change a parameter during NDSolve"

Next Comment >Help | Reply To Topic
Author Comment/Response
xage
02/08/12 02:29am

Hey,

i want to simulate a demographic transition for a model given by 6 differential equations.

The important parameter (d) needs to be changed while i solve the system, using NDSolve.


olc = NDSolve[{P'[t] == dP[P[t], k[t], S[t], n[t], c[t], e[t]],
P[0] == P0 + ic[[1]],
k'[t] == dk[P[t], k[t], S[t], n[t], c[t], e[t]],
k[0] == k0 + ic[[2]],
S'[t] == dS[P[t], k[t], S[t], n[t], c[t], e[t]],
S[0] == S0 + ic[[3]],
n'[t] == dn[P[t], k[t], S[t], n[t], c[t], e[t]],
n[0] == n0 + ic[[4]],
c'[t] == dc[P[t], k[t], S[t], n[t], c[t], e[t]],
c[0] == c0 + ic[[5]],
e'[t] == de[P[t], k[t], S[t], n[t], c[t], e[t]],
e[0] == e0 + ic[[6]]}, {P, k, S, n, c, e}, {t, tmin, tmax}]

I would like to change d in the intervall 2/5(tmax-tmin)<t<3/5(tmax-tmin) with steps d[t]*0.99 (representing lower mortality)

I tried two ways
1.) to add d'[t]=d[t]*0.99 as another differential equation, but i don't know how to trigger it to start and end at certain t-values inside NDSolve (can i use if somehow?)

2.) use "EventLocator". Couldn't complete it.

How may I solve this issue?

Thanks


URL: ,

Subject (listing for 'Change a parameter during NDSolve')
Author Date Posted
Change a parameter during NDSolve xage 02/08/12 02:29am
Re: Change a parameter during NDSolve Peter Pein 02/08/12 5:08pm
Next Comment >Help | Reply To Topic