Buildings.Fluid.FixedResistances.BuriedPipes.Examples

Collection of models that illustrate model use and test models

Information

This package contains examples for the use of models that can be found in Buildings.Fluid.Geothermal.BuriedPipes.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.FixedResistances.BuriedPipes.Examples.DiscretizedBuriedPipe DiscretizedBuriedPipe Example model of a buried pipe with multiple segments
Buildings.Fluid.FixedResistances.BuriedPipes.Examples.PipeGroundCoupling PipeGroundCoupling Example model for pipe ground coupling model
Buildings.Fluid.FixedResistances.BuriedPipes.Examples.SingleBuriedPipe SingleBuriedPipe Example model of a single buried pipe
Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoBuriedPipes TwoBuriedPipes Example model of two buried pipes in close proximity
Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoPipesConduit TwoPipesConduit Example model of a buried conduit housing a supply and return pipe

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.DiscretizedBuriedPipe Buildings.Fluid.FixedResistances.BuriedPipes.Examples.DiscretizedBuriedPipe

Example model of a buried pipe with multiple segments

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.DiscretizedBuriedPipe

Information

This example showcases the ground thermal coupling for two uninsulated buried pipes - direct and reverse flow direction - operating around ambient temperature (20°C), and separated in 2 and 10 segments respectively.

This example illustrates the difference in boundary conditions that results from different segmentation of the pipes, since both pipes are representative of the same conditions (see Buildings.Fluid.Geothermal.BuriedPipes.Examples.SingleBuriedPipe for validation that direct and reverse flow result in the same modeled operation).

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.WaterMedium in the pipe
LengthtotLen10000Total pipe length [m]
IntegernSeg2Number of pipe segments
LengthsegLen[nSeg]fill(totLen/nSeg, nSeg)Pipe segments length [m]
IntegernSegRev10Number of pipe segments
LengthsegLenRev[nSegRev]fill(totLen/nSegRev, nSegRev)Pipe segments length [m]
LengthdIns0.2Virtual insulation layer thickness [m]
BostoncliConredeclare parameter Building...Surface temperature climatic conditions
GenericsoiDatsoiDat(k=1.58, c=1150, d=1600)Soil thermal properties

Connectors

TypeNameDescription
replaceable package MediumMedium in the pipe

Modelica definition

