28 Example 6
28.1 Introduction
Example from [1] equation (3.1)–(3.3)
\left\{ \begin{aligned} y' &= t-x \\ y'+z' &= 1 - (\alpha x+\eta) y \\ 0 &=y(2-y)+2z \end{aligned} \right.
Semi-Explicit Formulation
For the previous DAE system introduce dummy variable x_{\text{dot}} and the system decomposes into differential (blue) and algebraic (red) components:
\left\{ \color{blue} \begin{aligned} x' &= x_{\text{dot}}\\ y' &= t-x \\ z' &= 1-t+x - (\alpha x+\eta)y \end{aligned} \right. \quad \bigoplus \quad \color{DarkRed} 0 = y(1-y/2)+z \qquad \text{(Constraint 1)}
For this DAE we have:
- Differential variables: x, y, z.
- Algebraic variables: x_{\text{dot}}.
Index Reduction Procedure
We attempt to solve for x_{\text{dot}}, but the system is not yet solvable explicitly. We proceed by differentiating.
Step 1: Differentiate algebraic constraints
Differentiate the constraint
\begin{aligned} \text{(Constraint 1)}' &= 1 - yy'+z' \\ &= 1 - y(t-x)+1-t+x - (\alpha x+\eta)y\\ &= 2 + (x-t)(y+1) - (\alpha x+\eta)y \end{aligned}
so that the DAE become:
\left\{ \color{blue} \begin{aligned} x' &= x_{\text{dot}}\\ y' &= t-x \\ z' &= 1-t+x - (\alpha x+\eta)y \end{aligned} \right. \quad \bigoplus \quad \left\{ \color{DarkRed} \begin{aligned} 0 & = 2 + (x-t)(y+1) - (\alpha x+\eta)y & \text{(Constraint 1)}' \\[1em] \color{DarkGreen} 0 & \color{DarkGreen} = y(1-y/2)+z & \color{DarkGreen}\text{(Constraint 1)}\\ \end{aligned} \right.
The red algebraic equations are the new algebraic equation after the derivation. The green algebraic equation is the hidden constraints that is removed from the DAE system but that is satisfied by choosing the right initial conditions.
The red part cannot determine x_{\text{dot}} the algebraic variable must be differentiated again.
Step 2: Differentiate (again) the algebraic constraint
\begin{aligned} \text{(Constraint 1)}'' &= (x'-1)(y+1)+(x-t)y'-\alpha(x'y+xy')+\eta y' \\ &= (x_{\text{dot}}-1)(y+1)+(x-t)(t-x)-\alpha(x_{\text{dot}}y+x(t-x))+\eta(t-x) \\ &= x_{\text{dot}}(y(1-\alpha)+1) -y-1-(x-t)^2+(\alpha x+\eta)(t-x) = 0 \end{aligned}
The dummy variable x_{\text{dot}} can be solved:
x_{\text{dot}} = \dfrac{y+1+(x-t+\alpha x+\eta)(x-t)}{y(1-\alpha)+1}
and the DAE is reduced to an index-1 DAE. Having done two derivation of the constraint the original DAE was of index 3. Removing the dummy variable we can obtain an ODE with invariants:
\left\{ \color{blue} \begin{aligned} x' &= \dfrac{y+1+(x-t+\alpha x+\eta)(x-t)}{y(1-\alpha)+1}\\ y' &= t-x \\ z' &= 1-t+x - (\alpha x+\eta)y \end{aligned} \right. \quad \bigoplus \quad \left\{ \color{DarkGreen} \begin{aligned} 0 & = 2 + (x-t)(y+1) - (\alpha x+\eta)y & \text{(Constraint 1)}' \\[1em] 0 & = y(1-y/2)+z & \text{(Constraint 1)} \end{aligned} \right.
28.2 Baumgarte Stabilization
As usual we want to stabilize the constraints to avoid the drift on the hidden constraints:
\text{(Constraints 1)}''+{\color{DarkOrange}2\eta\omega}\text{(Constraints 1)}' +{\color{DarkOrange}\omega^2}\text{(Constraints 1)}=0
and substituting the expression
\begin{aligned} & x_{\text{dot}}(y(1-\alpha)+1) -y-1-(x-t)^2+(\alpha x+\eta)(t-x) \\ & +{\color{DarkOrange}2\eta\omega}(2 + (x-t)(y+1) - (\alpha x+\eta)y) \\ & +{\color{DarkOrange}\omega^2}(y(1-y/2)+z)=0 \end{aligned}
so that
\begin{aligned} x_{\text{dot}} & = f(x,y,z) \\ f(t,x,y,z) & = \dfrac{a(t,x,y,z) -{\color{DarkOrange}2\eta\omega}b(t,x,y,z) -{\color{DarkOrange}\omega^2} c(t,x,y,z) }{y(1-\alpha)+1} \\ a(t,x,y,z) &= y+1+(x-t+\alpha x+\eta)(x-t) \\ b(t,x,y,z) &= 2 + (x-t)(y+1) - (\alpha x+\eta)y \\ c(t,x,y,z) &= y(1-y/2)+z \end{aligned}
and the stabilized ODE become
\left\{ \color{blue} \begin{aligned} x' &= f(t,x,y,z)\\ y' &= t-x \\ z' &= 1-t+x - (\alpha x+\eta)y \end{aligned} \right. \quad \bigoplus \quad \left\{ \color{DarkGreen} \begin{aligned} 0 & = 2 + (x-t)(y+1) - (\alpha x+\eta)y & \text{(Constraint 1)}' \\[1em] 0 & = y(1-y/2)+z & \text{(Constraint 1)} \end{aligned} \right.