Library demonstrating the usage of the tank model
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
| Name | Description |
|---|---|
| Demonstrating the usage of SimpleTank | |
| Two tanks connected with pipes at different heights | |
| Show the treatment of empty tanks |
Modelica.Fluid.Examples.Tanks.ThreeTanksDemonstrating the usage of SimpleTank
Extends from Modelica.Icons.Example (Icon for runnable examples).
| Name | Description |
|---|---|
| replaceable package Medium | Medium in the component |
| Name | Description |
|---|---|
| replaceable package Medium | Medium in the component |
Modelica.Fluid.Examples.Tanks.TanksWithOverflowTwo tanks connected with pipes at different heights
The mass flow rate to the upper tank is controlled by the static pressure at its bottom. The fluid flows through a pipe and forced by different heights from the upper tank to the lower tank.
Additional fluid flows through an overflow pipe if the level of the upper tank exceeds 6m. Initially the overflow enters the lower tank above its fluid level; later on the fluid level exceeds the overflow port.
Note that the number of solver intervals has been increased, accounting for the long simulation time horizon. Otherwise the simulation may fail due to too large steps subject to events. Alternatively the simulation accuracy could be increased in order to avoid errors.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Modelica.Fluid.Examples.Tanks.EmptyTanksShow the treatment of empty tanks
This example model demonstrates the use of the OpenTank component. The simulation starts with an almost full tank1 and an almost empty tank2. Water flows out of tank1 until the level reaches the height of the outlet port, 1 mm above the bottom, then the flow stops thanks to the implicit check-valve behaviour of the ports when they get above the fluid level.
Notice that the tanks should never get completely empty, otherwise the mass and energy balance equations become singular. Hence, tank2 starts with 1 mm of water and the outlet port of tank1 is 1 mm above the bottom, to ensure it never gets fully empty.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Automatically generated Tue Feb 24 16:59:25 2026.