functionbasicFlowFunction_m_flow_inv_der2
Extends from Modelica.Icons.Function (Icon for functions).
Information
Function that implements the second order derivative of Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow_inv, assuming constant flow coefficients.
When called with dp_der=der(dp) and dp_der2=der(dp_der),
this function returns the second order derivative of m_flow
with respect to time.
When called with dp_der=1 and dp_der2=0,
this function returns the second order derivative of m_flow
with respect to dp.
Implementation
Let f denote
Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow.
Differentiating dp = f(m_flow) twice gives
dp_der2 = f'(m_flow) m_flow_der2 + f''(m_flow) m_flow_der^2,
which this function solves for m_flow_der2.
The term f'(m_flow) is computed by
Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow_der
with m_flow_der=1, and the term f''(m_flow) m_flow_der^2 by
Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow_der2
with m_flow_der2=0.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.PressureDifference | dp | Pressure difference between port_a and port_b (= port_a.p - port_b.p) | |
| Real | k | Flow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2) | |
| Modelica.Units.SI.MassFlowRate | m_flow_turbulent | Mass flow rate where transition to turbulent flow occurs | |
| Real | dp_der | 1st derivative of pressure difference between port_a and port_b (= port_a.p - port_b.p) | |
| Real | dp_der2 | 2nd derivative of pressure difference between port_a and port_b (= port_a.p - port_b.p) |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | m_flow_der2 | 2nd derivative of mass flow rate in design flow direction |
Revisions
-
October 22, 2026, by Martin Sjölund:
First implementation.
This is for Buildings, #4798.