modelCompareFixedResistances

Compare models FixedResistancesDpM and HydraulicResistance

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

Information

Compares the mass flow rate of the two pressure loss models HydraulicResistance and FixedResistanceDpM. For small pressure differences (up to 800 Pa) the flow rate of HydraulicResistance will be larger than the flow rate of FixedResistanceDpM. The difference is lower than 0.1 kg/s.

The parameters of the two models are chosen in a way to achieve the same pressure drop. Results visualize the equation handling near zero. Furthermore, the parameter HR.zeta includes the denominator 8 due to the calculation of final dp_nominal=8*zeta*... in the model HydraulicResistance.


Change parameter HR.from_dp to false and the simulation time will increase by about 25 %.

Choosing this parameter depending whether you are using a mass flow source or a pressure source might improve the stability of the simulation.

Using a mass flow source and HR.from_dp = false shows similiar simulation speed as with HR.from_dp = true.

  • April 27, 2017  by Philipp Mehrfeld:
    Test incl. reversal mass flow.
  • April 2016  by Peter Matthes:
    Example after improved formulation of flow equation according to issue #232.

Components

TypeNameDefaultDescription
Modelica.Blocks.Sources.ConstantPAtm
Modelica.Blocks.Sources.TrapezoidP
AixLib.Fluid.FixedResistances.PressureDropFRdp
AixLib.Fluid.Sources.Boundary_pTsou1
AixLib.Fluid.Sources.Boundary_pTsin1
HydraulicResistanceHR
AixLib.Fluid.Sensors.MassFlowRatemasFlo2Mass flow rate sensor
AixLib.Utilities.Diagnostics.AssertEqualityassEquAssert equality of the two mass flow rates
AixLib.Fluid.Sensors.MassFlowRatemasFlo1Mass flow rate sensor

Contents

NameDescription
Medium