modelPowerLaw_dp_inv_DerivativeCheck
Model that checks the correct implementation of the 1st order derivative of the inverse of the power law function
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This model validates the implementation of Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp_inv and its first order derivative Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp_inv_der. If the derivative implementation is wrong, the simulation will stop with an error.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | gain | 0.5 | Gain for computing the mass flow rate |
| Real | k | 0.5 | Flow coefficient, k = m_flow/ dp^(1/n) |
| Real | n | 1.5 | Flow exponent, n=1 for laminar, n=2 for turbulent |
| Modelica.Units.SI.MassFlowRate | m_flow_turbulent | 0.1 | Mass flow rate where transition to turbulent flow occurs |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow | Mass flow rate | |
| Modelica.Units.SI.PressureDifference | dp | Pressure difference | |
| Modelica.Units.SI.PressureDifference | dp_comp | Comparison value for dp | |
| Modelica.Units.SI.PressureDifference | err | Integration error |
Revisions
-
October 22, 2026, by Michael Wetter:
First implementation.
This is for Buildings, #4798.