# Orifice (2P)

**Libraries:**

Simscape /
Fluids /
Two-Phase Fluid /
Valves & Orifices

## Description

The Orifice (2P) block models pressure loss due to a constant or variable area orifice in a
two-phase fluid network. The **Modeling option** parameter controls the
parameterization options for a valve designed for modeling either vapor or liquid, but
does not impact the fluid properties. The block calculates fluid properties inside the
valve from inlet conditions. There is no heat exchange between the fluid and the
environment, and therefore phase change inside the orifice only occurs due to a pressure
drop or a propagated phase change from another part of the model.

The orifice can be constant or variable. When **Orifice type** is
`Variable`

, the physical signal at port
**S** sets the position of the control member, which opens and
closes the orifice.

### Liquid Orifice

When **Modeling option** is ```
Liquid operating
condition
```

, the block parameterizations depend on the value of the
**Orifice type** parameter. The block calculates the pressure
loss and pressure recovery in the same way for all liquid parameterization
options.

The block accounts for pressure loss by using the ratio of the pressure loss across the
whole orifice to the pressure drop immediately across the orifice plate. This ratio,
*PR _{loss}*, is

$$P{R}_{loss}=\frac{\sqrt{1-{\left(\frac{{A}_{orifice}}{{A}_{port}}\right)}^{2}\left(1-{C}_{d}^{2}\right)}-{C}_{d}\frac{{A}_{orifice}}{{A}_{port}}}{\sqrt{1-{\left(\frac{{A}_{orifice}}{{A}_{port}}\right)}^{2}\left(1-{C}_{d}^{2}\right)}+{C}_{d}\frac{{A}_{orifice}}{{A}_{port}}},$$

where:

*C*is the value of the_{d}**Discharge coefficient**parameter.*A*is the instantaneous orifice open area._{orifice}*A*is the value of the_{port}**Cross-sectional area at ports A and B**parameter.

The pressure recovery is the positive pressure change in the valve due to an increase in
area after the orifice hole. If you do not want to capture this increase in
pressure, clear the **Pressure recovery** check box. In this case,
*PR _{loss}* is 1, which reduces the
model complexity. Clear this setting if the orifice hole is quite small relative to
the port area or if the next downstream component is close to the block and any jet
does not have room to dissipate.

The critical pressure difference, *Δp _{crit}*, is the
pressure differential where the flow transitions between laminar and turbulent
flow,

$$\Delta {p}_{crit}=\frac{\left({p}_{A}+{p}_{B}\right)}{2}\left(1-{B}_{lam}\right),$$

where:

*p*and_{A}*p*are the pressure at port_{B}**A**and**B**, respectively.*B*is the value of the_{lam}**Laminar flow pressure ratio**parameter.

**Nominal Mass Flow Rate Parameterization**

When you set **Orifice type** to `Constant`

and
**Orifice Parameterization** to ```
Nominal mass
flow rate
```

, the mass flow rate through the orifice is

$$\dot{m}={\dot{m}}_{nom}\left[\sqrt{\frac{{v}_{nom}}{2\Delta {p}_{nom}}}\right]\sqrt{\frac{2}{{v}_{in}}}\frac{\Delta p}{{\left(\Delta {p}^{2}+\Delta {p}_{crit}^{2}\right)}^{0.25}},$$

where:

$${\dot{m}}_{nom}$$ is the value of the

**Nominal mass flow rate**parameter.*Δp*is the value of the_{nom}**Nominal pressure drop rate**parameter.*v*is the nominal inlet specific volume. The block determines this value from the tabulated fluid properties data based on the value of the_{nom}**Nominal inlet condition specification**parameter.*v*is the inlet specific volume._{in}

**Liquid Orifice Area Parameterization**

When you set **Orifice type** to `Constant`

and
**Orifice Parameterization** to ```
Orifice
area
```

, the block calculates the mass flow rate as

$$\dot{m}=\frac{{C}_{d}{A}_{orifice}\sqrt{\frac{2}{{v}_{in}}}}{\sqrt{P{R}_{loss}\left(1-{\left(\frac{{A}_{orifice}}{{A}_{port}}\right)}^{2}\right)}}\sqrt{\Delta p}\approx \frac{{C}_{d}{A}_{orifice}\sqrt{2\frac{2}{{v}_{in}}}}{\sqrt{P{R}_{loss}\left(1-{\left(\frac{{A}_{orifice}}{{A}_{port}}\right)}^{2}\right)}}\frac{\Delta p}{{\left[\Delta {p}^{2}+\Delta {p}_{crit}\right]}^{1/4}},$$

