AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.shaGFunction

# .AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.shaGFunction

Returns a SHA1 encryption of the formatted arguments for the g-function generation

## Information

This function returns the SHA1 encryption of its arguments.

#### Implementation

Each argument is formatted in exponential notation with four significant digits, for example `1.234e+001`, with no spaces or other separating characters between each argument value. To prevent too long strings that can cause buffer overflows, the sha encoding of each argument is computed and added to the next string that is parsed.

The SHA1 encryption is computed using AixLib.Utilities.Cryptographics.sha.

#### Interface

>     function shaGFunction
>       extends Modelica.Icons.Function;
>       input Integer nBor "Number of boreholes";
>       input Modelica.Units.SI.Position cooBor[nBor, 2] "Coordinates of boreholes";
>       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 "Ground thermal diffusivity used in g-function evaluation";
>       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 Real ttsMax "Maximum adimensional time for gfunc calculation";
>       output String sha "SHA1 encryption of the g-function arguments";
>     end shaGFunction;

## Revisions

- June 9, 2022, by Massimo Cimmino:
  Added the number of clusters to the encryption.
- November 1, 2019 by Michael Wetter:
  Declared string as a constant due to JModelica's tigther type checking. See #1230.
- September 11, 2018, by Michael Wetter:
  Refactored implementation to avoid buffer overflow.
- September 11, 2018 by Damien Picard:
  Split long strings into small strings to avoid buffer overflow. See #1018.
- June 22, 2018 by Alex Laferrière:
  First implementation.

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