model DiscretizedBuriedPipe "Example model of a buried pipe with multiple segments" extends Modelica.Icons.Example; replaceable package Medium = Buildings.Media.Water "Medium in the pipe"; parameter Modelica.Units.SI.Length totLen=10000 "Total pipe length"; parameter Integer nSeg=2 "Number of pipe segments"; parameter Modelica.Units.SI.Length segLen[nSeg]=fill(totLen/nSeg, nSeg) "Pipe segments length"; parameter Integer nSegRev=10 "Number of pipe segments"; parameter Modelica.Units.SI.Length segLenRev[nSegRev]=fill(totLen/nSegRev, nSegRev) "Pipe segments length"; parameter Modelica.Units.SI.Length dIns=0.2 "Virtual insulation layer thickness"; replaceable parameter Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Boston cliCon "Surface temperature climatic conditions"; replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic soiDat(k=1.58,c=1150,d=1600) "Soil thermal properties"; FixedResistances.PlugFlowPipeDiscretized pip( redeclare package Medium = Medium, nSeg=nSeg, dh=0.1, segLen=segLen, m_flow_nominal=1, dIns=dIns, kIns=soiDat.k, thickness=0.0032) "Buried pipe"; Buildings.Fluid.FixedResistances.BuriedPipes.GroundCoupling gro( nPip=1, cliCon=cliCon, soiDat=soiDat, nSeg=pip.nSeg, len=pip.segLen, dep={1.5}, pos={0}, rad={pip.dh/2 + pip.thickness + pip.dIns}) "Ground coupling"; Modelica.Blocks.Sources.Sine Tin( amplitude=5, f=1/180/24/60/60, offset=273.15 + 20) "Pipe inlet temperature signal"; Sources.MassFlowSource_T sou( nPorts=1, redeclare package Medium = Medium, use_T_in=true, m_flow=3) "Flow source"; Sensors.TemperatureTwoPort senTemInl( redeclare package Medium = Medium, m_flow_nominal=1, T_start=293.15) "Pipe inlet temperature sensor"; Sources.Boundary_pT sin( redeclare package Medium = Medium, T=273.15 + 10, nPorts=1, p(displayUnit="Pa") = 101325) "Boundary condition"; Sensors.TemperatureTwoPort senTemOut( redeclare package Medium = Medium, m_flow_nominal=1, T_start=293.15) "Pipe outlet temperature sensor"; FixedResistances.PlugFlowPipeDiscretized pipRev( redeclare package Medium = Medium, nSeg=nSegRev, dh=0.1, segLen=segLenRev, m_flow_nominal=1, dIns=dIns, kIns=soiDat.k, thickness=0.0032) "Buried pipe"; GroundCoupling groRev( nPip=1, cliCon=cliCon, soiDat=soiDat, nSeg=pipRev.nSeg, len=pipRev.segLen, dep={1.5}, pos={0}, rad={pip.dh / 2 + pip.thickness + pip.dIns}) "Ground coupling"; Sensors.TemperatureTwoPort senTemOutRev( redeclare package Medium = Medium, m_flow_nominal=1, T_start=293.15) "Pipe outlet temperature sensor"; Sensors.TemperatureTwoPort senTemInlRev( redeclare package Medium = Medium, m_flow_nominal=1, T_start=293.15) "Pipe outlet temperature sensor"; Sources.MassFlowSource_T souRev( nPorts=1, redeclare package Medium = Medium, use_T_in=true, m_flow=3) "Flow source"; Sources.Boundary_pT sinRev( redeclare package Medium = Medium, T=273.15 + 10, nPorts=1, p(displayUnit="Pa") = 101325) "Boundary condition"; equation connect(Tin.y,sou. T_in); connect(sou.ports[1], senTemInl.port_a); connect(senTemOut.port_b, sin.ports[1]); connect(senTemInl.port_b, pip.port_a); connect(pip.port_b, senTemOut.port_a); connect(senTemOutRev.port_b, pipRev.port_a); connect(pipRev.port_b, senTemInlRev.port_a); connect(pip.heatPorts, gro.ports[1, :]); connect(pipRev.heatPorts, groRev.ports[1, :]); connect(souRev.ports[1], senTemInlRev.port_b); connect(senTemOutRev.port_a, sinRev.ports[1]); connect(Tin.y, souRev.T_in); end DiscretizedBuriedPipe;

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.PipeGroundCoupling Buildings.Fluid.FixedResistances.BuriedPipes.Examples.PipeGroundCoupling

Example model for pipe ground coupling model

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.PipeGroundCoupling

Information

This example shows how to use model Buildings.Fluid.FixedResistances.BuriedPipes.PipeGroundCoupling and compares the fluid output temperature with and without ground layer.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
replaceable package MediumBuildings.Media.WaterMedium in the pipe
IntegernSoi4Number of probed depths
Lengthdep[nSoi]{0,2,5,9}Probed depths [m]
Lengthlength100Pipe length [m]
MassFlowRatem_flow_nominal3Mass flow rate [kg/s]
TemperatureTin273.15 + 11.5Mean inlet temperature [K]

Connectors

TypeNameDescription
replaceable package MediumMedium in the pipe

Modelica definition