where *Δp* is the pressure drop over the
orifice, *p _{A} ̶
p_{B}*.

**Linear - Nominal Mass Flow Rate vs. Control Member Position Parameterization**

When you set **Orifice type** to `Variable`

and
**Orifice Parameterization** to ```
Nominal mass
flow rate vs. control member position
```

, the mass flow rate
through the variable-area orifice is

$$\dot{m}=\lambda {\dot{m}}_{nom}\left[\sqrt{\frac{{v}_{nom}}{2\Delta {p}_{nom}}}\right]\sqrt{\frac{2}{{v}_{in}}}\frac{\Delta p}{{\left(\Delta {p}^{2}+\Delta {p}_{crit}^{2}\right)}^{0.25}},$$

where *λ* is the orifice opening fraction,
which is a fraction of the total orifice open area.

The block determines the orifice opening for all variable orifice parameterizations as

$$\lambda =\epsilon \left(1-{f}_{leak}\right)\frac{\left(S-{S}_{\mathrm{min}}\right)}{\Delta S}+{f}_{leak},$$

where:

*ε*is`1`

when**Opening orientation**is`Positive control member displacement opens orifice`

and`-1`

when**Opening orientation**is`Negative control member displacement opens orifice`

.*f*is the value of the_{leak}**Leakage flow fraction**parameter.*S*is th value of the signal at port**S**.*S*is the value of the_{min}**Control member position at closed orifice**parameter.*ΔS*is the value of the**Control member travel between closed and open orifice**parameter.

**Linear - Area vs. Control Member Position Parameterization**

When you set **Orifice type** to
`Variable`

and **Orifice
Parameterization** to ```
Linear - Area vs. control member
position
```

, the orifice area is

$${A}_{orifice}=\lambda {A}_{\mathrm{max}},$$

where *A _{max}* is the
value of the

**Maximum orifice area**parameter.

The mass flow rate is

$$\dot{m}=\frac{{C}_{d}{A}_{orifice}\sqrt{\frac{2}{{v}_{in}}}}{\sqrt{P{R}_{loss}\left(1-{\left(\frac{{A}_{orifice}}{{A}_{port}}\right)}^{2}\right)}}\frac{\Delta p}{{\left[\Delta {p}^{2}+\Delta {p}_{crit}^{2}\right]}^{1/4}}.$$

When the orifice is in a near-open or near-closed
position, you can maintain numerical robustness in your simulation by adjusting
the **Smoothing factor** parameter. If the
**Smoothing factor** parameter is nonzero, the block
smoothly saturates the opening area between
*A _{leak}* and

*A*, where

_{max}*A*. For more information, see Numerical Smoothing.

_{leak}= f_{leak}A_{max}**Tabulated Data - Area vs. Control Member Position Parameterization**

When you set **Orifice type** to `Variable`

and
**Orifice Parameterization** to ```
Tabulated data
- Area vs. control member position
```

, the block interpolates the
orifice area, *A _{orifice}*, from the

**Orifice area vector**and

**Control member position vector**parameters. The signal at port

**S**specifies the control member position. The block uses linear interpolation to query between the data points and nearest extrapolation for points beyond the table boundaries.

The block uses the same equation as the ```
Linear - Area vs. control member
position
```

setting to calculate the volumetric flow
rate.

**Fluid Specific Volume Dynamics**

For all parameterizations, the block calculates the fluid specific volume during simulation based on the liquid state.

If the fluid at the orifice inlet is a liquid-vapor mixture, the block calculates the specific volume as

$${v}_{in}=\left(1-{x}_{dyn}\right){v}_{liq}+{x}_{dyn}{v}_{vap},$$

where:

*x*is the inlet vapor quality. The block applies a first-order lag to the inlet vapor quality of the mixture._{dyn}*v*is the liquid specific volume of the fluid._{liq}*v*is the vapor specific volume of the fluid._{vap}

If the inlet fluid is liquid or vapor,
*v _{in}* is the respective liquid
or vapor specific volume.

If the inlet vapor quality is a liquid-vapor mixture, the block applies a first-order time lag,

