modelBasicFlowFunction_dp_DerivativeCheck2

Model that checks the correct implementation of the 2nd order derivative of the flow function

Extends from Modelica.Icons.Example.

Information

This model validates the implementation of IDEAS.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp and its second order derivative IDEAS.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp_der2. If the derivative implementation is wrong, the simulation will stop with an error.

Implementation

The pressure drop dp is increased non-linearly in order for the first and second derivatives in IDEAS.Fluid.BaseClasses.FlowModels.basicFlowFunction_dp_der2 to be non-zero during part of the simulation. This will ensure full code coverage of this function.

Parameters

TypeNameDefaultDescription
Realk0.35Flow coefficient
Modelica.Units.SI.MassFlowRatem_flow_turbulent0.36Mass flow rate where transition to turbulent flow occurs

Components

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flowMass flow rate
Modelica.Units.SI.MassFlowRatem_flow_compComparison value for m_flow
Realder_m_flow1st order derivative of mass flow rate
Realder_m_flow_comp2nd order derivative of comparison value for m_flow
Modelica.Units.SI.PressureDifferencedpPressure drop
Modelica.Units.SI.MassFlowRateerr_m_flowIntegration error for m_flow
Realerr_der_m_flowIntegration error for der_m_flow

Revisions

  • January 22, 2016, by Michael Wetter:
    Corrected type declaration of pressure difference. This is for #404.
  • July 29, 2015, by Michael Wetter:
    First implementation.