Simulation Configuration

Description of available configuration item to build AbstractSimulation object from a configuration file.

Forward Simulation

Parameters

  • solver: The solver configuration item

  • net: The net configuration item

  • time: The time manager item

  • variables_magnitudes: Mapping of the float magnitude of the state variables

  • variables_initialization: Mapping of the state variables quantity initialization. It accepts:

    • float

    • str to reference a value set in the parameter mapping.

  • parameters: Mapping for the simulation parameter quantities initilisation. It accepts :

    • float, int or str values

    • str reference to an other value set in the parameter mapping

    • Function configuration items. See the functions section.

Example

Example for a ForwardSimulation object 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

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

Parameters

  • type: newton_solver

  • tolerance: 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
}