$$\frac{d{x}_{dyn}}{dt}=\frac{{x}_{in}-{x}_{dyn}}{\tau},$$

where:

*x*is the dynamic vapor quality._{dyn}*x*is the current inlet vapor quality._{in}*τ*is the value of the**Inlet phase change time constant**parameter.

If the inlet fluid is a subcooled liquid,
*x _{in} = 0*. If the inlet fluid is
a superheated vapor,

*x*.

_{in}= 1### Vapor Orifice

When **Modeling option** is ```
Vapor operating
condition
```

, the block behavior depends on the **Orifice
type**, **Orifice parameterization**, and
**Opening characteristic** parameters.

**Variable Vapor Orifice**

When you set **Orifice type** to `Variable`

and
**Opening characteristic** to
`Linear`

, the block uses the input at port
**S** to calculate the orifice opening,

$$\lambda =\epsilon \left(1-{f}_{leak}\right)\frac{\left(S-{S}_{\mathrm{min}}\right)}{\Delta S}+{f}_{leak},$$

where *S* is the value of the signal at port
**S**, and *S _{min}*
and

*ΔS*are the values of the

**Control member position at closed orifice**and

**Control member travel between closed and open orifice**parameters, respectively.

When you set **Orifice type** to
`Variable`

and **Opening
characteristic** to `Tabulated`

, the block
interpolates the orifice characteristics from the **Control member
position vector** parameter and the input at port **S**.

For a variable orifice, the flow rate in the orifice depends on the
**Opening characteristic** parameter:

`Linear`

— The measure of flow capacity is proportional to the control signal at port**S**. As the control signal increases, the measure of flow capacity scales from the specified minimum to the specified maximum.When you set

**Orifice parameterization**to`Cv flow coefficient`

or`Kv flow coefficient`

, the block treats the parameter**xT pressure differential ratio factor at choked flow**as a constant independent of the control signal.`Tabulated`

— The block calculates the measure of flow capacity as a function of the control signal at port**S**. This function uses a one-dimensional lookup table.When you set

**Orifice parameterization**to`Cv flow coefficient`

or`Kv flow coefficient`

, the block treats the parameter**xT pressure differential ratio factor at choked flow**as a function of the control signal.

**Cv Flow Coefficient Parameterization**

When you set **Orifice parametrization** to ```
Cv
flow coefficient
```

, the mass flow rate is

$$\dot{m}={C}_{v}{N}_{6}Y\sqrt{\frac{({p}_{in}-{p}_{out})}{{v}_{in}}},$$

where:

*C*is the flow coefficient._{v}*N*is a constant equal to 27.3 when mass flow rate is in kg/hr, pressure is in bar, and density is in kg/m_{6}^{3}.*Y*is the expansion factor.*p*is the inlet pressure._{in}*p*is the outlet pressure._{out}*v*is the inlet specific volume._{in}

The expansion factor is

$$Y=1-\frac{{p}_{in}-{p}_{out}}{3{p}_{in}{F}_{\gamma}{x}_{T}},$$

where:

*F*is the ratio of the isentropic exponent to 1.4._{γ}*x*is the value of the_{T}**xT pressure differential ratio factor at choked flow**parameter.

The block smoothly transitions to a linearized form of the equation when the
pressure ratio, $${p}_{out}/{p}_{in}$$, rises above the value of the **Laminar flow pressure
ratio** parameter,
*B _{lam}*,

$$\dot{m}={C}_{v}{N}_{6}{Y}_{lam}\sqrt{\frac{1}{{p}_{avg}(1-{B}_{lam}){v}_{avg}}}({p}_{in}-{p}_{out}),$$

where:

$${Y}_{lam}=1-\frac{1-{B}_{lam}}{3{F}_{\gamma}{x}_{T}}.$$

When the pressure ratio, $${p}_{out}/{p}_{in}$$, falls below $$1-{F}_{\gamma}{x}_{T}$$, the orifice becomes choked and the block uses the equation

$$\dot{m}=\frac{2}{3}{C}_{v}{N}_{6}\sqrt{\frac{{F}_{\gamma}{x}_{T}{p}_{in}}{{v}_{in}}}.$$

**Kv Flow Coefficient Parameterization**

When you set **Orifice parametrization** to ```
Kv flow
coefficient
```

, the block uses the same equations as the
`Cv flow coefficient`

parametrization, but replaces
*C _{v}* with

