modelPowerLaw_dp

Test model for power law function

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This example compares the mass flow rate of Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp by comparing it with the mass flow rate from Buildings.Airflow.Multizone.BaseClasses.powerLawFixedM. Outside the turbulent region, the two models give the same result. However, inside the turbulent region, the results differ slightly because Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp uses a 5th order polynomial to ensure C2 continuity, while Buildings.Airflow.Multizone.BaseClasses.powerLawFixedM uses a 7th order polynomial.

Parameters

TypeNameDefaultDescription
Realgamma1.5Normalized flow rate where dphi(0)/dpi intersects phi(1)
RealagammaPolynomial coefficient for regularized implementation of flow resistance
Realb1/8*m^2 - 3*gamma - 3/2*m + 35.0/8Polynomial coefficient for regularized implementation of flow resistance
Realc-1/4*m^2 + 3*gamma + 5/2*m - 21.0/4Polynomial coefficient for regularized implementation of flow resistance
Reald1/8*m^2 - gamma - m + 15.0/8Polynomial coefficient for regularized implementation of flow resistance
Modelica.Units.SI.Densityrho1.2Fluid density
Modelica.Units.SI.MassFlowRatem_flow_nominal5Nominal mass flow rate used to compute the flow coefficient k and C for the power law model
Modelica.Units.SI.PressureDifferencedp_nominal10Nominal pressure difference used to compute the flow coefficient k and C for the power law model
Realn1/0.8Flow exponent, n=1 for laminar, n=2 for turbulent
Realkm_flow_nominal/dp_nominal^(1/n)Flow coefficient, k = m_flow/ dp^(1/n)
Modelica.Units.SI.MassFlowRatem_flow_turbulentm_flow_nominalMass flow rate where regularization starts, here set to the same value as m_flow_nominal

Components

TypeNameDefaultDescription
Modelica.Units.SI.PressureDifferencedpPressure difference
Modelica.Units.SI.VolumeFlowRateV_flowVolume flow rate computed with model powerLawFixedM that uses C
Modelica.Units.SI.MassFlowRatem2_flowMass flow rate computed based on V_flow to compare equality with m_flow
Modelica.Units.SI.MassFlowRatem_flowMass flow rate computed with model powerLawFixedM that uses k

Revisions

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