# Orifice (TL)

**Libraries:**

Simscape /
Fluids /
Thermal Liquid /
Valves & Orifices

## Description

The Orifice (TL) block models the flow through a local
restriction with a constant or variable opening area. For variable orifices, a control
member connected to port **S** sets the opening position. The opening
area is parametrized either linearly or by lookup table.

The block conserves mass such that

$${\dot{m}}_{A}+{\dot{m}}_{B}=\rho {v}_{A}{A}_{A}+\rho {v}_{B}{A}_{B}=0.$$

This mass balance implies that there is an increase in velocity when there is a decrease in
area, and there is a reduction in velocity when the flow discharges into a larger area.
In accordance with the Bernoulli principle, this change in velocity results in a region
of lower pressure in the orifice and a higher pressure in the expansion zone. The
resulting increase in pressure, which is called *pressure recovery*,
depends on the discharge coefficient of the orifice and the ratio of the orifice and
port areas.

### Constant Orifices

For constant orifices, the orifice area,
*A*_{orifice}, does not change over the
course of the simulation.

**Using the**

`Constant`

Area ParameterizationThe block calculates the mass flow rate as

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

where:

*C*_{d}is the**Discharge coefficient**parameter.*A*_{orifice}is the instantaneous orifice open area.*A*_{port}is the**Cross-sectional area at ports A and B**parameter.$$\overline{\rho}$$ is the average fluid density.

*PR*_{loss} and
*Δp*_{crit} are calculated in the same
manner for constant and variable orifices.

This approximation for $$\dot{m}$$ and the Local Resistance (TL) block are the same.

**Using the**

```
Tabulated data - Volumetric flow rate vs. pressure
drop
```

ParameterizationThe volumetric flow rate is determined from the tabulated values of the pressure
differential, *Δp*, which you can provide. If you provide only
non-negative values for both the volumetric flow rate and pressure drop vectors,
the block extrapolates the table to contain negative values. The volumetric flow
rate is interpolated from this extended table.

If the **Volumetric flow rate vector** and **Pressure
drop vector** parameters contain both negative and positive values
but no 0, the block inserts an origin into the vectors to ensure the valve does
not have nonzero flow rate when the pressure drop is 0, which is
non-physical.

### Variable Orifices

For variable orifices, when you set **Opening orientation** to
`Positive control member displacement opens orifice`

opens the orifice when the signal at **S** is positive, while a
`Negative control member displacement opens orifice`

orientation opens the orifice when the signal at **S** is negative.
In both cases, the signal is positive and the orifice opening is set by the
magnitude of the signal.

**Using the**

```
Linear - Area vs. control member
position
```

ParameterizationThe orifice area *A*_{orifice} is based
on the control member position and the ratio of orifice area and maximum control
member position:

$${A}_{orifice}=\frac{\left({A}_{\mathrm{max}}-{A}_{leak}\right)}{\Delta S}\left(S-{S}_{\mathrm{min}}\right)\epsilon +{A}_{leak},$$

where:

*S*_{min}is the**Control member position at closed orifice**parameter.*ΔS*is the**Control member travel between closed and open orifice**parameter.*A*_{max}is the**Maximum orifice area**parameter.*A*_{leak}is the**Leakage area**parameter.*ε*is the**Opening orientation**parameter.

The volumetric flow rate is determined by the pressure-flow rate equation:

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

where *A* is the **Cross-sectional
area at ports A and B**.

When the orifice is in a near-open or
near-closed position in the linear parameterization, 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*. For more information, see Numerical Smoothing.

_{max}**Using the**

```
Tabulated data - Area vs. control member
position
```

ParameterizationWhen you use the ```
Tabulated data - Area vs. control member
position
```

parameterization, the orifice area
*A*_{orifice} is interpolated from the
tabulated values of opening area and the control member position,
*ΔS*, which you can provide. As with the
`Linear - Area vs. control member position`

parameterization, the volumetric flow rate is determined by the pressure-flow
rate equation:

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

where *A*_{orifice} is:

*A*, the last element of the_{max}**Orifice area vector**parameter, if the physical signal at port**S**is larger than the last element of the**Control member position vector**parameter.*A*, the first element of the_{leak}**Orifice area vector**parameter, if the physical signal at port**S**is smaller than the first element of the**Control member position vector**parameter.The linearly interpolated value of the

**Orifice area vector**parameter if the calculated area is between the limits of the first and last element of the**Control member position vector**parameter.

*A _{orifice}* is a function
of the control member position received at port

**S**. The block queries between data points with linear interpolation and uses nearest extrapolation for points beyond the table boundaries.

**Using the**

```
Tabulated data - Volumetric flow rate vs. control
member position and pressure drop
```

ParameterizationThe ```
Tabulated data - Volumetric flow rate vs. control member position and
pressure drop
```

parameterization interpolates the volumetric
flow rate directly from a user-provided volumetric flow rate table, which is
based on the control member position and pressure drop over the orifice. The
block queries between data points with linear interpolation and uses
nearest
extrapolation with respect to control member position and linear extrapolation
with respect to pressure drop.

