Example2.2.8 Rev1.doc

advertisement
Example 2.2.8 Multiple Steady States
> restart:
> with(plots):
The governing equation is entered here:
> eq:=diff(theta(t),t)=P*(1-theta(t))-theta(t)*exp(alpha*theta(t));
The steady states are found by equating the right hand side to zero:
> Eq:=subs(theta(t)=theta,rhs(eq));
Even though P is the parameter and theta is the dependent variable, the steady state equation
cannot be solved using theta as a function of P. However, P can be solved as a function of theta
as follows:
> Ps:=solve(Eq,P);
Next, P can be plotted as a function of theta (steady state solution):
>
p1:=plot(subs(alpha=6,Ps),theta=0..1,view=[0..1,0..0.1],labels=[
theta,P],thickness=3,title="Figure Exp. 2.2.22",axes=boxed):
> p2:=plot(0.05,theta=0..1):
> p3:=textplot([0.2,.055,(0.05)]):
> p4:=textplot([0.58,.055,(0.05)]):
> p5:=textplot([0.9,.055,(0.05)]):
> display({p1,p2,p3,p4,p5});
Page 1
In the above plot we observe that the line P=0.05 cuts the curve at three different points. Theta
vs P can be made by using the 'implicitplot' command in Maple.
> implicitplot(Psubs(alpha=6,Ps),P=0..0.1,theta=0..0.97,thickness=3,color=green,
title="Figure Exp. 2.2.23",axes=boxed);
Page 2
Hence, there are three different steady states. These three different states can be obtained by
equating the pressure to 0.5.
> Eqtheta:=subs(alpha=6,Ps)=0.05;
There are three different roots for the above equation. They can be obtained by providing
different initial guesses:
> st1:=fsolve(Eqtheta,theta=0.);
> st2:=fsolve(Eqtheta,theta=0.5);
> st3:=fsolve(Eqtheta,theta=0.8);
Next, the transient equation is solved for different initial conditions:
> eqtheta:=subs(alpha=6,P=0.05,eq);
> sol:=dsolve({eqtheta,theta(0)=0},theta(t),type=numeric);
>
odeplot(sol,[t,theta(t)],0.0..20,axes=boxed,color=blue,title="Fi
gure Exp. 2.2.24",thickness=3);
Page 3
> sol:=dsolve({eqtheta,theta(0)=1},theta(t),type=numeric);
>
odeplot(sol,[t,theta(t)],0.0..500,axes=boxed,color=magenta,title
="Figure Exp. 2.2.25",thickness=3);
Page 4
> sol:=dsolve({eqtheta,theta(0)=0.5},theta(t),type=numeric);
> odeplot(sol,[t,theta(t)],0.0..500,axes=boxed,title="Figure
Exp. 2.2.26",thickness=3);
> sol:=dsolve({eqtheta,theta(0)=0.4},theta(t),type=numeric);
>
odeplot(sol,[t,theta(t)],0.0..50,axes=boxed,color=green,title="F
igure 2.2.27",thickness=3);
Page 5
>
We obtained three different steady states. The stability of these states can be verified by
assigning these values as the initial conditions. If we start with a stable steady state solution as
the initial condition, the process remains at the stable steady state solution. If we start with an
unstable steady state solution, the process moves to one of the steady state solutions.
> sol:=dsolve({eqtheta,theta(0)=st1},theta(t),type=numeric);
>
odeplot(sol,[t,theta(t)],0..1000,axes=boxed,color=blue,title="Fi
gure Exp. 2.2.28",thickness=3,view=[0..1000,0..1]);
Page 6
> sol:=dsolve({eqtheta,theta(0)=st3},theta(t),type=numeric);
>
odeplot(sol,[t,theta(t)],0.0..1000,axes=boxed,color=magenta,titl
e="Figure Exp. 2.2.9",thickness=3,view=[0..1000,0..1]);
> sol:=dsolve({eqtheta,theta(0)=st2},theta(t),type=numeric);
> odeplot(sol,[t,theta(t)],0.0..1000,axes=boxed,title="Figure
Exp. 2.2.30",thickness=3);
Page 7
We observe that both st1=0.071 and st3=0.93 are stable steady states. However, st2=0.498 is an
unstable steady state. The dependent variable stays at st2 only until t=400 and then the process
approaches the stable steady state st3.
>
Page 8
Download