mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 18:21:00 -06:00
Merge pull request #3488 from totto82/fixOnePhase
guards for one-phase flow
This commit is contained in:
commit
725800cec7
@ -300,6 +300,7 @@ updatePrimaryVariables(const WellState& well_state, DeferredLogger& deferred_log
|
||||
if (baseif_.isInjector()) {
|
||||
auto phase = baseif_.wellEcl().getInjectionProperties().injectorType;
|
||||
// only single phase injection handled
|
||||
if constexpr (has_wfrac_variable) {
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||
if (phase == InjectorType::WATER) {
|
||||
primary_variables_[WFrac] = 1.0;
|
||||
@ -307,7 +308,8 @@ updatePrimaryVariables(const WellState& well_state, DeferredLogger& deferred_log
|
||||
primary_variables_[WFrac] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if constexpr (has_gfrac_variable) {
|
||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||
if (phase == InjectorType::GAS) {
|
||||
primary_variables_[GFrac] = 1.0;
|
||||
@ -319,6 +321,7 @@ updatePrimaryVariables(const WellState& well_state, DeferredLogger& deferred_log
|
||||
primary_variables_[GFrac] = 0.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: it is possible to leave injector as a oil well,
|
||||
// when F_w and F_g both equals to zero, not sure under what kind of circumstance
|
||||
|
Loading…
Reference in New Issue
Block a user