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

Fix segment ratio function #164

Closed j-c-cook closed 3 years ago

j-c-cook commented 3 years ago

The limit 0 < end_length_ratio < 0.5 should apply to all cases.

Also, in preparation for #153, we could consider here to allow nSegments=2 and nSegments=1 (which would simply return segment_ratios=numpy.array([0.5, 0.5]) and numpy.array([1.0])). A warning will be required in these cases to warn the user that the end_length_ratio parameter is overwritten.

closes #159

j-c-cook commented 3 years ago

Ready for your review @MassimoCimmino.

MassimoCimmino commented 3 years ago

Merged, thank you @j-c-cook.