-
Notifications
You must be signed in to change notification settings - Fork 25
Issue210 borefield class #310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
MassimoCimmino
wants to merge
7
commits into
master
Choose a base branch
from
issue210_BorefieldClass
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f80ec0d
Move solvers to new solver module
MassimoCimmino aab559c
Integrate Borefield objects into solvers
MassimoCimmino 009a3fa
Refactor heat_transfer.finite_line_source to use Borefield objects
MassimoCimmino 674b446
Specialized function for FLS at multiple distances
MassimoCimmino 02c72c4
Split heat_transfer into multiple files
MassimoCimmino 2347723
Fix import of Callable [ci skip]
MassimoCimmino 92022f6
Refactor Similarities for vertical boreholes [ci skip]
MassimoCimmino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,4 +6,5 @@ | |
| from . import media | ||
| from . import networks | ||
| from . import pipes | ||
| from . import solvers | ||
| from . import utilities | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider an assertion for when
len(x) != len(y)?What about enforcing
H,D,r_b,tiltandorientationto matchlen(<var>) == len(y)orlen(<var>) == 1?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An assertion would certainly be important here. The goal was to mimic numpy array broadcasting rules and allow for example
x = [0., 5., 10.], y = 0.if 3 boreholes are on the same row.This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
Boreholeclass can represent both a segment of a borehole or the borehole itself. Likewise, the collection of parameters inBorefieldcan represent segments or boreholes. With that in mind, segments along a vertical borehole share the same coordinates (x,y) and only requireHandDarrays at instantiation.One way to approach this would be to use
b = np.broadcast(H, D, r_b, x, y, tilt, orientation)to make sure that the inputs are broadcastable to a common shape withb.nd <= 1. The number of boreholes is thennBoreholes = b.size.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to make use of any ideas contained in commit j-c-cook@bd6e467. I've enjoyed the back and forth and little bit of collaboration here. I'll likely drop out of discussion now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I adapted your changes in #322. I removed the try / except clauses since
numpy.broadcastraises an error if the arguments cannot be broadcast.