Name | Description |
---|---|
FixedResistanceDpM | Fixed flow resistance with dp and m_flow as parameter |
LosslessPipe | Pipe with no flow friction and no heat transfer |
SplitterFixedResistanceDpM | Flow splitter with fixed resistance at each port |
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.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Boolean | use_dh | false | Set to true to specify hydraulic diameter |
Length | dh | 1 | Hydraulic diameter [m] |
Real | ReC | 4000 | Reynolds number where transition to laminar starts |
Real | deltaM | 0.3 | Fraction of nominal mass flow rate where transition to laminar occurs |
Initialization | |||
MassFlowRate | m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] | |
Pressure | dp | Pressure difference between port_a and port_b [Pa] | |
Nominal Condition | |||
MassFlowRate | m0_flow | Mass flow rate [kg/s] | |
Pressure | dp0 | Pressure [Pa] | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearized | false | = true, use linear relation between m_flow and dp for any flow rate |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
model FixedResistanceDpM "Fixed flow resistance with dp and m_flow as parameter" extends Buildings.BaseClasses.BaseIcon; extends Buildings.Fluids.BaseClasses.PartialResistance( final m_small_flow=if use_dh then eta0*dh/4*Modelica.Constants.pi*ReC else deltaM * m0_flow); import SI = Modelica.SIunits; parameter SI.MassFlowRate m0_flow "Mass flow rate"; parameter SI.Pressure dp0(min=0) "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_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;
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.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Initialization | |||
MassFlowRate | m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] | |
Advanced | |||
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_a -> port_b) or bidirectional flow component |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
model LosslessPipe "Pipe with no flow friction and no heat transfer" extends Modelica_Fluid.Interfaces.PartialTwoPortTransport(final dp=0); extends Buildings.BaseClasses.BaseIcon; end LosslessPipe;
Model of a flow splitter (or mixer) with a fixed resistance in each flow leg.
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Fluid medium model | |
Boolean | use_dh | false | Set to true to specify hydraulic diameter |
Real | deltaM | 0.3 | Fraction of nominal mass flow rate where transition to laminar occurs |
Length | dh[3] | {1,1,1} | Hydraulic diameter [m] |
Real | ReC[3] | {4000,4000,4000} | Reynolds number where transition to laminar starts |
Nominal Condition | |||
MassFlowRate | m0_flow[3] | Mass flow rate [kg/s] | |
Pressure | dp0[3] | Pressure [Pa] | |
Advanced | |||
Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
Temp | flowDirection | Modelica_Fluid.Types.FlowDir... | Unidirectional (port_1 -> port_2) or bidirectional flow component |
Boolean | linearized | false | = true, use linear relation between m_flow and dp for any flow rate |
Type | Name | Description |
---|---|---|
FluidPort_b | port_1 | |
FluidPort_b | port_2 | |
FluidPort_b | port_3 |
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;