Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).
Name | Description |
---|---|
UTube | |
Examples | Example files for borehole heat exchanger |
BaseClasses | Base classes for Borehole |
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. All thermal mass is assumed to be at the two bulk temperatures of the down-flowing and up-flowing fluid.
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 vertical heat flow is assumed to be zero, and there is assumed to be no ground water flow.
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.Each horizontal layer is modeled using an instance of Buildings.HeatExchangers.Fluid.Boreholes.BaseClasses.BoreholeSegment. This model is composed of the model Buildings.Fluid.HeatExchangers.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.HeatExchangers.Boreholes.BaseClasses.TemperatureBoundaryCondition which computes the far-field temperature boundary condition.
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).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Radius | rBor | 0.1 | Radius of the borehole [m] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Pressure | dp_nominal | Pressure [Pa] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
Pressure | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Tubes | |||
Radius | rTub | 0.02 | Radius of the tubes [m] |
ThermalConductivity | kTub | 0.5 | Thermal conductivity of the tube [W/(m.K)] |
Length | eTub | 0.002 | Thickness of a tube [m] |
Borehole | |||
Generic | matFil | redeclare parameter Building... | Thermal properties of the borehole filling |
Height | hBor | Total height of the borehole [m] | |
Integer | nVer | 10 | Number of segments used for discretization in the vertical direction |
Length | xC | 0.05 | Shank spacing, defined as the distance between the center of a pipe and the center of the borehole [m] |
Real | B0 | 17.44 | Shape coefficient for grout resistance |
Real | B1 | -0.605 | Shape coefficient for grout resistance |
Soil | |||
Generic | matSoi[nVer] | redeclare parameter Building... | Thermal properties of the soil |
Radius | rExt | 3 | Radius of the soil used for the external boundary condition [m] |
Integer | nHor | 10 | Number of state variables in each horizontal layer of the soil |
Time | samplePeriod | Sample period for the external boundary condition [s] | |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Boolean | homotopyInitialization | true | = true, use homotopy method |
Diagnostics | |||
Boolean | show_V_flow | false | = true, if volume flow rate at inflowing port is computed |
Boolean | show_T | true | = true, if actual temperature at port is computed (may lead to events) |
Flow resistance | |||
Boolean | computeFlowResistance | false | =true, compute flow resistance. Set to false to assume no friction |
Boolean | from_dp | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Dynamics | |||
Equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Formulation of energy balance |
Dynamics | massDynamics | energyDynamics | Formulation of mass balance |
Initialization | |||
AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Start value of temperature [K] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
ExtraProperty | C_nominal[Medium.nC] | fill(1E-2, Medium.nC) | Nominal value of trace substances. (Set to typical order of magnitude.) |
Initial temperature | |||
Soil | |||
Temperature | TExt0_start | 283.15 | Initial far field temperature [K] |
Temperature | TExt_start[nVer] | {if z[i] >= z0 then TExt0_st... | Temperature of the undisturbed ground [K] |
Filling material | |||
Temperature | TFil0_start | TExt0_start | Initial temperature of the filling material for h = 0...z0 [K] |
Temperature | TFil_start[nVer] | TExt_start | Temperature of the undisturbed ground [K] |
Temperature profile | |||
Height | z0 | 10 | Depth below which the temperature gradient starts [m] |
Real | dT_dz | 0.01 | Vertical temperature gradient of the undisturbed soil for h below z0 [K/m] |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
model UTube extends Buildings.Fluid.Interfaces.PartialTwoPortInterface( show_T=true); extends Buildings.Fluid.Interfaces.TwoPortFlowResistanceParameters(final computeFlowResistance=false, final linearizeFlowResistance=false); extends Buildings.Fluid.Interfaces.LumpedVolumeDeclarations; 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"; replaceable parameter Buildings.HeatTransfer.Data.BoreholeFilling.Generic matFil "Thermal properties of the borehole filling"; 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"; replaceable parameter Buildings.HeatTransfer.Data.Soil.Generic matSoi[nVer] "Thermal properties of the soil"; 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.HeatExchangers.Boreholes.BaseClasses.BoreholeSegment borHol[nVer]( redeclare each final package Medium = Medium, 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 B0=B0, each final B1=B1, 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_V_flow=show_V_flow, 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"; 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 loopconnect(borHol[i].port_b1, borHol[i + 1].port_a1); connect(borHol[i].port_a2, borHol[i + 1].port_b2); end for;end UTube;