|
1 | 1 | classdef AscherLinearDAEProblem < otp.Problem |
2 | 2 | % A simple linear differential algebraic problem. |
3 | 3 | % |
4 | | - % The Ascher linear DAE Problem :cite:p:`Asc89` is given by $M(t) y' = A(t) y + q(t) $ with |
| 4 | + % The Ascher linear DAE Problem :cite:p:`Asc89` is an index-1 differential agebraic |
| 5 | + % equation given by $M(t) y' = A(t) y + q(t) $ where |
5 | 6 | % |
6 | 7 | % $$ |
7 | 8 | % M=\left(\begin{array}{cc} |
|
16 | 17 | % \end{array}\right), |
17 | 18 | % $$ |
18 | 19 | % |
19 | | - % with $t \in [0,1]$, and $y_0 = [1, \beta]^T$. The exact solution |
| 20 | + % defined on timespan $t \in [0,1]$, and initial condition $y_0 = [1, \beta]^T$. The exact solution |
20 | 21 | % is given by |
21 | 22 | % |
22 | 23 | % $$ |
|
27 | 28 | % $$ |
28 | 29 | % |
29 | 30 | % 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. |
| 31 | + % matrix, this simple DAE problem can |
| 32 | + % become challenging to solve. This problem is introduced in :cite:p:`Asc89` |
| 33 | + % to study the convergence of implcit solvers applied to DAEs. |
33 | 34 | % |
34 | 35 | % Notes |
35 | 36 | % ----- |
|
43 | 44 | % |
44 | 45 | % Example |
45 | 46 | % ------- |
46 | | - % >>> problem = otp.ascherlineardae.presets.Canonical; |
47 | | - % >>> sol = problem.solve(); |
| 47 | + % >>> problem = otp.ascherlineardae.presets.Canonical(0.1); |
| 48 | + % >>> sol = problem.solve('MaxStep',1e-5); |
48 | 49 | % >>> problem.plotPhaseSpace(sol); |
49 | | - % |
| 50 | + |
| 51 | + properties (Access = private, Constant) |
| 52 | + NumComps = 2 |
| 53 | + VarNames = 'yz' |
| 54 | + end |
| 55 | + |
50 | 56 | methods |
51 | 57 | function obj = AscherLinearDAEProblem(timeSpan, y0, parameters) |
52 | 58 | % Create an Ascher linear DAE problem object. |
|
57 | 63 | % The start and final time. |
58 | 64 | % y0 : numeric(2, 1) |
59 | 65 | % The initial conditions. |
60 | | - % parameters : BrusselatorParameters |
| 66 | + % parameters : AscherLinearDAEParameters |
61 | 67 | % The parameters. |
62 | 68 | % |
63 | 69 | % Returns |
64 | 70 | % ------- |
65 | | - % obj : BrusselatorProblem |
| 71 | + % obj : AscherLinearDAEProblem |
66 | 72 | % The constructed problem. |
67 | 73 | obj@otp.Problem('Ascher Linear DAE', 2, timeSpan, y0, parameters); |
68 | 74 | end |
|
0 commit comments