cosapp.drivers.time.implicit

Classes

ImplicitTimeDriver([name, owner, ...])

Abstract base class for implicit integrators.

class cosapp.drivers.time.implicit.ImplicitTimeDriver(name='Implicit time driver', owner: System | None = None, time_interval: tuple[float, float] | None = None, dt: float | None = None, record_dt: bool = False, **options)[source]

Bases: AbstractTimeDriver

Abstract base class for implicit integrators.

add_equation(equation: str, *args, **kwargs)[source]

Add an equation to the design problem.

Parameters:
  • equation (str) – Equation of the kind lhs == rhs.

  • *args – Additional arguments forwarded to the equation.

  • **kwargs – Additional arguments forwarded to the equation.

Returns:

`MathematicalProblem`

Return type:

design problem of the driver.

add_problem(problem: MathematicalProblem, copy=False)[source]

Add a mathematical problem to the design problem.

Parameters:
  • problem (MathematicalProblem) – Problem to add.

  • copy (bool) – If True, the problem is copied before being added.

Returns:

`MathematicalProblem`

Return type:

design problem of the driver.

add_unknown(name: str, *args, **kwargs)[source]

Add an unknown variable to the design problem.

Parameters:
  • name (str) – Name of the unknown variable to add.

  • *args – Additional arguments forwarded to the unknown.

  • **kwargs – Additional arguments forwarded to the unknown.

Returns:

`MathematicalProblem`

Return type:

design problem of the driver.

clear_problem() None[source]

Clear the design problem associated to the driver (if any).

is_standalone() bool[source]

Is this Driver able to solve a system?

Returns:

Ability to solve a system or not.

Return type:

bool

property problem

Mathematical problem handled by the driver, gathering the intrinsic problem of the owner system and its transient variables.

setup_run() None[source]

Setup the driver once before starting the simulation and before calling the systems setup_run.