SHUT wells returns 0
Shut wells returns 0 for bhp and rates in the EclipseWriter
This commit is contained in:
parent
c659c080cb
commit
2ff42c327b
@ -655,7 +655,7 @@ public:
|
||||
"SM3/DAY" /* surf. cub. m. per day */)
|
||||
{ }
|
||||
|
||||
virtual double retrieveValue(const SimulatorTimer& /*timer*/,
|
||||
virtual double retrieveValue(const SimulatorTimer& timer,
|
||||
const WellState& wellState,
|
||||
const std::map<std::string, int>& wellNameToIdxMap)
|
||||
{
|
||||
@ -666,6 +666,11 @@ public:
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
if (well_->getStatus(timer.currentStepNum()) == WellCommon::SHUT) {
|
||||
// well is shut in the current time step
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// TODO: Why only positive rates?
|
||||
using namespace Opm::unit;
|
||||
return convert::to(std::max(0., rate(wellState)),
|
||||
@ -705,6 +710,11 @@ public:
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
if (well_->getStatus(timer.currentStepNum()) == WellCommon::SHUT) {
|
||||
// well is shut in the current time step
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// find the index for the quantity in the wellState
|
||||
this->updateTimeStepWellIndex_(wellNameToIdxMap);
|
||||
if (this->flatIdx_ < 0) {
|
||||
@ -748,7 +758,7 @@ public:
|
||||
"Pascal")
|
||||
{ }
|
||||
|
||||
virtual double retrieveValue(const SimulatorTimer& /*timer*/,
|
||||
virtual double retrieveValue(const SimulatorTimer& timer,
|
||||
const WellState& wellState,
|
||||
const std::map<std::string, int>& wellNameToIdxMap)
|
||||
{
|
||||
@ -758,6 +768,10 @@ public:
|
||||
// well not active in current time step
|
||||
return 0.0;
|
||||
}
|
||||
if (well_->getStatus(timer.currentStepNum()) == WellCommon::SHUT) {
|
||||
// well is shut in the current time step
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
return bhp(wellState);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user