Buildings.Fluids.FixedResistances

Package with models for fixed flow resistances (pipes, diffusers etc.)

Package Content

NameDescription
Buildings.Fluids.FixedResistances.FixedResistanceDpM FixedResistanceDpM Fixed flow resistance with dp and m_flow as parameter
Buildings.Fluids.FixedResistances.SplitterFixedResistanceDpM SplitterFixedResistanceDpM Flow splitter with fixed resistance at each port


Buildings.Fluids.FixedResistances.FixedResistanceDpM Buildings.Fluids.FixedResistances.FixedResistanceDpM

Fixed flow resistance with dp and m_flow as parameter

Buildings.Fluids.FixedResistances.FixedResistanceDpM

Information


This is a model of a resistance with a fixed flow coefficient k = m_flow/sqrt(dP).

Near the origin, the square root relation is regularized to ensure that the derivative is bounded.


Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
MassFlowRatem_small_floweta0*dh/4*Modelica.Constants...Mass flow rate where transition to laminar occurs [kg/s]
Lengthdh1Hydraulic diameter [m]
RealReC4000Reynolds number where transition to laminar starts
Initialization
MassFlowRatem_flow Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s]
Pressuredp Pressure difference between port_a and port_b [Pa]
Nominal Condition
MassFlowRatem0_flow Mass flow rate [kg/s]
Pressuredp0 Pressure [Pa]
Advanced
TempflowDirectionModelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component
Booleanfrom_dptrue= true, use m_flow = f(dp) else dp = f(m_flow)
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for any flow rate

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica definition

model FixedResistanceDpM 
  "Fixed flow resistance with dp and m_flow as parameter" 
  extends Buildings.BaseClasses.BaseIcon;
  extends Buildings.Fluids.Actuators.BaseClasses.PartialResistance(
                                                   m_small_flow=eta0*dh/4*
        Modelica.Constants.pi*ReC);
  import SI = Modelica.SIunits;
  parameter SI.MassFlowRate m0_flow "Mass flow rate";
  parameter SI.Pressure dp0(min=0) "Pressure";
  parameter SI.Length dh=1 "Hydraulic diameter";
  parameter Real ReC=4000 "Reynolds number where transition to laminar starts";
initial equation 
 if ( m_small_flow > m0_flow) then
   Modelica.Utilities.Streams.print("Warning: In FixedResistanceDpM, m0_flow is smaller than m_small_flow."
           + "\n"
           + "  m0_flow = " + realString(m0_flow) + "\n"
           + "  dh      = " + realString(dh) + "\n"
           + "  To fix, set dh < " +
                realString(     4*m0_flow/eta0/Modelica.Constants.pi/ReC) + "\n"
           + "  Suggested value: dh = " +
                realString(1/10*4*m0_flow/eta0/Modelica.Constants.pi/ReC));
 end if;
equation 
  if linearized then
   k = m0_flow / dp0;
  else
   k = m0_flow / sqrt(dp0);
 end if;
end FixedResistanceDpM;

Buildings.Fluids.FixedResistances.SplitterFixedResistanceDpM Buildings.Fluids.FixedResistances.SplitterFixedResistanceDpM

Flow splitter with fixed resistance at each port

Buildings.Fluids.FixedResistances.SplitterFixedResistanceDpM

Information


Model of a flow splitter (or mixer) with a fixed resistance in each flow leg.


Parameters

TypeNameDefaultDescription
Lengthdh[3]{1,1,1}Hydraulic diameter [m]
RealReC[3]{4000,4000,4000}Reynolds number where transition to laminar starts
Nominal Condition
MassFlowRatem0_flow[3] Mass flow rate [kg/s]
Pressuredp0[3] Pressure [Pa]
Advanced
Booleanfrom_dptrue= true, use m_flow = f(dp) else dp = f(m_flow)

Connectors

TypeNameDescription
FluidPort_bport_1 
FluidPort_bport_2 
FluidPort_bport_3 

Modelica definition

model SplitterFixedResistanceDpM 
  "Flow splitter with fixed resistance at each port" 
    extends Buildings.BaseClasses.BaseIconLow;
  
  import SI = Modelica.SIunits;
  
  replaceable package Medium = Modelica.Media.Interfaces.PartialMedium 
    "Fluid medium model";
  
  Modelica_Fluid.Interfaces.FluidPort_b port_1(redeclare package Medium = 
        Medium);
  Modelica_Fluid.Interfaces.FluidPort_b port_2(redeclare package Medium = 
        Medium);
  Modelica_Fluid.Interfaces.FluidPort_b port_3(redeclare package Medium = 
        Medium);
  
  Medium.AbsolutePressure pMix "Pressure";
  Medium.SpecificEnthalpy hMix "Mixing enthalpy";
  Medium.MassFraction XiMix[Medium.nXi] 
    "Independent mixture mass fractions m_i/m";
  
  parameter Boolean from_dp = true 
    "= true, use m_flow = f(dp) else dp = f(m_flow)";
  parameter SI.MassFlowRate[3] m0_flow(each min=0) "Mass flow rate";
  parameter SI.Pressure[3] dp0(each min=0) "Pressure";
  parameter SI.Length[3] dh={1, 1, 1} "Hydraulic diameter";
  parameter Real[3] ReC={4000, 4000, 4000} 
    "Reynolds number where transition to laminar starts";
  
  Buildings.Fluids.FixedResistances.FixedResistanceDpM res1(
                          from_dp=from_dp, m0_flow=m0_flow[1], dp0=dp0[1], ReC=ReC[1],
    redeclare package Medium=Medium) "Resistance 1";
  Buildings.Fluids.FixedResistances.FixedResistanceDpM res2(
                          from_dp=from_dp, m0_flow=m0_flow[2], dp0=dp0[2], ReC=ReC[2],
     redeclare package Medium=Medium) "Resistance 2";
  Buildings.Fluids.FixedResistances.FixedResistanceDpM res3(
                          from_dp=from_dp, m0_flow=m0_flow[3], dp0=dp0[3], ReC=ReC[3],
     redeclare package Medium=Medium) "Resistance 3";
  
  Modelica_Fluid.Junctions.Splitter spl(redeclare package Medium=Medium);
equation 
  pMix = spl.p;
  hMix = spl.hMix;
  XiMix   = spl.Xi;
  connect(port_1, res1.port_b);
  connect(res2.port_b, port_2);
  connect(res3.port_b, port_3);
  connect(spl.port_2, res2.port_a);
  connect(res1.port_a, spl.port_1);
  connect(spl.port_3, res3.port_a);
end SplitterFixedResistanceDpM;

HTML-documentation generated by Dymola Tue May 27 12:39:41 2008.