Separator Vessel¶
![]()
Represents a separator vessel unit operation that splits an inlet multi-phase stream into separate vapour and liquid outlet streams. Supports two-phase and three-phase operation, optional heat duty, and dynamic simulation.
DWSIM.UnitOperations.UnitOperations.Vessel
Assembly DWSIM.UnitOperations.dll · Object ← BaseClass ← UnitOpBaseClass ← Vessel
At a glance¶

| Port | Index | Connected in the example |
|---|---|---|
| Inlet, material | 0 |
Chilled-gas |
| Inlet, material | 1 |
|
| Inlet, material | 2 |
|
| Inlet, material | 3 |
|
| Inlet, material | 4 |
|
| Inlet, material | 5 |
|
| Inlet, energy | 6 |
|
| Outlet, material | 0 |
Sales-gas |
| Outlet, material | 1 |
Condensate |
| Outlet, material | 2 |
|
| Outlet, material | 3 |
|
| Outlet, energy | 4 |
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("SeparatorExample")
.WithCompounds("Methane", "Ethane", "Propane", "N-butane", "N-pentane")
.WithPropertyPackage(PropertyPackages.PengRobinson))
feed = (fs.AddMaterialStream("Chilled-gas")
.At(Q.Celsius(-20.0), Q.Bar(40.0))
.SetCompoundMolarFlow("Methane", 70.0) # mol/s
.SetCompoundMolarFlow("Ethane", 12.0)
.SetCompoundMolarFlow("Propane", 10.0)
.SetCompoundMolarFlow("N-butane", 5.0)
.SetCompoundMolarFlow("N-pentane", 3.0))
gas = fs.AddMaterialStream("Sales-gas")
liquid = fs.AddMaterialStream("Condensate")
vessel = (fs.AddSeparator("V-1")
.ConnectFeed(feed, 0)
.ConnectProduct(gas, 0) # vapor outlet
.ConnectProduct(liquid, 1)) # liquid outlet
fs.AutoLayout()
fs.Solve()
g, l = gas.Object, liquid.Object
print(f"Feed vapor fraction = {feed.Object.Phases[2].Properties.molarfraction:.4f}")
print(f"Gas flow = {g.Phases[0].Properties.molarflow:.2f} mol/s")
print(f"Condensate flow = {l.Phases[0].Properties.molarflow:.2f} mol/s")
print(f"Mass balance = {feed.Object.GetMassFlow():.4f} kg/s in, "
f"{g.GetMassFlow() + l.GetMassFlow():.4f} kg/s out")
print(f"Methane in gas = {g.Phases[0].Compounds['Methane'].MoleFraction:.4f} (mole fraction)")
print(f"Propane+ in liquid = {sum(l.Phases[0].Compounds[c].MoleFraction for c in ('Propane', 'N-butane', 'N-pentane')):.4f} (mole fraction)")
Output
Feed vapor fraction = 0.7269
Gas flow = 72.69 mol/s
Condensate flow = 27.31 mol/s
Mass balance = 2.4318 kg/s in, 2.4318 kg/s out
Methane in gas = 0.8569 (mole fraction)
Propane+ in liquid = 0.5323 (mole fraction)
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_SV_0 |
Separation Temperature (if overriden) | K | yes |
PROP_SV_1 |
Separation Pressure (if overriden) | Pa | yes |
Dynamic mode¶
Extra properties used when the flowsheet runs in dynamic mode.
| Name | Unit |
|---|---|
| Vessel Orientation | |
| Operating Pressure | Pa |
| Liquid Level | m |
| Get Volume from Dimensions | |
| Volume | m3 |
| Get Height from Dimensions | |
| Height | m |
| Minimum Pressure | Pa |
| Initialize using Inlet Stream | |
| Reset Content | |
| Liquid Outlet Nozzle Elevation | m |
| Gas Outlet Nozzle Elevation | m |
| Gas Outlet Transition Height | m |
| Gas Outlet Homogeneous | |
| Gas Outlet Liquid Fraction | |
| Liquid Outlet Transition Height | m |
| Liquid Outlet Gas Fraction | |
| Rigorous Energy Balance (UV) | |
| Split Wall (Wetted/Dry) | |
| Internal Heat Transfer Factor | |
| Fire Case (API 521) | |
| Fire Environment Factor | |
| Fire Adequate Drainage | |
| Fire Dry Wall Heat Flux | |
| Vessel Bottom Elevation | m |
| Wetted Area | m2 |
| Fire Heat Input | kW |
| Wetted Wall Heat Transfer Coefficient | W/[m2.K] |
| Dry Wall Heat Transfer Coefficient | W/[m2.K] |
| Wetted Wall Temperature | K |
| Dry Wall Temperature | K |
| Minimum Fluid Temperature | K |
| Minimum Wetted Wall Temperature | K |
| Minimum Dry Wall Temperature | K |
| Maximum Dry Wall Temperature | K |
Learn more¶
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
Vessel(): Initializes a new default instance of the Vessel class.
Initializes a new default instance of the Vessel class.
Vessel(string, string): Initializes a new instance of the Vessel class with a name and description.
Initializes a new instance of the Vessel class with a name and description.
| Parameter | Type | Description |
|---|---|---|
name |
String |
The display name of the vessel. |
description |
String |
A brief description of the vessel. |
Properties¶
CalculateRigorousHeatBalance: Gets or sets whether a rigorous wall heat-balance is performed instead of the legacy adiabatic model.
Gets or sets whether a rigorous wall heat-balance is performed instead of the legacy adiabatic model.
CalculationMode: Gets or sets the active thermal calculation mode for the vessel.
Gets or sets the active thermal calculation mode for the vessel.
DeltaQ: Gets or sets the net heat duty (kW) added to or removed from the vessel content.
Gets or sets the net heat duty (kW) added to or removed from the vessel content. Positive values indicate heating.
DimensionRatio: Gets or sets the length-to-diameter ratio used to size the vessel geometry.
Gets or sets the length-to-diameter ratio used to size the vessel geometry.
EquipmentTypes: Gets the list of equipment sub-types available for this vessel (Vertical, Horizontal).
Gets the list of equipment sub-types available for this vessel (Vertical, Horizontal).
FlashPressure: Gets or sets the fixed vessel pressure (Pa) used when OverrideP is True.
Gets or sets the fixed vessel pressure (Pa) used when OverrideP is True.
FlashTemperature: Gets or sets the fixed vessel temperature (K) used when OverrideT is True.
Gets or sets the fixed vessel temperature (K) used when OverrideT is True.
HasPropertiesForDynamicMode: Gets a value indicating whether this unit operation exposes dedicated properties for dynamic mode configuration.
Gets a value indicating whether this unit operation exposes dedicated properties for dynamic mode configuration.
HeadType: Gets or sets the head geometry type for sizing calculations (e.g.
Gets or sets the head geometry type for sizing calculations (e.g. "Hemispherical", "Flat").
HeadTypes: Gets the list of vessel head geometry types available for sizing calculations.
Gets the list of vessel head geometry types available for sizing calculations.
HeatingCoolingAmount: Gets or sets the fixed heating or cooling duty (kW) applied to the vessel content when the calculation mode requires it.
Gets or sets the fixed heating or cooling duty (kW) applied to the vessel content when the calculation mode requires it.
MaterialTypes: Gets the list of wall material names selectable for rigorous heat-balance calculations.
Gets the list of wall material names selectable for rigorous heat-balance calculations.
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 category for this vessel (Separators).
Gets or sets the simulation object class category for this vessel (Separators).
OverrideP: Gets or sets whether the vessel pressure is fixed to FlashPressure instead of being determined...
Gets or sets whether the vessel pressure is fixed to FlashPressure instead of being determined from the inlet streams.
OverrideT: Gets or sets whether the vessel temperature is fixed to FlashTemperature instead of being...
Gets or sets whether the vessel temperature is fixed to FlashTemperature instead of being determined by the flash calculation.
PressureCalculation: Gets or sets the rule used to determine the vessel operating pressure from the inlet stream pressures.
Gets or sets the rule used to determine the vessel operating pressure from the inlet stream pressures.
ResidenceTime: Gets or sets the required liquid residence time (minutes) used in vessel sizing.
Gets or sets the required liquid residence time (minutes) used in vessel sizing.
SupportsDynamicMode: Gets a value indicating whether this unit operation supports dynamic simulation mode.
Gets a value indicating whether this unit operation supports dynamic simulation mode.
SurgeFactor: Gets or sets the surge factor applied to the minimum vapour velocity when sizing the vessel.
Gets or sets the surge factor applied to the minimum vapour velocity when sizing the vessel.
ThermalProperties: Gets or sets the thermal property definitions used for the rigorous heat-balance model.
Gets or sets the thermal property definitions used for the rigorous heat-balance model.
WallMaterial: Gets or sets the vessel wall material name.
Gets or sets the vessel wall material name. Used to look up thermal conductivity in rigorous mode.
WallTemperature: Gets or sets the ambient/external wall temperature (K) for rigorous heat-balance calculations.
Gets or sets the ambient/external wall temperature (K) for rigorous heat-balance calculations.
WallTemperatureDry: Wall temperature of the dry (vapour-contact) segment, K.
Wall temperature of the dry (vapour-contact) segment, K. See WallTemperatureWetted.
WallTemperatureWetted: Wall temperature of the wetted (liquid-contact) segment, K.
Wall temperature of the wetted (liquid-contact) segment, K. A persistent dynamic state used when the wall is split; the lumped WallTemperature is the area-weighted mean of the two segments.
WallThickness: Gets or sets the vessel wall thickness in metres.
Gets or sets the vessel wall thickness in metres. Used in rigorous heat-balance and sizing calculations.
Methods¶
CalcOverallExternalHeatTransferCoefficient(double, double, double, double, double, bool): Calculates the heat transfer coefficient between the wall and the surrounding air, combining the wall conduction...
Calculates the heat transfer coefficient between the wall and the surrounding air, combining the wall conduction resistance, the optional insulation layer (from ThermalProperties) and forced convection to air at 101325 Pa at the velocity set in ThermalProperties (Holman correlation).
| Parameter | Type | Description |
|---|---|---|
Dint |
Double |
Internal diameter, in m. |
Dext |
Double |
External diameter, in m. |
rugosidade |
Double |
Wall roughness, in m. Not used. |
T |
Double |
Temperature used to evaluate the wall thermal conductivity, in K. |
Text |
Double |
Ambient air temperature, in K. |
isolamento |
Boolean |
True to include the insulation layer. |
CalcOverallInternalHeatTransferCoefficient(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double): Calculates the heat transfer coefficient between the vessel contents and the wall, combining the internal film...
Calculates the heat transfer coefficient between the vessel contents and the wall, combining the internal film coefficient (Petukhov correlation with holdup-weighted mixture properties) and the conduction resistance of the wall.
| Parameter | Type | Description |
|---|---|---|
EL |
Double |
Liquid holdup (volume fraction of liquid), used to weight the phase properties. |
L |
Double |
Vessel length, in m. Not used. |
Dint |
Double |
Internal diameter, in m. |
Dext |
Double |
External diameter, in m. |
rugosidade |
Double |
Wall roughness, in m. Not used; the roughness of WallMaterial is used instead. |
T |
Double |
Temperature used to evaluate the wall thermal conductivity, in K. |
Text |
Double |
External temperature, in K. Not used. |
vel_g |
Double |
Vapor velocity, in m/s. |
vel_l |
Double |
Liquid velocity, in m/s. |
Cpl |
Double |
Liquid heat capacity, in kJ/(kg.K). |
Cpv |
Double |
Vapor heat capacity, in kJ/(kg.K). |
kl |
Double |
Liquid thermal conductivity, in W/(m.K). |
kv |
Double |
Vapor thermal conductivity, in W/(m.K). |
mu_l |
Double |
Liquid viscosity, in Pa.s. |
mu_v |
Double |
Vapor viscosity, in Pa.s. |
rho_l |
Double |
Liquid density, in kg/m3. |
rho_v |
Double |
Vapor density, in kg/m3. |
Public Function CalcOverallInternalHeatTransferCoefficient(EL As Double, L As Double, Dint As Double, Dext As Double, rugosidade As Double, T As Double, Text As Double, vel_g As Double, vel_l As Double, Cpl As Double, Cpv As Double, kl As Double, kv As Double, mu_l As Double, mu_v As Double, rho_l As Double, rho_v As Double) As Double()
Calculate(object): Calculates the gas-liquid separation vessel (flash drum).
Calculates the gas-liquid separation vessel (flash drum).
| Parameter | Type | Description |
|---|---|---|
args |
Object |
CalculateVolume(): Computes the internal volume of the vessel (m3) based on either the user-entered value or the configured geometry...
Computes the internal volume of the vessel (m3) based on either the user-entered value or the configured geometry (diameter, length, and head type) from the dimensions list.
CloneXML(): Creates a deep copy of this vessel via XML serialization.
Creates a deep copy of this vessel via XML serialization.
CloseEditForm(): Closes and disposes the editing form.
Closes and disposes the editing form.
CreateDimensionsList(): Creates the dimensions list (Diameter, Length) used for vessel sizing calculations.
Creates the dimensions list (Diameter, Length) used for vessel sizing calculations.
CreateDynamicProperties(): Registers the dynamic properties that are exposed in dynamic simulation mode, such as vessel orientation, operating...
Registers the dynamic properties that are exposed in dynamic simulation mode, such as vessel orientation, operating pressure, liquid level, volume, and height.
DeCalculate(): Clears all calculated results.
Clears all calculated results.
DisplayDynamicsEditForm(): Opens or activates the dynamics property editor form for this vessel, including buttons to view the accumulation...
Opens or activates the dynamics property editor form for this vessel, including buttons to view the accumulation stream and to fill the vessel from an inlet stream.
DisplayEditForm(): Opens or activates the editing form.
Opens or activates the editing form.
FireHeatInput(double, double, bool): API 521 pool-fire heat to the wetted surface, W: Q = C F A^0.82 with C = 43200 (adequate drainage and prompt...
API 521 pool-fire heat to the wetted surface, W: Q = C F A^0.82 with C = 43200 (adequate drainage and prompt firefighting) or 70900, F the environment factor, A the wetted area within 7.6 m of grade.
| Parameter | Type | Description |
|---|---|---|
wettedAreaWithin76m |
Double |
|
environmentFactor |
Double |
|
adequateDrainage |
Boolean |
GasOutletLiquidFraction(double, double, double): Mass fraction of liquid in the gas outlet: 0 with the level below the nozzle minus the transition band, 1 with the...
Mass fraction of liquid in the gas outlet: 0 with the level below the nozzle minus the transition band, 1 with the level at or above the nozzle, linear in between. Always 1 when the vessel holds no gas and always 0 when it holds no liquid.
| Parameter | Type | Description |
|---|---|---|
level |
Double |
|
nozzleElevation |
Double |
|
transitionHeight |
Double |
GetDisplayDescription(): Returns the localised display description.
Returns the localised display description.
GetDisplayName(): Returns the localised display name.
Returns the localised display name.
GetDynamicResidenceTime(): Calculates the theoretical residence time (s) of fluid in the vessel by dividing the vessel volume by the total...
Calculates the theoretical residence time (s) of fluid in the vessel by dividing the vessel volume by the total volumetric inlet flow rate. Returns Double if the calculation cannot be performed.
GetDynamicVolume(): Returns the dynamic simulation volume of the vessel by delegating to CalculateVolume.
Returns the dynamic simulation volume of the vessel by delegating to CalculateVolume.
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 |
GetPropertyDescription(string): Returns a human-readable description of the specified property.
Returns a human-readable description of the specified property.
| Parameter | Type | Description |
|---|---|---|
p |
String |
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 |
GetReport(IUnitsOfMeasure, CultureInfo, string): Generates a plain-text report of the vessel results.
Generates a plain-text report of the vessel results.
| Parameter | Type | Description |
|---|---|---|
su |
IUnitsOfMeasure |
|
ci |
CultureInfo |
|
numberformat |
String |
GetRugosity(string): Returns the pipe-wall rugosity (m) for the given material name.
Returns the pipe-wall rugosity (m) for the given material name.
| Parameter | Type | Description |
|---|---|---|
material |
String |
HeadArea(double): Outside area of one head, m2, for the selected head type (2:1 ellipsoidal by default).
Outside area of one head, m2, for the selected head type (2:1 ellipsoidal by default).
| Parameter | Type | Description |
|---|---|---|
DE |
Double |
Kwall(double): Returns the thermal conductivity of the wall material (WallMaterial) at the given temperature.
Returns the thermal conductivity of the wall material (WallMaterial) at the given temperature.
| Parameter | Type | Description |
|---|---|---|
T |
Double |
Wall temperature, in K. |
LiquidHeightFromFraction(double, double, double): Liquid height (m) that holds the given liquid volume fraction: f L for a vertical vessel; for a horizontal one the...
Liquid height (m) that holds the given liquid volume fraction: f L for a vertical vessel; for a horizontal one the chord height whose circular segment is the fraction f of the section.
| Parameter | Type | Description |
|---|---|---|
f |
Double |
|
D |
Double |
|
L |
Double |
LiquidOutletGasFraction(double, double, double): Mass fraction of gas in the liquid outlet: 0 with the level above the nozzle plus the transition band, 1 with the...
Mass fraction of gas in the liquid outlet: 0 with the level above the nozzle plus the transition band, 1 with the level at or below the nozzle, linear in between. Always 1 when the vessel holds no liquid and always 0 when it holds no gas.
| Parameter | Type | Description |
|---|---|---|
level |
Double |
|
nozzleElevation |
Double |
|
transitionHeight |
Double |
NaturalConvectionHTC(double, double, double, double, double, double, double, double): Heat transfer coefficient for turbulent natural convection on a wall, from Nu = 0.13 (Gr Pr)^(1/3), in which the...
Heat transfer coefficient for turbulent natural convection on a wall, from Nu = 0.13 (Gr Pr)^(1/3), in which the length scale cancels. The result is never lower than floor.
| Parameter | Type | Description |
|---|---|---|
k |
Double |
Fluid thermal conductivity, in W/(m.K). |
rho |
Double |
Fluid density, in kg/m3. |
mu |
Double |
Fluid dynamic viscosity, in Pa.s. |
cpKJ |
Double |
Fluid heat capacity, in kJ/(kg.K). |
dT |
Double |
Wall-to-fluid temperature difference, in K (the sign is ignored). |
T |
Double |
Fluid temperature, in K. Not used in the current correlation. |
beta |
Double |
Fluid thermal expansion coefficient, in 1/K (1/T for an ideal gas). |
floor |
Double |
Minimum value returned, in W/(m2.K); also returned when the properties are invalid. |
RunDynamicModel(): Executes one dynamic simulation step for the vessel: integrates inlet and outlet mass flows over the current time...
Executes one dynamic simulation step for the vessel: integrates inlet and outlet mass flows over the current time step, updates the accumulation stream, and flashes the vessel content to determine the outlet stream 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 |
SizeHorizontal(): Sizes the vessel in horizontal orientation using the calculated flow rates and settling velocity.
Sizes the vessel in horizontal orientation using the calculated flow rates and settling velocity.
SizeVertical(): Sizes the vessel in vertical orientation using the calculated flow rates and settling velocity.
Sizes the vessel in vertical orientation using the calculated flow rates and settling velocity.
TotalWallArea(double, double): Total outside wall area (shell plus both heads), m2.
Total outside wall area (shell plus both heads), m2.
| Parameter | Type | Description |
|---|---|---|
DE |
Double |
|
L |
Double |
UpdateDimensionsList(): Updates the Diameter and Length dimension values from the last sizing calculation results.
Updates the Diameter and Length dimension values from the last sizing calculation results.
UpdateEditForm(): Refreshes the editing form with updated data.
Refreshes the editing form with updated data.
WallDensity(): Returns the density of the wall material (WallMaterial).
Returns the density of the wall material (WallMaterial).
WallSpecificHeat(): Returns the specific heat of the wall material (WallMaterial).
Returns the specific heat of the wall material (WallMaterial).
WallThermalMass(double, double, double): Returns the heat capacity of the cylindrical vessel wall (mass times specific heat), used by the transient wall model.
Returns the heat capacity of the cylindrical vessel wall (mass times specific heat), used by the transient wall model.
| Parameter | Type | Description |
|---|---|---|
D |
Double |
Internal diameter, in m. |
DE |
Double |
External diameter, in m. |
L |
Double |
Vessel length, in m. |
WettedArea(double, double, double, double): Outside wall area (shell plus both heads) in contact with liquid up to height h, m2.
Outside wall area (shell plus both heads) in contact with liquid up to height h, m2.
| Parameter | Type | Description |
|---|---|---|
h |
Double |
|
D |
Double |
|
DE |
Double |
|
L |
Double |
Fields¶
AH: Results of the horizontal vessel sizing (SizeHorizontal): AH is the vessel length and DH the...
Results of the horizontal vessel sizing (SizeHorizontal): AH is the vessel length and DH the vessel diameter, both in m.
AV: Results of the vertical vessel sizing (SizeVertical): AV is the vessel height and DV the vessel...
Results of the vertical vessel sizing (SizeVertical): AV is the vessel height and DV the vessel diameter, both in m.
DH: Results of the horizontal vessel sizing (SizeHorizontal): AH is the vessel length and DH the...
Results of the horizontal vessel sizing (SizeHorizontal): AH is the vessel length and DH the vessel diameter, both in m.
DV: Results of the vertical vessel sizing (SizeVertical): AV is the vessel height and DV the vessel...
Results of the vertical vessel sizing (SizeVertical): AV is the vessel height and DV the vessel diameter, both in m.
f: The classic (WinForms) editor window open for this vessel, if any.
The classic (WinForms) editor window open for this vessel, if any. Not saved with the flowsheet.
MixedStream: Internal material stream holding the mixture of all connected inlet streams, rebuilt on each steady-state...
Internal material stream holding the mixture of all connected inlet streams, rebuilt on each steady-state calculation before the flash. Not saved with the flowsheet.