CheckAirCircuitSystem model

Requirements.Examples.AirCircuitSystem.CheckAirCircuitSystem  ยท source

Icon of CheckAirCircuitSystem

Air circuit system with the pressure and temperature requirements of pipe2 bound and checked

Extends Modelica.Icons.Example, Components.AirCircuitSystem_B

Example that demonstrates the three steps of requirement checking with the Requirements library: requirement definition, binding to a plant model and checking during simulation.

  • The plant is the air circuit AirCircuitSystem_B, inherited by this model.
  • The requirements are defined in PipeRequirements: in every node of a pipe the pressure shall stay below pMax (here set to 200000 Pa) and the temperature shall be within [Tmin, Tmax] (default 255 K to 300 K).
  • The binding function pipeObservation_from_DynamicPipe maps the medium states of pipe2 to the observation record of the requirement block pipe2Requirements. Its argument, a MediumVector record, is built at the call site with explicit record constructors from the pressure p and temperature T of every medium model pipe2.mediums[i].
  • The inner PrintViolations block prints the verdicts of the 10 requirements (2 per node of pipe2) at the end of the simulation and writes them to the log files.

The example runs for 1 s (StopTime), and printViolations.evaluationTime is set to the same instant.

Revisions

DateDescription
Dec. 3, 2026The pipe instance pipe2 is no longer passed to pipeObservation_from_DynamicPipe; the call site builds the MediumVector record with explicit record constructors from pipe2.mediums[i].p and pipe2.mediums[i].T. Passing the instance (record cast) was rejected by Modelon Impact ("Accesses to composite components other than records are not allowed") and OpenModelica 1.27 (type mismatch). experiment(StopTime=1) and printViolations.evaluationTime=1 are now explicit (H. Tummescheit, Model Based Innovation LLC)

Components and variables

NameTypeDescription
printViolations innerVerify.PrintViolationsPrints the requirement verdicts and writes the log files at the end of the simulation
pipe2RequirementsComponents.Checks.PipeRequirementsPressure and temperature requirements of every node of pipe2