Navigation

  • index
  • modules |
  • next |
  • previous |
  • SigmaMu 1.0-b1 documentation »
  • API documentation »
  • Process modelling »
  • Handler classes related to materials

Handler classes related to materials¶

MaterialHandler¶

class simu.core.model.material.MaterialHandler¶

The material handler maintains the thermodynamic states represented as flows and states. When a model is created, the interface method can be used to define material ports. In the with context, invoked by the parent model, defined ports are to be connected to Material instances in the parent context. Finally, the model can create further (local) material instances.

__init__()¶
define_port(
name: str,
spec: MaterialSpec | None = None,
)¶

Define a material port of the given name and specification. The name must be unique in this context. If no spec is given, any material is accepted.

create_flow(
name: str,
definition: MaterialDefinition,
) → Material¶

Create a Material as a flow in the local context.

create_state(
name: str,
definition: MaterialDefinition,
) → Material¶

Create a Material as a state in the local context.

property ports: Mapping[str, MaterialSpec]¶

All defined ports of the model

create_proxy() → MaterialProxy¶

Create a proxy object for configuration in material context

finalise(
connections: Mapping[str, Material],
)¶

Internal method called to provide connected ports.

MaterialProxy¶

class simu.core.model.material.MaterialProxy¶
__init__(handler: MaterialHandler)¶
connect(name: str, material: Material)¶

Connect the material in local context to the port with given name of the child model

connect_many(**materials: Material)¶

Connect several materials at once, calling connect() for each specification. This method can obviously only be used if the names of the ports are valid variable identifiers in python.

free_ports() → Collection[str]¶

Return collection of all ports that are yet free

finalise()¶

check that all ports are connected

Table of Contents

Contents:

  • Introduction
  • Getting started
  • Tutorial
  • API documentation
    • Thermodynamic Modelling
    • Process modelling
    • Numerical solvers
    • Utilities
    • Predefined models
  • Frequently asked questions
  • Release notes
  • License
  • Literature

Quick search

Navigation

  • index
  • modules |
  • next |
  • previous |
  • SigmaMu 1.0-b1 documentation »
  • API documentation »
  • Process modelling »
  • Handler classes related to materials
© Copyright 2021-2025, Volker Siepmann. Created using Sphinx 9.1.0.