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

extending drsdtcon with regimes, and option for GAS/WATER #5418

Closed
wants to merge 2 commits into from

Conversation

trinemykk
Copy link

@trinemykk trinemykk commented Jun 7, 2024

Extended the DRSDTCON to include more parameters that controls the regime and rate of convective mixing.
Included a convective term in the transport flux for the brine.
Also works for GAS/WATER (not only GAS/OIL as before)

Has corresponding PR in opm-models (OPM/opm-models#902) and opm-common (OPM/opm-common#4097)

Copy link
Member

@totto82 totto82 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. I only have minor comments.

@@ -123,7 +121,7 @@ drsdtActive(int episodeIdx) const
const auto& oilVaporizationControl = schedule_[episodeIdx].oilvap();
const bool bothOilGasActive = FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) &&
FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx);
return (oilVaporizationControl.drsdtActive() && bothOilGasActive);
return (oilVaporizationControl.drsdtActive());
Copy link
Member

Choose a reason for hiding this comment

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

bothOilGasActive is unused

@@ -113,7 +112,6 @@ init(std::size_t numDof, int episodeIdx, const unsigned ntpvt)
if (this->drsdtConvective(episodeIdx)) {
Copy link
Member

Choose a reason for hiding this comment

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

the resize are duplicated.

@@ -101,8 +101,7 @@ init(std::size_t numDof, int episodeIdx, const unsigned ntpvt)
//TODO We may want to only allocate these properties only if active.
//But since they may be activated at later time we need some more
//intrastructure to handle it
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx) &&
FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {

Copy link
Member

Choose a reason for hiding this comment

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

I still think we should add a if here, but it should be a bit more fine-tuned. Something like
If (drsdt)
resize: maxDRs and lastRs_ and dRsDtOnlyFreeGas_
if(drvdt)
resize: maxDrv and lastRv

// Note that for so = 0 this gives no limits (inf) for the dissolution rate
// Also we restrict the effect of convective mixing to positive density differences
// i.e. we only allow for fingers moving downward

Copy link
Member

Choose a reason for hiding this comment

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

Since we also support gas-water case, maybe adapt the comment?

@@ -174,6 +174,7 @@ class EquilInitializer
const auto& h = FluidSystem::enthalpy(fluidState, phaseIdx, regionIdx);
fluidState.setEnthalpy(phaseIdx, h);
}

}
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick. Please remove the added line.

@@ -520,6 +524,8 @@ class FlowProblem : public GetPropType<TypeTag, Properties::BaseProblem>
const auto& schedule = simulator.vanguard().schedule();
const auto& events = schedule[episodeIdx].events();



if (episodeIdx >= 0 && events.hasEvent(ScheduleEvents::GEO_MODIFIER)) {
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick. Please remove the added line.

Trine Mykkeltvedt added 2 commits June 28, 2024 13:49
@totto82 totto82 mentioned this pull request Jul 29, 2024
@totto82
Copy link
Member

totto82 commented Aug 9, 2024

I will close this since its content is part of #5491

@totto82 totto82 closed this Aug 9, 2024
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.

2 participants