Buildings.Fluid.Geothermal.Borefields.TOUGH.Examples

Example model of single u-tube borefield with ground responses calculated by TOUGH simulation

Information

Package with examples validating models in package Buildings.Fluid.Geothermal.Borefields.TOUGH.

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

Package Content

Name Description
Buildings.Fluid.Geothermal.Borefields.TOUGH.Examples.Borefield Borefield Example model of single u-tube borefield with ground responses calculated by TOUGH simulation

Buildings.Fluid.Geothermal.Borefields.TOUGH.Examples.Borefield Buildings.Fluid.Geothermal.Borefields.TOUGH.Examples.Borefield

Example model of single u-tube borefield with ground responses calculated by TOUGH simulation

Buildings.Fluid.Geothermal.Borefields.TOUGH.Examples.Borefield

Information

This example shows the borefield ground thermal response that is modeled by the TOUGH simulator. However in this example, the dummy function def tough_avatar(heatFlux, T_out, nInt) is used to imitate the ground response of the TOUGH simulator.

Note that the dummy function cannot run the ground modeling as TOUGH. It assumes that the response temperature increases by 0.1 K every time when invoking the Python interface. It is created to show the coupling workflow.

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

Parameters

TypeNameDefaultDescription
TemperatureTGro283.15Initial ground temperature [K]
ExampleborFieUTubDatborFieUTubDat(filDat=Buildin...Borefield data record

Modelica definition

model Borefield "Example model of single u-tube borefield with ground responses calculated by TOUGH simulation" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water; parameter Modelica.Units.SI.Temperature TGro = 283.15 "Initial ground temperature"; parameter Buildings.Fluid.Geothermal.Borefields.TOUGH.Data.Borefield.Example borFieUTubDat( filDat=Buildings.Fluid.Geothermal.Borefields.TOUGH.Data.Filling.Bentonite( kFil=2.5, cFil=1000, dFil=2600)) "Borefield data record"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin floRat( freqHz=1/21600, offset=1.2) "Mass flow rate to the borefield"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin watTem( amplitude=5, freqHz=1/10800, offset=273.15 + 10) "Water temperature to the borefield"; Buildings.Fluid.Sources.MassFlowSource_T sou( redeclare package Medium = Medium, use_m_flow_in=true, use_T_in=true, nPorts=1) "Source"; Buildings.Fluid.Geothermal.Borefields.TOUGH.OneUTube borFieUTubWitTou( redeclare package Medium = Medium, show_T=true, borFieDat=borFieUTubDat, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, TExt0_start=TGro, nTouSeg=33, nSeg=10, nInt=10, samplePeriod=60, touWorDir="tmp-tou-wor") "Borefield with a U-tube borehole configuration, with ground response calculated by TOUGH"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, nPorts=1) "Sink"; Buildings.Controls.OBC.CDL.Reals.Sources.Sin ambTem( amplitude=5, freqHz=1/72000, offset=273.15 + 15) "Ambient temperature"; equation connect(floRat.y, sou.m_flow_in); connect(watTem.y, sou.T_in); connect(ambTem.y, borFieUTubWitTou.TOut); connect(sou.ports[1], borFieUTubWitTou.port_a); connect(borFieUTubWitTou.port_b, sin.ports[1]); end Borefield;