Buildings.Fluids.FixedResistances

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

Package Content

NameDescription
Buildings.Fluids.FixedResistances.Examples Examples Collection of models that illustrate model use and test models
Buildings.Fluids.FixedResistances.FixedResistanceDpM FixedResistanceDpM Fixed flow resistance with dp and m_flow as parameter
Buildings.Fluids.FixedResistances.LosslessPipe LosslessPipe Pipe with no flow friction and no heat transfer
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.


Extends from Buildings.Fluids.BaseClasses.PartialResistance (Partial model for a hydraulic resistance).

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the component
Booleanuse_dhfalseSet to true to specify hydraulic diameter
Lengthdh1Hydraulic diameter [m]
RealReC4000Reynolds number where transition to laminar starts
RealdeltaM0.3Fraction of nominal mass flow rate where transition to laminar occurs
Nominal condition
MassFlowRatem0_flow Nominal mass flow rate [kg/s]
Nominal Condition
Pressuredp0 Pressure [Pa]
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
AbsolutePressuredp_start0.01*system.p_startGuess value of dp = port_a.p - port_b.p [Pa]
MassFlowRatem_flow_startsystem.m_flow_startGuess value of m_flow = port_a.m_flow [kg/s]
MassFlowRatem_flow_small1E-4*m0_flowSmall mass flow rate for regularization of zero flow [kg/s]
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
Diagnostics
Booleanshow_Ttrue= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flowtrue= true, if volume flow rate at inflowing port is computed

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.Fluids.BaseClasses.PartialResistance;
  import SI = Modelica.SIunits;
  parameter SI.MassFlowRate m0_flow "Mass flow rate";
  parameter SI.Pressure dp0(min=0, displayUnit="Pa") "Pressure";
  parameter Boolean use_dh = false "Set to true to specify hydraulic diameter";
  parameter SI.Length dh=1 "Hydraulic diameter";
  parameter Real ReC=4000 "Reynolds number where transition to laminar starts";
  parameter Real deltaM(min=0) = 0.3 
    "Fraction of nominal mass flow rate where transition to laminar occurs";
initial equation 
 if ( m_flow_laminar > m0_flow) then
   Modelica.Utilities.Streams.print("Warning: In FixedResistanceDpM, m0_flow is smaller than m_flow_laminar."
           + "\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 
  m_flow_laminar = if use_dh then 
                      eta0*dh/4*Modelica.Constants.pi*ReC else 
                      deltaM * m0_flow;
  if linearized then
   k = m0_flow / dp0;
  else
   k = m0_flow / sqrt(dp0);
 end if;
end FixedResistanceDpM;

Buildings.Fluids.FixedResistances.LosslessPipe Buildings.Fluids.FixedResistances.LosslessPipe

Pipe with no flow friction and no heat transfer

Buildings.Fluids.FixedResistances.LosslessPipe

Information


Model of a pipe with no flow resistance and no heat loss. This model can be used to replace a replaceable pipe model in flow legs in which no friction should be modeled, such as in the outlet port of a three way valve.


Extends from Modelica_Fluid.Interfaces.PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy), Buildings.BaseClasses.BaseIcon (Base icon).

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the component
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Advanced
AbsolutePressuredp_start0.01*system.p_startGuess value of dp = port_a.p - port_b.p [Pa]
MassFlowRatem_flow_startsystem.m_flow_startGuess value of m_flow = port_a.m_flow [kg/s]
MassFlowRatem_flow_smallsystem.m_flow_smallSmall mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Ttrue= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flowtrue= true, if volume flow rate at inflowing port is computed

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 LosslessPipe "Pipe with no flow friction and no heat transfer"
  extends Modelica_Fluid.Interfaces.PartialTwoPortTransport;
  extends Buildings.BaseClasses.BaseIcon;
equation 
 dp=0;
  // Isenthalpic state transformation (no storage and no loss of energy)
  port_a.h_outflow = inStream(port_b.h_outflow);
  port_b.h_outflow = inStream(port_a.h_outflow);
end LosslessPipe;

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.


Extends from Buildings.Fluids.BaseClasses.PartialThreeWayResistance (Flow splitter with partial resistance model at each port).

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Fluid medium model
Booleanuse_dhfalseSet to true to specify hydraulic diameter
RealdeltaM0.3Fraction of nominal mass flow rate where transition to laminar occurs
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)
Booleanlinearizedfalse= true, use linear relation between m_flow and dp for any flow rate

Connectors

TypeNameDescription
FluidPort_aport_1 
FluidPort_bport_2 
FluidPort_aport_3 

Modelica definition

model SplitterFixedResistanceDpM 
  "Flow splitter with fixed resistance at each port"
    extends Buildings.Fluids.BaseClasses.PartialThreeWayResistance(
      redeclare Buildings.Fluids.FixedResistances.FixedResistanceDpM res1(
         redeclare package Medium=Medium,
         from_dp=from_dp, m0_flow=m0_flow[1], dp0=dp0[1],
         ReC=ReC[1], dh=dh[1],
         linearized=linearized, deltaM=deltaM),
      redeclare Buildings.Fluids.FixedResistances.FixedResistanceDpM res2(
         redeclare package Medium=Medium,
         from_dp=from_dp, m0_flow=m0_flow[2], dp0=dp0[2],
         ReC=ReC[2], dh=dh[2],
         linearized=linearized, deltaM=deltaM),
      redeclare Buildings.Fluids.FixedResistances.FixedResistanceDpM res3(
         redeclare package Medium=Medium,
         from_dp=from_dp, m0_flow=m0_flow[3], dp0=dp0[3],
         ReC=ReC[3], dh=dh[3],
         linearized=linearized, deltaM=deltaM));


  parameter Boolean use_dh = false "Set to true to specify hydraulic diameter";
  parameter Modelica.SIunits.MassFlowRate[3] m0_flow(each min=0) 
    "Mass flow rate";
  parameter Modelica.SIunits.Pressure[3] dp0(each min=0) "Pressure";
  parameter Real deltaM(min=0) = 0.3 
    "Fraction of nominal mass flow rate where transition to laminar occurs";

  parameter Modelica.SIunits.Length[3] dh={1, 1, 1} "Hydraulic diameter";
  parameter Real[3] ReC={4000, 4000, 4000} 
    "Reynolds number where transition to laminar starts";
  parameter Boolean linearized = false 
    "= true, use linear relation between m_flow and dp for any flow rate";
end SplitterFixedResistanceDpM;

HTML-documentation generated by Dymola Thu Feb 19 16:51:26 2009.