Tank¶
![]()
Represents a Tank unit operation that models a storage vessel for material accumulation. In dynamic mode, the tank tracks liquid inventory over time, integrating inlet and outlet mass flows to update the accumulated content. In steady-state mode, the tank passes the inlet stream through to the outlet, applying an optional pressure drop.
DWSIM.UnitOperations.UnitOperations.Tank
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← Tank
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
Decane-in |
| Outlet, material | 0 |
Decane-out |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("TankExample")
.WithCompound("N-decane")
.WithPropertyPackage(PropertyPackages.PengRobinson))
feed = (fs.AddMaterialStream("Decane-in")
.At(Q.Celsius(30.0), Q.Bar(2.0))
.WithMassFlow(Q.KgPerSecond(2.0)))
product = fs.AddMaterialStream("Decane-out")
tank = (fs.AddTank("TK-1")
.WithVolume(Q.CubicMeters(50.0))
.ConnectFeed(feed)
.ConnectProduct(product))
tank.Object.DeltaP = 20000.0 # Pa, static pressure loss across the tank
fs.AutoLayout()
fs.Solve()
q = feed.Object.Phases[0].Properties.volumetric_flow # m3/s
print(f"Liquid density = {feed.Object.Phases[0].Properties.density:.1f} kg/m3")
print(f"Volumetric flow = {q * 3600.0:.2f} m3/h")
print(f"Residence time = {tank.Object.ResidenceTime / 3600.0:.2f} h (V/Q = {50.0 / q / 3600.0:.2f} h)")
print(f"Outlet P = {product.Object.Phases[0].Properties.pressure / 1e5:.2f} bar")
print(f"Outlet T = {product.TemperatureK - 273.15:.2f} C")
Output
Liquid density = 725.2 kg/m3
Volumetric flow = 9.93 m3/h
Residence time = 5.04 h (V/Q = 5.04 h)
Outlet P = 1.80 bar
Outlet T = 30.01 C
DWSIM 10.2.11.0, generated 2026-10-08.
Properties¶
IDs accepted by GetPropertyValue, SetPropertyValue, the sensitivity analysis, the optimizer, the Adjust block and dynamic events. Units are SI; pass another unit system to GetPropertyValue to get them converted.
| ID | Name | Unit (SI) | Input |
|---|---|---|---|
PROP_TK_0 |
Pressure Drop | Pa | yes |
PROP_TK_1 |
Volume | m3 | yes |
PROP_TK_2 |
Residence Time | s | result |
Dynamic mode¶
Extra properties used when the flowsheet runs in dynamic mode.
| Name | Unit |
|---|---|
| Liquid Level | m |
| Height | m |
| Initialize using Inlet Stream | |
| Reset Content | |
| Closed Tank | |
| Ambient Temperature | K |
| Ambient UA Product | |
| Operating Pressure | Pa |
| Minimum Pressure | Pa |
Learn more¶
-
User guide
-
Tutorials
-
FluentAPI
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
Tank(): Initializes a new default instance of the Tank class.
Initializes a new default instance of the Tank class.
Tank(string, string): Initializes a new instance of the Tank class with a name and description.
Initializes a new instance of the Tank class with a name and description.
| Parameter | Type | Description |
|---|---|---|
name |
String |
The component name assigned to this tank object. |
description |
String |
A short description of this tank object. |
Properties¶
DeltaP: Gets or sets the pressure drop across the tank (Pa).
Gets or sets the pressure drop across the tank (Pa).
DeltaQ: Gets or sets the calculated heat duty exchanged by the tank (kW).
Gets or sets the calculated heat duty exchanged by the tank (kW).
EquipmentTypes: Gets the list of equipment orientation types supported by the tank (vertical, horizontal).
Gets the list of equipment orientation types supported by the tank (vertical, horizontal).
HasPropertiesForDynamicMode: Gets a value indicating that this unit operation exposes properties for dynamic mode configuration.
Gets a value indicating that this unit operation exposes properties for dynamic mode configuration.
IgnorePhase: Gets or sets a value indicating whether the presence of a vapour phase in the inlet stream should be ignored during...
Gets or sets a value indicating whether the presence of a vapour phase in the inlet stream should be ignored during steady-state calculation. When False, a vapour phase will raise an error.
MobileCompatible: Gets a value indicating whether this unit operation is compatible with mobile interfaces.
Gets a value indicating whether this unit operation is compatible with mobile interfaces.
ObjectClass: Gets or sets the simulation object class, categorized as a Separator.
Gets or sets the simulation object class, categorized as a Separator.
ResidenceTime: Gets or sets the calculated liquid residence time (s) based on volume and throughput.
Gets or sets the calculated liquid residence time (s) based on volume and throughput.
SupportsDynamicMode: Gets a value indicating that this unit operation supports dynamic (time-stepping) mode.
Gets a value indicating that this unit operation supports dynamic (time-stepping) mode.
Volume: Gets or sets the tank total volume (m³).
Gets or sets the tank total volume (m³).
Methods¶
Calculate(object): Calculates the tank (mixing) operation.
Calculates the tank (mixing) operation.
| Parameter | Type | Description |
|---|---|---|
args |
Object |
CloneXML(): Creates a deep copy of this tank by serializing and deserializing via XML.
Creates a deep copy of this tank by serializing and deserializing via XML.
CloseEditForm(): Closes and disposes the editing form.
Closes and disposes the editing form.
CreateDimensionsList(): Creates the list of physical dimensions associated with the tank (volume).
Creates the list of physical dimensions associated with the tank (volume).
CreateDynamicProperties(): Registers the dynamic properties exposed in dynamic simulation mode, such as liquid level, height, and...
Registers the dynamic properties exposed in dynamic simulation mode, such as liquid level, height, and initialisation options.
DeCalculate(): Clears all calculated results.
Clears all calculated results.
DisplayDynamicsEditForm(): Opens or activates the dynamics property editor form for this tank, including buttons to view the accumulation...
Opens or activates the dynamics property editor form for this tank, including buttons to view the accumulation stream and to fill the tank from the inlet stream.
DisplayEditForm(): Opens or activates the editing form.
Opens or activates the editing form.
GetDisplayDescription(): Returns the localised display description.
Returns the localised display description.
GetDisplayName(): Returns the localised display name.
Returns the localised display name.
GetEditingForm(): Returns the editing form instance.
Returns the editing form instance.
GetIconBitmapBytes(): Returns the icon bitmap as a byte array.
Returns the icon bitmap as a byte array.
GetProperties(PropertyType): Returns an array of property identifiers for the specified property type.
Returns an array of property identifiers for the specified property type.
| Parameter | Type | Description |
|---|---|---|
proptype |
PropertyType |
GetPropertyUnit(string, IUnitsOfMeasure): Returns the unit string for the specified property.
Returns the unit string for the specified property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
su |
IUnitsOfMeasure |
GetPropertyValue(string, IUnitsOfMeasure): Returns the value of the specified property.
Returns the value of the specified property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
su |
IUnitsOfMeasure |
RunDynamicModel(): Executes one dynamic simulation step for the tank: integrates inlet and outlet mass flows over the current time...
Executes one dynamic simulation step for the tank: integrates inlet and outlet mass flows over the current time step, updates the accumulation stream, and flashes the content to determine the new liquid level and outlet conditions.
SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of the specified property.
Sets the value of the specified property.
| Parameter | Type | Description |
|---|---|---|
prop |
String |
|
propval |
Object |
|
su |
IUnitsOfMeasure |
UpdateDimensionsList(): Updates the dimensions list values from the current tank properties (e.g., Volume).
Updates the dimensions list values from the current tank properties (e.g., Volume).
UpdateEditForm(): Refreshes the editing form with updated data.
Refreshes the editing form with updated data.
Fields¶