Engee documentation

Solver Configuration

Solver and environment configuration for the physical network.

solver configuration

Description

Each physical network in the Engee model requires information about the solver settings for the simulation. The Solver Configuration block specifies the solver parameters to be applied to the physical network.

Each topologically distinct network requires one and only one Solver Configuration block to be connected to it.

Ports

Conserving

# Port_1 — connection port
untyped port

Details

This port has no type. You can connect it anywhere on the physical network by creating a branch point on the link between ports of any type. The block provides solver configuration for the entire physical network, regardless of the connection type.

Program usage name

Port

Parameters

The behaviour of the block when the Experimental settings parameters are enabled is not guaranteed and is not described in the documentation.

Main

# Synchronization type — type of synchronisation of the physical network with the volumetric model
Continuous | Discrete

Details

The type of synchronisation of the physical network with the volumetric model. Defined as:

  • Continuous.

  • Discrete

For more information, see Local solvers for physical networks.

Values

Continuous | Discrete

Default value

Continuous

Program usage name

SynchronizationType

Evaluatable

No

# Solver type — the type of solver used to solve the physical network equations
Inherit global | Fixed-step | Variable-step

Details

Specifies the type of solver used to solve the physical network equations.

Dependencies

To use this parameter, set the Synchronisation type parameter to Continuous.

Values

Inherit global | Fixed-step | Variable-step

Default value

Variable-step

Program usage name

SolverType

Evaluatable

No

# Subsystem solver — solver name for usage with continuous synchronisation
FBDF | ImplicitEuler | QNDF | QBDF | RadauIIA5 | Rodas3 | Rodas4 | Rodas5 | Rodas5P | Trapezoid

Details

Solver name for usage with continuous synchronisation for the physical network. Defined as:

  • FBDF.

  • ImplicitEuler.

  • QNDF.

  • `QBDF

  • `RadauIIA5

  • Rodas3

  • `Rodas4

  • `Rodas5

  • `Rodas5P

  • `Trapezoid

Dependencies

To use this parameter, set the Synchronisation type parameters to Continuous.

Values

FBDF | ImplicitEuler | QNDF | QBDF | RadauIIA5 | Rodas3 | Rodas4 | Rodas5 | Rodas5P | Trapezoid

Default value

Rodas4

Program usage name

SolverBasic

Evaluatable

No

# Subsystem solver — solver name for usage with discrete synchronisation
ImplicitEuler (Fast) | ImplicitEuler (Robust) | Trapezoid (Fast) | Trapezoid (Robust)

Details

