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
| Type | Name | Default | Description |
|---|---|---|---|
| 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 |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| 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 |
Revisions
-
May 30, 2026, by Michael Wetter:
First implementation.
This is for Buildings, #4620.