modelBasicFlowFunction_m_flow_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 Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow and its second order derivative Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow_der2. If the derivative implementation is wrong, the simulation will stop with an error.

Implementation

The mass flow rate m_flow is increased non-linearly in order for the first and second derivatives in Buildings.Fluid.BaseClasses.FlowModels.basicFlowFunction_m_flow_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
Buildings.Utilities.Diagnostics.CheckEqualitycheEqu1Block for checking integration error
Buildings.Utilities.Diagnostics.CheckEqualitycheEqu2Block for checking integration error
Modelica.Units.SI.PressureDifferencedpPressure drop
Modelica.Units.SI.PressureDifferencedp_compComparison value for dp
Realder_dp1st order derivative of pressure drop
Realder_dp_comp2nd order derivative of comparison value for pressure drop
Modelica.Units.SI.MassFlowRatem_flowMass flow rate
Modelica.Units.SI.PressureDifferenceerr_dpIntegration error for dp
Realerr_der_dpIntegration error for der_dp

Revisions

  • July 29, 2015, by Michael Wetter:
    First implementation.