# Local Resistance (MA)

Pipe resistance in a moist air network

Since R2024a

Libraries:
Simscape / Fluids / Moist Air / Pipes & Fittings

## Description

The Local Resistance (MA) block models the pressure loss due to user-defined pipe resistance in a moist air network. You can specify different loss coefficients for forward and reversed flows through the pipe segment.

You can parameterize the loss factor as either a constant relationship based on the pipe pressure or by specifying tabular data for loss coefficients based on the Reynolds number.

### Constant Loss Factor

When you set Local loss parameterization to `Constant`, the losses remain constant over the range of flow velocities. The loss factor is

`${k}_{loss}={k}_{loss,BA}+\frac{\left({k}_{loss,AB}-{k}_{loss,BA}\right)}{2}\left[\mathrm{tanh}\left(\frac{3\Delta p}{\Delta {p}_{crit}}\right)+1\right],$`

where:

• kloss,AB and kloss,BA are the values of the Forward flow loss coefficient (from A to B) and Reverse flow loss coefficient (from B to A) parameters, respectively.

• Δp is the pressure difference, which is pApB.

The critical pressure difference, Δpcrit, is the pressure differential associated with the Critical Reynolds number parameter, Recrit, which is the flow regime transition point between laminar and turbulent flow,

`$\Delta {p}_{crit}=\frac{\overline{\rho }}{2}{k}_{loss,crit}{\left(\frac{\nu {\mathrm{Re}}_{crit}}{{D}_{h}}\right)}^{2},$`

where:

• kloss,crit is the loss factor associated with the critical pressure. The value is based on an average of the forward and reverse loss coefficients.

• ν is the fluid kinematic viscosity.

• $\overline{\rho }$ is the average fluid density.

• Dh is the segment hydraulic diameter, which is the equivalent diameter of a pipe with a non-circular cross-section, ${D}_{h}=\sqrt{\frac{4}{\pi {A}_{flow}}}.$, where Aflow is the value of the Flow area parameter.

### Tabulated Loss Coefficient

When you set Local loss parameterization to ```Tabulated data - loss coefficient vs. Reynolds number```, you can interpolate the loss coefficient from the Reynolds number and the loss coefficient data. The vector of Reynolds numbers can have both positive and negative values, which indicate forward and reverse flow, respectively: ${k}_{loss}=TLU\left(\mathrm{Re}\right).$

### Mass Flow Rate

The block conserves mass such that

`$\begin{array}{l}{\stackrel{˙}{m}}_{A}+{\stackrel{˙}{m}}_{B}=0\\ {\stackrel{˙}{m}}_{wA}+{\stackrel{˙}{m}}_{wB}=0\\ {\stackrel{˙}{m}}_{gA}+{\stackrel{˙}{m}}_{gB}=0\end{array}$`

where:

• $\stackrel{˙}{m}$B is the mixture mass flow rate at port B.

• $\stackrel{˙}{m}$wA and $\stackrel{˙}{m}$wB are the water vapor mass flow rates at ports A and B, respectively.

• $\stackrel{˙}{m}$gA and $\stackrel{˙}{m}$gB are the trace gas mass flow rates at ports A and B, respectively.

The mass flow rate through the valve is

`$\stackrel{˙}{m}={A}_{flow}\frac{\sqrt{2\overline{\rho }}}{\sqrt{{k}_{loss}}}\frac{\Delta p}{{\left[\Delta {p}^{2}+\Delta {p}_{crit}^{2}\right]}^{1/4}},$`

where kloss is the flow loss coefficient.

### Energy Balance

The block balances energy such that

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

where:

• ϕA is the energy flow rate at port A.

• ϕB is the energy flow rate at port B.

## Ports

### Conserving

expand all

Moist air conserving port associated with the entry or exit port to the pipe segment. Flow is positive from port A to port B.

Moist air conserving port associated with the entry or exit port to the pipe segment. Flow is positive from port A to port B.

## Parameters

expand all

Method of calculating the pipe segment loss factor. You can parameterize the loss factor as either a linear relationship between the segment pressure drop and constant loss factor or by specifying the loss factor and Reynolds number data.

Loss coefficient associated with pressure loss for flows from port A to port B.

#### Dependencies

To enable this parameter, set Local loss parameterization to `Constant`.

Loss coefficient associated with pressure loss for flows from port B to port A.

#### Dependencies

To enable this parameter, set Local loss parameterization to `Constant`.

Vector of Reynolds numbers for the tabular parameterization of the loss coefficient. The vector elements must correspond one-to-one with the elements in the Loss coefficient vector parameter. List the elements in ascending order.

#### Dependencies

To enable this parameter, set Local loss parameterization to ```Tabulated data - loss coefficient vs. Reynolds number```.

Vector of loss coefficients for the tabular parameterization of the loss coefficient. The vector elements must correspond one-to-one with the elements in the Reynolds number vector parameter. The elements must be greater than 0.

#### Dependencies

To enable this parameter, set Local loss parameterization to ```Tabulated data - loss coefficient vs. Reynolds number```.

Cross-sectional area of the pipe segment.

Upper Reynolds number limit for laminar flow through the valve.

## Version History

Introduced in R2024a