Description
Many functions in the heat_transfer
and gfunction
modules necessitate to generate arrays of borehole parameters (i.e. H
, D
, r_b
, x
, y
, tilt
, orientation
) from lists of boreholes. This generates multiple instances of duplicate and not very readable code.
The new Borefield
class will replace lists of boreholes within the modules. Anytime a user provides a list of boreholes, this list will be used to generate a Borefield
object. Alternatively, Borefield
objects can be provided as input.
To preserve current behavior, the following should be considered (for an instance borefield
of the Borefield
class):
borefield[i]
should return thei
-th boreholeborefield[i0:i1]
should return an instance of theBorefield
class formed by boreholesi0
throughi1-1
.
To simplify the code, the Borefield
class will:
- Implement class methods similar to the
Borehole
class to evaluate, e.g., distance vectors and arrays. An additional parameterouter
can be included to evaluate distance vectors (outer=False
) and arrays (outer=True
). - Return arrays of parameters, e.g.
borefield.H
returns an array of borehole lengths.