Simulation Configuration
Description of available configuration item to build AbstractSimulation object from a configuration file.
Forward Simulation
Class:
ForwardSimulationType name:
forward_simulation
Parameters
solver: The solver configuration item
net: The net configuration item
time: The time manager item
variables_magnitudes: Mapping of the
floatmagnitude of the state variablesvariables_initialization: Mapping of the state variables quantity initialization. It accepts:
float
strto reference a value set in the parameter mapping.parameters: Mapping for the simulation parameter quantities initilisation. It accepts :
float,intorstrvalues
strreference to an other value set in the parameter mappingFunction configuration items. See the functions section.
Example
Example for a
ForwardSimulationobject using alias for its solver, net and time manager items.
{
"type": "forward_simulation",
"solver": {"type": "aliased_solver"},
"net": {"type": "aliased_net"},
"time": {"type": "aliased_time_manager"},
"variables_initialization": {
"variable_name_1": 1.0,
"variable_name_2": 20.0,
"variable_name_3": "global_parameter_name_1",
},
"variables_magnitudes": {
"variable_name_1": 1.0,
"variable_name_2": 10.0,
"variable_name_3": 100.0,
},
"parameters": {
"global_parameter_name_1": 101.0,
"global_parameter_name_2": 1000,
"global_parameter_name_3": "global_parameter_name_1",
"global_parameter_name_4": {
"type": "sum",
"add": [
"global_parameter_name_1",
100.0
]
}
}
}
Time manager
Class:
TimeManagerType name:
time
Parameters
start: The initial value of the simulation time.
duration: The simulation duration
step_size: the time of a single simulation step.
min_step: the minimum step duration allowed. Useful when simulation algorithms can adapt the time step duration.
Example
The following example describes a time manager starting at 0.0 for a 10.0 seconds simulation dufration with 0.001s time steps. the minimum allowed time increment is 0.0001s
{
"type": "time",
"start": 0.0,
"duration": 10.0,
"step_size": 1e-3,
"min_step": 1e-4
}
Solvers Configuration
Description of available configuration item to build AbstractSolver object from a configuration file.
Newton Solver
Class:
NewtonSolverType name:
newton_solver
Parameters
type:
newton_solvertolerance: Relative (to each variables magnitudes) tolerance for the stop criteria of the Newton method.
iteration_max: Maximum number of iteration of the algorithm allowed to find a solution.
Example
The following example describes a newton solver and set its relative tolerance and maximum iterations.
{
"type": "newton_solver",
"tolerance": 1e-9,
"iteration_max": 10
}