Restriction in flow area in gas network
Simscape / Foundation Library / Gas / Elements
The Local Restriction (G) block models the pressure drop due to a localized reduction in flow area, such as a valve or an orifice, in a gas network. Choking occurs when the restriction reaches the sonic condition.
Ports A and B represent the restriction inlet and outlet. The input physical signal at port AR specifies the restriction area. Alternatively, you can specify a fixed restriction area as a block parameter.
The block icon changes depending on the value of the Restriction type parameter.
Restriction Type  Block Icon 





The restriction is adiabatic. It does not exchange heat with the environment.
The restriction consists of a contraction followed by a sudden expansion in flow area. The gas accelerates during the contraction, causing the pressure to drop. The gas separates from the wall during the sudden expansion, causing the pressure to recover only partially due to the loss of momentum.
Local Restriction Schematic
Caution
Gas flow through this block can choke. If a Mass Flow Rate Source (G) block or a Controlled Mass Flow Rate Source (G) block connected to the Local Restriction (G) block specifies a greater mass flow rate than the possible choked mass flow rate, the simulation generates an error. For more information, see Choked Flow.
The mass balance equation is:
$${\dot{m}}_{A}+{\dot{m}}_{B}=0$$
where $$\dot{m}$$_{A} and $$\dot{m}$$_{B} are the mass flow rates at ports A and B, respectively. Flow rate associated with a port is positive when it flows into the block.
The energy balance equation is:
$${\Phi}_{A}+{\Phi}_{B}=0$$
where Φ_{A} and Φ_{B} are energy flow rates at ports A and B, respectively.
The block is assumed adiabatic. Therefore, there is no change in specific total enthalpy between port A, port B, and the restriction:
$$\begin{array}{l}{h}_{A}+\frac{{w}_{A}^{2}}{2}={h}_{R}+\frac{{w}_{R}^{2}}{2}\\ {h}_{B}+\frac{{w}_{B}^{2}}{2}={h}_{R}+\frac{{w}_{R}^{2}}{2}\end{array}$$
where h is the specific enthalpy at port A, port B, or restriction R, as indicated by the subscript.
The ideal flow velocities at port A, port B, and the restriction are:
$$\begin{array}{l}{w}_{A}=\frac{{\dot{m}}_{ideal}}{{\rho}_{A}S}\\ {w}_{B}=\frac{{\dot{m}}_{ideal}}{{\rho}_{B}S}\\ {w}_{R}=\frac{{\dot{m}}_{ideal}}{{\rho}_{R}{S}_{R}}\end{array}$$
where:
S is the crosssectional area at ports A and B.
S_{R} is the crosssectional area at the restriction.
ρ is the density of gas volume at port A, port B, or restriction R, as indicated by the subscript.
The theoretical mass flow rate without nonideal effects is:
$${\dot{m}}_{ideal}=\frac{{\dot{m}}_{A}}{{C}_{d}}$$
where C_{d} is the discharge coefficient.
The pressure difference between ports A and B is based on a momentum balance for flow area contraction between the inlet and the restriction, plus a momentum balance for sudden flow area expansion between the restriction and the outlet.
For flow from port A to port B:
$$\Delta {p}_{AB}={\rho}_{R}\cdot {w}_{R}\cdot \left{w}_{R}\right\cdot \left(\frac{1+r}{2}\left(1r\frac{{\rho}_{R}}{{\rho}_{A}}\right)r\left(1r\frac{{\rho}_{R}}{{\rho}_{B}}\right)\right)$$
where r is the area ratio, r = S_{R}/S.
For flow from port B to port A:
$$\Delta {p}_{BA}={\rho}_{R}\cdot {w}_{R}\cdot \left{w}_{R}\right\cdot \left(\frac{1+r}{2}\left(1r\frac{{\rho}_{R}}{{\rho}_{B}}\right)r\left(1r\frac{{\rho}_{R}}{{\rho}_{A}}\right)\right)$$
The pressure differences in the two preceding equations are proportional to the square of the flow rate. This is the typical behavior for turbulent flow. However, for laminar flow, the pressure difference becomes linear with respect to flow rate. The laminar approximation for the pressure difference is:
$$\Delta {p}_{lam}=\sqrt{\frac{{\rho}_{R}\Delta {p}_{transition}}{2}}\left(1r\right)$$
The threshold for transition from turbulent flow to laminar flow is defined as Δp_{transition} = p_{avg}(1 — B_{lam}), where B_{lam} is the pressure ratio at the transition between laminar and turbulent regimes (Laminar flow pressure ratio parameter value) and p_{avg} = (p_{A} + p_{B})/2.
The pressure at the restriction is based on a momentum balance for flow area contraction between the inlet and the restriction.
For flow from port A to port B:
$${p}_{{R}_{AB}}={p}_{A}{\rho}_{R}\cdot {w}_{R}\cdot \left{w}_{R}\right\cdot \frac{1+r}{2}\left(1r\frac{{\rho}_{R}}{{\rho}_{A}}\right)$$
For flow from port B to port A:
$${p}_{{R}_{BA}}={p}_{B}+{\rho}_{R}\cdot {w}_{R}\cdot \left{w}_{R}\right\cdot \frac{1+r}{2}\left(1r\frac{{\rho}_{R}}{{\rho}_{B}}\right)$$
For laminar flow, the pressure at the restriction is approximately
$${p}_{{R}_{lam}}={p}_{avg}{\rho}_{R}\cdot {w}_{R}^{2}\frac{1{r}^{2}}{2}$$
The block uses a cubic polynomial in terms of (p_{A} – p_{B}) to smoothly blend the pressure difference and the restriction pressure between the turbulent regime and the laminar regime:
When Δp_{transition} ≤ p_{A} – p_{B},
then p_{A} – p_{B} = Δp_{AB}
and p_{R} = p_{RAB}.
When 0 ≤ p_{A} – p_{B} < Δp_{transition},
then p_{A} – p_{B} is smoothly blended between Δp_{AB} and Δp_{lam}
and p_{R} is smoothly blended between p_{RAB} and p_{Rlam}.
When –Δp_{transition} < p_{A} – p_{B} ≤ 0,
then p_{A} – p_{B} is smoothly blended between Δp_{BA} and Δp_{lam}
and p_{R} is smoothly blended between p_{RBA} and p_{Rlam}.
When p_{A} – p_{B} ≤ –Δp_{transition},
then p_{A} – p_{B} = Δp_{BA}
and p_{R} = p_{RBA}.
When the flow through the restriction becomes choked, further changes to the flow are dependent on the upstream conditions and are independent of the downstream conditions.
If A.p is the Across variable at port A and p_{Bchoked} is the hypothetical pressure at port B, assuming choked flow from port A to port B, then
$$A.p{p}_{{B}_{choked}}={\rho}_{R}\cdot {a}_{R}^{2}\left(\frac{1+r}{2}\left(1r\frac{{\rho}_{R}}{{\rho}_{A}}\right)r\left(1r\frac{{\rho}_{R}}{{\rho}_{B}}\right)\right)$$
where a is speed of sound.
If B.p is the Across variable at port B and p_{Achoked} is the hypothetical pressure at port A, assuming choked flow from port B to port A, then
$$B.p{p}_{{A}_{choked}}={\rho}_{R}\cdot {a}_{R}^{2}\left(\frac{1+r}{2}\left(1r\frac{{\rho}_{R}}{{\rho}_{B}}\right)r\left(1r\frac{{\rho}_{R}}{{\rho}_{A}}\right)\right)$$
The actual pressures at ports A and B, p_{A} and p_{B}, respectively, depend on whether choking has occurred.
For flow from port A to port B, p_{A} = A.p and
$${p}_{B}=\{\begin{array}{ll}B.p,\hfill & \text{if}B.p\ge {p}_{{B}_{choked}}\hfill \\ {p}_{{B}_{choked}},\hfill & \text{if}B.p{p}_{{B}_{choked}}\text{}\hfill \end{array}$$
For flow from port B to port A, p_{B} = B.p and
$${p}_{A}=\{\begin{array}{ll}A.p,\hfill & \text{if}A.p\ge {p}_{{A}_{choked}}\hfill \\ {p}_{{A}_{choked}},\hfill & \text{if}A.p{p}_{{A}_{choked}}\text{}\hfill \end{array}$$
The restriction is adiabatic. It does not exchange heat with the environment.
This block does not model supersonic flow.