modelInsulatedPipe

Two port model of an insulated pipe

Extends from dhcSim.DHC.Submodules.TwoPortModules.Pipe.BaseClasses.BasePipe (Base model of two port pipe model).

Parameters

TypeNameDefaultDescription
BooleanhomotopyInitialization (from Pipe)true= true, use homotopy method
IntegernSeg (from Pipe)10Number of volume segments
Modelica.Units.SI.LengththicknessIns (from Pipe)Thickness of insulation
Modelica.Units.SI.ThermalConductivitylambdaIns (from Pipe)Heat conductivity of insulation
Modelica.Units.SI.Lengthdiameter (from Pipe)Pipe diameter (without insulation)
Modelica.Units.SI.Lengthlength (from Pipe)Length of the pipe
Modelica.SIunits.PressureDifferencedpStraightPipe_nominal (from BasePipe)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_set, diameter = diameter_internal, roughness = roughness, m_flow_small = m_flow_small)Pressure loss of a straight pipe at m_flow_nominal
Modelica.SIunits.PressureDifferencedp_nominal_internal (from BasePipe)(if dpType == dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.no_dp then 0 elseif dpType == dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.dp_nominal then dp_nominal_set elseif dpType == dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.lengthDiameter then dpStraightPipe_nominal elseif dpType == dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.v_nominal then dpStraightPipe_nominal else 0)Pressure difference for internal calculations
Modelica.SIunits.MassFlowRatem_flow_nominal_internal (from BasePipe)(if dpType == dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.no_dp then 1 else m_flow_nominal_set)Nominal mass flow rate for internal calculations
Modelica.SIunits.Lengthdiameter_internal (from BasePipe)(if dpType == dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.lengthDiameter then diameter_set elseif dpType == dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.v_nominal then sqrt(4*m_flow_nominal_internal/rho_default/v_nominal/Modelica.Constants.pi) else diameter_set)
BooleanuseMultipleHeatPortsfalse= 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.DynamicsenergyDynamics (from LumpedVolumeDeclarations)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicssubstanceDynamics (from LumpedVolumeDeclarations)energyDynamicsType of independent mass fraction balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicstraceDynamics (from LumpedVolumeDeclarations)energyDynamicsType of trace substance balance: dynamic (3 initialization options) or steady state
Advanced › Dynamics
Modelica.Fluid.Types.DynamicsmassDynamics (from LumpedVolumeDeclarations)energyDynamicsType of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state
Initialization
Medium.AbsolutePressurep_start (from LumpedVolumeDeclarations)Medium.p_defaultStart value of pressure
Medium.TemperatureT_start (from LumpedVolumeDeclarations)Medium.T_defaultStart value of temperature
Medium.MassFraction[Medium.nX]X_start (from LumpedVolumeDeclarations)Medium.X_defaultStart 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
RealmSenFac (from LumpedVolumeDeclarations)1Factor for scaling the sensible thermal mass of the volume
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 TwoPortFlowResistanceParameters)Pressure difference
Advanced
Modelica.Units.SI.MassFlowRatem_flow_small (from PartialTwoPortInterface)1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortInterface)false= true, if actual temperature at port is computed
Flow resistance
BooleancomputeFlowResistance (from TwoPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp (from TwoPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance (from TwoPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM (from TwoPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar
RealReC (from Pipe)4000Reynolds number where transition to turbulence starts
Pressure drop
dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypesdpType (from BasePipe)dhcSim.DHC.Submodules.TwoPortModules.Pipe.Types.dpTypes.dp_nominalDefine pressure drop calculation
Modelica.SIunits.Lengthdiameter_set (from BasePipe)0.1Pipe diameter
Modelica.SIunits.Lengthlength_set (from BasePipe)1Length of the pipe
Modelica.SIunits.Velocityv_nominal (from BasePipe)0.15Velocity at m_flow_nominal (used to compute default diameter)
Modelica.SIunits.Lengthroughness (from BasePipe)2.5e-5Absolute roughness of pipe, with a default for a smooth steel pipe (dummy if use_roughness = false)
Modelica.SIunits.PressureDifferencedp_nominal_set (from BasePipe)10Pressure difference
Modelica.SIunits.MassFlowRatem_flow_nominal_set (from BasePipe)1Pressure difference
Modelica.SIunits.PressureDifferencedp_fixed_nominal (from BasePipe)0Additional nominal pressure drop of installations and fitting

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)
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatPortSingle heat port that connects to outside of pipe wall (default, enabled when useMultipleHeatPorts=false)
Modelica.Fluid.Interfaces.HeatPorts_a[nSeg]heatPortsMultiple heat ports that connect to outside of pipe wall (enabled if useMultipleHeatPorts=true)

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
Buildings.Fluid.FixedResistances.PressureDroppreDro (from Pipe)Flow resistance
Buildings.Fluid.MixingVolumes.BaseClasses.MixingVolumeHeatPortvol (from Pipe)Volume for pipe fluid
Modelica.Thermal.HeatTransfer.Components.ThermalResistor[nSeg]ResPipWalThermal resistance through insulation
Modelica.Thermal.HeatTransfer.Components.ThermalCollectorcolAllToOneConnector to assign multiple heat ports to one heat port