Main Content

Local Resistance (MA)

R2026b

Pipe resistance in a moist air network

Since R2024a

  • Block icon

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

kloss=kloss,BA+(kloss,ABkloss,BA)2[tanh(3ΔpΔplam)+1],

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 laminar pressure difference, Δplam, is the threshold pressure drop at which the flow begins to smoothly transition between laminar and turbulent,

Δplam=pA+pB2(1Blam),

where Blam is the value of the Laminar flow pressure ratio 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: kloss=TLU(Re).

Mass Flow Rate

The block conserves mass such that

m˙A+m˙B=0m˙wA+m˙wB=0m˙gA+m˙gB=0m˙dA+m˙dB=0

where:

  • m˙B is the mixture mass flow rate at port B.

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

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

  • m˙dA and m˙dB are the water droplets mass flow rates at ports A and B, respectively.

The mass flow rate through the valve is

m˙=Aflow2ρ¯klossΔp[Δp2+Δplam2]1/4,

where:

  • Aflow is the value of the Flow area parameter.

  • kloss is the flow loss coefficient.

Energy Balance

The block balances energy such that

ΦA+Φ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.

Programmatic Use

Port: A

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

Programmatic Use

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.

Programmatic Use

Parameter: resistance_loss_spec
Values: "fluids.moist_air.pipes_fittings.enum.ResistanceLossSpec.Constant" | "fluids.moist_air.pipes_fittings.enum.ResistanceLossSpec.Table1DRe"

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.

Programmatic Use

Parameter: loss_coeff_AB

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.

Programmatic Use

Parameter: loss_coeff_BA

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.

Programmatic Use

Parameter: Re_TLU

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.

Programmatic Use

Parameter: loss_coeff_TLU

Cross-sectional area of the pipe segment.

Programmatic Use

Parameter: flow_area

Ratio of the valve outlet pressure to valve inlet pressure at which the fluid transitions between the laminar and turbulent regimes. The pressure loss corresponds to the mass flow rate linearly in laminar flows and quadratically in turbulent flows.

Programmatic Use

Parameter: B_lam

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2024a

expand all