BuildSysPro.IBPSA.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.temperatureResponseMatrix

# .BuildSysPro.IBPSA.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.LoadAggregation.temperatureResponseMatrix

Reads and possibly writes a matrix with a time series of the borefield's temperature response

## Information

This function uses the parameters required to calculate the borefield's thermal response to build a SHA1-encrypted string unique to the borefield in question. Then, if the `forceGFunCalc` input is `true` or if there is no `.mat` file with the SHA1 hash as its filename in the `tmp/temperatureResponseMatrix` folder, the thermal response will be calculated and written as a `.mat` file. Otherwise, the thermal response will simply be read from the `.mat` file. In the `.mat` file, the data is saved in a matrix with the name `TStep`, where the first column is the time (in seconds) and the second column is the temperature step response, which is the g-function divided by 2 π H ksoi, with `H` being the borehole length and ksoi being the thermal conductivity of the soil.

#### Interface

>     impure function temperatureResponseMatrix
>       extends Modelica.Icons.Function;
>       input Integer nBor "Number of boreholes";
>       input Real cooBor[nBor, 2] "Borehole coordinates";
>       input Modelica.Units.SI.Height hBor "Borehole length";
>       input Modelica.Units.SI.Height dBor "Borehole buried depth";
>       input Modelica.Units.SI.Radius rBor "Borehole radius";
>       input Modelica.Units.SI.ThermalDiffusivity aSoi "Thermal diffusivity of soil";
>       input Modelica.Units.SI.ThermalConductivity kSoi "Thermal conductivity of soil";
>       input Integer nSeg "Number of line source segments per borehole";
>       input Integer nClu "Number of clusters for g-function calculation";
>       input Integer nTimSho "Number of time steps in short time region";
>       input Integer nTimLon "Number of time steps in long time region";
>       input Integer nTimTot "Number of g-function points";
>       input Real ttsMax "Maximum non-dimensional time for g-function calculation";
>       input String sha "SHA-1 encryption of the g-function arguments";
>       input Boolean forceGFunCalc "Set to true to force the thermal response to be calculated at the start";
>       output Modelica.Units.SI.ThermalResistance TStep[nTimTot, 2] "Temperature step-response time series";
>     end temperatureResponseMatrix;

## Revisions

- December 11, 2021, by Michael Wetter:
  Added `impure` declaration for MSL 4.0.0.
- August 27, 2018, by Michael Wetter:
  Changed name of temporary directory so that it is clear for users that this is a temporary directory.
- July 15, 2018, by Michael Wetter:
  Changed implementation to use matrix read and write from the Modelica Standard Library.
- March 5, 2018, by Alex Laferrière:
  First implementation.

Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos