Buildings.Fluid.Geothermal.Boreholes

Package with borehole heat exchangers

Information

This package contains models for borehole heat exchangers.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Fluid.Geothermal.Boreholes.UTube UTube Single U-tube borehole heat exchanger
Buildings.Fluid.Geothermal.Boreholes.Examples Examples Example files for borehole heat exchanger
Buildings.Fluid.Geothermal.Boreholes.BaseClasses BaseClasses Base classes for Borehole

Buildings.Fluid.Geothermal.Boreholes.UTube Buildings.Fluid.Geothermal.Boreholes.UTube

Single U-tube borehole heat exchanger

Buildings.Fluid.Geothermal.Boreholes.UTube

Information

Model of a single U-tube borehole heat exchanger. The borehole heat exchanger is vertically discretized into nseg elements of height h=hBor⁄nseg. Each segment contains a model for the heat transfer in the borehole, for heat transfer in the soil and for the far-field boundary condition.

The heat transfer in the borehole is computed using a convective heat transfer coefficient that depends on the fluid velocity, a heat resistance between the two pipes, and a heat resistance between the pipes and the circumference of the borehole. The heat capacity of the fluid, and the heat capacity of the grout, is taken into account. The thermal resistance and capacity network inside the borehole is computed according to Bauer et al., (2011).

The heat transfer in the soil is computed using transient heat conduction in cylindrical coordinates for the spatial domain rbor ≤ r ≤ rext. In the radial direction, the spatial domain is discretized into nhor segments with uniform material properties. Thermal properties can be specified separately for each horizontal layer.

The far-field temperature, i.e., the temperature at the radius rext, is computed using a power-series solution to a line-source heat transfer problem. This temperature boundary condition is updated every tsample seconds.

The initial far-field temperature Text,start, which is the temperature of the soil at a radius rext, is computed as a function of the depth z > 0. For a depth between 0 ≤ z ≤ z0, the temperature is set to Text,0,start. The value of z0 is a parameter with a default of 10 meters. However, there is large variability in the depth where the undisturbed soil temperature starts. For a depth of z0 ≤ z ≤ hbor, the temperature is computed as

Tiext,start = Text,0,start + (zi - z0) dT ⁄ dz

with i ∈ {1, ..., nver}, where the temperature gradient dT ⁄ dz ≥ 0 is a parameter. As with z0, there is large variability in dT ⁄ dz ≥ 0. The default value is set to 1 Kelvin per 100 meters. For the temperature of the grout, the same equations are applied, with Text,0,start replaced with Tfil,0,start, and Tiext,start replaced with Tifil,start. The default setting uses the same temperature for the soil and the filling material.

Assumptions and limitations

The vertical heat flow is assumed to be zero and hence there is no heat flow from the ground surface to the soil that could be used to regenerate the soil temperature.

There is no ground water flow.

Implementation

Each horizontal layer is modeled using an instance of Buildings.HeatExchangers.Fluid.Boreholes.BaseClasses.BoreholeSegment. This model is composed of the model Buildings.Fluid.Geothermal.Boreholes.BaseClasses.HexInternalElement which computes the heat transfer in the pipes and the borehole filling, of the model Buildings.HeatTransfer.Conduction.SingleLayerCylinder which computes the heat transfer in the soil, and of the model Buildings.Fluid.Geothermal.Boreholes.BaseClasses.SingleUTubeBoundaryCondition which computes the far-field temperature boundary condition. The thermal resistor and capacitor network is computed in Buildings.Fluid.Geothermal.Boreholes.BaseClasses.singleUTubeResistances.

References

