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 |
DiscretizedBuriedPipe
|
Example model of a buried pipe with multiple segments |
SingleBuriedPipe
|
Example model of a single buried pipe |
TwoBuriedPipes
|
Example model of two buried pipes in close proximity |
TwoPipesConduit
|
Example model of a buried conduit housing a supply and return pipe |
Example model of a buried pipe with multiple segments
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
Type | Name | Default | Description |
replaceable package Medium | Buildings.Media.Water | Medium in the pipe |
Length | totLen | 10000 | Total pipe length [m] |
Integer | nSeg | 2 | Number of pipe segments |
Length | segLen[nSeg] | fill(totLen/nSeg, nSeg) | Pipe segments length [m] |
Integer | nSegRev | 10 | Number of pipe segments |
Length | segLenRev[nSegRev] | fill(totLen/nSegRev, nSegRev) | Pipe segments length [m] |
Length | dIns | 0.2 | Virtual insulation layer thickness [m] |
Boston | cliCon | redeclare parameter Building... | Surface temperature climatic conditions |
Generic | soiDat | soiDat(k=1.58, c=1150, d=1600) | Soil thermal properties |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the pipe |
Modelica definition
model DiscretizedBuriedPipe
extends Modelica.Icons.Example;
replaceable package Medium =
Buildings.Media.Water ;
parameter Modelica.Units.SI.Length totLen=10000 ;
parameter Integer nSeg=2 ;
parameter Modelica.Units.SI.Length segLen[nSeg]=
fill(totLen/nSeg, nSeg)
;
parameter Integer nSegRev=10 ;
parameter Modelica.Units.SI.Length segLenRev[nSegRev]=
fill(totLen/nSegRev,
nSegRev) ;
parameter Modelica.Units.SI.Length dIns=0.2
;
replaceable parameter Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Boston
cliCon ;
replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic
soiDat(k=1.58,c=1150,d=1600) ;
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) ;
Buildings.Fluid.Geothermal.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}) ;
Modelica.Blocks.Sources.Sine Tin(
amplitude=5,
f=1/180/24/60/60,
offset=273.15 + 20) ;
Sources.MassFlowSource_T sou(
nPorts=1,
redeclare package Medium =
Medium,
use_T_in=true,
m_flow=3) ;
Sensors.TemperatureTwoPort senTemInl(
redeclare package Medium =
Medium,
m_flow_nominal=1,
T_start=293.15) ;
Sources.Boundary_pT sin(
redeclare package Medium =
Medium,
T=273.15 + 10,
nPorts=1,
p(displayUnit="Pa") = 101325) ;
Sensors.TemperatureTwoPort senTemOut(
redeclare package Medium =
Medium,
m_flow_nominal=1,
T_start=293.15) ;
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) ;
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})
;
Sensors.TemperatureTwoPort senTemOutRev(
redeclare package Medium =
Medium,
m_flow_nominal=1,
T_start=293.15) ;
Sensors.TemperatureTwoPort senTemInlRev(
redeclare package Medium =
Medium,
m_flow_nominal=1,
T_start=293.15) ;
Sources.MassFlowSource_T souRev(
nPorts=1,
redeclare package Medium =
Medium,
use_T_in=true,
m_flow=3) ;
Sources.Boundary_pT sinRev(
redeclare package Medium =
Medium,
T=273.15 + 10,
nPorts=1,
p(displayUnit="Pa") = 101325) ;
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;
Example model of a single buried pipe
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
Type | Name | Default | Description |
Boston | cliCon | redeclare parameter Building... | Surface temperature climatic conditions |
replaceable package Medium | Buildings.Media.Water | Medium in the pipe |
Temperature | Tin | 293.15 | Mean inlet temperature [K] |
Generic | soiDat | soiDat(k=1.58, c=1150, d=1600) | Soil thermal properties |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the pipe |
Modelica definition
model SingleBuriedPipe
extends Modelica.Icons.Example;
replaceable parameter Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Boston
cliCon ;
replaceable package Medium =
Buildings.Media.Water ;
parameter Modelica.Units.SI.Temperature Tin=293.15 ;
replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic
soiDat(k=1.58,c=1150,d=1600) ;
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) ;
Buildings.Fluid.Geothermal.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}) ;
Modelica.Blocks.Sources.Sine TInlSig(
amplitude=5,
f=1/180/24/60/60,
offset=Tin) ;
Sources.MassFlowSource_T sou(
nPorts=1,
redeclare package Medium =
Medium,
use_T_in=true,
m_flow=3) ;
Sensors.TemperatureTwoPort senTemInl(
redeclare package Medium =
Medium,
m_flow_nominal=pip.m_flow_nominal,
T_start=Tin) ;
Sources.Boundary_pT sin(
redeclare package Medium =
Medium,
T=Tin,
nPorts=1,
p(displayUnit="Pa") = 101325) ;
Sensors.TemperatureTwoPort senTemOut(
redeclare package Medium =
Medium,
m_flow_nominal=pip.m_flow_nominal,
T_start=Tin) ;
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) ;
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})
;
Sensors.TemperatureTwoPort senTemOutRev(
redeclare package Medium =
Medium,
m_flow_nominal=pipRev.m_flow_nominal,
T_start=Tin) ;
Sensors.TemperatureTwoPort senTemInlRev(
redeclare package Medium =
Medium,
m_flow_nominal=pipRev.m_flow_nominal,
T_start=Tin) ;
Sources.MassFlowSource_T souRev(
nPorts=1,
redeclare package Medium =
Medium,
use_T_in=true,
m_flow=3) ;
Sources.Boundary_pT sinRev(
redeclare package Medium =
Medium,
T=Tin,
nPorts=1,
p(displayUnit="Pa") = 101325) ;
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;
Example model of two buried pipes in close proximity
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
Type | Name | Default | Description |
Boston | cliCon | redeclare parameter Building... | Surface temperature climatic conditions |
replaceable package Medium | Buildings.Media.Water | Medium in the pipe |
Generic | soiDat | soiDat(k=1.58, c=1150, d=1600) | Soil thermal properties |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the pipe |
Modelica definition
model TwoBuriedPipes
extends Modelica.Icons.Example;
replaceable parameter Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Boston
cliCon ;
replaceable package Medium =
Buildings.Media.Water ;
replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic
soiDat(k=1.58,c=1150,d=1600) ;
Buildings.Fluid.Geothermal.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}) ;
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) ;
Modelica.Blocks.Sources.Sine TinChW(
amplitude=2,
f=1/180/24/60/60,
offset=TChW) ;
Sources.MassFlowSource_T souChW(
nPorts=1,
redeclare package Medium =
Medium,
use_T_in=true,
m_flow=3) ;
Sensors.TemperatureTwoPort senTemChWIn(
redeclare package Medium =
Medium,
m_flow_nominal=pipChW.m_flow_nominal,
T_start=TChW) ;
Sources.Boundary_pT sinChW(
redeclare package Medium =
Medium,
T=TChW,
nPorts=1,
p(displayUnit="Pa") = 101325) ;
Sensors.TemperatureTwoPort senTemChWOut(
redeclare package Medium =
Medium,
m_flow_nominal=pipChW.m_flow_nominal,
T_start=TChW) ;
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) ;
Modelica.Blocks.Sources.Sine TinHotW(
amplitude=5,
f=1/90/24/60/60,
phase=3.1415926535898,
offset=THotW) ;
Sources.MassFlowSource_T souHotW(
redeclare package Medium =
Medium,
use_T_in=true,
m_flow=3,
nPorts=1) ;
Sensors.TemperatureTwoPort senTemHotWIn(
redeclare package Medium =
Medium,
m_flow_nominal=pipHotW.m_flow_nominal,
T_start=THotW) ;
Sources.Boundary_pT sinHotW(
redeclare package Medium =
Medium,
T=THotW,
p(displayUnit="Pa") = 101325,
nPorts=1) ;
Sensors.TemperatureTwoPort senTemHotWOut(
redeclare package Medium =
Medium,
m_flow_nominal=pipHotW.m_flow_nominal,
T_start=THotW) ;
protected
parameter Modelica.Units.SI.Temperature TChW=273.15 + 10
;
parameter Modelica.Units.SI.Temperature THotW=273.15 + 80
;
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;
Example model of a buried conduit housing a supply and return pipe
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
Type | Name | Default | Description |
Boston | cliCon | redeclare parameter Building... | Surface temperature climatic conditions |
replaceable package Medium | Buildings.Media.Water | Medium in the pipe |
Length | dCon | 0.3 | Conduit diameter [m] |
Length | len | 1000 | Conduit length [m] |
Length | xConWal | 0.01 | Conduit wall thickness [m] |
Generic | conMat | conMat(k=0.19, c=840, d=1380) | Conduit wall material (PVC) |
Generic | soiDat | soiDat(k=1.58, c=1150, d=1600) | Soil thermal properties |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the pipe |
Modelica definition
model TwoPipesConduit
extends Modelica.Icons.Example;
replaceable parameter Buildings.BoundaryConditions.GroundTemperature.ClimaticConstants.Boston
cliCon ;
replaceable package Medium =
Buildings.Media.Water ;
parameter Modelica.Units.SI.Length dCon=0.3 ;
parameter Modelica.Units.SI.Length len=1000 ;
parameter Modelica.Units.SI.Length xConWal=0.01 ;
parameter Buildings.HeatTransfer.Data.Soil.Generic conMat(
k=0.19,
c=840,
d=1380) ;
replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic
soiDat(k=1.58,c=1150,d=1600) ;
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) ;
Buildings.Fluid.Geothermal.BuriedPipes.GroundCoupling gro(
nPip=1,
cliCon=cliCon,
soiDat=soiDat,
nSeg=1,
len={len},
dep={1.5},
pos={0},
rad={dCon}) ;
Modelica.Blocks.Sources.Sine TinSup(
amplitude=5,
f=1/180/24/60/60,
offset=273.15 + 70) ;
Sources.MassFlowSource_T souSup(
nPorts=1,
redeclare package Medium =
Medium,
use_T_in=true,
m_flow=3) ;
Sensors.TemperatureTwoPort senTemInlSup(
redeclare package Medium =
Medium,
m_flow_nominal=1,
T_start=343.15) ;
Sources.Boundary_pT sinSup(
redeclare package Medium =
Medium,
T=343.15,
nPorts=1,
p(displayUnit="Pa") = 101325) ;
Sensors.TemperatureTwoPort senTemOutSup(
redeclare package Medium =
Medium,
m_flow_nominal=1,
T_start=343.15) ;
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) ;
Sensors.TemperatureTwoPort senTemOutRet(
redeclare package Medium =
Medium,
m_flow_nominal=1,
T_start=323.15) ;
Sensors.TemperatureTwoPort senTemInlRet(
redeclare package Medium =
Medium,
m_flow_nominal=1,
T_start=323.15) ;
Sources.MassFlowSource_T souRet(
nPorts=1,
redeclare package Medium =
Medium,
use_T_in=true,
m_flow=3) ;
Sources.Boundary_pT sinRet(
redeclare package Medium =
Medium,
T=323.15,
nPorts=1,
p(displayUnit="Pa") = 101325) ;
Modelica.Thermal.HeatTransfer.Components.HeatCapacitor conAir(C=VConAir * rhoAir * cpAir, T(start=
313.15, fixed=true))
;
Modelica.Blocks.Sources.Sine TinRet(
amplitude=2,
f=1/180/24/60/60,
phase=0.78539816339745,
offset=273.15 + 50) ;
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) ;
protected
parameter Modelica.Units.SI.Volume VConAir=len*Modelica.Constants.pi*((dCon/2)
^2 - (pipSup.dh/2)^2 - (pipRet.dh/2)^2) ;
constant Modelica.Units.SI.Density rhoAir=1.2 ;
constant Modelica.Units.SI.SpecificHeatCapacity cpAir=Buildings.Utilities.Psychrometrics.Constants.cpAir
;
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;