functionpowerLawData

Function that computes the coefficients used by powerLaw_dp and powerLaw_m_flow

Information

This function computes the coefficients that are used by the functions Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp and Buildings.Fluid.BaseClasses.FlowModels.powerLaw_m_flow.

The coefficients dp_turbulent, m, a1, a3 and a5 are used by Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp, while the coefficients C, b1, b3 and b5 are used by Buildings.Fluid.BaseClasses.FlowModels.powerLaw_m_flow.

The coefficients only depend on the k, n and m_flow_turbulent which often are parameters in a model. In this case, this function allows to compute the coefficients only once as parameters and then pass them to the above functions, which avoids recomputing them during the time step simulation.

Inputs

TypeNameDefaultDescription
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

Outputs

TypeNameDefaultDescription
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

Revisions

  • May 30, 2026, by Michael Wetter:
    First implementation.
    This is for Buildings, #4620.