Make calling wsolvent() and wpolymer() always ok.

With the existing code, it was a bug to call wsolvent() when the well
was not a gas injector (and similar for wpolymer and water injectors).
Since such calls could happen, this minor fix removes the assertation
failure in those cases.
This commit is contained in:
Atgeirr Flø Rasmussen 2017-11-13 10:40:09 +01:00
parent baa4f0b0c3
commit 29277489e1

View File

@ -298,11 +298,11 @@ namespace Opm
if (injection.injectorType == WellInjector::GAS) {
double solvent_fraction = well_ecl_->getSolventFraction(current_step_);
return solvent_fraction;
}
assert(false);
} else {
// Not a gas injection well => no solvent.
return 0.0;
}
}
@ -323,11 +323,11 @@ namespace Opm
if (injection.injectorType == WellInjector::WATER) {
const double polymer_injection_concentration = polymer.m_polymerConcentration;
return polymer_injection_concentration;
}
assert(false); // TODO: find a more logical way to handle this situation
} else {
// Not a water injection well => no polymer.
return 0.0;
}
}