Skip to content

New Borefield class #210

Open
1 of 4 issues completed
Open
1 of 4 issues completed
@MassimoCimmino

Description

@MassimoCimmino

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 the i-th borehole
  • borefield[i0:i1] should return an instance of the Borefield class formed by boreholes i0 through i1-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 parameter outer 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.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions