|
1 | 1 | classdef AscherLinearDAEProblem < otp.Problem |
2 | | - %ASCHERLINEARDAEPROBLEM This is an Index-1 DAE problem |
| 2 | + % A simple linear differential algebraic problem. |
| 3 | + % |
| 4 | + % The Ascher linear DAE Problem :cite:p:`Asc89` is given by $M(t) y' = A(t) y + q(t) $ with |
| 5 | + % |
| 6 | + % $$ |
| 7 | + % M=\left(\begin{array}{cc} |
| 8 | + % 1 & -t \\ |
| 9 | + % 0 & 0 |
| 10 | + % \end{array}\right), \quad A=\left(\begin{array}{cc} |
| 11 | + % -1 & 1+t \\ |
| 12 | + % \beta & -1-\beta t |
| 13 | + % \end{array}\right), \quad {q}=\left(\begin{array}{c} |
| 14 | + % 0 \\ |
| 15 | + % \sin t |
| 16 | + % \end{array}\right), |
| 17 | + % $$ |
| 18 | + % |
| 19 | + % with $t \in [0,1]$, and $y_0 = [1, \beta]^T$. The exact solution |
| 20 | + % is given by |
| 21 | + % |
| 22 | + % $$ |
| 23 | + % y = \begin{pmatrix} |
| 24 | + % t \sin(t) + (1 + \beta t) e^{-t}\\ |
| 25 | + % \beta e^{-t} + \sin(t) |
| 26 | + % \end{pmatrix}. |
| 27 | + % $$ |
| 28 | + % |
| 29 | + % Due to its stiffness and time-dependant mass |
| 30 | + % matrix and righ-hand-side function, this simple DAE problem can |
| 31 | + % become challenging to solve. This problem is used in :cite:p:`Asc89` |
| 32 | + % to study convergence of implcit solvers. |
| 33 | + % |
| 34 | + % Notes |
| 35 | + % ----- |
| 36 | + % +---------------------+-----------------------------------------+ |
| 37 | + % | Type | DAE | |
| 38 | + % +---------------------+-----------------------------------------+ |
| 39 | + % | Number of Variables | 2 | |
| 40 | + % +---------------------+-----------------------------------------+ |
| 41 | + % | Stiff | typically, depending on $\beta$ | |
| 42 | + % +---------------------+-----------------------------------------+ |
| 43 | + % |
| 44 | + % Example |
| 45 | + % ------- |
| 46 | + % >>> problem = otp.ascherlineardae.presets.Canonical; |
| 47 | + % >>> sol = problem.solve(); |
| 48 | + % >>> problem.plotPhaseSpace(sol); |
3 | 49 | % |
4 | 50 | methods |
5 | 51 | function obj = AscherLinearDAEProblem(timeSpan, y0, parameters) |
| 52 | + % Create an Ascher linear DAE problem object. |
| 53 | + % |
| 54 | + % Parameters |
| 55 | + % ---------- |
| 56 | + % timeSpan : numeric(1, 2) |
| 57 | + % The start and final time. |
| 58 | + % y0 : numeric(2, 1) |
| 59 | + % The initial conditions. |
| 60 | + % parameters : BrusselatorParameters |
| 61 | + % The parameters. |
| 62 | + % |
| 63 | + % Returns |
| 64 | + % ------- |
| 65 | + % obj : BrusselatorProblem |
| 66 | + % The constructed problem. |
6 | 67 | obj@otp.Problem('Ascher Linear DAE', 2, timeSpan, y0, parameters); |
7 | 68 | end |
8 | 69 | end |
@@ -35,4 +96,3 @@ function onSettingsChanged(obj) |
35 | 96 | end |
36 | 97 | end |
37 | 98 | end |
38 | | - |
|
0 commit comments