model PipeGroundCoupling "Example model for pipe ground coupling model" extends Modelica.Icons.Example; replaceable package Medium = Buildings.Media.Water "Medium in the pipe"; parameter Integer nSoi = 4 "Number of probed depths"; parameter Modelica.Units.SI.Length dep[nSoi] = {0,2,5,9} "Probed depths"; parameter Modelica.Units.SI.Length length = 100 "Pipe length"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal = 3 "Mass flow rate"; parameter Modelica.Units.SI.Temperature Tin = 273.15+11.5 "Mean inlet temperature"; Buildings.Fluid.FixedResistances.BuriedPipes.PipeGroundCoupling pipeGroundCoupling( lPip=length, rPip=0.1, thiGroLay=1.1, nSta=5, nSeg=1, TpipSta=Tin, TGrouBouSta=Tin, cliCon=cliCon, soiDat=soiDat); Fluid.Sources.MassFlowSource_T sou( redeclare package Medium = Medium, use_T_in=true, m_flow=m_flow_nominal, T=293.15, nPorts=1) "Flow source"; Fluid.Sensors.TemperatureTwoPort senTemIn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, tau=0, T_start=Tin) "Temperature sensor"; Fluid.FixedResistances.PlugFlowPipe pip( redeclare package Medium = Medium, dh=0.1, length=length, dIns=0.0001, kIns=1, m_flow_nominal=m_flow_nominal, cPip=2300, thickness=0.0032, initDelay=true, m_flow_start=m_flow_nominal, rhoPip=930, T_start_in=Tin, T_start_out=Tin) "Pipe"; Fluid.Sensors.TemperatureTwoPort senTemOut( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, tau=0, T_start=Tin) "Temperature sensor"; Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, T=273.15 + 10, nPorts=2, p(displayUnit="Pa") = 101325) "Pressure boundary condition"; Fluid.Sources.MassFlowSource_T souNoGro( redeclare package Medium = Medium, use_T_in=true, m_flow=m_flow_nominal, T=293.15, nPorts=1) "Flow source"; Fluid.Sensors.TemperatureTwoPort senTemInNoGro( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, tau=0, T_start=Tin) "Temperature sensor"; Fluid.FixedResistances.PlugFlowPipe pipNoGro( redeclare package Medium = Medium, dh=0.1, length=length, dIns=0.0001, kIns=1, m_flow_nominal=m_flow_nominal, cPip=2300, thickness=0.0032, initDelay=true, m_flow_start=m_flow_nominal, rhoPip=930, T_start_in=293.15, T_start_out=293.15) "Pipe"; Fluid.Sensors.TemperatureTwoPort senTemOutNoGro( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, tau=0, T_start=Tin) "Temperature sensor"; Modelica.Blocks.Sources.Sine TInlSig( amplitude=5.5, f=1/600, offset=Tin) "Pipe inlet temperature signal"; protected replaceable parameter BoundaryConditions.GroundTemperature.ClimaticConstants.Boston cliCon "Surface temperature climatic conditions"; replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic soiDat( k=1.58,c=1150,d=1600) "Soil thermal properties"; equation connect(sou.ports[1], senTemIn.port_a); connect(senTemIn.port_b, pip.port_a); connect(pip.port_b, senTemOut.port_a); connect(senTemOut.port_b, sin.ports[1]); connect(pipeGroundCoupling.heatPorts[1], pip.heatPort); connect(souNoGro.ports[1], senTemInNoGro.port_a); connect(senTemInNoGro.port_b, pipNoGro.port_a); connect(pipNoGro.port_b, senTemOutNoGro.port_a); connect(senTemOutNoGro.port_b, sin.ports[2]); connect(TInlSig.y, sou.T_in); connect(TInlSig.y, souNoGro.T_in); end PipeGroundCoupling;

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.SingleBuriedPipe Buildings.Fluid.FixedResistances.BuriedPipes.Examples.SingleBuriedPipe

Example model of a single buried pipe

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.SingleBuriedPipe

Information