Solver name for usage with discrete synchronisation for the physical network. Defined as:

  • ImplicitEuler (Fast).

  • ImplicitEuler (Robust).

  • `Trapezoid (Fast)

  • Trapezoid (Robust)

Dependencies

To use this parameter, set the Synchronisation type parameters to Discrete.

Values

ImplicitEuler (Fast) | ImplicitEuler (Robust) | Trapezoid (Fast) | Trapezoid (Robust)

Default value

ImplicitEuler (Fast)

Program usage name

SolverDiscreteChoice

Evaluatable

No

# Fixed step size — integration step size
String

Details

Integration step size of local solver for physical network in continuous synchronisation mode.

Dependencies

To use this parameter, set the Synchronisation type parameters to Continuous and the Solver type to Fixed-step.

Default value

auto

Program usage name

FixedStepSize

Evaluatable

Yes

# Initial step size — initial integration step size
String

Details

Initial integration step size of the local solver for the physical network in continuous synchronisation mode.

Dependencies

To use this parameter, set the Synchronisation type parameters to Continuous and the Solver type to Variable-step.

Default value

auto

Program usage name

InitialStepSize

Evaluatable

Yes

# Minimum step size — minimum integration step size
String

Details

Minimum integration step size of the local solver for a physical network in continuous synchronisation mode.

Dependencies

To use this parameter, set the Synchronisation type parameters to Continuous and the Solver type to Variable-step.

Default value

auto

Program usage name

MinimumStepSize

Evaluatable

Yes

# Maximum step size — maximum integration step size
String

Details

Maximum integration step size of the local solver for a physical network in continuous synchronisation mode.

Dependencies

To use this parameter, set the Synchronisation type parameters to Continuous and the Solver type to Variable-step.

Default value

auto

Program usage name

MaximumStepSize

Evaluatable

Yes

# Number of consecutive min steps — limit number of consecutive minimum integration steps
String

Details

Number of consecutive integration steps less than or equal to the minimum allowed step size, leading to forced termination of the calculation with an error message.

Dependencies

To use this parameter, set the Synchronisation type parameter to Continuous and the Solver type to Variable-step.

Default value

10

Program usage name

MaxConsecutiveMinStep

Evaluatable

Yes

# Absolute tolerance — absolute precision
String

Details

Together with relative accuracy, affect the closeness of the numerical and exact solutions. If a variable in the physical network is modulo less than this setpoint, the local error estimate for that variable is considered to be zero.

Dependencies

To use this parameter, set the Synchronisation type parameter to Continuous and the Solver type to Variable-step.

Default value

auto

Program usage name

AbsoluteTolerance

Evaluatable

Yes

# Relative tolerance — relative accuracy
String

Details

Together with absolute precision, affect the closeness of the numerical and exact solutions. Relative accuracy defines the allowable local error with respect to the variable value itself in the physical network.

Dependencies

To use this parameter, set the Synchronisation type parameters to Continuous and the Solver type to Variable-step.

Default value

auto

Program usage name

RelativeTolerance

Evaluatable

Yes

# Nonlinear iterations — maximum number of iterations of the nonlinear solver
String

Details

Number of iterations of the solver of systems of nonlinear algebraic equations resulting from discretisation of the initial problem. Allows to limit the computational cost per integration step in discrete synchronisation mode. Usually used for real-time calculations.

Dependencies

To use this parameter, set the Synchronisation type parameters to Discrete and the Subsystem solver to ImplicitEuler (Fast) or Trapezoid (Fast).

Default value

10

Program usage name

NonlinearIterations

Evaluatable

Yes

# Start simulation from steady state — running the simulation in transient or steady-state mode
Logical

Details

By default, when this checkbox is unchecked, the simulation starts with some mode, generally a transient mode, which is determined as a result of the initialisation task.

When you select this checkbox, Engee tries to find a steady state that the physical network would arrive at if the signals at its input remained constant for a sufficiently long time (configurable separately). The simulation then starts from the found steady state.

Default value

false (switched off)

Program usage name

StartFromSteadyState

Evaluatable

No

# Maximum settling time — limiting modelling time of steady state search
String

Details

Limit modelling time up to which the steady state search is attempted.

Dependencies

To use this parameter, select the Start simulation from steady state parameters check box.

Default value

1000.0

Program usage name

MaximumSettlingTime

Evaluatable

Yes

# Use automatic differentiation (ForwardDiff.jl) — use automatic differentiation or finite differences when calculating the Jacobi matrix
Logical

Details

Select this check box to use automatic differentiation when calculating the Jacobi matrix. Otherwise, finite differences will be used.

Default value

true (switched on)

Program usage name

AutomaticDifferentiation

Evaluatable

No

# Use analytical Jacobian — use the analytically obtained Jacobi matrix in calculations
Logical

Details

Select this checkbox to use the analytically derived Jacobi matrix in calculations. Otherwise it will be calculated numerically.

Default value

false (switched off)

Program usage name

AnalyticalJacobian

Evaluatable

No

# Sparse Jacobian — storing the Jacobi matrix in sparse form
Logical

Details

Select this checkbox to use sparse algebra when working with the Jacobi matrix. Otherwise its sparsity will not be taken into account in calculations.

Default value

false (switched off)

Program usage name

SparseJacobian

Evaluatable

No

# Event detection — Physical network event detection mode
Enable | Expose discontinuities to solver | Disable

Details

The event detection mode of the physical network. Defined as:

  • Enable (recommended) - a mode in which events are localised by a special algorithm.

  • Expose discontinuities to solver - mode in which a problem with discontinuous right-hand side is solved.

  • Disable - mode in which events are not localised, but discontinuities are still masked from the continuous solver.

Dependencies

To use this parameter, set the Synchronisation type parameter to Continuous.

Values

Enable | Expose discontinuities to solver | Disable

Default value

Enable

Program usage name

EventDetection

Evaluatable

No

# Run-time assertions — performing checks of physical invariants in the simulation process
Logical

Details

Select this checkbox to enable physical invariant checks during simulation.

Default value

false (switched off)

Program usage name

RunTimeAssertions

Evaluatable

No

# Sample time — sampling interval of the physical network
SampleTime (real number / vector of two real numbers)

Details

Defines the moments of time at which the inputs and outputs of the physical network are sampled.

Dependencies

To use this parameter, set the Synchronisation type parameters to Discrete.

Default value

0.001

Program usage name

SampleTime

Evaluatable

Yes

# Synchronization Interval — synchronisation interval of the local solver of the physical network with the solver of the volumetric model
SampleTime (real number / vector of two real numbers)

Details

Synchronisation interval of the local solver of the physical network with the solver of the volumetric model, specified as a positive scalar. Increasing the interval leads to speeding up the calculation at the expense of reducing its quality.

For more information on solver setup, see Local solvers for physical networks.

Dependencies

To use this parameter, set the Synchronisation type parameters to Continuous.

Default value

0.001

Program usage name

SynchronizationInterval

Evaluatable

Yes

Initialization

# Enable experimental DAE initialization algorithm — usage of an experimental algorithm for initialisation of differential-algebraic systems of equations
Logical

Details

Select this check box (recommended) to use the experimental algorithm for initialising differential-algebraic systems of equations. Disabling the algorithm causes variable priorities to be ignored.

Default value

true (switched on)

Program usage name

InitializationEnabled

Evaluatable

No