16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.1. FIRST-ORDER MODELS 111<br />

Therateofchangeofvolume(dV=dt) of the aorta is equal to the di®erence<br />

between the rate f(t) at which blood is pumped into the aorta by the heart and<br />

the rate p(t)=R at which blood is pumped out of the aorta into the circulatory<br />

system. The constant R is referred to as the systemic resistance. Thus, the<br />

second ODE is is now given by ode2 .<br />

> ode2:=diff(V(t),t)=f(t)-p(t)/R;<br />

ode2 := d<br />

p(t)<br />

V (t) =f (t) ¡<br />

dt R<br />

An ODE (ode3 ) for pressure alone results on substituting ode1 into ode2 .<br />

> ode3:=subs(ode1,ode2);<br />

μ<br />

d<br />

ode3 := C<br />

dt p(t)<br />

<br />

= f (t) ¡ p(t)<br />

R<br />

As a simple model of the forcing function f(t), let's assume that during the<br />

systolic (pumping) phase f(t) =A sin(¼t=¿), with A the amplitude and ¿ the<br />

duration of this phase, and f(t) = 0 during the diastolic (nonpumping) phase.<br />

So f(t) is a piecewise forcing function. If T is the time for one complete cycle<br />

(time between heart beats), the piecewise function for two heartbeats can be<br />

entered using the following piecewise command.<br />

> f(t):=piecewise(t0, R>0, A>0, and P>0.<br />

> sol:=dsolve(fode3,p(0)=Pg,p(t))<br />

assuming (tau>0,T>tau,C>0,R>0,A>0,P>0) ;<br />

The assuming command applies the assumption only to the command line in<br />

which it appears. If you wish to apply assumptions to the entire work sheet,<br />

you can use the assume command at the beginning of the work sheet. In either

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!