modelControlledTanks

Demonstrating the controller of a tank filling/emptying system

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

With this example, the controller of a tank filling/emptying system is demonstrated.

The basic operation is to fill and empty the two tanks:

  1. Valve 1 is opened and tank 1 is filled.
  2. When tank 1 reaches its fill level limit, valve 1 is closed.
  3. After a waiting time, valve 2 is opened and the fluid flows from tank 1 into tank 2.
  4. When tank 1 reaches its minimum level, valve 2 is closed.
  5. After a waiting time, valve 3 is opened and the fluid flows out of tank 2
  6. When tank 2 reaches its minimum level, valve 3 is closed

The above "normal" process can be influenced by three buttons:

  • Button start starts the above process. When this button is pressed after a "stop" or "shut" operation, the process operation continues.
  • Button stop stops the above process by closing all valves. Then, the controller waits for further input (either "start" or "shut" operation).
  • Button shut is used to shutdown the process, by emptying at once both tanks by opening valve 2 and valve 3. When this is achieved, the process goes back to its start configuration where all 3 valves are closed. Clicking on "start", restarts the process.

The demo-run uses the following button presses:

  • Button start pressed at 20 s.
  • Button stop pressed at 220 s
  • Button start pressed at 280 s
  • Button stop pressed at 650 s
  • Button shut pressed at 700 s
  • Simulate for 900 s

This example is based on

Dressler I. (2004):
Code Generation From JGrafchart to Modelica. Master thesis, supervisor: Karl-Erik Årzén, Department of Automatic Control, Lund Institute of Technology, Lund, Sweden, March 30, 2004
 
ControlledTanks.png

Components

TypeNameDefaultDescription
Modelica.Fluid.Examples.ControlledTankSystem.Utilities.TankControllertankController
Modelica.Blocks.Sources.RadioButtonSourcestart
Modelica.Blocks.Sources.RadioButtonSourcestop
Modelica.Blocks.Sources.RadioButtonSourceshut
Modelica.Fluid.Valves.ValveDiscretevalve1
Modelica.Fluid.Vessels.OpenTanktank1
Modelica.Blocks.Sources.RealExpressionlevel1
Modelica.Fluid.Valves.ValveDiscretevalve2
Modelica.Fluid.Valves.ValveDiscretevalve3
Modelica.Fluid.Vessels.OpenTanktank2
Modelica.Fluid.Sources.Boundary_pTambient1
Modelica.Blocks.Sources.RealExpressionlevel2
Modelica.Fluid.Sources.Boundary_pTsource
Modelica.Fluid.Systemsystem

Contents

NameDescription
Medium