DAE examples

The following examples of differential algebraic equations are drawn from the book
Peter Kunkel and Volker Mehrmann: Differential Algebraic Equations. Analysis and numerical methods. Zürich: European Mathematical Society Publishing House. (2006).

1  Example 1: A chemical reaction

<a name="test1"></a>

A chemical reaction is controled by external cooling. c is the concentration of the reactant, T temperature, R the reaction rate per unit volume, T0 the initial temparature, c0 the initial concentration and R0 the initial rate. TC denotes the external cooling temperature (a given function of time). The equation reads
( 100 010 000 )( c · T · R · )=( k1 ( c0 -c)-R k1 ( T0 -T)+ k2 R- k3 (T- TC ) R- k3 exp(- k4 /T)c )

ki ,i=1,2,3,4 are given constants which we choose as
k1 =0.9, k2 =1.0, k3 =0.5 and k4 =0.2.

The standard initial values are
c0 =1, T0 =100.

For consistency it then follows that
R0 =0.499000999333666.

R0 is obtained from the third equation using c0 and T0 . As TC we take TC =0. c · and T · for t= t0 are taken from the system, and R · for t= t0 is obtained by differentiating the third equation w.r.t. t and inserting these values. This equation has index one: differentiate the third equation and insert the derivatives from the first two in order to obtain an explicit system. We take the rather long time interval [0,5]. You may change the values c0 , T0 , t end .

2  Example 2

<a name="test2"></a>

The van der Pol equation
y · = z ϵ z · = (1- y2 )z-y

and its limit case for ϵ=0:
y · = z 0 = (1- y2 )z-y

You may work with smaller and smaller ϵ and with ϵ=0. Then this equation has also index 1: differentiate the second equation and insert z for y · . We use as standard initial values y0 =-1/10 and z0 =-100/99. This implies y · 0 =-100/99. z · 0 is chosen consistently as 0. For these values and ϵ=0 the equation exhibits a singularity very near to 1.805. We take 1.805 as final time. For ϵ>0 there is no such singularity, but cusps build up for smaller and smaller values. You may change here the initial value y0 and z0 if ϵ>0 or only y0 \not=±1 if ϵ=0. In the latter case it follows from the consistency conditions that
z0 = y0 /(1- y0 2 ) y · 0 = z0 z · 0 = y · 0 (1+2 y0 z0 )/(1- y0 2 )

3  Example 3

<a name="test3"></a>

The pendulum, a typical from the constrained motion examples (like occur in multibody motions applications):
m x ·· +2xλ = 0 m y ·· +2yλ+mg = 0 x2 + y2 - L2 = 0.

Here m is the mass mounted at the tip of the pendulum, x,y is the position of the tip and λ is the force acting along the pendulum. g is the earth acceleration. This equation has index three. It is rewritten in first order form using
z1 = x z2 = y z5 = λ

as
z3 - z1 · = 0 z4 - z2 · = 0 m z3 · +2 z1 z5 = 0 m z4 · +2 z2 z5 +mg = 0 z1 2 + z2 2 - L2 = 0.

In this form it cannot be solved using the BDF-code, since the Jacobian does not allow the computation of z · 5 . We proceed in transforming it into index one:
Repeated differentiation of the fifth equation gives
z1 · z1 + z2 · z2 = 0 z3 z1 + z4 z2 = 0 z3 · z1 + z3 z1 · + z4 · z2 + z4 z2 · = 0 (-2 z1 z5 /m) z1 +(-g-2 z2 z5 /m) z2 + z3 z1 · + z4 z2 · = 0 L2 z5 + mgz2 /2-m( z3 z1 · + z4 z2 · )/2 = 0 L2 z5 · +mg z2 · /2-m( z3 · z1 · + z3 z1 ·· + z4 · z2 · + z4 z2 ·· )/2 = 0 L2 z5 · +mg z2 · /2-m( z3 · z3 + z4 z4 · ) = 0 L2 z5 · +mg z2 · /2-( z3 (-2 z1 z5 )+ z4 (-2 z2 z5 -mg)) = 0 L2 z5 · +(3/2)mg z2 · = 0

The last equation gives us the required explicit representation of z5 · . As final semiexplicit system of index one we now use
z3 - z1 · = 0 m z3 · +2 z1 z5 = 0 z1 2 + z2 2 - L2 = 0 z3 z1 + z4 z2 = 0 L2 z5 +(mg/2) z2 -(m/2)( z3 2 + z4 2 ) = 0

For the computation of consistent initial values you can chose two parameters only: ϑ0 and α. Then
x0 = cos( ϑ0 )= z1 y0 = sin( ϑ0 )= z2 x · 0 = sin( ϑ0 )α= z · 1 = z3 y · 0 = -cos( ϑ0 )α= z · 2 = z4 z5 = (- mgz2 /2+m( z3 2 + z4 2 )/2)/ L2 z · 3 = -2 z1 z5 /m z · 4 = -g-2 z2 z5 /m z · 5 = -(3/2) mgz4 / L2

We use ϑ0 =5π/4 and α=0.5 as standard values. L=1 and m=1.



File translated from TEX by TTM Unregistered, version 4.03.
On 16 Jun 2016, 18:43.