impure functiontemperatureResponseMatrix
Extends from Modelica.Icons.Function (Icon for functions).
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.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nBor | Number of boreholes | |
| Real[nBor,2] | cooBor | Borehole coordinates | |
| Modelica.Units.SI.Height | hBor | Borehole length | |
| Modelica.Units.SI.Height | dBor | Borehole buried depth | |
| Modelica.Units.SI.Radius | rBor | Borehole radius | |
| Modelica.Units.SI.ThermalDiffusivity | aSoi | Thermal diffusivity of soil | |
| Modelica.Units.SI.ThermalConductivity | kSoi | Thermal conductivity of soil | |
| Integer | nSeg | Number of line source segments per borehole | |
| Integer | nClu | Number of clusters for g-function calculation | |
| Integer | nTimSho | Number of time steps in short time region | |
| Integer | nTimLon | Number of time steps in long time region | |
| Integer | nTimTot | Number of g-function points | |
| Real | ttsMax | Maximum non-dimensional time for g-function calculation | |
| String | sha | SHA-1 encryption of the g-function arguments | |
| Boolean | forceGFunCalc | Set to true to force the thermal response to be calculated at the start |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[nTimTot,2] | TStep | Temperature step-response time series |
Revisions
-
March 20, 2026, by Michael Wetter:
Corrected type declaration of g-function.
This is for Buildings, #4501. -
December 11, 2021, by Michael Wetter:
Addedimpuredeclaration 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.