CheckPumpingSystem model
Requirements.Examples.SimplePumpingSystem.CheckPumpingSystem
ยท source
Check model PumpingSystem
Extends Modelica.Icons.Example, Requirements.Examples.SimplePumpingSystem.Components.PumpingSystem
Example that checks the requirements of the drinking water pumping system PumpingSystem, which this model extends. When the users' valve opens at t = 200 s, the on-off controller turns the pump on and off to keep the reservoir level around 2 m. The following requirement blocks observe the plant:
tankRequirements(TankRequirements) observesreservoirthrough tankObservation_from_OpenTank: the level stays within 1.8 m to 2.21 m and is not below 2.0 m for more than 300 s.pumpRequirements(PumpRequirements) observespumpsthrough pumpObservation_from_PrescribedPump: the speed is at most 1000 rev/min and the pressures at both ports are at least 100 Pa.sourceRequirements1andsourceRequirements2(SourceRequirements) check that the pressures at the ports ofsourceandsinkare at least 100 Pa.
The observation records are built at the call site with explicit record constructors (see the revisions). Simulate for
2000 s; the inner PrintViolations block
(with evaluationTime = 2000 s) prints the violated, untested and satisfied requirements at the end of the
run and writes them to CheckPumpingSystem_log.txt and CheckPumpingSystem_log.html.
Revisions
| Date | Description |
|---|---|
| Sept. 14, 2026 | The observation records are built with explicit record constructors from reservoir, pumps, source and sink, which are no longer passed to the binding functions themselves (a Dymola extension; the record cast of the Modelica Language Specification, section 12.6.1, is implemented by Dymola alone). The source and sink observations use the Source record constructor directly: OpenModelica 1.27 returns zeros from a function whose result is a record with an array component when the call has parameter variability, as a fixed boundary's pressures have (H. Tummescheit, Model Based Innovation LLC) |
Components and variables
| Name | Type | Description |
|---|---|---|
printViolations inner | Verify.PrintViolations | Prints the requirement verdicts and writes the log files at the end of the simulation |
tankRequirements | SimplePumpingSystem.Components.Checks.TankRequirements | Level requirements of the reservoir |
pumpRequirements | SimplePumpingSystem.Components.Checks.PumpRequirements | Speed and cavitation requirements of the pumps |
sourceRequirements1 | Components.Checks.SourceRequirements | Cavitation requirements at the ports of the source |
sourceRequirements2 | Components.Checks.SourceRequirements | Cavitation requirements at the ports of the sink |