pymloc.model.dynamical_system.dae

Classes

DAE(variables, n)

Base class for differential algebraic systems.

LinearDAE(variables, e, a, f, n[, der_e, …])

Class for linear differential algebraic equations of the form

class pymloc.model.dynamical_system.dae.DAE(variables, n)

Bases: object

Base class for differential algebraic systems.

Currently, only the linear case is functional.

Parameters
property index

differentiation index of the DAE.

Currently only support strangeness-free DAEs, i.e. differentiation index of up to 1.

Type

index

property nm

number of variables

Type

nm

property nn

number of equations

Type

nn

property variables

Variables instance

Type

variables

class pymloc.model.dynamical_system.dae.LinearDAE(variables, e, a, f, n, der_e=None, constant_coefficients=True)

Bases: pymloc.model.dynamical_system.dae.DAE

Class for linear differential algebraic equations of the form

\[E\dot{x} = Ax + f\]

or

\[E\frac{\mathrm d}{\mathrm dt}(E^+E{x}) = Ax + f.\]

All coefficients are assumed sufficiently smooth. The system is assumed to be strangeness-free. All quantities according to the definitions in Kunkel, Mehrmann (2006).

Parameters
  • variables (pymloc.model.variables.container.StateVariablesContainer) –

  • e (Callable[[float], numpy.ndarray]) –

  • a (Callable[[float], numpy.ndarray]) –

  • f (Callable[[float], numpy.ndarray]) –

  • n (int) –

  • der_e (Optional[Callable[[float], numpy.ndarray]]) –

  • constant_coefficients (bool) –

a(t)

Computes \(A(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

ahat_1(t)

Computes the reduced system matrix \(\hat A_1(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

ahat_2(t)

Computes the reduced system matrix \(\hat A_2(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

property constant_coefficients

Describes, whether we have a constant (in time) coefficients system.

If True, many computations are only necessary once.

Type

bool

der_e(t)

Returns the derivative \(\dot{E}(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

e(t)

Computes \(E(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

ehat_1(t)

Computes the reduced system matrix \(\hat E_1(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

ehat_2(t)

Computes the reduced system matrix \(\hat E_2(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

eplus(t)

Computes the pseudo inverse \(E^+(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

f(t)

Computes \(f(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

fhat_1(t)

Computes the reduced system matrix \(\hat{f}_1(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

fhat_2(t)

Computes the reduced system matrix \(\hat{f}_2(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

init_rank()

Computes rank initially.

Return type

None

property rank

Describes the rank of the matrix E and is assumed to be constant.

Type

int

reset()

Resets all DAE objects. Removes stored current values.

Return type

None

t2(t)

Computes the selector matrix \(T_2(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

t2prime(t)

Computes the selector matrix \(T_2^{\prime}(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

z1(t)

Computes the selector matrix \(Z_1(t)\).

Parameters

t (float) –

Return type

numpy.ndarray

z1prime(t)

Computes the selector matrix \(Z_1^{\prime}(t)\).

Parameters

t (float) –

Return type

numpy.ndarray