modelPipe
Extends from Buildings.Fluid.FixedResistances.BaseClasses.Pipe (Model of a pipe with finite volume discretization along the flow path).
Information
Model of a pipe with flow resistance and optional heat exchange with environment.
Heat loss calculation
There are two possible configurations:
-
If
useMultipleHeatPorts=false(default option), the pipe uses a single heat port for the heat exchange with the environment. Note that if the heat port is unconnected, then all volumes are still connected through the heat conduction elementsconPipWal. Therefore, they exchange a small amount of heat, which is not physical. To avoid this, setuseMultipleHeatPorts=true. -
If
useMultipleHeatPorts=true, then one heat port for each segment of the pipe is used for the heat exchange with the environment. If the heat port is unconnected, then the pipe has no heat loss.
Pressure drop calculation
The default value for the parameter diameter is computed such that the flow velocity
is equal to v_nominal=0.15 for a mass flow rate of m_flow_nominal.
Both parameters, diameter and v_nominal, can be overwritten
by the user.
The default value for dp_nominal is two times the pressure drop that the pipe
would have if it were straight with no fittings.
The factor of two that takes into account the pressure loss of fittings can be overwritten.
These fittings could also be explicitly modeled outside of this component using models from
the package
Modelica.Fluid.Fittings.
For mass flow rates other than m_flow_nominal, the model
Buildings.Fluid.FixedResistances.PressureDrop is used to
compute the pressure drop.
For a steady-state model of a flow resistance, use Buildings.Fluid.FixedResistances.PressureDrop instead of this model.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | homotopyInitialization (from Pipe) | true | = true, use homotopy method |
| Integer | nSeg (from Pipe) | 10 | Number of volume segments |
| Modelica.Units.SI.Length | thicknessIns (from Pipe) | Thickness of insulation | |
| Modelica.Units.SI.ThermalConductivity | lambdaIns (from Pipe) | Heat conductivity of insulation | |
| Modelica.Units.SI.Length | diameter (from Pipe) | Pipe diameter (without insulation) | |
| Modelica.Units.SI.Length | length (from Pipe) | Length of the pipe | |
| Modelica.Units.SI.Velocity | v_nominal | 0.15 | Velocity at m_flow_nominal (used to compute default diameter) |
| Modelica.Units.SI.Length | roughness | 2.5e-5 | Absolute roughness of pipe, with a default for a smooth steel pipe (dummy if use_roughness = false) |
| Modelica.Units.SI.PressureDifference | dpStraightPipe_nominal | Modelica.Fluid.Pipes.BaseClasses.WallFriction.Detailed.pressureLoss_m_flow(m_flow = m_flow_nominal, rho_a = rho_default, rho_b = rho_default, mu_a = mu_default, mu_b = mu_default, length = length, diameter = diameter, roughness = roughness, m_flow_small = m_flow_small) | Pressure loss of a straight pipe at m_flow_nominal |
| Boolean | useMultipleHeatPorts | false | = true to use one heat port for each segment of the pipe, false to use a single heat port for the entire pipe |
| Dynamics › Conservation equations | |||
| Modelica.Fluid.Types.Dynamics | energyDynamics (from LumpedVolumeDeclarations) | Modelica.Fluid.Types.Dynamics.DynamicFreeInitial | Type of energy balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | substanceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of independent mass fraction balance: dynamic (3 initialization options) or steady state |
| Modelica.Fluid.Types.Dynamics | traceDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of trace substance balance: dynamic (3 initialization options) or steady state |
| Advanced › Dynamics | |||
| Modelica.Fluid.Types.Dynamics | massDynamics (from LumpedVolumeDeclarations) | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
| Initialization | |||
| Medium.AbsolutePressure | p_start (from LumpedVolumeDeclarations) | Medium.p_default | Start value of pressure |
| Medium.Temperature | T_start (from LumpedVolumeDeclarations) | Medium.T_default | Start value of temperature |
| Medium.MassFraction[Medium.nX] | X_start (from LumpedVolumeDeclarations) | Medium.X_default | Start value of mass fractions m_i/m |
| Medium.ExtraProperty[Medium.nC] | C_start (from LumpedVolumeDeclarations) | fill(0, Medium.nC) | Start value of trace substances |
| Medium.ExtraProperty[Medium.nC] | C_nominal (from LumpedVolumeDeclarations) | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
| Dynamics | |||
| Real | mSenFac (from LumpedVolumeDeclarations) | 1 | Factor for scaling the sensible thermal mass of the volume |
| Assumptions | |||
| Boolean | allowFlowReversal (from PartialTwoPort) | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
| Nominal condition | |||
| Modelica.Units.SI.MassFlowRate | m_flow_nominal (from PartialTwoPortInterface) | Nominal mass flow rate | |
| Modelica.Units.SI.PressureDifference | dp_nominal (from TwoPortFlowResistanceParameters) | Pressure difference | |
| Advanced | |||
| Modelica.Units.SI.MassFlowRate | m_flow_small (from PartialTwoPortInterface) | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow |
| Advanced › Diagnostics | |||
| Boolean | show_T (from PartialTwoPortInterface) | false | = true, if actual temperature at port is computed |
| Flow resistance | |||
| Boolean | computeFlowResistance (from TwoPortFlowResistanceParameters) | true | =true, compute flow resistance. Set to false to assume no friction |
| Boolean | from_dp (from TwoPortFlowResistanceParameters) | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
| Real | n (from TwoPortFlowResistanceParameters) | 2 | Flow exponent, n=1 for laminar, n=2 for turbulent |
| Boolean | linearizeFlowResistance (from TwoPortFlowResistanceParameters) | false | = true, use linear relation between m_flow and dp for any flow rate |
| Real | deltaM (from TwoPortFlowResistanceParameters) | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
| Real | ReC (from Pipe) | 4000 | Reynolds number where transition to turbulence starts |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Fluid.Interfaces.FluidPort_a | port_a (from PartialTwoPort) | Fluid connector a (positive design flow direction is from port_a to port_b) | |
| Modelica.Fluid.Interfaces.FluidPort_b | port_b (from PartialTwoPort) | Fluid connector b (positive design flow direction is from port_a to port_b) | |
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heatPort | Single heat port that connects to outside of pipe wall (default, enabled when useMultipleHeatPorts=false) | |
| Modelica.Fluid.Interfaces.HeatPorts_a[nSeg] | heatPorts | Multiple heat ports that connect to outside of pipe wall (enabled if useMultipleHeatPorts=true) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.MassFlowRate | m_flow (from PartialTwoPortInterface) | port_a.m_flow | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) |
| Modelica.Units.SI.PressureDifference | dp (from PartialTwoPortInterface) | port_a.p - port_b.p | Pressure difference between port_a and port_b |
| Medium.ThermodynamicState | sta_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.ThermodynamicState | sta_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 |
| Buildings.Fluid.FixedResistances.PressureDrop | preDro (from Pipe) | Flow resistance | |
| Buildings.Fluid.MixingVolumes.BaseClasses.MixingVolumeHeatPort | vol (from Pipe) | Volume for pipe fluid | |
| Modelica.Thermal.HeatTransfer.Components.ThermalConductor[nSeg] | conPipWal | Thermal conductance through pipe wall | |
| Modelica.Thermal.HeatTransfer.Components.ThermalCollector | colAllToOne | Connector to assign multiple heat ports to one heat port |
Revisions
-
January 22, 2016, by Michael Wetter:
Corrected type declaration of pressure difference. This is for #404. -
October 30, 2015, by Michael Wetter:
Improved documentation for #455. -
February 5, 2015, by Michael Wetter:
RenamedrestopreDrofor #292. -
September 13, 2013 by Michael Wetter:
Replacednominalwithdefaultvalues as they are computed using the default Medium values. -
February 22, 2012 by Michael Wetter:
RenameduseMultipleHeatPorttouseMultipleHeatPortsand used heat port connector fromModelica.Fluidpackage for vector of heat ports. -
February 15, 2012 by Michael Wetter:
Revised implementation and added default values. -
February 12, 2012 by Wangda Zuo:
First implementation.