pipeObservation_from_DynamicPipe function
Requirements.Examples.AirCircuitSystem.Components.Bindings.pipeObservation_from_DynamicPipe
ยท source
Map DynamicPipe variables to Pipe observations record
Extends Modelica.Icons.Function
Binding function that maps the medium states of a
Modelica.Fluid.Pipes.DynamicPipe to the
observation record
MediumVector
that is the input of
PipeRequirements.
The input dynamicPipe is of the record type MediumVector, and the output is a copy of it.
The input record is built at the call site with explicit record constructors from the medium models
pipe2.mediums[i] of the pipe, as in
observation = Components.Bindings.pipeObservation_from_DynamicPipe(
Components.Checks.Records.MediumVector(mediums={
Components.Checks.Records.Medium(p=pipe2.mediums[i].p, T=pipe2.mediums[i].T)
for i in 1:pipe2.nNodes}))
in CheckAirCircuitSystem.
Passing the pipe instance itself (pipeObservation_from_DynamicPipe(pipe2)) would rely on the record cast of
the Modelica Language Specification (section 12.6.1), which Modelon Impact and OpenModelica 1.27 reject.
The function is Inline=true and has no algorithm: it only documents and isolates the binding,
so that the requirement blocks do not depend on the plant library.
Revisions
| Date | Description |
|---|---|
| Dec. 3, 2026 | Documentation: the argument is built at the call site with record constructors instead of passing the pipe instance (H. Tummescheit, Model Based Innovation LLC) |
Inputs
| Name | Type | Description |
|---|---|---|
dynamicPipe input | Checks.Records.MediumVector | Observation variables from a DynamicPipe |
Outputs
| Name | Type | Description |
|---|---|---|
pipeObservation output | Checks.Records.MediumVector | Pipe observation variables in requirements model |