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
| Type | Name | Default | Description |
|---|---|---|---|
| Real | gamma | 1.5 | Normalized flow rate where dphi(0)/dpi intersects phi(1) |
| Real | a | gamma | Polynomial coefficient for regularized implementation of flow resistance |
| Real | b | 1/8*m^2 - 3*gamma - 3/2*m + 35.0/8 | Polynomial coefficient for regularized implementation of flow resistance |
| Real | c | -1/4*m^2 + 3*gamma + 5/2*m - 21.0/4 | Polynomial coefficient for regularized implementation of flow resistance |
| Real | d | 1/8*m^2 - gamma - m + 15.0/8 | Polynomial coefficient for regularized implementation of flow resistance |
| Modelica.Units.SI.Density | rho | 1.2 | Fluid density |
| Modelica.Units.SI.MassFlowRate | m_flow_nominal | 5 | Nominal mass flow rate used to compute the flow coefficient k and C for the power law model |
| Modelica.Units.SI.PressureDifference | dp_nominal | 10 | Nominal pressure difference used to compute the flow coefficient k and C for the power law model |
| Real | n | 1/0.8 | Flow exponent, n=1 for laminar, n=2 for turbulent |
| Real | k | m_flow_nominal/dp_nominal^(1/n) | Flow coefficient, k = m_flow/ dp^(1/n) |
| Modelica.Units.SI.MassFlowRate | m_flow_turbulent | m_flow_nominal | Mass flow rate where regularization starts, here set to the same value as m_flow_nominal |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.PressureDifference | dp | Pressure difference | |
| Modelica.Units.SI.VolumeFlowRate | V_flow | Volume flow rate computed with model powerLawFixedM that uses C | |
| Modelica.Units.SI.MassFlowRate | m2_flow | Mass flow rate computed based on V_flow to compare equality with m_flow | |
| Modelica.Units.SI.MassFlowRate | m_flow | Mass flow rate computed with model powerLawFixedM that uses k |
Revisions
-
May 30, 2026, by Michael Wetter:
First implementation.
This is for Buildings, #4620.