This data can include negative pressure drops and negative opening values. If a negative pressure drop is included in the dataset, the volumetric flow rate will change direction. However, the flow rate will remain unchanged for negative opening values.

If the **Pressure drop vector, dp** parameter does not contain a 0 and
the **Volumetric flow rate table, q(s,dp)** parameter does not
contain a corresponding column of 0's, the block inserts them to ensure the
valve does not have nonzero flow rate when the pressure drop is 0, which is
non-physical.

**Using the**

```
Tabulated data - Mass flow rate vs. control member
position and pressure drop
```

Parameterization```
Tabulated data - Mass flow rate vs. control member position and pressure
drop
```

— Calculate the mass flow rate directly from the control
member position and the pressure drop across the valve. The relationship between
the three variables can be nonlinear and it is given by the tabulated data in
the **Control member position vector, s**, **Pressure
drop vector, dp**, and **Mass flow rate table,
mdot(s,dp)** block parameters:

$${\dot{m}}_{\text{Tab}}=\frac{{\rho}_{\text{Avg}}}{{\rho}_{\text{Ref}}}\dot{m}(\Delta S,\Delta p),$$

where $$\dot{m}$$ is the tabulated form of the mass flow rate, a function of the
control member position, *h*, and of the pressure drop across
the orifice, *Δp*. The mass flow rate is adjusted for
temperature and pressure by the ratio *ρ _{Avg}*/

*ρ*, where

_{Ref}*ρ*is the average fluid density in the orifice and

_{Avg}*ρ*is the reference density for the values of the

_{ref}**Reference inflow temperature**and

**Reference inflow pressure**parameters.

### Pressure Loss

*Pressure loss* describes the reduction of pressure in the valve due to
a decrease in area. The block calculates the pressure loss term,
*PR*_{loss} as:

$$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}}}.$$

*Pressure recovery* describes the positive pressure change in the valve
due to an increase in area. If you do not wish to capture this increase in pressure,
clear the **Pressure recovery** check box. In this case,
*PR*_{loss} is 1.

### Critical Pressure

The critical pressure difference, *Δp*_{crit}, is the
pressure differential associated with the **Critical Reynolds
number** parameter, *Re*_{crit},
which is the point of transition between laminar and turbulent flow in the
fluid:

$$\Delta {p}_{crit}=\frac{\pi \overline{\rho}}{8{A}_{orifice}}{\left(\frac{\nu {\mathrm{Re}}_{crit}}{{C}_{d}}\right)}^{2}.$$

### Energy Balance

The block treats the orifice as an adiabatic component. No heat exchange can occur between
the fluid and the wall that surrounds it. No work is done on or by the fluid as it
traverses from inlet to outlet. With these assumptions, energy can flow by advection
only, through ports **A** and **B**. By the principle of conservation of energy, the sum of the port
energy flows must always equal zero:

$${\varphi}_{\text{A}}+{\varphi}_{\text{B}}=0,$$

where *ϕ* is defined as the energy flow rate
*into* the orifice through one of the ports (**A** or **B**).

### Faults

To model a fault, in the **Faults** section,
click the **Add fault** hyperlink next to the fault that you want to model. Use
the fault parameters to specify the fault properties. For more information about fault modeling,
see Introduction to Simscape Faults.

The **Opening area when faulted** parameter has three fault options:

`Closed`

— The orifice freezes at its smallest value, depending on the**Orifice parameterization**:When

**Orifice parameterization**is set to`Linear - Area vs. control member position`

, the orifice freezes at the**Leakage area**.When

**Orifice parameterization**is set to`Tabulated data - Area vs. control member position`

, the orifice freezes at the first element of the**Orifice area vector**.When

**Orifice parameterization**is set to`Tabulated data - Volumetric flow rate vs. control member position and pressure drop`

, the orifice freezes at the first row of the**Volumetric flow rate table, q(s,dp)**.When

**Orifice parameterization**is set to`Tabulated data - Mass flow rate vs. control member position and pressure drop`

, the orifice freezes at the first row of the**Mass flow rate table, mdot(s,dp)**.

`Open`

— The orifice freezes at its largest value, depending on the**Orifice parameterization**:When

**Orifice parameterization**is set to`Linear - Area vs. control member position`

, the orifice freezes at the**Maximum orifice area**.When

**Orifice parameterization**is set to`Tabulated data - Area vs. control member position`

, the orifice freezes at the last element of the**Orifice area vector**.When

**Orifice parameterization**is set to`Tabulated data - Volumetric flow rate vs. control member position and pressure drop`

, the orifice freezes at the last row of the**Volumetric flow rate table, q(s,dp)**.When

**Orifice parameterization**is set to`Tabulated data - Mass flow rate vs. control member position and pressure drop`

, the orifice freezes at the last row of the**Mass flow rate table, mdot(s,dp)**.

`Maintain at last value`

— The orifice seizes at the open area or volumetric flow rate when the trigger occurs.

## Examples

## Ports

### Input

### Conserving

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2022a**