mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-12 17:31:55 -06:00
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:
parent
baa4f0b0c3
commit
29277489e1
@ -298,10 +298,10 @@ namespace Opm
|
||||
if (injection.injectorType == WellInjector::GAS) {
|
||||
double solvent_fraction = well_ecl_->getSolventFraction(current_step_);
|
||||
return solvent_fraction;
|
||||
} else {
|
||||
// Not a gas injection well => no solvent.
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
assert(false);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
@ -323,10 +323,10 @@ namespace Opm
|
||||
if (injection.injectorType == WellInjector::WATER) {
|
||||
const double polymer_injection_concentration = polymer.m_polymerConcentration;
|
||||
return polymer_injection_concentration;
|
||||
} else {
|
||||
// Not a water injection well => no polymer.
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
assert(false); // TODO: find a more logical way to handle this situation
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user