modelInversePowerLaws

Test model for power law flow function and its inverse

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

Information

This model tests the inverse formulation of the power law flow functions for three values of the flow exponent: n=1 (laminar flow), n=1.25, and n=2 (turbulent flow).

The pressure difference dp and dpCalc need to be equal up to the solver tolerance in the turbulent region. However, for small absolute pressure drops, the results differ slightly because the functions Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp and Buildings.Fluid.BaseClasses.FlowModels.powerLaw_m_flow are not exact inverses. The exact inverses are Buildings.Fluid.BaseClasses.FlowModels.powerLaw_dp_inv and Buildings.Fluid.BaseClasses.FlowModels.powerLaw_m_flow_inv.

Parameters

TypeNameDefaultDescription
Realk0.5
Real[3]n{1, 1/0.8, 2}Flow exponent, n=1 for laminar, n=2 for turbulent
Modelica.Units.SI.MassFlowRatem_flow_nominal1Nominal flow rate
Modelica.Units.SI.MassFlowRatem_flow_turbulentm_flow_nominal*0.3Mass flow rate where transition to turbulent flow occurs

Components

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRate[3]m_flow
Modelica.Units.SI.PressureDifferencedpPressure difference
Modelica.Units.SI.PressureDifference[3]dpCalcPressure difference computed by the flow functions
Modelica.Units.SI.Pressure[3]deltaDpPressure difference between input and output to the functions
Modelica.Units.SI.TimedTime2

Revisions

  • October 25, 2026, by Michael Wetter:
    Updated documentation.
    This is for Buildings, #4798.
  • May 30, 2026, by Michael Wetter:
    First implementation.
    This is for Buildings, #4620.