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

For convective mixing, store the saturated dissolution factor. #5774

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

Conversation

atgeirr
Copy link
Member

@atgeirr atgeirr commented Nov 29, 2024

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...

@atgeirr
Copy link
Member Author

atgeirr commented Nov 29, 2024

jenkins build this please

@akva2
Copy link
Member

akva2 commented Nov 29, 2024

new file is missing from CMakeLists_files.cmake. EDIT: never mind, it's not a new file.

Copy link
Member

@bska bska left a 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.

Comment on lines +400 to +402
const auto& liquidPhaseIdx = (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) ?
FluidSystem::waterPhaseIdx :
FluidSystem::oilPhaseIdx;
Copy link
Member

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.

@totto82
Copy link
Member

totto82 commented Dec 2, 2024

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();
Copy link
Member

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.

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.

4 participants