Tank Model Class
The tank class is an implementation of a simple tank (nominally straight-sides) for two-phase streams. It is intended for slurries (solids and liquids), but can be used for "dry" ore bins as well as well-mixed two-liquid-phase flows. Note that here the normal discharge from the tank is referred to as the underflow and the overflow from the tank as the overflow.
This documentation should be read in conjunction with the docstring documentation from the class definition ("built-in documentation").
Objectives
- Create a thickener class that is useful to Process Control Engineers but relatively low computational load.
- Allow a single class to be adaptable to a very wide range of "tank" types with different discharge policies.
Philosophy
- Use the concept of a demanded volumetric outflow to be set for the tank based on some external calculation or policy.
- If possible, the tank will deliver the demanded volumetric outflow based on the "well-mixed" density in the tank.
- If the tank is empty, then the tank will deliver (at most) at the underflow a stream identical to the tank feed stream.
- The calculation to generate the demanded flow will reflect the type of discharge system, for example:
- head driven outflow (where the calculation depends on the level in the tank)
- feedback-controlled outflow (e.g. level control on the tank), where the flow is dictated by an actuation device:
- variable-speed pump
- valve
- belt feeder (for "dry" solids bins)
- Specifically include the potential for tank overflow to allow a rigorous mass-balance to be maintained and tested.
Implementation
- Euler integration of mass-balance.
- Tank is assumed to be well-mixed.
Usage
Usually the tank class is used with a calculation to determine the volumetric outflow demand. This could be as simple as a constant value or as complex as a large control scheme (including PID feedback control of level in the tank). For a constant flow, this underflow can be set before the tank object's "run" method is used. When the calculation of the underflow flow depends on the outcome of the tank model (e.g. level), then a loop is formed and either the tank or the "control" calculation needs to be executed first. A reasonable convention is to execute the tank first (with an initial underflow flow value set outside the simulation loop) and the calculation immediately afterwards. Of course, the newly calculated underflow flow demand will not be seen by the tank until the next timestep. So clearly the timestep needs to be kept small relative to the tank residence time or emptying time, but this is usually not a problem.
If the feed flow to the tank needs to be varied (e.g. in order to control level), this can be easily done by manipulating the upstream simulation components to ensure the correct stream flow. This could be by manipulating the underflow flow of an upstream tank, or perhaps just changing the volumetric flow specification on an isolated stream object that has no real source (e.g. generic water supply flow).
Ideas/Hints
Implement a weir by a discharge flow calculation which depends on the tank level over and above a threshold (the weir level) with the appropriate characteristics function (e.g. linear, squared, etc) dependent on the weir shape (flat, V-notch, etc.). Be sure to use a max function to limit the calculation output to >=0.0