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