*K*using the relation $${K}_{v}=0.865{C}_{v}$$.

_{v}**Vapor Orifice Area Parameterization**

When you set **Orifice parametrization** to
`Orifice area`

, the mass flow rate is

$$\dot{m}={C}_{d}{A}_{orifice}\sqrt{\frac{2\gamma}{\gamma -1}{p}_{in}\frac{1}{{v}_{in}}{\left(\frac{{p}_{out}}{{p}_{in}}\right)}^{\frac{2}{\gamma}}\left[\frac{1-{\left(\frac{{p}_{out}}{{p}_{in}}\right)}^{\frac{\gamma -1}{\gamma}}}{1-{\left(\frac{{A}_{orifice}}{{A}_{port}}\right)}^{2}{\left(\frac{{p}_{out}}{{p}_{in}}\right)}^{\frac{2}{\gamma}}}\right]},$$

where:

*C*is the value of the_{d}**Discharge coefficient**parameter.*γ*is the isentropic exponent.

The block smoothly transitions to a linearized form of the equation when
the pressure ratio, $${p}_{out}/{p}_{in}$$, rises above the value of the **Laminar flow
pressure ratio** parameter,
*B _{lam}*,

$$\dot{m}={C}_{d}{A}_{orifice}\sqrt{\frac{2\gamma}{\gamma -1}{p}_{avg}^{\frac{2-\gamma}{\gamma}}\frac{1}{{v}_{avg}}{B}_{lam}^{\frac{2}{\gamma}}\left[\frac{1-\text{\hspace{0.17em}}{B}_{lam}^{\frac{\gamma -1}{\gamma}}}{1-{\left(\frac{{A}_{orifice}}{{A}_{port}}\right)}^{2}{B}_{lam}^{\frac{2}{\gamma}}}\right]}\left(\frac{{p}_{in}^{\frac{\gamma -1}{\gamma}}-{p}_{out}^{\frac{\gamma -1}{\gamma}}}{1-{B}_{lam}^{\frac{\gamma -1}{\gamma}}}\right).$$

When the pressure ratio, $${p}_{out}/{p}_{in}$$, falls below$${\left(\frac{2}{\gamma +1}\right)}^{\frac{\gamma}{\gamma -1}}$$ , the orifice becomes choked and the block uses the equation

$$\dot{m}={C}_{d}{A}_{orifice}\sqrt{\frac{2\gamma}{\gamma +1}{p}_{in}\frac{1}{{v}_{in}}\frac{1}{{\left(\frac{\gamma +1}{2}\right)}^{\frac{2}{\gamma -1}}-{\left(\frac{{A}_{orifice}}{{A}_{port}}\right)}^{2}}}.$$

### Mass Balance

Mass is conserved in the orifice,

$${\dot{m}}_{A}+{\dot{m}}_{B}=0,$$

where:

$${\dot{m}}_{A}$$ is the mass flow rate at port

**A**.$${\dot{m}}_{B}$$ is the mass flow rate at port

**B**.

### Energy Balance

Energy is conserved in the orifice,

$${\Phi}_{A}+{\Phi}_{B}=0,$$

where:

*Φ*is the energy flow at port_{A}**A**.*Φ*is the energy flow at port_{B}**B**.

### Assumptions and Limitations

There is no heat exchange between the valve and the environment.

When

**Modeling option**is`Liquid operating condition`

, the results may not be accurate outside of the subcooled liquid region. When**Modeling option**is`Vapor operating condition`

, the results may not be accurate outside of the superheated vapor region. To model an orifice in a liquid-vapor mixture, set**Modeling option**to`Liquid operating condition`

.

## Examples

## Ports

### Conserving

### Input

## Parameters

## References

[1] ISO 6358-3. "Pneumatic fluid power – Determination of flow-rate characteristics of components using compressible fluids – Part 3: Method for calculating steady-state flow rate characteristics of systems". 2014.

[2] IEC 60534-2-3. "Industrial-process control valves – Part 2-3: Flow capacity – Test procedures". 2015.

[3] ANSI/ISA-75.01.01. "Industrial-Process Control Valves – Part 2-1: Flow capacity – Sizing equations for fluid flow underinstalled conditions". 2012.

[4] P. Beater. *Pneumatic
Drives*. Springer-Verlag Berlin Heidelberg. 2007.

## Extended Capabilities

## Version History

**Introduced in R2021a**