Skip to content

Restriction Orifice

DWSIM Plus

Available with a DWSIM Plus (Patreon) subscription.

Restriction orifice plate for an all-gas stream. In sizing mode it calculates the orifice diameter that passes the specified mass flow rate for a given permanent pressure drop; otherwise it calculates the mass flow rate through a given orifice. The orifice flow leaves through outlet port 1 at the reduced pressure and the rest of the feed leaves through outlet port 2.

DWSIM.UnitOperations.RestrictionOrifice.RestrictionOrifice
Assembly DWSIM.UnitOperations.RestrictionOrifice.dll · Object ← BaseClass ← UnitOpBaseClass ← RestrictionOrifice

At a glance

Restriction Orifice in the example flowsheet

Port Index Connected in the example
Inlet, material 0 Gas
Outlet, material 0 Through orifice
Outlet, material 1 Remainder

Example

This code runs on every build of this site, and the output below is what it printed.

fs = (Flowsheet.Create("RestrictionOrificeExample")
      .WithCompounds("Methane", "Ethane", "Propane")
      .WithPropertyPackage(PropertyPackages.PengRobinson))

gas = (fs.AddMaterialStream("Gas")
       .At(Q.Celsius(30.0), Q.Bar(20.0))
       .SetCompoundMolarFlow("Methane", 90.0)       # mol/s
       .SetCompoundMolarFlow("Ethane", 7.0)
       .SetCompoundMolarFlow("Propane", 3.0))
through = fs.AddMaterialStream("Through orifice")   # outlet 1: the orifice flow, at P1 - permanent loss
rest = fs.AddMaterialStream("Remainder")            # outlet 2: the rest of the feed, at P1

ro = (fs.AddRestrictionOrifice("RO-1")
      .WithSizingMode(True)                           # sizing: compute the orifice diameter
      .WithMassFlowRate(Q.KgPerSecond(0.5))
      .WithPipeInternalDiameter(Q.Millimeters(52.5))  # 2 in schedule 40
      .ConnectFeed(gas)
      .ConnectProduct(through, 0)
      .ConnectProduct(rest, 1))
ro.Object.PermanentPressureDrop = 5.0e5               # Pa

fs.AutoLayout()
fs.Solve()

o = ro.Object
print(f"Orifice diameter      = {o.OrificeDiameter * 1000:.2f} mm (beta = {o.Beta:.3f})")
print(f"Orifice pressure drop = {o.PressureDrop / 1e5:.2f} bar")
print(f"Discharge coefficient = {o.C:.4f}, expansion factor = {o.Y:.4f}")
print(f"Reynolds number       = {o.Reynolds:.3g}")
print(f"Outlet pressure       = {through.Object.GetPressure() / 1e5:.2f} bar")

Output

Orifice diameter      = 16.71 mm (beta = 0.318)
Orifice pressure drop = 5.56 bar
Discharge coefficient = 0.6092, expansion factor = 0.9190
Reynolds number       = 3.3e+06
Outlet pressure       = 15.00 bar

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
Orifice Pressure Drop Pa result
Permanent Pressure Drop Pa yes
Pipe Internal Diameter mm yes
Orifice Diameter mm yes
Orifice Area m2 result
Mass Flow Rate kg/s yes
Beta   Beta result
C result
Y result
Reynolds Number result

Learn more

API members

Public members declared by this class. Inherited members are documented on the base classes.

Constructors

RestrictionOrifice(): Initializes a new default instance of the RestrictionOrifice class.

Initializes a new default instance of the RestrictionOrifice class.

public RestrictionOrifice()
Public Sub New()

RestrictionOrifice(string, string): Initializes a new instance of the RestrictionOrifice class with a name and description.

Initializes a new instance of the RestrictionOrifice class with a name and description.

Parameter Type Description
Name String The name of this unit operation.
Description String A brief description of this unit operation.
public RestrictionOrifice(string Name, string Description)
Public Sub New(Name As String, Description As String)

Properties

AOrifice: Gets or sets the orifice bore area, in m2.

Gets or sets the orifice bore area, in m2. Output.

public double AOrifice { get; set; }
Public Property AOrifice As Double

Beta: Gets or sets the diameter ratio Beta = orifice diameter / pipe internal diameter (dimensionless).

Gets or sets the diameter ratio Beta = orifice diameter / pipe internal diameter (dimensionless). Output.

public double Beta { get; set; }
Public Property Beta As Double

C: Gets or sets the discharge coefficient of the orifice (dimensionless), from a Reader-Harris/Gallagher type correlation.

Gets or sets the discharge coefficient of the orifice (dimensionless), from a Reader-Harris/Gallagher type correlation. Output.

public double C { get; set; }
Public Property C As Double

