dde23 can solve problems with discontinuities in the history or discontinuities in coefficients of the equations. It provides properties that enable you to supply locations of known discontinuities and a different initial value.
|At the initial value
||Generally the intial value is the value returned by the history function, which is to say that the solution is continuous at the initial point. However, if this is not the case, supply a different initial value using the
|In the history, i.e., the solution at , or in the equation coefficients for
||Provide the known locations of the discontinuities in a vector as the value of the
Example: Cardiovascular Model
This example solves a cardiovascular model due to J. T. Ottesen . The equations are integrated over the interval [0,1000]. The situation of interest is when the peripheral pressure is reduced exponentially from its value of 1.05 to 0.84 beginning at = 600.
This is a problem with one delay, a constant history, and three differential equations with fourteen physical parameters. It has a discontinuity in a low order derivative at
t = 600.
The demo |
ddex2, the fourteen physical parameters are set as fields in a structure
dde23 passes to
ddex2de as an additional argument. The function
ddex2de for evaluating the equations begins with
Solve Using the Jumps Property. The peripheral pressure is a continuous function of , but it does not have a continuous derivative at
t = 600. The example uses the
Jumps property to inform
dde23 about the location of this discontinuity.
After defining the delay
tau and the constant
history, the call is
ddex2 plots only the third component, the heart rate, which shows a sharp change at
t = 600.
Solve by Restarting. The example could have solved this problem by breaking it into two pieces
The solution structure
sol on the interval
[0,600] serves as history for restarting the integration at
t = 600. In the second call,
sol so that on return the solution is available on the whole interval
[0,1000]. That is, after this second return,
evaluates the solution obtained in the first integration at
t = 300, and the solution obtained in the second integration at
t = 900.
When discontinuities occur in low order derivatives at points known in advance, it is better to use the
Jumps property. When you use event functions to locate such discontinuities, you must restart the integration at discontinuities.
|Solving DDE Problems||Changing DDE Integration Properties|