-
Notifications
You must be signed in to change notification settings - Fork 122
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
For convective mixing, store the saturated dissolution factor. #5774
base: master
Are you sure you want to change the base?
Conversation
jenkins build this please |
new file is missing from CMakeLists_files.cmake. EDIT: never mind, it's not a new file. |
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'll defer to others to determine if this solves the same problem as #5771, but I appreciate not having additional boolean parameters. Other than that, I just noticed one small nit.
const auto& liquidPhaseIdx = (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) ? | ||
FluidSystem::waterPhaseIdx : | ||
FluidSystem::oilPhaseIdx; |
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 don't think you need references here–i.e., auto&
. The phase indices are integers so you can just store them by value.
Make sense to put rssat in the intensiveQuantities rather than the fluidstate. So I will close my PRs. I my PRs I changed default enableConvectiveMixing to false and only activated it for gas+water+dissolution and gas+oil and it's thermal/diffusion variants. Does it make sense to do something like this in the PR as well? |
*/ | ||
void updateSaturatedDissolutionFactor_() | ||
{ | ||
auto& fs = asImp_().fluidState(); |
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.
Another tiny nit: The fs
object is used in just a single location–the call to saturatedDissolutionFactor()
–so I guess you could just as well use asImp_().fluidState()
directly in that function call.
Gives a significant speedup with DRSDTCON.
Same idea as OPM/opm-common#4364 and #5771, but with some differences. I managed to avoid noticing that one, or I would not have made this...