mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5605 from totto82/issue_stopped_wells
Fix issue with stopped injectors in thermal runs
This commit is contained in:
commit
bf5f0c864d
@ -2606,7 +2606,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
// change temperature for injecting fluids
|
// change temperature for injecting fluids
|
||||||
if (this->isInjector() && cq_s[activeCompIdx] > 0.0){
|
if (this->isInjector() && !this->wellIsStopped() && cq_r_thermal > 0.0){
|
||||||
// only handles single phase injection now
|
// only handles single phase injection now
|
||||||
assert(this->well_ecl_.injectorType() != InjectorType::MULTI);
|
assert(this->well_ecl_.injectorType() != InjectorType::MULTI);
|
||||||
fs.setTemperature(this->well_ecl_.inj_temperature());
|
fs.setTemperature(this->well_ecl_.inj_temperature());
|
||||||
@ -2623,6 +2623,9 @@ namespace Opm
|
|||||||
fs.setEnthalpy(phaseIdx, h);
|
fs.setEnthalpy(phaseIdx, h);
|
||||||
cq_r_thermal *= this->extendEval(fs.enthalpy(phaseIdx)) * this->extendEval(fs.density(phaseIdx));
|
cq_r_thermal *= this->extendEval(fs.enthalpy(phaseIdx)) * this->extendEval(fs.density(phaseIdx));
|
||||||
result += getValue(cq_r_thermal);
|
result += getValue(cq_r_thermal);
|
||||||
|
} else if (cq_r_thermal > 0.0) {
|
||||||
|
cq_r_thermal *= getValue(fs.enthalpy(phaseIdx)) * getValue(fs.density(phaseIdx));
|
||||||
|
result += Base::restrictEval(cq_r_thermal);
|
||||||
} else {
|
} else {
|
||||||
// compute the thermal flux
|
// compute the thermal flux
|
||||||
cq_r_thermal *= this->extendEval(fs.enthalpy(phaseIdx)) * this->extendEval(fs.density(phaseIdx));
|
cq_r_thermal *= this->extendEval(fs.enthalpy(phaseIdx)) * this->extendEval(fs.density(phaseIdx));
|
||||||
|
Loading…
Reference in New Issue
Block a user