This example showcases the ground thermal coupling for a single uninsulated buried pipe operating around ambient temperature (20°C). Both design flow direction and reverse flow direction (components with suffix Rev) are simulated.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
BostoncliConredeclare parameter Building...Surface temperature climatic conditions
replaceable package MediumBuildings.Media.WaterMedium in the pipe
TemperatureTin293.15Mean inlet temperature [K]
GenericsoiDatsoiDat(k=1.58, c=1150, d=160...Soil thermal properties

Connectors

TypeNameDescription
replaceable package MediumMedium in the pipe

Modelica definition

model SingleBuriedPipe "Example model of a single buried pipe" extends Modelica.Icons.Example; replaceable parameter Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Boston cliCon "Surface temperature climatic conditions"; replaceable package Medium = Buildings.Media.Water "Medium in the pipe"; parameter Modelica.Units.SI.Temperature Tin=293.15 "Mean inlet temperature"; replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic soiDat(k=1.58,c=1150,d=1600, steadyState=false) "Soil thermal properties"; FixedResistances.PlugFlowPipe pip( redeclare package Medium=Medium, dh=0.1, length=1000, m_flow_nominal=10, dIns=0.01, kIns=100, cPip=500, rhoPip=8000, thickness=0.0032) "Buried pipe"; Buildings.Fluid.FixedResistances.BuriedPipes.GroundCoupling gro( nPip=1, cliCon=cliCon, soiDat=soiDat, nSeg=1, len={pip.length}, dep={1.5}, pos={0}, rad={pip.dh/2 + pip.thickness + pip.dIns}) "Ground coupling"; Modelica.Blocks.Sources.Sine TInlSig( amplitude=5, f=1/180/24/60/60, offset=Tin) "Pipe inlet temperature signal"; Sources.MassFlowSource_T sou( nPorts=1, redeclare package Medium = Medium, use_T_in=true, m_flow=3) "Flow source"; Sensors.TemperatureTwoPort senTemInl( redeclare package Medium = Medium, m_flow_nominal=pip.m_flow_nominal, T_start=Tin) "Pipe inlet temperature sensor"; Sources.Boundary_pT sin( redeclare package Medium = Medium, T=Tin, nPorts=1, p(displayUnit="Pa") = 101325) "Boundary condition"; Sensors.TemperatureTwoPort senTemOut( redeclare package Medium = Medium, m_flow_nominal=pip.m_flow_nominal, T_start=Tin) "Pipe outlet temperature sensor"; FixedResistances.PlugFlowPipe pipRev( redeclare package Medium = Medium, dh=0.1, length=1000, m_flow_nominal=1, dIns=0.01, kIns=100, cPip=500, rhoPip=8000, thickness=0.0032) "Buried pipe"; GroundCoupling groRev( nPip=1, cliCon=cliCon, soiDat=soiDat, nSeg=1, len={pipRev.length}, dep={1.5}, pos={0}, rad={pipRev.dh / 2 + pipRev.thickness + pipRev.dIns}) "Ground coupling"; Sensors.TemperatureTwoPort senTemOutRev( redeclare package Medium = Medium, m_flow_nominal=pipRev.m_flow_nominal, T_start=Tin) "Pipe outlet temperature sensor"; Sensors.TemperatureTwoPort senTemInlRev( redeclare package Medium = Medium, m_flow_nominal=pipRev.m_flow_nominal, T_start=Tin) "Pipe outlet temperature sensor"; Sources.MassFlowSource_T souRev( nPorts=1, redeclare package Medium = Medium, use_T_in=true, m_flow=3) "Flow source"; Sources.Boundary_pT sinRev( redeclare package Medium = Medium, T=Tin, nPorts=1, p(displayUnit="Pa") = 101325) "Boundary condition"; equation connect(TInlSig.y,sou. T_in); connect(sou.ports[1], senTemInl.port_a); connect(senTemOut.port_b, sin.ports[1]); connect(senTemInl.port_b, pip.port_a); connect(pip.heatPort, gro.ports[1,1]); connect(senTemOutRev.port_b, pipRev.port_a); connect(pipRev.heatPort, groRev.ports[1,1]); connect(souRev.ports[1], senTemInlRev.port_b); connect(sinRev.ports[1], senTemOutRev.port_a); connect(TInlSig.y, souRev.T_in); connect(pip.port_b, senTemOut.port_a); connect(pipRev.port_b, senTemInlRev.port_a); end SingleBuriedPipe;

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoBuriedPipes Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoBuriedPipes

Example model of two buried pipes in close proximity

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoBuriedPipes

Information

This example showcases the ground thermal coupling for a network of two uninsulated buried pipes that are in close proximity. One pipe carries chilled water oscillating around 10°C whereas the other carries hot water oscillating around 80°C.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
BostoncliConredeclare parameter Building...Surface temperature climatic conditions
replaceable package MediumBuildings.Media.WaterMedium in the pipe
GenericsoiDatsoiDat(k=1.58, c=1150, d=1600)Soil thermal properties

Connectors

TypeNameDescription
replaceable package MediumMedium in the pipe

Modelica definition

model TwoBuriedPipes "Example model of two buried pipes in close proximity" extends Modelica.Icons.Example; replaceable parameter Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Boston cliCon "Surface temperature climatic conditions"; replaceable package Medium = Buildings.Media.Water "Medium in the pipe"; replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic soiDat(k=1.58,c=1150,d=1600) "Soil thermal properties"; Buildings.Fluid.FixedResistances.BuriedPipes.GroundCoupling gro( nPip=2, cliCon=cliCon, soiDat=soiDat, nSeg=1, len={1000}, dep={1.5,2.5}, pos={0,1}, rad={0.09,0.09}) "Ground coupling"; FixedResistances.PlugFlowPipe pipChW( redeclare package Medium = Medium, dh=0.1, length=1000, m_flow_nominal=10, dIns=0.01, kIns=100, cPip=500, rhoPip=8000, thickness=0.0032, T_start_in=TChW, T_start_out=TChW) "Buried chilled water pipe"; Modelica.Blocks.Sources.Sine TinChW( amplitude=2, f=1/180/24/60/60, offset=TChW) "Chilled water pipe inlet temperature signal"; Sources.MassFlowSource_T souChW( nPorts=1, redeclare package Medium = Medium, use_T_in=true, m_flow=3) "Chilled water flow source"; Sensors.TemperatureTwoPort senTemChWIn( redeclare package Medium = Medium, m_flow_nominal=pipChW.m_flow_nominal, T_start=TChW) "Chilled water pipe inlet temperature sensor"; Sources.Boundary_pT sinChW( redeclare package Medium = Medium, T=TChW, nPorts=1, p(displayUnit="Pa") = 101325) "Chilled water pressure boundary condition"; Sensors.TemperatureTwoPort senTemChWOut( redeclare package Medium = Medium, m_flow_nominal=pipChW.m_flow_nominal, T_start=TChW) "Chilled water pipe outlet temperature sensor"; FixedResistances.PlugFlowPipe pipHotW( redeclare package Medium = Medium, dh=0.1, length=1000, m_flow_nominal=10, dIns=0.01, kIns=100, cPip=500, rhoPip=8000, thickness=0.0032, T_start_in=THotW, T_start_out=THotW) "Buried hot water pipe"; Modelica.Blocks.Sources.Sine TinHotW( amplitude=5, f=1/90/24/60/60, phase=3.1415926535898, offset=THotW) "Hot water pipe inlet temperature signal"; Sources.MassFlowSource_T souHotW( redeclare package Medium = Medium, use_T_in=true, m_flow=3, nPorts=1) "Hot water flow source"; Sensors.TemperatureTwoPort senTemHotWIn( redeclare package Medium = Medium, m_flow_nominal=pipHotW.m_flow_nominal, T_start=THotW) "Hot water pipe inlet temperature sensor"; Sources.Boundary_pT sinHotW( redeclare package Medium = Medium, T=THotW, p(displayUnit="Pa") = 101325, nPorts=1) "Pressure boundary condition"; Sensors.TemperatureTwoPort senTemHotWOut( redeclare package Medium = Medium, m_flow_nominal=pipHotW.m_flow_nominal, T_start=THotW) "Hot water pipe outlet temperature sensor"; protected parameter Modelica.Units.SI.Temperature TChW=273.15 + 10 "Chilled water mean supply temperature"; parameter Modelica.Units.SI.Temperature THotW=273.15 + 80 "Hot water mean supply temperature"; equation connect(TinChW.y, souChW.T_in); connect(souChW.ports[1], senTemChWIn.port_a); connect(senTemChWOut.port_b, sinChW.ports[1]); connect(senTemChWIn.port_b, pipChW.port_a); connect(pipChW.heatPort, gro.ports[1,1]); connect(TinHotW.y, souHotW.T_in); connect(pipHotW.heatPort, gro.ports[2,1]); connect(souHotW.ports[1], senTemHotWIn.port_a); connect(senTemHotWIn.port_b, pipHotW.port_a); connect(senTemHotWOut.port_b, sinHotW.ports[1]); connect(pipChW.port_b, senTemChWOut.port_a); connect(pipHotW.port_b, senTemHotWOut.port_a); end TwoBuriedPipes;

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoPipesConduit Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoPipesConduit

Example model of a buried conduit housing a supply and return pipe

Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoPipesConduit

Information

This example showcases the ground thermal coupling for a buried conduit that contains one insulated hot water supply pipe oscillating around 70°C and an uninsulated hot water return pipe oscillating around 50°C.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
BostoncliConredeclare parameter Building...Surface temperature climatic conditions
replaceable package MediumBuildings.Media.WaterMedium in the pipe
LengthdCon0.3Conduit diameter [m]
Lengthlen1000Conduit length [m]
LengthxConWal0.01Conduit wall thickness [m]
GenericconMatconMat(k=0.19, c=840, d=1380)Conduit wall material (PVC)
GenericsoiDatsoiDat(k=1.58, c=1150, d=1600)Soil thermal properties

Connectors

TypeNameDescription
replaceable package MediumMedium in the pipe

Modelica definition

model TwoPipesConduit "Example model of a buried conduit housing a supply and return pipe" extends Modelica.Icons.Example; replaceable parameter Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Boston cliCon "Surface temperature climatic conditions"; replaceable package Medium = Buildings.Media.Water "Medium in the pipe"; parameter Modelica.Units.SI.Length dCon=0.3 "Conduit diameter"; parameter Modelica.Units.SI.Length len=1000 "Conduit length"; parameter Modelica.Units.SI.Length xConWal=0.01 "Conduit wall thickness"; parameter Buildings.HeatTransfer.Data.Soil.Generic conMat( k=0.19, c=840, d=1380) "Conduit wall material (PVC)"; replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic soiDat(k=1.58,c=1150,d=1600) "Soil thermal properties"; FixedResistances.PlugFlowPipe pipSup( redeclare package Medium = Medium, dh=0.1, length=len, m_flow_nominal=1, dIns(displayUnit="mm") = 0.06, kIns=0.05, cPip=500, rhoPip=8000, thickness=0.0032) "Buried pipe"; Buildings.Fluid.FixedResistances.BuriedPipes.GroundCoupling gro( nPip=1, cliCon=cliCon, soiDat=soiDat, nSeg=1, len={len}, dep={1.5}, pos={0}, rad={dCon}) "Ground coupling"; Modelica.Blocks.Sources.Sine TinSup( amplitude=5, f=1/180/24/60/60, offset=273.15 + 70) "Pipe inlet temperature signal"; Sources.MassFlowSource_T souSup( nPorts=1, redeclare package Medium = Medium, use_T_in=true, m_flow=3) "Flow source"; Sensors.TemperatureTwoPort senTemInlSup( redeclare package Medium = Medium, m_flow_nominal=1, T_start=343.15) "Pipe inlet temperature sensor"; Sources.Boundary_pT sinSup( redeclare package Medium = Medium, T=343.15, nPorts=1, p(displayUnit="Pa") = 101325) "Boundary condition"; Sensors.TemperatureTwoPort senTemOutSup( redeclare package Medium = Medium, m_flow_nominal=1, T_start=343.15) "Pipe outlet temperature sensor"; FixedResistances.PlugFlowPipe pipRet( redeclare package Medium = Medium, dh=0.1, length=len, m_flow_nominal=1, dIns=0.01, kIns=0.19, cPip=500, rhoPip=8000, thickness=0.0032) "Buried pipe"; Sensors.TemperatureTwoPort senTemOutRet( redeclare package Medium = Medium, m_flow_nominal=1, T_start=323.15) "Pipe outlet temperature sensor"; Sensors.TemperatureTwoPort senTemInlRet( redeclare package Medium = Medium, m_flow_nominal=1, T_start=323.15) "Pipe outlet temperature sensor"; Sources.MassFlowSource_T souRet( nPorts=1, redeclare package Medium = Medium, use_T_in=true, m_flow=3) "Flow source"; Sources.Boundary_pT sinRet( redeclare package Medium = Medium, T=323.15, nPorts=1, p(displayUnit="Pa") = 101325) "Boundary condition"; Modelica.Thermal.HeatTransfer.Components.HeatCapacitor conAir(C=VConAir * rhoAir * cpAir, T(start= 313.15, fixed=true)) "Conduit air heat capacity"; Modelica.Blocks.Sources.Sine TinRet( amplitude=2, f=1/180/24/60/60, phase=0.78539816339745, offset=273.15 + 50) "Pipe inlet temperature signal"; HeatTransfer.Conduction.SingleLayerCylinder con( final material=conMat, final h=len, final r_a=dCon, final r_b=dCon + xConWal, nSta=1, TInt_start=313.15, TExt_start=313.15) "Conduit heat conduction"; protected parameter Modelica.Units.SI.Volume VConAir=len*Modelica.Constants.pi*((dCon/2) ^2 - (pipSup.dh/2)^2 - (pipRet.dh/2)^2) "Air volume in conduit"; constant Modelica.Units.SI.Density rhoAir=1.2 "Air density"; constant Modelica.Units.SI.SpecificHeatCapacity cpAir=Buildings.Utilities.Psychrometrics.Constants.cpAir "Air specific heat capacity"; equation connect(TinSup.y, souSup.T_in); connect(souSup.ports[1], senTemInlSup.port_a); connect(senTemOutSup.port_b, sinSup.ports[1]); connect(senTemInlSup.port_b, pipSup.port_a); connect(senTemOutRet.port_b,pipRet. port_a); connect(souRet.ports[1],senTemInlRet. port_b); connect(sinRet.ports[1],senTemOutRet. port_a); connect(conAir.port, pipSup.heatPort); connect(conAir.port,pipRet. heatPort); connect(TinRet.y,souRet. T_in); connect(con.port_a, pipSup.heatPort); connect(con.port_b, gro.ports[1, 1]); connect(pipSup.port_b, senTemOutSup.port_a); connect(pipRet.port_b, senTemInlRet.port_a); end TwoPipesConduit;