D. Bauer, W. Heidemann, H. Müller-Steinhagen, and H.-J. G. Diersch. Thermal resistance and capacity models for borehole heat exchangers . International Journal Of Energy Research, 35:312–320, 2011.

Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy), Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters (Parameters for flow resistance for models with two ports), Buildings.Fluid.Interfaces.LumpedVolumeDeclarations (Declarations for lumped volumes).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
RadiusrBor0.1Radius of the borehole [m]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal Pressure difference [Pa]
Soil
GenericmatSoiredeclare parameter Building...Thermal properties of soil
RadiusrExt3Radius of the soil used for the external boundary condition [m]
IntegernHor10Number of state variables in each horizontal layer of the soil
TimesamplePeriod Sample period for the external boundary condition [s]
Borehole
GenericmatFilredeclare parameter Building...Thermal properties of the filling material
HeighthBor Total height of the borehole [m]
IntegernVer10Number of segments used for discretization in the vertical direction
LengthxC0.05Shank spacing, defined as the distance between the center of a pipe and the center of the borehole [m]
RealB017.44Shape coefficient for grout resistance
RealB1-0.605Shape coefficient for grout resistance
Tubes
RadiusrTub0.02Radius of the tubes [m]
ThermalConductivitykTub0.5Thermal conductivity of the tube [W/(m.K)]
LengtheTub0.002Thickness of a tube [m]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Ttrue= true, if actual temperature at port is computed
Flow resistance
BooleancomputeFlowResistancefalse=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistancefalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
RealmSenFac1Factor for scaling the sensible thermal mass of the volume
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances
ExtraPropertyC_nominal[Medium.nC]fill(1E-2, Medium.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Initial temperature
Soil
TemperatureTExt0_start283.15Initial far field temperature [K]
TemperatureTExt_start[nVer]{if z[i] >= z0 then TExt0_st...Temperature of the undisturbed ground [K]
Filling material
TemperatureTFil0_startTExt0_startInitial temperature of the filling material for h = 0...z0 [K]
TemperatureTFil_start[nVer]TExt_startTemperature of the undisturbed ground [K]
Temperature profile
Heightz010Depth below which the temperature gradient starts [m]
RealdT_dz0.01Vertical temperature gradient of the undisturbed soil for h below z0 [K/m]

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica definition

model UTube "Single U-tube borehole heat exchanger" extends Buildings.Fluid.Interfaces.PartialTwoPortInterface( show_T=true); extends Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters(final computeFlowResistance=false, final linearizeFlowResistance=false); extends Buildings.Fluid.Interfaces.LumpedVolumeDeclarations; constant Boolean homotopyInitialization = true "= true, use homotopy method"; replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic matSoi "Thermal properties of soil"; replaceable parameter Buildings.HeatTransfer.Data.BoreholeFillings.Generic matFil "Thermal properties of the filling material"; parameter Modelica.SIunits.Radius rTub=0.02 "Radius of the tubes"; parameter Modelica.SIunits.ThermalConductivity kTub=0.5 "Thermal conductivity of the tube"; parameter Modelica.SIunits.Length eTub=0.002 "Thickness of a tube"; parameter Modelica.SIunits.Height hBor "Total height of the borehole"; parameter Integer nVer=10 "Number of segments used for discretization in the vertical direction"; parameter Modelica.SIunits.Radius rBor=0.1 "Radius of the borehole"; parameter Modelica.SIunits.Radius rExt=3 "Radius of the soil used for the external boundary condition"; parameter Integer nHor(min=1) = 10 "Number of state variables in each horizontal layer of the soil"; parameter Modelica.SIunits.Temperature TExt0_start=283.15 "Initial far field temperature"; parameter Modelica.SIunits.Temperature TExt_start[nVer]={if z[i] >= z0 then TExt0_start + (z[i] - z0)*dT_dz else TExt0_start for i in 1:nVer} "Temperature of the undisturbed ground"; parameter Modelica.SIunits.Temperature TFil0_start=TExt0_start "Initial temperature of the filling material for h = 0...z0"; parameter Modelica.SIunits.Temperature TFil_start[nVer]=TExt_start "Temperature of the undisturbed ground"; parameter Modelica.SIunits.Height z0=10 "Depth below which the temperature gradient starts"; parameter Real dT_dz(unit="K/m") = 0.01 "Vertical temperature gradient of the undisturbed soil for h below z0"; parameter Modelica.SIunits.Time samplePeriod "Sample period for the external boundary condition"; parameter Modelica.SIunits.Length xC=0.05 "Shank spacing, defined as the distance between the center of a pipe and the center of the borehole"; parameter Real B0=17.44 "Shape coefficient for grout resistance"; parameter Real B1=-0.605 "Shape coefficient for grout resistance"; Buildings.Fluid.Geothermal.Boreholes.BaseClasses.BoreholeSegment borHol[nVer]( redeclare each final package Medium = Medium, each final matSoi=matSoi, each final matFil=matFil, each final hSeg=hBor/nVer, each final samplePeriod=samplePeriod, each final rTub=rTub, each final rBor=rBor, each final rExt=rExt, each final xC=xC, each final eTub=eTub, each final kTub=kTub, each final nSta=nHor, each final m_flow_nominal=m_flow_nominal, each final m_flow_small=m_flow_small, final dp_nominal={if i == 1 then dp_nominal else 0 for i in 1:nVer}, TExt_start=TExt_start, TFil_start=TExt_start, each final homotopyInitialization=homotopyInitialization, each final show_T=show_T, each final computeFlowResistance=computeFlowResistance, each final from_dp=from_dp, each final linearizeFlowResistance=linearizeFlowResistance, each final deltaM=deltaM, each final energyDynamics=energyDynamics, each final massDynamics=massDynamics, each final p_start=p_start, each T_start=T_start, each X_start=X_start, each C_start=C_start, each C_nominal=C_nominal, each allowFlowReversal=allowFlowReversal) "Discretized borehole segments"; Modelica.SIunits.Temperature Tdown[nVer] "Medium temperature in pipe 1"; Modelica.SIunits.Temperature Tup[nVer] "Medium temperature in pipe 2"; protected parameter Modelica.SIunits.Height z[nVer]={hBor/nVer*(i - 0.5) for i in 1: nVer} "Distance from the surface to the considered segment"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); equation Tdown[:] = borHol[:].pipFil.vol1.heatPort.T; Tup[:] = borHol[:].pipFil.vol2.heatPort.T; connect(port_a, borHol[1].port_a1); connect(port_b, borHol[1].port_b2); connect(borHol[nVer].port_b1, borHol[nVer].port_a2); for i in 1:nVer - 1 loop connect(borHol[i].port_b1, borHol[i + 1].port_a1); connect(borHol[i].port_a2, borHol[i + 1].port_b2); end for; end UTube;