Buildings.Fluid.Geothermal.Borefields.Examples

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
Buildings.Fluid.Geothermal.Borefields.Examples.Borefields Borefields Example model with several borefield configurations operating simultaneously
Buildings.Fluid.Geothermal.Borefields.Examples.RectangularBorefield RectangularBorefield Example model of a rectangular borefield

Buildings.Fluid.Geothermal.Borefields.Examples.Borefields Buildings.Fluid.Geothermal.Borefields.Examples.Borefields

Example model with several borefield configurations operating simultaneously

Buildings.Fluid.Geothermal.Borefields.Examples.Borefields

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

TypeNameDefaultDescription
TimetLoaAgg300Time resolution of load aggregation [s]
TemperatureTGro283.15Ground temperature [K]

Modelica definition

model Borefields "Example model with several borefield configurations operating simultaneously" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water; parameter Modelica.SIunits.Time tLoaAgg=300 "Time resolution of load aggregation"; parameter Modelica.SIunits.Temperature TGro = 283.15 "Ground temperature"; 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) "Borefield with a 2-U-tube connected in parallel borehole configuration"; 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) "Source"; Buildings.Fluid.Sensors.TemperatureTwoPort T2UTubParIn( redeclare package Medium = Medium, m_flow_nominal=borFie2UTubParDat.conDat.mBorFie_flow_nominal, tau=0) "Inlet temperature of the borefield with 2-UTube in serie configuration"; 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) "Sink"; Buildings.Fluid.Sensors.TemperatureTwoPort T2UTubParOut( redeclare package Medium = Medium, m_flow_nominal=borFie2UTubParDat.conDat.mBorFie_flow_nominal, tau=0) "Outlet temperature of the borefield with 2-UTube in parallel configuration"; 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) "Borefield with a 2-U-tube connected in serie borehole configuration"; 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) "Source"; Buildings.Fluid.Sensors.TemperatureTwoPort T2UTubSerIn( redeclare package Medium = Medium, m_flow_nominal=borFie2UTubSerDat.conDat.mBorFie_flow_nominal, tau=0) "Inlet temperature of the borefield with 2-UTube in serie configuration"; 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) "Sink"; Buildings.Fluid.Sensors.TemperatureTwoPort T2UTubSerOut( redeclare package Medium = Medium, m_flow_nominal=borFie2UTubSerDat.conDat.mBorFie_flow_nominal, tau=0) "Outlet temperature of the borefield with 2-UTube in serie configuration"; Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Example borFie2UTubParDat( conDat=Buildings.Fluid.Geothermal.Borefields.Data.Configuration.Example( borCon=Buildings.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.DoubleUTubeParallel)) "Data from the borefield with 2-UTube in parallel borehole configuration"; 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) "Borefield with a U-tube borehole configuration"; 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) "Source"; Buildings.Fluid.Sensors.TemperatureTwoPort TUTubIn( redeclare package Medium = Medium, m_flow_nominal=borFieUTubDat.conDat.mBorFie_flow_nominal, tau=0) "Inlet temperature of the borefield with UTube configuration"; 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) "Sink"; Buildings.Fluid.Sensors.TemperatureTwoPort TUTubOut( redeclare package Medium = Medium, m_flow_nominal=borFieUTubDat.conDat.mBorFie_flow_nominal, tau=0) "Inlet temperature of the borefield with UTube configuration"; Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Example borFie2UTubSerDat( conDat=Buildings.Fluid.Geothermal.Borefields.Data.Configuration.Example( borCon=Buildings.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.DoubleUTubeSeries)) "Data from the borefield with 2-UTube in serie borehole configuration"; 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;

Buildings.Fluid.Geothermal.Borefields.Examples.RectangularBorefield Buildings.Fluid.Geothermal.Borefields.Examples.RectangularBorefield

Example model of a rectangular borefield

Buildings.Fluid.Geothermal.Borefields.Examples.RectangularBorefield

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

TypeNameDefaultDescription
TimetLoaAgg300Time resolution of load aggregation [s]
TemperatureTGro283.15Ground temperature [K]
Velocityv_nominal1Nominal velocity [m/s]
MassFlowRatem_flow_nominalnBorHol*v_nominal*rTub^2*3.1...Nominal mass flow rate [kg/s]
PressuredpBorFie_nominal(hBor + (xBorFie + yBorFie)/...Pressure losses for the entire borefield [Pa]
PressuredpHex_nominal10000Pressure drop heat exchanger [Pa]
Pressuredp_nominaldpBorFie_nominal + dpHex_nom...Total pressure drop [Pa]
HeighthBor100Total height of the borehole [m]
RadiusrTub0.02Outer radius of the tubes [m]
LengthxBorFie10Borefield length [m]
LengthyBorFie30Borefield width [m]
LengthdBorHol5Distance between two boreholes [m]

Modelica definition

model RectangularBorefield "Example model of a rectangular borefield" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model"; parameter Modelica.SIunits.Time tLoaAgg=300 "Time resolution of load aggregation"; parameter Modelica.SIunits.Temperature TGro = 283.15 "Ground temperature"; parameter Modelica.SIunits.Velocity v_nominal = 1 "Nominal velocity"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal = nBorHol*v_nominal*rTub^2*3.14*1000 "Nominal mass flow rate"; parameter Modelica.SIunits.Pressure dpBorFie_nominal = (hBor+(xBorFie+yBorFie)/2)*2 "Pressure losses for the entire borefield"; parameter Modelica.SIunits.Pressure dpHex_nominal = 10000 "Pressure drop heat exchanger"; parameter Modelica.SIunits.Pressure dp_nominal = dpBorFie_nominal + dpHex_nominal "Total pressure drop"; parameter Modelica.SIunits.Height hBor = 100 "Total height of the borehole"; parameter Modelica.SIunits.Radius rTub = 0.02 "Outer radius of the tubes"; parameter Modelica.SIunits.Length xBorFie = 10 "Borefield length"; parameter Modelica.SIunits.Length yBorFie = 30 "Borefield width"; parameter Modelica.SIunits.Length dBorHol = 5 "Distance between two boreholes"; final parameter Integer nXBorHol = integer((xBorFie+dBorHol)/dBorHol) "Number of boreholes in x-direction"; final parameter Integer nYBorHol = integer((yBorFie+dBorHol)/dBorHol) "Number of boreholes in y-direction"; final parameter Integer nBorHol = nXBorHol*nYBorHol "Number of boreholes"; final parameter Buildings.Fluid.Geothermal.Borefields.Data.Filling.Bentonite filDat; final parameter Buildings.Fluid.Geothermal.Borefields.Data.Soil.SandStone soiDat "Soil data"; 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}) "Borefield configuration"; final parameter Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Template borFieDat( final filDat=filDat, final soiDat=soiDat, final conDat=conDat) "Borefield parameters"; Buildings.Fluid.Geothermal.Borefields.OneUTube borFie( redeclare package Medium = Medium, borFieDat=borFieDat, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, TExt0_start=280.65, allowFlowReversal=false) "Geothermal borefield"; Buildings.Fluid.Sources.Boundary_pT bou( redeclare package Medium = Medium, nPorts=1) "Pressure boundary condition"; 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) "Heater"; Modelica.Blocks.Sources.Constant TSou(k=293.15) "Temperature of water that goes into the borefield"; 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;