Example models for Buildings.Fluid.Geothermal.Borefields
Information
This package contains examples for the use of functions that can be found in
Buildings.Fluid.Geothermal.Borefields.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
Borefields
|
Example model with several borefield configurations operating simultaneously |
RectangularBorefield
|
Example model of a rectangular borefield |
Example model with several borefield configurations operating simultaneously
Information
This example shows three different borefields, each with a different configuration
(single U-tube, double U-tube in parallel, and double U-tube in series) and compares
the thermal behaviour of the circulating fluid in each case.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Time | tLoaAgg | 300 | Time resolution of load aggregation [s] |
Temperature | TGro | 283.15 | Ground temperature [K] |
Modelica definition
model Borefields
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water;
parameter Modelica.SIunits.Time tLoaAgg=300
;
parameter Modelica.SIunits.Temperature TGro = 283.15
;
Buildings.Fluid.Geothermal.Borefields.TwoUTubes borFie2UTubPar(
redeclare package Medium = Medium,
borFieDat=borFie2UTubParDat,
tLoaAgg=tLoaAgg,
dynFil=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
TExt0_start=TGro)
;
Buildings.Fluid.Sources.MassFlowSource_T sou1(
redeclare package Medium = Medium,
nPorts=1,
use_T_in=false,
m_flow=borFie2UTubParDat.conDat.mBorFie_flow_nominal,
T=303.15) ;
Buildings.Fluid.Sensors.TemperatureTwoPort T2UTubParIn(
redeclare package Medium = Medium,
m_flow_nominal=borFie2UTubParDat.conDat.mBorFie_flow_nominal,
tau=0)
;
Buildings.Fluid.Sources.Boundary_pT sin1(
redeclare package Medium = Medium,
use_p_in=false,
use_T_in=false,
nPorts=1,
p=101330,
T=283.15) ;
Buildings.Fluid.Sensors.TemperatureTwoPort T2UTubParOut(
redeclare package Medium = Medium,
m_flow_nominal=borFie2UTubParDat.conDat.mBorFie_flow_nominal,
tau=0)
;
Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Example borFieUTubDat(
conDat=
Buildings.Fluid.Geothermal.Borefields.Data.Configuration.Example(
borCon=Buildings.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.SingleUTube));
Buildings.Fluid.Geothermal.Borefields.TwoUTubes borFie2UTubSer(
redeclare package Medium = Medium,
borFieDat=borFie2UTubSerDat,
tLoaAgg=tLoaAgg,
dynFil=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
TExt0_start=TGro)
;
Buildings.Fluid.Sources.MassFlowSource_T sou2(
redeclare package Medium = Medium,
nPorts=1,
use_T_in=false,
m_flow=borFie2UTubSerDat.conDat.mBorFie_flow_nominal,
T=303.15) ;
Buildings.Fluid.Sensors.TemperatureTwoPort T2UTubSerIn(
redeclare package Medium = Medium,
m_flow_nominal=borFie2UTubSerDat.conDat.mBorFie_flow_nominal,
tau=0)
;
Buildings.Fluid.Sources.Boundary_pT sin2(
redeclare package Medium = Medium,
use_p_in=false,
use_T_in=false,
nPorts=1,
p=101330,
T=283.15) ;
Buildings.Fluid.Sensors.TemperatureTwoPort T2UTubSerOut(
redeclare package Medium = Medium,
m_flow_nominal=borFie2UTubSerDat.conDat.mBorFie_flow_nominal,
tau=0)
;
Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Example borFie2UTubParDat(
conDat=
Buildings.Fluid.Geothermal.Borefields.Data.Configuration.Example(
borCon=Buildings.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.DoubleUTubeParallel))
;
Buildings.Fluid.Geothermal.Borefields.OneUTube borFieUTub(
redeclare package Medium = Medium,
borFieDat=borFieUTubDat,
tLoaAgg=tLoaAgg,
dynFil=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
TExt0_start=TGro)
;
Buildings.Fluid.Sources.MassFlowSource_T sou(
redeclare package Medium = Medium,
nPorts=1,
use_T_in=false,
m_flow=borFieUTubDat.conDat.mBorFie_flow_nominal,
T=303.15) ;
Buildings.Fluid.Sensors.TemperatureTwoPort TUTubIn(
redeclare package Medium = Medium,
m_flow_nominal=borFieUTubDat.conDat.mBorFie_flow_nominal,
tau=0)
;
Buildings.Fluid.Sources.Boundary_pT sin(
redeclare package Medium = Medium,
use_p_in=false,
use_T_in=false,
nPorts=1,
p=101330,
T=283.15) ;
Buildings.Fluid.Sensors.TemperatureTwoPort TUTubOut(
redeclare package Medium = Medium,
m_flow_nominal=borFieUTubDat.conDat.mBorFie_flow_nominal,
tau=0)
;
Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Example borFie2UTubSerDat(
conDat=
Buildings.Fluid.Geothermal.Borefields.Data.Configuration.Example(
borCon=Buildings.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.DoubleUTubeSeries))
;
equation
connect(sou1.ports[1], T2UTubParIn.port_a);
connect(T2UTubParIn.port_b, borFie2UTubPar.port_a);
connect(T2UTubParOut.port_a, borFie2UTubPar.port_b);
connect(T2UTubParOut.port_b, sin1.ports[1]);
connect(sou2.ports[1], T2UTubSerIn.port_a);
connect(T2UTubSerIn.port_b, borFie2UTubSer.port_a);
connect(T2UTubSerOut.port_a, borFie2UTubSer.port_b);
connect(T2UTubSerOut.port_b,sin2. ports[1]);
connect(sou.ports[1], TUTubIn.port_a);
connect(TUTubIn.port_b, borFieUTub.port_a);
connect(borFieUTub.port_b, TUTubOut.port_a);
connect(TUTubOut.port_b, sin.ports[1]);
end Borefields;
Example model of a rectangular borefield
Information
This example model illustrates how to configure the layout
of the boreholes for a rectangular borefield.
The configuration is
cooBor = {{dBorHol*mod((i-1),nXBorHol), dBorHol*floor((i-1)/nXBorHol)} for i in 1:nBorHol}
where dBorHol
is the distance between the boreholes,
nXBorHol
is the number of boreholes in the x-direction, and
nBorHol
is the total number of boreholes.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Time | tLoaAgg | 300 | Time resolution of load aggregation [s] |
Temperature | TGro | 283.15 | Ground temperature [K] |
Velocity | v_nominal | 1 | Nominal velocity [m/s] |
MassFlowRate | m_flow_nominal | nBorHol*v_nominal*rTub^2*3.1... | Nominal mass flow rate [kg/s] |
Pressure | dpBorFie_nominal | (hBor + (xBorFie + yBorFie)/... | Pressure losses for the entire borefield [Pa] |
Pressure | dpHex_nominal | 10000 | Pressure drop heat exchanger [Pa] |
Pressure | dp_nominal | dpBorFie_nominal + dpHex_nom... | Total pressure drop [Pa] |
Height | hBor | 100 | Total height of the borehole [m] |
Radius | rTub | 0.02 | Outer radius of the tubes [m] |
Length | xBorFie | 10 | Borefield length [m] |
Length | yBorFie | 30 | Borefield width [m] |
Length | dBorHol | 5 | Distance between two boreholes [m] |
Modelica definition
model RectangularBorefield
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water ;
parameter Modelica.SIunits.Time tLoaAgg=300
;
parameter Modelica.SIunits.Temperature TGro = 283.15
;
parameter Modelica.SIunits.Velocity v_nominal = 1 ;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal = nBorHol*v_nominal*rTub^2*3.14*1000
;
parameter Modelica.SIunits.Pressure dpBorFie_nominal = (hBor+(xBorFie+yBorFie)/2)*2
;
parameter Modelica.SIunits.Pressure dpHex_nominal = 10000 ;
parameter Modelica.SIunits.Pressure dp_nominal = dpBorFie_nominal + dpHex_nominal
;
parameter Modelica.SIunits.Height hBor = 100 ;
parameter Modelica.SIunits.Radius rTub = 0.02 ;
parameter Modelica.SIunits.Length xBorFie = 10 ;
parameter Modelica.SIunits.Length yBorFie = 30 ;
parameter Modelica.SIunits.Length dBorHol = 5 ;
final parameter Integer nXBorHol =
integer((xBorFie+dBorHol)/dBorHol) ;
final parameter Integer nYBorHol =
integer((yBorFie+dBorHol)/dBorHol) ;
final parameter Integer nBorHol = nXBorHol*nYBorHol ;
final parameter Buildings.Fluid.Geothermal.Borefields.Data.Filling.Bentonite filDat;
final parameter Buildings.Fluid.Geothermal.Borefields.Data.Soil.SandStone soiDat
;
final parameter Buildings.Fluid.Geothermal.Borefields.Data.Configuration.Template
conDat(
final borCon=Buildings.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.SingleUTube,
final use_Rb=false,
final mBor_flow_nominal=m_flow_nominal/(nXBorHol*nYBorHol),
final mBorFie_flow_nominal=m_flow_nominal,
final hBor=hBor,
final dBor=1,
final rBor=0.2,
final rTub=rTub,
final kTub=0.5,
final eTub=0.002,
final xC=0.05,
final dp_nominal=dpBorFie_nominal,
final cooBor = {{dBorHol*
mod((i-1),nXBorHol), dBorHol*
floor((i-1)/nXBorHol)}
for i
in 1:nBorHol})
;
final parameter Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Template
borFieDat(
final filDat=filDat,
final soiDat=soiDat,
final conDat=conDat) ;
Buildings.Fluid.Geothermal.Borefields.OneUTube borFie(
redeclare package Medium = Medium,
borFieDat=borFieDat,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
TExt0_start=280.65,
allowFlowReversal=false)
;
Buildings.Fluid.Sources.Boundary_pT bou(
redeclare package Medium = Medium, nPorts=1)
;
Buildings.Fluid.Movers.FlowControlled_m_flow pum(
redeclare package Medium = Medium,
addPowerToMedium=false,
use_inputFilter=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
massDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
inputType=Buildings.Fluid.Types.InputType.Constant,
m_flow_nominal=borFieDat.conDat.mBorFie_flow_nominal,
allowFlowReversal=false);
Buildings.Fluid.HeatExchangers.Heater_T hea(
redeclare package Medium = Medium,
show_T=true,
m_flow_nominal=borFieDat.conDat.mBorFie_flow_nominal,
m_flow(start=borFieDat.conDat.mBorFie_flow_nominal),
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
dp_nominal=dpHex_nominal,
allowFlowReversal=false) ;
Modelica.Blocks.Sources.Constant TSou(k=293.15)
;
equation
connect(hea.port_b, pum.port_a);
connect(TSou.y, hea.TSet);
connect(pum.port_b, borFie.port_a);
connect(borFie.port_b, hea.port_a);
connect(pum.port_a, bou.ports[1]);
end RectangularBorefield;