Ascher Linear DAE

class otp.ascherlineardae.AscherLinearDAEProblem

Bases: otp.Problem

A linear differential-algebraic problem with a time-dependant mass matrix.

The Ascher linear DAE problem [Asc89] is an index-1 differential-agebraic equation given by

\[\begin{split} \begin{bmatrix} 1 & -t \\ 0 & 0 \end{bmatrix} \begin{bmatrix} y'(t) \\ z'(t) \end{bmatrix} = \begin{bmatrix} -1 & 1+t \\ β & -1-β t \end{bmatrix} \begin{bmatrix} y(t) \\ z(t) \end{bmatrix} + \begin{bmatrix} 0 \\ \sin(t) \end{bmatrix}. \end{split}\]

When the initial condition \(y(0) = 1 , z(0) = β\) is used, the problem has the following closed-form solution:

\[\begin{split} \begin{bmatrix} y(t)\\ z(t) \end{bmatrix} = \begin{bmatrix} t \sin(t) + (1 + β t) e^{-t}\\ β e^{-t} + \sin(t) \end{bmatrix}. \end{split}\]

This DAE problem can be used to investigate the convergence of implcit time-stepping methods due to its stiffness and time-dependant mass matrix.

Notes

Type

DAE

Number of Variables

2

Stiff

possibly, depending on \(β\)

Example

>>> problem = otp.ascherlineardae.presets.Canonical('Beta', 50);
>>> t = linspace(0, 1);
>>> sol = problem.solveExactly(t);
>>> problem.plot(t, sol);
Constructor Summary
AscherLinearDAEProblem(timeSpan, y0, parameters)

Create an Ascher linear DAE problem object.

Parameters:
  • timeSpan (numeric(1, 2)) – The start and final time.

  • y0 (numeric(2, 1)) – The initial condition.

  • parameters (AscherLinearDAEParameters) – The parameters.

Parameters

class otp.ascherlineardae.AscherLinearDAEParameters

Bases: otp.Parameters

Parameters for Ascher linear DAE problem.

Constructor Summary
AscherLinearDAEParameters(varargin)

Create a Ascher linear DAE parameters object.

Parameters:

varargin – A variable number of name-value pairs. A name can be any property of this class, and the subsequent value initializes that property.

Property Summary
Beta

A scalar parameter \(β\) in the linear model. It affects the stifness of the problem.

Presets

class otp.ascherlineardae.presets.Canonical

Bases: otp.ascherlineardae.AscherLinearDAEProblem

The problem defined by Ascher in [Asc89] (sec. 2) which uses time span \(t ∈ [0, 1]\) and intial condition \([y_0, z_0]^T = [1, β]^T\).

Constructor Summary
Canonical(varargin)

Create the canonical Ascher linear DAE problem object.

Parameters:

varargin

A variable number of name-value pairs. The accepted names are

  • Beta – Value of \(β\).

class otp.ascherlineardae.presets.Stiff

Bases: otp.ascherlineardae.AscherLinearDAEProblem

The stiff example from [Asc89]. It is a variant of the Ascher linear DAE problem which uses time span \(t ∈ [0, 1]\) and \(β = 100\) with the initial condition \([y_0, z_0]^T = [1, 100]^T\).

Constructor Summary
Stiff()

Create the stiff Ascher linear DAE problem object.

class otp.ascherlineardae.presets.Petzold

Bases: otp.ascherlineardae.AscherLinearDAEProblem

The Petzold DAE example [Pet86] is a special case of the Ascher linear DAE problem. This preset uses time span \(t ∈ [0, 1]\) and \(β = 0 \) with the initial condition \([y_0, z_0]^T = [1, 0]^T\).

Constructor Summary
Petzold()

Create the Petzold–Ascher linear DAE problem object.