mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3488 from totto82/fixOnePhase
guards for one-phase flow
This commit is contained in:
commit
725800cec7
@ -300,23 +300,26 @@ updatePrimaryVariables(const WellState& well_state, DeferredLogger& deferred_log
|
|||||||
if (baseif_.isInjector()) {
|
if (baseif_.isInjector()) {
|
||||||
auto phase = baseif_.wellEcl().getInjectionProperties().injectorType;
|
auto phase = baseif_.wellEcl().getInjectionProperties().injectorType;
|
||||||
// only single phase injection handled
|
// only single phase injection handled
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
if constexpr (has_wfrac_variable) {
|
||||||
if (phase == InjectorType::WATER) {
|
if (FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx)) {
|
||||||
primary_variables_[WFrac] = 1.0;
|
if (phase == InjectorType::WATER) {
|
||||||
} else {
|
primary_variables_[WFrac] = 1.0;
|
||||||
primary_variables_[WFrac] = 0.0;
|
} else {
|
||||||
|
primary_variables_[WFrac] = 0.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if constexpr (has_gfrac_variable) {
|
||||||
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
if (FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)) {
|
||||||
if (phase == InjectorType::GAS) {
|
if (phase == InjectorType::GAS) {
|
||||||
primary_variables_[GFrac] = 1.0;
|
primary_variables_[GFrac] = 1.0;
|
||||||
if constexpr (Indices::enableSolvent) {
|
if constexpr (Indices::enableSolvent) {
|
||||||
primary_variables_[GFrac] = 1.0 - baseif_.wsolvent();
|
primary_variables_[GFrac] = 1.0 - baseif_.wsolvent();
|
||||||
primary_variables_[SFrac] = baseif_.wsolvent();
|
primary_variables_[SFrac] = baseif_.wsolvent();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
primary_variables_[GFrac] = 0.0;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
primary_variables_[GFrac] = 0.0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user