functionpowerLaw_dp

Power law used in pressure drop equations when the flow exponent is constant and may be different from 2

Information

This model describes the mass flow rate and pressure difference relation of a flow resistance in the form

ṁ = k sign(Δp) |Δp|1/n

where ṁ is the mass flow rate, k > 0 is a flow coefficient Δ p is the pressure drop and n ∈ [1, 2] is a flow exponent. The equation is regularized for |Δp| < Δpt, where Δpt is a parameter that is computed from the input m_flow_turbulent. For laminar flow, set n=1 and for turbulent flow, set n=2.

The polynomial coefficients a1, a3 and a5, the flow exponent m and the pressure difference dp_turbulent 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. It is similar to Buildings.Airflow.Multizone.BaseClasses.powerLawFixedM except that it is formulated for mass flow rate rather than volume flow rate and uses a fifth-order rather than a seventh-order polynomial for the regularization.

Note regarding arguments

This function takes as inputs not only the coefficients dp_turbulent, m, a1, a3 and a5 that are used in its own implementation, but also the coefficients C, b1, b3 and b5. With them, this function, its inverse function Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp_inv, and Buildings.Fluid.BaseClasses.FlowModels.powerLaw_m_flow have the same input arguments, except that this function takes the pressure difference dp as the first argument while the other two take the mass flow rate m_flow. 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 |Δp| < Δpt, the equation is regularized with a fifth-order polynomial so that it is twice continuously differentiable in Δp.

Inputs

TypeNameDefaultDescription
Modelica.Units.SI.PressureDifferencedpPressure difference
RealkFlow coefficient, k = m_flow/ dp^(1/n)
RealnFlow exponent, n=1 for laminar, n=2 for turbulent
Modelica.Units.SI.MassFlowRatem_flow_turbulentMass flow rate where transition to turbulent flow occurs
Modelica.Units.SI.PressureDifferencedp_turbulentPressure difference where turbulent flow occurs
RealmFlow exponent for the pressure drop
Reala1Polynomial coefficient for regularized implementation of flow resistance
Reala3Polynomial coefficient for regularized implementation of flow resistance
Reala5Polynomial coefficient for regularized implementation of flow resistance
RealCCoefficient 1/k^n, based on the definition k = m_flow / dp^(1/n)
Realb1Polynomial coefficient for regularized implementation of flow resistance
Realb3Polynomial coefficient for regularized implementation of flow resistance
Realb5Polynomial coefficient for regularized implementation of flow resistance

Outputs

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flowMass flow rate

Revisions

  • October 22, 2026, by Michael Wetter:
    Updated documentation.
    This is for Buildings, #4798.
  • October 22, 2026, by Martin Sjölund:
    Changed the inverse annotation from powerLaw_m_flow, which differs from the inverse in the laminar region, to the exact inverse Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp_inv. Set Inline=false, as with Inline=true, OpenModelica inlines the function before it uses the inverse annotation, and solves a nonlinear equation instead.
    This is for Buildings, #4798.
  • May 30, 2026, by Michael Wetter:
    First implementation.
    This is for Buildings, #4620.