The simple pendulum problem in natural coordinates:
>
|
|
| (1) |
>
|
|
| (2) |
| (3) |
Compare with projection=false:
>
|
|
| (5) |
| (6) |
>
|
|
| (7) |
Compare time with differential=true:
>
|
|
| (9) |
| (10) |
>
|
|
| (11) |
The Chemical Akzo Nobel problem
This DAE system describes a chemical process in which FLB and ZHU are mixed while carbon dioxide is added over time. The ZLA concentration is of interest.
The rate equations for each reaction are given by:
>
|
|
The carbon dioxide inflow is governed by
>
|
|
The concentrations are described by the following differential equations
>
|
|
and the Initial values are given by:
>
|
|
The parameters are as follows:
>
|
|
To begin, we apply the parameters to the rates and inflow:
>
|
|
>
|
|
then pass all equations and initial conditions to dsolve with moderately tight tolerances choosing the rosenbrock_dae method, as the problem is known to be stiff:
>
|
|
| (13) |
The period of interest is t=0..180, but the CO2 concentration shows some interesting behavior in the first 0.5s:
>
|
|
The values at t=180 show perfect comparison to the 6-digit accurate benchmark results (CO2(180)=1.20383e-3, ZLA(180)=1.70801e-2):
>
|
|
| (14) |
And we plot the CO2 and ZLA concentrations as a function of time over the entire range of interest (adjusting CO2 by a factor of 10 for scale):
>
|
|