ComponentDescription: Gets or sets the CAPE-OPEN component description for this unit operation.

Gets or sets the CAPE-OPEN component description for this unit operation.

public override string ComponentDescription { get; set; }
Public Overrides Property ComponentDescription As String

ComponentName: Gets or sets the CAPE-OPEN component name for this unit operation.

Gets or sets the CAPE-OPEN component name for this unit operation.

public override string ComponentName { get; set; }
Public Overrides Property ComponentName As String

ConnectionPorts: Connection port definitions of the automatic unit operation template.

Connection port definitions of the automatic unit operation template. Not used by this unit operation, which creates its ports in CreateConnectors; it is empty.

public List<DefaultImplementations.ConnectionPort> ConnectionPorts { get; set; }
Public Property ConnectionPorts As List(Of DefaultImplementations.ConnectionPort)

InputParameters: Input parameter definitions of the automatic unit operation template.

Input parameter definitions of the automatic unit operation template. Not used by this unit operation; it is empty.

public Dictionary<string, DefaultImplementations.Parameter> InputParameters { get; set; }
Public Property InputParameters As Dictionary(Of String, DefaultImplementations.Parameter)

IsPremium: Gets a value indicating whether this unit operation requires a premium (Patreon) subscription.

Gets a value indicating whether this unit operation requires a premium (Patreon) subscription. Always True.

public bool IsPremium { get; }
Public ReadOnly Property IsPremium As Boolean

MassFlowRate: Gets or sets the mass flow rate through the orifice, in kg/s.

Gets or sets the mass flow rate through the orifice, in kg/s. Input in sizing mode; calculated otherwise. Must not exceed the feed mass flow.

public double MassFlowRate { get; set; }
Public Property MassFlowRate As Double

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. Always False.

public override bool MobileCompatible { get; }
Public Overrides ReadOnly Property MobileCompatible As Boolean

ObjectClass: Gets or sets the simulation object class category (pressure changers).

Gets or sets the simulation object class category (pressure changers).

public override SimulationObjectClass ObjectClass { get; set; }
Public Overrides Property ObjectClass As SimulationObjectClass

OrificeDiameter: Gets or sets the orifice bore diameter, in m.

Gets or sets the orifice bore diameter, in m. Calculated in sizing mode; input otherwise. Default 0.005 m.

public double OrificeDiameter { get; set; }
Public Property OrificeDiameter As Double

OutputParameters: Output parameter definitions of the automatic unit operation template.

Output parameter definitions of the automatic unit operation template. Not used by this unit operation; it is empty.

public Dictionary<string, DefaultImplementations.Parameter> OutputParameters { get; set; }
Public Property OutputParameters As Dictionary(Of String, DefaultImplementations.Parameter)

PermanentPressureDrop: Gets or sets the permanent (unrecovered) pressure drop across the orifice, in Pa.

Gets or sets the permanent (unrecovered) pressure drop across the orifice, in Pa. The outlet port 1 pressure is the inlet pressure minus this value.

public double PermanentPressureDrop { get; set; }
Public Property PermanentPressureDrop As Double

PipeInternalDiameter: Gets or sets the internal diameter of the pipe, in m.

Gets or sets the internal diameter of the pipe, in m. Default 0.0254 m.

public double PipeInternalDiameter { get; set; }
Public Property PipeInternalDiameter As Double

PressureDrop: Gets or sets the differential pressure across the orifice plate, in Pa, calculated as the permanent pressure drop...

Gets or sets the differential pressure across the orifice plate, in Pa, calculated as the permanent pressure drop divided by (1 - Beta^2). Output.

public double PressureDrop { get; set; }
Public Property PressureDrop As Double

PressureRatio: Gets or sets the ratio of outlet to inlet pressure, P2/P1 (dimensionless).

Gets or sets the ratio of outlet to inlet pressure, P2/P1 (dimensionless). Output.

public double PressureRatio { get; set; }
Public Property PressureRatio As Double

Reynolds: Gets or sets the orifice Reynolds number, based on the orifice diameter (dimensionless).

Gets or sets the orifice Reynolds number, based on the orifice diameter (dimensionless). Output.

public double Reynolds { get; set; }
Public Property Reynolds As Double

SizingMode: Gets or sets the calculation mode: True (default) calculates the orifice diameter from...

Gets or sets the calculation mode: True (default) calculates the orifice diameter from MassFlowRate; False calculates the mass flow rate from OrificeDiameter.

public bool SizingMode { get; set; }
Public Property SizingMode As Boolean

Y: Gets or sets the gas expansion factor Y (dimensionless).

Gets or sets the gas expansion factor Y (dimensionless). Output.

public double Y { get; set; }
Public Property Y As Double

Methods

Calculate(object): Calculates the object.

