Engee documentation

Solver Configuration

Configuration of the solver and environment for the physical model.

blockType: SolverConfiguration

Path in the library:

/Physical Modeling/Utilities/Solver Configuration

Description

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

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

Ports

Conserving

# Port_1 — connection port
untyped port

Details

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

Program usage name

Port

Parameters

Block behavior when the parameter is enabled Experimental settings not guaranteed and not described in the documentation.

If there are only discrete directional blocks on the canvas (without blocks from the library Physical Modeling) the global solver automatically switches to discrete mode (parameter Synchronization type set to value Discrete), even if Variable-Step is specified in the settings.

If at the same time in the block Solver Configuration for the parameter Solver type value selected Inherit global, and the model contains blocks from the library Physical Modeling (requiring a continuous solver), then an execution error will occur: the discrete solver does not support the calculation of such blocks.

To avoid errors, it is not recommended to use the value Inherit global for the parameter Solver type if discrete directional blocks and blocks from the library are simultaneously present in the model Physical Modeling.

Main

# Synchronization type — the type of synchronization of a physical model with a model consisting of directional blocks
Continuous | Discrete

Details

The type of synchronization of a physical model with a model consisting of directional blocks. Set 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 equations of the physical model
Inherit global | Fixed-step | Variable-step

Details

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

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous.

Values

Inherit global | Fixed-step | Variable-step

Default value

Variable-step

Program usage name

SolverType

Evaluatable

No

# Subsystem solver — the name of the solver to use with continuous synchronization
FBDF | ImplicitEuler | QNDF | QBDF | RadauIIA5 | Rodas3 | Rodas4 | Rodas5 | Rodas5P | Trapezoid

Details

The name of the solver to use with continuous synchronization for the physical model. Set as:

  • FBDF

  • ImplicitEuler

  • QNDF

  • QBDF

  • RadauIIA5

  • Rodas3

  • Rodas4

  • Rodas5

  • Rodas5P

  • Trapezoid

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous.

Values

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

Default value

Rodas4

Program usage name

SolverBasic

Evaluatable

No

# Subsystem solver — the name of the solver to use with discrete synchronization
ImplicitEuler (Fast) | ImplicitEuler (Robust) | Trapezoid (Fast) | Trapezoid (Robust)

Details

The name of the solver to use with discrete synchronization for the physical model. Set as:

  • ImplicitEuler (Fast)

  • ImplicitEuler (Robust)

  • Trapezoid (Fast)

  • Trapezoid (Robust)

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Discrete.

Values

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

Default value

ImplicitEuler (Fast)

Program usage name

SolverDiscreteChoice

Evaluatable

No

# Fixed step size — the size of the integration step
String

Details

The size of the integration step of the local solver for the physical model in continuous synchronization mode.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous and for Solver type meaning Fixed-step.

Default value

auto

Program usage name

FixedStepSize

Evaluatable

Yes

# Initial step size — the initial size of the integration step
String

Details

The initial step size of the integration of the local solver for the physical model in continuous synchronization mode.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous and for Solver type meaning Variable-step.

Default value

auto

Program usage name

InitialStepSize

Evaluatable

Yes

# Minimum step size — minimum size of the integration step
String

Details

The minimum step size of the integration of the local solver for the physical model in continuous synchronization mode.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous and for Solver type meaning Variable-step.

Default value

auto

Program usage name

MinimumStepSize

Evaluatable

Yes

# Maximum step size — maximum size of the integration step
String

Details

The maximum step size of the integration of the local solver for the physical model in continuous synchronization mode.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous and for Solver type meaning Variable-step.

Default value

auto

Program usage name

MaximumStepSize

Evaluatable

Yes

# Number of consecutive min steps — the maximum number of consecutive minimum integration steps
String

Details

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

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous and for Solver type meaning Variable-step.

Default value

10

Program usage name

MaxConsecutiveMinStep

Evaluatable

Yes

# Absolute tolerance — absolute accuracy
String

Details

Together with the relative accuracy, they affect the proximity of numerical and exact solutions. If a variable in the physical model is modulo less than this setpoint, the local error estimate for this variable is considered zero.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous and for Solver type meaning Variable-step.

Default value

auto

Program usage name

AbsoluteTolerance

Evaluatable

Yes

# Relative tolerance — relative accuracy
String

Details

Together with absolute accuracy, they affect the proximity of numerical and exact solutions. The relative accuracy determines the allowable local error relative to the value of the variable itself in the physical model.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous and for Solver type meaning Variable-step.

Default value

auto

Program usage name

RelativeTolerance

Evaluatable

Yes

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

Details

The number of iterations of the solver of systems of nonlinear algebraic equations resulting from the discretization of the original problem. Allows you to limit the computational costs per integration step in discrete synchronization mode. It is usually used for real-time calculations.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Discrete and for Subsystem solver meaning ImplicitEuler (Fast) or Trapezoid (Fast).

Default value

10

Program usage name

NonlinearIterations

Evaluatable

Yes

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

Details

By default, when this checkbox is unchecked, the simulation starts with a certain mode, generally a transitional one, which is determined as a result of solving the initialization problem.

When you check this box, Engee tries to find the steady-state mode that the physical model would have reached if the signals at its input had remained constant for a sufficiently long time (to be configured separately). Then the simulation starts with the found steady state.

Default value

false (switched off)

Program usage name

StartFromSteadyState

Evaluatable

No

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

Details

Select this option 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 option to use the analytically obtained 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

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

Default value

false (switched off)

Program usage name

SparseJacobian

Evaluatable

No

# Fixed Sparse Jacobianthe description is missing
Logical

Details

The description is missing.

Default value

false (switched off)

Program usage name

FixedSparseJacobian

Evaluatable

No

# Event detection — Event detection mode in the physical model
Enable | Expose discontinuities to solver | Disable

Details

Event detection mode in the physical model. Set as:

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

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

  • Disable - a mode in which events are not localized, but gaps are still masked from the continuous solver.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning 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 during simulation
Logical

Details

Select this option to enable physical invariant checks during the simulation.

Default value

false (switched off)

Program usage name

RunTimeAssertions

Evaluatable

No

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

Details

Defines the time points at which the inputs and outputs of the physical model are sampled.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Discrete.

Default value

0.001

Program usage name

SampleTime

Evaluatable

Yes

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

Details

The synchronization interval of the local solver of the physical model with the solver of the enclosing model, specified as a positive scalar. Increasing the interval speeds up the calculation by reducing its quality.

For more information about configuring the solver, see Local solvers for physical networks.

Dependencies

To use this parameter, set for the parameter Synchronization type meaning Continuous.

Default value

0.001

Program usage name

SynchronizationInterval

Evaluatable

Yes

Initialization

# Enable experimental DAE initialization algorithm — using an experimental initialization algorithm for differential algebraic systems of equations
Logical

Details

Check this box (recommended) to use an experimental algorithm for initializing differential algebraic systems of equations. Disabling the algorithm leads to ignoring the priorities of variables.

Default value

true (switched on)

Program usage name

InitializationEnabled

Evaluatable

No