Net Configuration

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

Net item

  • Class: Net

  • Type name: net

Parameters

  • flux_dof_definitions: Mapping of the flux-dof type couples used in the net.

  • nodes: Sequence of the nodes names.

  • blocks: Mapping of the blocks with their names.

  • boundary_conditions: Mapping of boundary conditions at Nodes.

Example

Considering the following block-node diagram, with boundary conditions:

  • On the flux at node A

  • On the pressure at node C

Figure made with TikZ

Simple circulation system block-node diagram

We get the following configuration:

{
    "type": "net",
    "flux_dof_definitions": {"flow": "pressure"},
    "nodes": ["A", "B", "C"],
    "blocks": {
        "RC_1": {
            "type": "rc_block",
            "flux_type": "flow",
            "resistance": "Ra",
            "capacitance": "Ca",
            "nodes":
            {
                0: "B",
                1: "A"
            }
        },
        "RC_2": {
            "type": "rc_block",
            "flux_type": "flow",
            "resistance": "Rb",
            "capacitance": "Cb",
            "nodes":
            {
                0: "C",
                1: "B"
            }
        }
    },
    "boundaries_conditions": {
        "A": [
            {
                "type": "condition",
                "condition_type": "flow",
                "condition_id": "A.flow"
            }
        ],
        "C": [
            {
                "type": "condition",
                "condition_type": "pressure",
                "condition_id": "C.pressure"
            }
        ]
    }
}

Model Component Description item

Parameters

  • model_type: The name of the underlying model conponent type.

  • submodels: (Optional) Mapping of the ModelComponentDescription item of the model.

  • local parameters: (Optional) For every local name of the model type, you can set a global name. Otherwise a default name is given.

Note

Every model type provided in the library declares an Alias of the model_description with the correct model_type set. See the Aliases section for model component alias documentation.

Example

For the description of a Velocity Law type.

{
    "type": "model_description",
    "model_type": "velocity_law",
    "pos": "global_position_name",
    "vel": "global_velocity_name",
    "acc": "global_acceleration_name",
    "time": "time",
    "submodels":
    {
        "submodel_1": {"optional submodel description goes here"},
        "submodel_2": {"optional submodel description goes here"}
    }
}

Block Description item

Parameters

  • model_type: The name of the underlying model type.

  • nodes: Mapping of the block local nodes ids to net’s global node names.

  • submodels: (Optional) Mapping of the ModelComponentDescription item of the block.

  • local parameters: (Optional) For every local name of the model type, you can set a global name. Otherwise a default name is given.

Note

Every block type provided in the library declares an Alias of the block_description with the correct model_type set. See the Aliases section for block alias documentation.

Example

For the description of a RCBlock type

{
    "type": "block_description",
    "model_type": "rc_block",
    "flux_type": "flow",
    "resistance": "R",
    "capacitance": "C",
    "time": "time",
    "submodels":
    {
        "submodel_1": {"optional submodel description goes here"},
        "submodel_2": {"optional submodel description goes here"}
    },
    "nodes":
    {
        0: "global_node_0",
        1: "global_node_1"
    }
}

Boundary Condition items

Parameters

  • type: condition

  • condition_type: The flux or DOF type of the condition.

  • condition_id: The global name of the parameter set by the condition.

Note

The condition_type used has to be defined in a flux_dof_definitions parameter of the Net.

Example

For the description of a boundary condition of a flow flux type named inlet_flow:

{
    "type": "condition",
    "condition_type": "flow",
    "condition_id": "inlet_flow"
}

For the description of a boundary condition of a pressure dof type named p_out:

{
    "type": "condition",
    "condition_type": "pressure",
    "condition_id": "p_out"
}