modelParallelPressureDrop

Fixed flow resistance with multiple parallel circuits

Extends from IDEAS.Fluid.BaseClasses.PartialResistance (Partial model for a hydraulic resistance).

Information

This is a model of a resistance with a fixed flow coefficient. The mass flow rate is computed as

ṁ = k √ΔP,

where k is a constant and ΔP is the pressure drop. The constant k is equal to k=m_flow_nominal/dp_nominal, where m_flow_nominal and dp_nominal are parameters. In the region abs(m_flow) < m_flow_turbulent, the square root is replaced by a differentiable function with finite slope. The value of m_flow_turbulent is computed as follows:

  • If the parameter use_dh is false (the default setting), the equation m_flow_turbulent = deltaM * abs(m_flow_nominal), where deltaM=0.3 and m_flow_nominal are parameters that can be set by the user.
  • Otherwise, the equation m_flow_turbulent = eta_nominal*dh/4*π*ReC is used, where eta_nominal is the dynamic viscosity, obtained from the medium model. The parameter dh is the hydraulic diameter and ReC=4000 is the critical Reynolds number, which both can be set by the user.

The figure below shows the pressure drop for the parameters m_flow_nominal=5 kg/s, dp_nominal=10 Pa and deltaM=0.3.

image

If the parameter show_T is set to true, then the model will compute the temperature at its ports. Note that this can lead to state events when the mass flow rate approaches zero, which can increase computing time.

The parameter from_dp is used to determine whether the mass flow rate is computed as a function of the pressure drop (if from_dp=true), or vice versa. This setting can affect the size of the nonlinear system of equations.

If the parameter linearized is set to true, then the pressure drop is computed as a linear function of the mass flow rate.

Setting allowFlowReversal=false can lead to simpler equations. However, this should only be set to false if one can guarantee that the flow never reverses its direction. This can be difficult to guarantee, as pressure imbalance after the initialization, or due to medium expansion and contraction, can lead to reverse flow.

Notes

For more detailed models that compute the actual flow friction, models from the package Modelica.Fluid can be used and combined with models from the Buildings library.

Implementation

The pressure drop is computed by calling a function in the package IDEAS.Fluid.BaseClasses.FlowModels, This package contains regularized implementations of the equation

m = sign(Δp) k √ Δp  

and its inverse function.

To decouple the energy equation from the mass equations, the pressure drop is a function of the mass flow rate, and not the volume flow rate. This leads to simpler equations.

Parameters

TypeNameDefaultDescription
BooleanhomotopyInitialization (from PartialResistance)true= true, use homotopy method
Modelica.Units.SI.MassFlowRatem_flow_turbulent (from PartialResistance)Turbulent flow if |m_flow| >= m_flow_turbulent
RealnParCirNumber of parallel circuits
Booleanuse_dhfalseSet to true to specify hydraulic diameter
Modelica.Units.SI.Lengthdh1Hydraulic diameter
RealReC4000Reynolds number where transition to turbulent starts
RealdeltaM0.3Fraction of nominal mass flow rate where transition to turbulent occurs
Realkif computeFlowResistance then m_flow_nominal_pos/nParCir/sqrt(dp_nominal_pos) else 0Flow coefficient for 1 of the parallel circuits
BooleancomputeFlowResistancetrueFlag to enable/disable computation of flow resistance
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Nominal condition
Modelica.Units.SI.MassFlowRatem_flow_nominal (from PartialTwoPortInterface)Nominal mass flow rate
Modelica.Units.SI.PressureDifferencedp_nominal (from PartialResistance)Pressure drop at nominal mass flow rate
Advanced
Modelica.Units.SI.MassFlowRatem_flow_small (from PartialTwoPortInterface)1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow
Booleanfrom_dp (from PartialResistance)false= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanlinearized (from PartialResistance)false= true, use linear relation between m_flow and dp for any flow rate
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortInterface)false= true, if actual temperature at port is computed

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)

Components

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flow (from PartialTwoPortInterface)port_a.m_flowMass flow rate from port_a to port_b (m_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp (from PartialTwoPortInterface)port_a.p - port_b.pPressure difference between port_a and port_b
Medium.ThermodynamicStatesta_a (from PartialTwoPortInterface)if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow)))Medium properties in port_a
Medium.ThermodynamicStatesta_b (from PartialTwoPortInterface)if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow))Medium properties in port_b

Revisions

  • October 8, 2013, by Michael Wetter:
    Removed parameter show_V_flow.
  • December 14, 2012 by Michael Wetter:
    Renamed protected parameters for consistency with the naming conventions.
  • January 16, 2012 by Michael Wetter:
    To simplify object inheritance tree, revised base classes IDEAS.Fluid.BaseClasses.PartialResistance, IDEAS.Fluid.Actuators.BaseClasses.PartialTwoWayValve, IDEAS.Fluid.Actuators.BaseClasses.PartialDamperExponential, IDEAS.Fluid.Actuators.BaseClasses.PartialActuator and model IDEAS.Fluid.FixedResistances.FixedResistanceDpM.
  • May 30, 2008 by Michael Wetter:
    Added parameters use_dh and deltaM for easier parameterization.
  • July 20, 2007 by Michael Wetter:
    First implementation.