impure functionclusterBoreholes
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
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nBor | Number of boreholes | |
| Modelica.Units.SI.Position[nBor,2] | cooBor | Coordinates of boreholes | |
| Modelica.Units.SI.Height | hBor | Borehole length | |
| Modelica.Units.SI.Height | dBor | Borehole buried depth | |
| Modelica.Units.SI.Radius | rBor | Borehole radius | |
| Integer | nClu | Number of clusters to be generated | |
| Modelica.Units.SI.TemperatureDifference | TTol | 0.001 | Absolute tolerance on the borehole wall temperature for the identification of clusters |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Integer[nBor] | labels | Cluster label associated with each data point | |
| Integer[nClu] | cluSiz | Size of the clusters | |
| Integer | N | Number of unique clusters |
Revisions
-
February 1, 2023, by Michael Wetter:
Addedimpuredeclaration 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.