functionbasicFlowFunction_dp_inv_der2

2nd derivative of basicFlowFunction_dp_inv

Extends from Modelica.Icons.Function (Icon for functions).

Information

Function that implements the second order derivative of Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp_inv, assuming constant flow coefficients.

When called with m_flow_der=der(m_flow) and m_flow_der2=der(m_flow_der), this function returns the second order derivative of dp with respect to time. When called with m_flow_der=1 and m_flow_der2=0, this function returns the second order derivative of dp with respect to m_flow.

Implementation

Let f denote Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp. Differentiating m_flow = f(dp) twice gives m_flow_der2 = f'(dp) dp_der2 + f''(dp) dp_der^2, which this function solves for dp_der2. The term f'(dp) is computed by Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp_der with dp_der=1, and the term f''(dp) dp_der^2 by Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp_der2 with dp_der2=0.

Inputs

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flowMass flow rate in design flow direction
RealkFlow coefficient, k=m_flow/sqrt(dp), with unit=(kg.m)^(1/2)
Modelica.Units.SI.MassFlowRatem_flow_turbulentMass flow rate where transition to turbulent flow occurs
Realm_flow_der1st derivative of mass flow rate in design flow direction
Realm_flow_der22nd derivative of mass flow rate in design flow direction

Outputs

TypeNameDefaultDescription
Realdp_der22nd derivative of pressure difference between port_a and port_b (= port_a.p - port_b.p)

Revisions

  • October 22, 2026, by Martin Sjölund:
    First implementation.
    This is for Buildings, #4798.