Calculates the object.

Parameter Type Description
args Object
public override void Calculate(object args = null)
Public Overrides Sub Calculate(args As Object = Nothing)

CloneXML(): Creates a deep copy of this object by round-tripping through XML serialization.

Creates a deep copy of this object by round-tripping through XML serialization.

public override object CloneXML()
Public Overrides Function CloneXML() As Object

CloseEditForm(): Closes the editor of this object, if it is open.

Closes the editor of this object, if it is open.

public override void CloseEditForm()
Public Overrides Sub CloseEditForm()

DisplayEditForm(): Opens the editor of this object.

Opens the editor of this object. A host that has no editor for it does nothing.

public override void DisplayEditForm()
Public Overrides Sub DisplayEditForm()

DrawIcon(int, int): Draws the restriction orifice icon on a transparent bitmap of the given size.

Draws the restriction orifice icon on a transparent bitmap of the given size.

Parameter Type Description
w Int32 The image width, in pixels.
h Int32 The image height, in pixels.
public SKImage DrawIcon(int w, int h)
Public Function DrawIcon(w As Integer, h As Integer) As SKImage

GetDisplayDescription(): Returns the description string for this unit operation type.

Returns the description string for this unit operation type.

public override string GetDisplayDescription()
Public Overrides Function GetDisplayDescription() As String

GetDisplayName(): Returns the display name for this unit operation type.

Returns the display name for this unit operation type.

public override string GetDisplayName()
Public Overrides Function GetDisplayName() As String

GetEditingForm(): The editor window of this object, a window of the host's UI framework.

The editor window of this object, a window of the host's UI framework.

public override object GetEditingForm()
Public Overrides Function GetEditingForm() As Object

GetIconBitmapBytes(): Returns the raw bytes of the icon image for this unit operation.

Returns the raw bytes of the icon image for this unit operation.

public override byte[] GetIconBitmapBytes()
Public Overrides Function GetIconBitmapBytes() As Byte()

GetPreferredGraphicObjectHeight(): Returns the preferred height of the flowsheet graphic object, in pixels.

Returns the preferred height of the flowsheet graphic object, in pixels.

public override double GetPreferredGraphicObjectHeight()
Public Overrides Function GetPreferredGraphicObjectHeight() As Double

GetPreferredGraphicObjectWidth(): Returns the preferred width of the flowsheet graphic object, in pixels.

Returns the preferred width of the flowsheet graphic object, in pixels.

public override double GetPreferredGraphicObjectWidth()
Public Overrides Function GetPreferredGraphicObjectWidth() As Double

GetProperties(PropertyType): Get a list of all properties of the object.

Get a list of all properties of the object.

Parameter Type Description
proptype PropertyType Type of the property.
public override string[] GetProperties(PropertyType proptype)
Public Overrides Function GetProperties(proptype As PropertyType) As String()

GetPropertyUnit(string, IUnitsOfMeasure): Gets the units of a property.

Gets the units of a property.

Parameter Type Description
prop String Property identifier.
su IUnitsOfMeasure Units system to use. Null to use the default (SI) system.
public override string GetPropertyUnit(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyUnit(prop As String, su As IUnitsOfMeasure = Nothing) As String

GetPropertyValue(string, IUnitsOfMeasure): Returns the value of a named property, converting from SI to the current unit system.

Returns the value of a named property, converting from SI to the current unit system. Falls back to extra properties if the property is not found in the base implementation.

Parameter Type Description
prop String The property identifier string.
su IUnitsOfMeasure Optional units-of-measure system used for conversion; uses the shared SI system when Nothing.
public override object GetPropertyValue(string prop, IUnitsOfMeasure su = null)
Public Overrides Function GetPropertyValue(prop As String, su As IUnitsOfMeasure = Nothing) As Object

SetPropertyValue(string, object, IUnitsOfMeasure): Sets the value of a property.

Sets the value of a property.

Parameter Type Description
prop String Property identifier.
propval Object Property value to set at the specified units.
su IUnitsOfMeasure Units system to use. Null to use the default (SI) system.
public override bool SetPropertyValue(string prop, object propval, IUnitsOfMeasure su = null)
Public Overrides Function SetPropertyValue(prop As String, propval As Object, su As IUnitsOfMeasure = Nothing) As Boolean

UpdateEditForm(): Redraws the editor of this object with the current values, if it is open.

Redraws the editor of this object with the current values, if it is open.

public override void UpdateEditForm()
Public Overrides Sub UpdateEditForm()

Fields

editwindow: The classic (WinForms) editor window open for this unit operation, if any.

The classic (WinForms) editor window open for this unit operation, if any. Not saved with the flowsheet.

public Editor editwindow
Public editwindow As Editor