functionpowerLaw_m_flow
Information
This model describes the pressure difference and mass flow rate relation of a flow resistance in the form
Δp = sign(ṁ) (ṁ ⁄ k)n
where Δp is the pressure drop, k > 0 is a flow coefficient, ṁ is the mass flow rate, and n ∈ [1, 2] is a flow exponent. The equation is regularized for |ṁ| < ṁt, where ṁt is a parameter. For laminar flow, set n=1 and for turbulent flow, set n=2.
The coefficient C and the polynomial coefficients
b1, b3 and b5 are computed by the function
Buildings.Fluid.BaseClasses.FlowModels.powerLawData
and passed as inputs. As these quantities only depend on the parameters
k, n and m_flow_turbulent, they
can be computed once as parameters rather than at each function evaluation.
The model is used for the fluid flow models that are neither fully laminar nor fully turbulent.
Note regarding arguments
This function takes as inputs not only the coefficients
C, b1, b3 and b5
that are used in its own implementation,
but also the coefficients dp_turbulent, m,
a1, a3 and a5.
With them, this function, its inverse function
Buildings.Fluid.BaseClasses.FlowModels.powerLaw_m_flow_inv,
and
Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp
have the same input arguments, except that this function takes the mass flow rate
m_flow
as the first argument while the other two take the pressure difference
dp.
The inverse annotation passes the input arguments of this function
directly to its inverse function.
All coefficients are computed by the function
Buildings.Fluid.BaseClasses.FlowModels.powerLawData.
Implementation
For |ṁ| < ṁt, the equation is regularized with a fifth-order polynomial so that it is twice continuously differentiable in ṁ.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow | Mass flow rate | |
| Real | k | Flow coefficient, k = m_flow/ dp^(1/n) | |
| Real | n | Flow exponent, n=1 for laminar, n=2 for turbulent | |
| Modelica.Units.SI.MassFlowRate | m_flow_turbulent | Mass flow rate where transition to turbulent flow occurs | |
| Modelica.Units.SI.PressureDifference | dp_turbulent | Pressure difference where turbulent flow occurs | |
| Real | m | Flow exponent for the pressure drop | |
| Real | a1 | Polynomial coefficient for regularized implementation of flow resistance | |
| Real | a3 | Polynomial coefficient for regularized implementation of flow resistance | |
| Real | a5 | Polynomial coefficient for regularized implementation of flow resistance | |
| Real | C | Coefficient 1/k^n, based on the definition k = m_flow / dp^(1/n) | |
| Real | b1 | Polynomial coefficient for regularized implementation of flow resistance | |
| Real | b3 | Polynomial coefficient for regularized implementation of flow resistance | |
| Real | b5 | Polynomial coefficient for regularized implementation of flow resistance |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.PressureDifference | dp | Pressure difference |
Revisions
-
October 22, 2026, by Michael Wetter:
Updated documentation.
This is for Buildings, #4798. -
October 22, 2026, by Martin Sjölund:
Changed theinverseannotation frompowerLaw_dp, which differs from the inverse in the laminar region, to the exact inverse Buildings.Fluid.BaseClasses.FlowModels.powerLaw_m_flow_inv. SetInline=false, as withInline=true, OpenModelica inlines the function before it uses theinverseannotation, and solves a nonlinear equation instead.
This is for Buildings, #4798. -
May 30, 2026, by Michael Wetter:
First implementation.
This is for Buildings, #4620.