Skip to content
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

Add Pipe Drain Evaluator #253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add Pipe Drain Evaluator #253

wants to merge 1 commit into from

Conversation

gcapodag
Copy link

@gcapodag gcapodag commented Apr 3, 2024

This PR adds a pipe drain evaluator modeling the flow of water through manholes between an overland flow model and an underground pipe network model. This PR is the companion of amanzi/amanzi#824

Copy link
Collaborator

@ecoon ecoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor changes, then this looks good.

energ_loss_coeff_subweir_ = plist.get<double>("energy losses coeff submerged weir", 0.056);
energ_loss_coeff_orifice_ = plist.get<double>("energy losses coeff orifice", 0.167);

sw_domain_name_ = plist.get<std::string>("surface domain name", "surface");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can one of these domains be inferred from the key being evaluated? E.g, if you are evaluating "surface-pipe_drainage" then prefer to use:

sw_domain_name_ = Keys::getDomain(my_keys_.front().first);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comment.

The domain is obtained using "Keys::getDomain(my_keys_.front().first)" to identify if we are in the surface or pipe network domain later in the code (line 54) when using the pipe_drain_evaluator.

Hence we need to set the default name of sw_ or pipe_ domain before we use "Keys::getDomain(my_keys_.front().first)" to obtain the current domain.

if (domain1 == pipe_domain_name_) {
for (const auto& dep : dependencies_) {
auto domain = Keys::getDomain(dep.first);
if (pipe_domain_name_ == domain) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the domain isn't pipe_domain_name? You should still set this evaluator's expectations of what the dependency's structure is.

Likely you should be making two "fac" variables, one with pipe_domain, one with surface_domain as the mesh. Then loop over each dependency and Update with the correct one.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dasvyat could you please help with this comment?

@gcapodag
Copy link
Author

Thanks @ecoon . @nvohra0016 would you mind addressing Ethan's comments?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants