MassimoCimmino / pygfunction

An open-source toolbox for the evaluation of thermal response factors (g-functions) of geothermal borehole fields.
BSD 3-Clause "New" or "Revised" License
46 stars 21 forks source link

Issue50 Inclined boreholes #197

Closed MassimoCimmino closed 2 years ago

MassimoCimmino commented 2 years ago

Closes #50.

MassimoCimmino commented 2 years ago

Inclined boreholes are only implemented for the 'detailed' solver, since there is no known 'similarities' or 'equivalent' methods for inclined boreholes.

The initial implementation seems to be working and compares well with Eskilson's results (I will update the issue with figures).

The integral of the FLS solution had to be split between the real and image parts of the solution to avoid overflow flow errors in the product erfc(a*s)*exp(b*s**2) (see the code below). There could be a better implementation for this. It should be explored further before merging.

https://github.com/MassimoCimmino/pygfunction/blob/a847dfd70661f2dbf08e3cbb8f84f093a5b7e00c/pygfunction/heat_transfer.py#L772-L777

While testing the implementation I found that the 'detailed' solver calculates the FLS between a borehole and itself in a for loop, so it is called once per borehole. This could be done in one call for all boreholes at the same time. I will open a new issue to work on this.

MassimoCimmino commented 2 years ago

Remaining tasks:

MassimoCimmino commented 2 years ago

This is now ready for review.