impure functionclusterBoreholes

Identify clusters of boreholes with similar heat interactions

Extends from Modelica.Icons.Function (Icon for functions).

Information

This function identifies groups of similarly behaving boreholes using a k-means clustering algorithm. Boreholes are clustered based on their steady-state dimensionless borehole wall temperatures obtained from the spatial superposition of the steady-state finite line source solution (see AixLib.Fluid.Geothermal.Borefields.BaseClasses.HeatTransfer.ThermalResponseFactors.finiteLineSource_SteadyState).

Implementation

The implemented method differs from the method presented by Prieto and Cimmino (2021). They used a hierarchical agglomerative clustering method with complete linkage to identify the borehole clusters. The optimal number of clusters was identified by cutting the dendrogram generated during the clustering process.

Here, a k-means algorithm is used instead, using the euclidian distance between steady-state borehole wall temperatures. The number of clusters is a parameter in this approach. However, as observed by Prieto and Cimmino (2021), nClu=5 clusters should provide acceptable accuracy in most practical cases. This number can be increased without significant change in the computational cost.

References

Prieto, C. and Cimmino, M. 2021. Thermal interactions in large irregular fields of geothermal boreholes: the method of equivalent boreholes. Journal of Building Performance Simulation 14(4): 446-460. doi:10.1080/19401493.2021.1968953.

Inputs

TypeNameDefaultDescription
IntegernBorNumber of boreholes
Modelica.Units.SI.Position[nBor,2]cooBorCoordinates of boreholes
Modelica.Units.SI.HeighthBorBorehole length
Modelica.Units.SI.HeightdBorBorehole buried depth
Modelica.Units.SI.RadiusrBorBorehole radius
IntegernCluNumber of clusters to be generated
Modelica.Units.SI.TemperatureDifferenceTTol0.001Absolute tolerance on the borehole wall temperature for the identification of clusters

Outputs

TypeNameDefaultDescription
Integer[nBor]labelsCluster label associated with each data point
Integer[nClu]cluSizSize of the clusters
IntegerNNumber of unique clusters

Revisions

  • February 1, 2023, by Michael Wetter:
    Added impure declaration which is needed for compliance with the Modelica Language Specification, and is required by Optimica.
  • February 1, 2023, by Michael Wetter:
    Added units.
  • June 9, 2022 by Massimo Cimmino:
    First implementation.