mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
ECL peaceman wells: distinguish between target and observed pressures
... and also print the latter to the console.
This commit is contained in:
parent
4e59104a80
commit
2fc2cabc98
@ -237,8 +237,8 @@ public:
|
|||||||
// use one bar for the default bottom and top hole
|
// use one bar for the default bottom and top hole
|
||||||
// pressures. For the bottom hole pressure, this is probably
|
// pressures. For the bottom hole pressure, this is probably
|
||||||
// off by at least one magnitude...
|
// off by at least one magnitude...
|
||||||
bottomHolePressure_ = 1e5;
|
targetBhp_ = 1e5;
|
||||||
topHolePressure_ = 1e5;
|
targetThp_ = 1e5;
|
||||||
|
|
||||||
// By default, all fluids exhibit the weight 1.0
|
// By default, all fluids exhibit the weight 1.0
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||||
@ -343,7 +343,10 @@ public:
|
|||||||
|
|
||||||
// we assume that the z-coordinate represents depth (and not
|
// we assume that the z-coordinate represents depth (and not
|
||||||
// height) here...
|
// height) here...
|
||||||
bottomDepth_ = std::max(bottomDepth_, dofPos[2]);
|
if (dofPos[2] > bottomDepth_) {
|
||||||
|
bottomDofGlobalIdx_ = globalDofIdx;
|
||||||
|
bottomDepth_ = dofPos[2];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -409,14 +412,14 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Set the maximum bottom hole pressure [Pa] of the well.
|
* \brief Set the maximum bottom hole pressure [Pa] of the well.
|
||||||
*/
|
*/
|
||||||
void setBottomHolePressure(Scalar val)
|
void setTargetBottomHolePressure(Scalar val)
|
||||||
{ bottomHolePressure_ = val; }
|
{ targetBhp_ = val; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the top hole pressure [Pa] of the well.
|
* \brief Set the top hole pressure [Pa] of the well.
|
||||||
*/
|
*/
|
||||||
void setTopHolePressure(Scalar val)
|
void setTargetTopHolePressure(Scalar val)
|
||||||
{ topHolePressure_ = val; }
|
{ targetThp_ = val; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Set the maximum combined rate of the fluids at the surface.
|
* \brief Set the maximum combined rate of the fluids at the surface.
|
||||||
@ -478,14 +481,14 @@ public:
|
|||||||
// assume a density of 650 kg/m^3 for the bottom hole pressure
|
// assume a density of 650 kg/m^3 for the bottom hole pressure
|
||||||
// calculation
|
// calculation
|
||||||
Scalar rho = 650.0;
|
Scalar rho = 650.0;
|
||||||
effectiveBottomHolePressure_ = topHolePressure_ + rho*bottomDepth_;
|
effectiveBottomHolePressure_ = targetThp_ + rho*bottomDepth_;
|
||||||
|
|
||||||
// set the maximum rates to unlimited
|
// set the maximum rates to unlimited
|
||||||
maximumReservoirRate_ = 1e100;
|
maximumReservoirRate_ = 1e100;
|
||||||
maximumSurfaceRate_ = 1e100;
|
maximumSurfaceRate_ = 1e100;
|
||||||
}
|
}
|
||||||
else if (controlMode_ == ControlMode::BottomHolePressure) {
|
else if (controlMode_ == ControlMode::BottomHolePressure) {
|
||||||
effectiveBottomHolePressure_ = bottomHolePressure_;
|
effectiveBottomHolePressure_ = targetBhp_;
|
||||||
|
|
||||||
// set the maximum rates to unlimited
|
// set the maximum rates to unlimited
|
||||||
maximumReservoirRate_ = 1e100;
|
maximumReservoirRate_ = 1e100;
|
||||||
@ -496,12 +499,12 @@ public:
|
|||||||
// limit. this is a HACK since the effective density must be given and is
|
// limit. this is a HACK since the effective density must be given and is
|
||||||
// assumed to be constant...
|
// assumed to be constant...
|
||||||
Scalar rhoEff = 650; // kg/m^3
|
Scalar rhoEff = 650; // kg/m^3
|
||||||
Scalar bhpFromThp = topHolePressure_ + rhoEff*bottomDepth_;
|
Scalar bhpFromThp = targetThp_ + rhoEff*bottomDepth_;
|
||||||
|
|
||||||
if (wellType_ == WellType::Injector)
|
if (wellType_ == WellType::Injector)
|
||||||
effectiveBottomHolePressure_ = std::max(bhpFromThp, bottomHolePressure_);
|
effectiveBottomHolePressure_ = std::max(bhpFromThp, targetBhp_);
|
||||||
else if (wellType_ == WellType::Producer)
|
else if (wellType_ == WellType::Producer)
|
||||||
effectiveBottomHolePressure_ = std::min(bhpFromThp, bottomHolePressure_);
|
effectiveBottomHolePressure_ = std::min(bhpFromThp, targetBhp_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// make it very likely that we screw up if we control for {surface,reservoir}
|
// make it very likely that we screw up if we control for {surface,reservoir}
|
||||||
@ -549,13 +552,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::array<Scalar, numPhases> dofSurfaceRate;
|
std::array<Scalar, numPhases> dofSurfaceRate;
|
||||||
|
const auto& intQuants = context.intensiveQuantities(dofIdx, timeIdx);
|
||||||
computeSurfaceRates_(dofSurfaceRate,
|
computeSurfaceRates_(dofSurfaceRate,
|
||||||
reservoirVolRates,
|
reservoirVolRates,
|
||||||
context.intensiveQuantities(dofIdx, timeIdx).fluidState());
|
intQuants.fluidState());
|
||||||
|
|
||||||
dofVariables_[globalDofIdx].unconstraintSurfaceRates = dofSurfaceRate;
|
dofVariables_[globalDofIdx].unconstraintSurfaceRates = dofSurfaceRate;
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx)
|
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx)
|
||||||
unconstraintSurfaceRates_[phaseIdx] += dofSurfaceRate[phaseIdx];
|
unconstraintSurfaceRates_[phaseIdx] += dofSurfaceRate[phaseIdx];
|
||||||
|
|
||||||
|
if (globalDofIdx == bottomDofGlobalIdx_)
|
||||||
|
observedBhp_ = intQuants.fluidState().pressure(oilPhaseIdx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,7 +590,8 @@ public:
|
|||||||
Scalar weightedSurfaceRate = computeWeightedRate_(unconstraintSurfaceRates_);
|
Scalar weightedSurfaceRate = computeWeightedRate_(unconstraintSurfaceRates_);
|
||||||
|
|
||||||
std::cout << "Well '" << name() << "':\n";
|
std::cout << "Well '" << name() << "':\n";
|
||||||
std::cout << " BHP: " << bottomHolePressure_ << "\n";
|
std::cout << " Target BHP: " << targetBhp_ << "\n";
|
||||||
|
std::cout << " Observed BHP: " << observedBhp_ << "\n";
|
||||||
std::cout << " Control mode: " << controlMode_ << "\n";
|
std::cout << " Control mode: " << controlMode_ << "\n";
|
||||||
std::cout << " Unconstraint reservoir rate: " << weightedReservoirRate << "\n";
|
std::cout << " Unconstraint reservoir rate: " << weightedReservoirRate << "\n";
|
||||||
std::cout << " Unconstraint surface rate: " << weightedSurfaceRate << "\n";
|
std::cout << " Unconstraint surface rate: " << weightedSurfaceRate << "\n";
|
||||||
@ -653,8 +661,8 @@ public:
|
|||||||
res.serializeSectionBegin("PeacemanWell");
|
res.serializeSectionBegin("PeacemanWell");
|
||||||
|
|
||||||
res.serializeStream()
|
res.serializeStream()
|
||||||
<< topHolePressure_ << " "
|
<< targetThp_ << " "
|
||||||
<< bottomHolePressure_ << " "
|
<< targetBhp_ << " "
|
||||||
<< controlMode_ << " "
|
<< controlMode_ << " "
|
||||||
<< wellType_ << " "
|
<< wellType_ << " "
|
||||||
<< maximumSurfaceRate_ << " "
|
<< maximumSurfaceRate_ << " "
|
||||||
@ -684,8 +692,8 @@ public:
|
|||||||
{
|
{
|
||||||
res.deserializeSectionBegin("PeacemanWell");
|
res.deserializeSectionBegin("PeacemanWell");
|
||||||
res.deserializeStream()
|
res.deserializeStream()
|
||||||
>> topHolePressure_
|
>> targetThp_
|
||||||
>> bottomHolePressure_
|
>> targetBhp_
|
||||||
>> controlMode_
|
>> controlMode_
|
||||||
>> wellType_
|
>> wellType_
|
||||||
>> maximumSurfaceRate_
|
>> maximumSurfaceRate_
|
||||||
@ -944,8 +952,11 @@ protected:
|
|||||||
Scalar wellTotalVolume_;
|
Scalar wellTotalVolume_;
|
||||||
|
|
||||||
// The assumed bottom and top hole pressures as specified by the user
|
// The assumed bottom and top hole pressures as specified by the user
|
||||||
Scalar bottomHolePressure_;
|
Scalar targetBhp_;
|
||||||
Scalar topHolePressure_;
|
Scalar targetThp_;
|
||||||
|
|
||||||
|
// real pressure seen at the bottom of the borehole
|
||||||
|
Scalar observedBhp_;
|
||||||
|
|
||||||
// The sum of the unconstraint volumetric reservoir rates of all
|
// The sum of the unconstraint volumetric reservoir rates of all
|
||||||
// degrees of freedom in the well for all fluid phases. This is
|
// degrees of freedom in the well for all fluid phases. This is
|
||||||
@ -1012,6 +1023,9 @@ protected:
|
|||||||
// the depth of the deepest DOF. (actually, the center of this
|
// the depth of the deepest DOF. (actually, the center of this
|
||||||
// DOF, but the difference should be minimal.)
|
// DOF, but the difference should be minimal.)
|
||||||
Scalar bottomDepth_;
|
Scalar bottomDepth_;
|
||||||
|
|
||||||
|
// global index of the DOF at the bottom of the well
|
||||||
|
int bottomDofGlobalIdx_;
|
||||||
};
|
};
|
||||||
} // namespace Ewoms
|
} // namespace Ewoms
|
||||||
|
|
||||||
|
@ -222,8 +222,8 @@ public:
|
|||||||
|
|
||||||
well->setMaximumSurfaceRate(injectProperties.surfaceInjectionRate);
|
well->setMaximumSurfaceRate(injectProperties.surfaceInjectionRate);
|
||||||
well->setMaximumReservoirRate(injectProperties.reservoirInjectionRate);
|
well->setMaximumReservoirRate(injectProperties.reservoirInjectionRate);
|
||||||
well->setBottomHolePressure(injectProperties.BHPLimit);
|
well->setTargetBottomHolePressure(injectProperties.BHPLimit);
|
||||||
well->setTopHolePressure(injectProperties.THPLimit);
|
well->setTargetTopHolePressure(injectProperties.THPLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deckWell->isProducer(episodeIdx)) {
|
if (deckWell->isProducer(episodeIdx)) {
|
||||||
@ -280,8 +280,8 @@ public:
|
|||||||
"Not implemented: Well groups");
|
"Not implemented: Well groups");
|
||||||
}
|
}
|
||||||
|
|
||||||
well->setBottomHolePressure(producerProperties.BHPLimit);
|
well->setTargetBottomHolePressure(producerProperties.BHPLimit);
|
||||||
well->setTopHolePressure(producerProperties.THPLimit);
|
well->setTargetTopHolePressure(producerProperties.THPLimit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user