21.04.2015 Views

The Computable Differential Equation Lecture ... - Bruce E. Shapiro

The Computable Differential Equation Lecture ... - Bruce E. Shapiro

The Computable Differential Equation Lecture ... - Bruce E. Shapiro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

180 CHAPTER 9. DIFFERENTIAL ALGEBRAIC EQUATIONS<br />

✬<br />

✩<br />

Algorithm 9.2. Semi-explicit Index-1 DAE with Backward Euler<br />

To solve the semi-implicit index-1 DAE<br />

y ′ = f(t, y, z) (9.148)<br />

0 = g(t, y, z) (9.149)<br />

where g z is non-singular, at each time step t n solve the constraint for z n<br />

and substitute the result back into the ODE,<br />

z = h(t n , y n ) (9.150)<br />

y ′ n = f(t n , y n , h(t n , y n )) (9.151)<br />

(9.152)<br />

This produces an ordinary differential system that can be discretized using backwards-<br />

Euler (or any other method of choice) via<br />

1<br />

h (y n − y n−1 ) = f(t n , y n , h(t n , y n )) (9.153)<br />

Solve for y n using a Newton root-finder, and then proceed to the next mesh point.<br />

✫<br />

✪<br />

Let us proceed by implementing an equation-specific solution for the implicit DAE<br />

A ′ = −αAE + βX (9.154)<br />

B ′ = γX (9.155)<br />

X ′ = αAE − (γ + β)X (9.156)<br />

0 = E + X − 1 (9.157)<br />

Using the backward Euler method, the iteration formulas are<br />

0 = F 1 (A n , B n , X n , E n ) = 1 h (A n − A n−1 ) + αA n E n − βX n (9.158)<br />

0 = F 2 (A n , B n , X n , E n ) = 1 h (B n − B n−1 ) − γX n (9.159)<br />

0 = F 3 (A n , B n , X n , E n ) = 1 h (X n − X n−1 ) − αA n E n + (γ + β)X n (9.160)<br />

0 = F 4 (A n , B n , X n , E n ) = E n + X n − 1 (9.161)<br />

We need to solve this explicitly at each time-step for the values of A n , B n , E n , X n ;<br />

Math 582B, Spring 2007<br />

California State University Northridge<br />

c○2007, B.E.<strong>Shapiro</strong><br />

Last revised: May 23, 2007

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

Saved successfully!

Ooh no, something went wrong!