-
Notifications
You must be signed in to change notification settings - Fork 249
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
[FluidDynamicsHydraulicsApplication] Adding new hydraulic utilities; inflow detection and artificial viscosity. #13061
base: master
Are you sure you want to change the base?
Conversation
.../FluidDynamicsHydraulicsApplication/custom_utilities/hydraulic_fluid_auxiliary_utilities.cpp
Outdated
Show resolved
Hide resolved
double neg_nodes = 0.0; | ||
double pos_nodes=0.0; | ||
for (auto &r_node : rElement.GetGeometry()) | ||
{ | ||
double distance = r_node.FastGetSolutionStepValue(DISTANCE); | ||
|
||
if (distance > 0) | ||
{ | ||
pos_nodes += 1; | ||
} | ||
else | ||
{ | ||
neg_nodes += 1; | ||
} | ||
} | ||
if (neg_nodes > 0 && pos_nodes > 0) | ||
{ | ||
artificial_viscosity = 0.0; | ||
} |
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'd first check if it is whether it is intersected or not. If it is not, you calculate it. If not you skip it.
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.
Not for this PR but we should at some point do an IsCut
tiny function in the utilities (we're doing this in many places).
.../FluidDynamicsHydraulicsApplication/custom_utilities/hydraulic_fluid_auxiliary_utilities.cpp
Outdated
Show resolved
Hide resolved
...ns/FluidDynamicsHydraulicsApplication/custom_utilities/hydraulic_fluid_auxiliary_utilities.h
Outdated
Show resolved
Hide resolved
...ns/FluidDynamicsHydraulicsApplication/custom_utilities/hydraulic_fluid_auxiliary_utilities.h
Outdated
Show resolved
Hide resolved
...ns/FluidDynamicsHydraulicsApplication/custom_utilities/hydraulic_fluid_auxiliary_utilities.h
Outdated
Show resolved
Hide resolved
...cations/FluidDynamicsHydraulicsApplication/tests/test_hydraulic_fluid_auxiliary_utilities.py
Outdated
Show resolved
Hide resolved
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.
Minor comments. Aside of these, changes look good to me.
…es/hydraulic_fluid_auxiliary_utilities.cpp Co-authored-by: Rubén Zorrilla <[email protected]>
…es/hydraulic_fluid_auxiliary_utilities.cpp Co-authored-by: Rubén Zorrilla <[email protected]>
…es/hydraulic_fluid_auxiliary_utilities.h Co-authored-by: Rubén Zorrilla <[email protected]>
…raulic_fluid_auxiliary_utilities.py Co-authored-by: Rubén Zorrilla <[email protected]>
…es/hydraulic_fluid_auxiliary_utilities.h Co-authored-by: Rubén Zorrilla <[email protected]>
…es/hydraulic_fluid_auxiliary_utilities.h Co-authored-by: Rubén Zorrilla <[email protected]>
📝 Description
"In this PR, we add two new methods to the hydraulic utilities:
Reminder for the future: The test for the artificial viscosity calculation is performed in the test of the
TwoFluidNavierStokesFractional
element within theCalculate
method, where the artificial viscosity is actually computed.Its application in Python is tested in the solver test. Therefore, adding an extra test to evaluate the method itself within the utility is not considered necessary."
🆕 Changelog