Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples

Example files for borehole heat exchanger

Information

This package contains examples for the use of models that can be found in Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeDynamics BoreholeDynamics Example model for different borehole models and dynamics
Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeOneUTube BoreholeOneUTube Test for the single U-tube borehole model
Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeTwoUTube BoreholeTwoUTube Test for the double U-tube borehole model
Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BaseClasses BaseClasses Package with base classes for Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples

Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeDynamics Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeDynamics

Example model for different borehole models and dynamics

Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeDynamics

Information

This example illustrates different borehole models using different mass and energy dynamics.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
IntegernSeg10Number of segments to use in vertical discretization of the boreholes
TemperatureT_start273.15 + 22Initial soil temperature [K]
ExampleborFieUTubDat Borefield parameters with UTube borehole configuration
ExampleborFie2UTubDatborFie2UTubDat(conDat=Buildi...Borefield parameters with UTube borehole configuration

Modelica definition

model BoreholeDynamics "Example model for different borehole models and dynamics" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water; parameter Integer nSeg(min=1) = 10 "Number of segments to use in vertical discretization of the boreholes"; parameter Modelica.SIunits.Temperature T_start = 273.15 + 22 "Initial soil temperature"; Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.OneUTube borHolOneUTubDyn( redeclare package Medium = Medium, borFieDat=borFieUTubDat, m_flow_nominal=borFieUTubDat.conDat.mBor_flow_nominal, dp_nominal=borFieUTubDat.conDat.dp_nominal, dynFil=true, nSeg=nSeg, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, TGro_start = {T_start for i in 1:nSeg}, TFlu_start={Medium.T_default for i in 1:nSeg}) "Borehole with U-Tub configuration and grout dynamics"; Buildings.Fluid.Sources.MassFlowSource_T sou( redeclare package Medium = Medium, nPorts=1, use_T_in=false, m_flow=borFieUTubDat.conDat.mBor_flow_nominal, T=303.15) "Source"; 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"; parameter Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Example borFieUTubDat "Borefield parameters with UTube borehole configuration"; Buildings.Fluid.Sensors.TemperatureTwoPort TBorIn(m_flow_nominal=borFieUTubDat.conDat.mBor_flow_nominal, redeclare package Medium = Medium, tau=0) "Inlet borehole temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort TBor1UTubDyn( m_flow_nominal=borFieUTubDat.conDat.mBor_flow_nominal, redeclare package Medium = Medium, tau=0) "Outlet borehole temperature"; Modelica.Thermal.HeatTransfer.Components.ThermalCollector therCol1(m=nSeg) "Thermal collector"; Modelica.Blocks.Sources.Constant TGroUn(k=T_start) "Undisturbed ground temperature"; Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.OneUTube borHolOneUTubSteSta( redeclare package Medium = Medium, borFieDat=borFieUTubDat, m_flow_nominal=borFieUTubDat.conDat.mBor_flow_nominal, dp_nominal=borFieUTubDat.conDat.dp_nominal, dynFil=false, nSeg=nSeg, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, TGro_start = {T_start for i in 1:nSeg}, TFlu_start={Medium.T_default for i in 1:nSeg}) "Borehole with U-Tub configuration and steady state grout"; Buildings.Fluid.Sources.MassFlowSource_T sou1( redeclare package Medium = Medium, nPorts=1, use_T_in=false, m_flow=borFieUTubDat.conDat.mBor_flow_nominal, T=303.15) "Source"; 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 TBorIn1( m_flow_nominal=borFieUTubDat.conDat.mBor_flow_nominal, redeclare package Medium = Medium, tau=0) "Inlet borehole temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort TBor1UTubSteSta( m_flow_nominal=borFieUTubDat.conDat.mBor_flow_nominal, redeclare package Medium = Medium, tau=0) "Outlet borehole temperature"; Modelica.Thermal.HeatTransfer.Components.ThermalCollector therCol2(m=nSeg) "Thermal collector"; Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.TwoUTube borHol2UTubDyn( redeclare package Medium = Medium, dp_nominal=borFie2UTubDat.conDat.dp_nominal, dynFil=true, m_flow_nominal=borFie2UTubDat.conDat.mBor_flow_nominal, borFieDat=borFie2UTubDat, nSeg=nSeg, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, TGro_start = {T_start for i in 1:nSeg}, TFlu_start={Medium.T_default for i in 1:nSeg}) "Borehole with 2U-Tub configuration and grout dynamics"; Buildings.Fluid.Sources.MassFlowSource_T sou2( redeclare package Medium = Medium, nPorts=1, use_T_in=false, m_flow=borFie2UTubDat.conDat.mBor_flow_nominal, T=303.15) "Source"; 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"; parameter Buildings.Fluid.Geothermal.Borefields.Data.Borefield.Example borFie2UTubDat(conDat= Buildings.Fluid.Geothermal.Borefields.Data.Configuration.Example( borCon=Buildings.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.DoubleUTubeParallel)) "Borefield parameters with UTube borehole configuration"; Buildings.Fluid.Sensors.TemperatureTwoPort TBorIn2(redeclare package Medium = Medium, m_flow_nominal=borFie2UTubDat.conDat.mBor_flow_nominal, tau=0) "Inlet borehole temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort TBor2UTubDyn(redeclare package Medium = Medium, m_flow_nominal=borFie2UTubDat.conDat.mBor_flow_nominal, tau=0) "Outlet borehole temperature"; Modelica.Thermal.HeatTransfer.Components.ThermalCollector therCol3(m=nSeg) "Thermal collector"; Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.TwoUTube borHol2UTubSteSta( redeclare package Medium = Medium, dp_nominal=borFie2UTubDat.conDat.dp_nominal, dynFil=false, m_flow_nominal=borFie2UTubDat.conDat.mBor_flow_nominal, borFieDat=borFie2UTubDat, nSeg=nSeg, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, TGro_start = {T_start for i in 1:nSeg}, TFlu_start={Medium.T_default for i in 1:nSeg}) "Borehole with 2U-Tub configuration and steady states grout"; Buildings.Fluid.Sources.MassFlowSource_T sou3( redeclare package Medium = Medium, nPorts=1, use_T_in=false, m_flow=borFie2UTubDat.conDat.mBor_flow_nominal, T=303.15) "Source"; Buildings.Fluid.Sources.Boundary_pT sin3( redeclare package Medium = Medium, use_p_in=false, use_T_in=false, nPorts=1, p=101330, T=283.15) "Sink"; Buildings.Fluid.Sensors.TemperatureTwoPort TBorIn3( redeclare package Medium = Medium, m_flow_nominal=borFie2UTubDat.conDat.mBor_flow_nominal, tau=0) "Inlet borehole temperature"; Buildings.Fluid.Sensors.TemperatureTwoPort TBor2UTubSteSta( redeclare package Medium = Medium, m_flow_nominal=borFie2UTubDat.conDat.mBor_flow_nominal, tau=0) "Outlet borehole temperature"; Modelica.Thermal.HeatTransfer.Components.ThermalCollector therCol4(m=nSeg) "Thermal collector"; Buildings.HeatTransfer.Sources.PrescribedTemperature prescribedTemperature; Buildings.HeatTransfer.Sources.PrescribedTemperature prescribedTemperature1; Buildings.HeatTransfer.Sources.PrescribedTemperature prescribedTemperature2; Buildings.HeatTransfer.Sources.PrescribedTemperature prescribedTemperature3; equation connect(sou.ports[1],TBorIn. port_a); connect(TBorIn.port_b, borHolOneUTubDyn.port_a); connect(borHolOneUTubDyn.port_b, TBor1UTubDyn.port_a); connect(TBor1UTubDyn.port_b, sin.ports[1]); connect(therCol1.port_a, borHolOneUTubDyn.port_wall); connect(sou1.ports[1], TBorIn1.port_a); connect(TBorIn1.port_b, borHolOneUTubSteSta.port_a); connect(borHolOneUTubSteSta.port_b, TBor1UTubSteSta.port_a); connect(TBor1UTubSteSta.port_b, sin1.ports[1]); connect(therCol2.port_a, borHolOneUTubSteSta.port_wall); connect(sou2.ports[1], TBorIn2.port_a); connect(TBorIn2.port_b, borHol2UTubDyn.port_a); connect(borHol2UTubDyn.port_b, TBor2UTubDyn.port_a); connect(TBor2UTubDyn.port_b, sin2.ports[1]); connect(therCol3.port_a, borHol2UTubDyn.port_wall); connect(sou3.ports[1], TBorIn3.port_a); connect(TBorIn3.port_b, borHol2UTubSteSta.port_a); connect(borHol2UTubSteSta.port_b, TBor2UTubSteSta.port_a); connect(TBor2UTubSteSta.port_b, sin3.ports[1]); connect(therCol4.port_a, borHol2UTubSteSta.port_wall); connect(TGroUn.y, prescribedTemperature.T); connect(therCol1.port_b, prescribedTemperature.port); connect(therCol2.port_b, prescribedTemperature1.port); connect(TGroUn.y, prescribedTemperature1.T); connect(therCol3.port_b, prescribedTemperature2.port); connect(prescribedTemperature2.T, prescribedTemperature1.T); connect(therCol4.port_b, prescribedTemperature3.port); connect(prescribedTemperature3.T, prescribedTemperature1.T); end BoreholeDynamics;

Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeOneUTube Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeOneUTube

Test for the single U-tube borehole model

Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeOneUTube

Information

This example illustrates the use of the Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.OneUTubes model. It simulates the behavior of a borehole with a prescribed borehole wall temperature boundary condition.

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BaseClasses.PartialBorehole (Partial model for borehole example models).

Parameters

TypeNameDefaultDescription
IntegernSeg10Number of segments to use in vertical discretization of the boreholes
TemperatureT_start273.15 + 22Initial soil temperature [K]
ExampleborFieDat Borefield parameters

Modelica definition

model BoreholeOneUTube "Test for the single U-tube borehole model" extends Modelica.Icons.Example; extends Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BaseClasses.PartialBorehole ( redeclare Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.OneUTube borHol( energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)); end BoreholeOneUTube;

Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeTwoUTube Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeTwoUTube

Test for the double U-tube borehole model

Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BoreholeTwoUTube

Information

This example illustrates the use of the Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.TwoUTube model. It simulates the behavior of a borehole with a prescribed borehole wall boundary condition.

Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BaseClasses.PartialBorehole (Partial model for borehole example models).

Parameters

TypeNameDefaultDescription
IntegernSeg10Number of segments to use in vertical discretization of the boreholes
TemperatureT_start273.15 + 22Initial soil temperature [K]

Modelica definition

model BoreholeTwoUTube "Test for the double U-tube borehole model" extends Modelica.Icons.Example; extends Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.Examples.BaseClasses.PartialBorehole ( redeclare Buildings.Fluid.Geothermal.Borefields.BaseClasses.Boreholes.TwoUTube borHol(energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial), borFieDat( conDat=Buildings.Fluid.Geothermal.Borefields.Data.Configuration.Example( borCon=Buildings.Fluid.Geothermal.Borefields.Types.BoreholeConfiguration.DoubleUTubeParallel))); end BoreholeTwoUTube;