Merge pull request #1795 from bska/thp-restart-support

Add Restart I/O Support for Well's THP
This commit is contained in:
Bård Skaflestad
2020-05-20 15:07:56 +02:00
committed by GitHub
7 changed files with 17 additions and 3 deletions

View File

@@ -94,6 +94,7 @@ struct RstWell {
double gas_rate;
double liquid_rate;
double void_rate;
double thp;
double flow_bhp;
double wct;
double gor;

View File

@@ -135,7 +135,7 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
GasPrRate = 2, // Well's gas production rate
LiqPrRate = 3, // Well's liquid production rate
VoidPrRate = 4, // Well's reservoir voidage production rate
TubHeadPr = 5, // Well's tubing head pressure
FlowBHP = 6, // Well's flowing/producing bottom hole pressure
WatCut = 7, // Well's producing water cut
GORatio = 8, // Well's producing gas/oil ratio

View File

@@ -87,6 +87,7 @@ RstWell::RstWell(const ::Opm::UnitSystem& unit_system,
gas_rate( unit_system.to_si(M::gas_surface_rate, xwel[VI::XWell::GasPrRate])),
liquid_rate( unit_system.to_si(M::rate, xwel[VI::XWell::LiqPrRate])),
void_rate( unit_system.to_si(M::rate, xwel[VI::XWell::VoidPrRate])),
thp( unit_system.to_si(M::pressure, xwel[VI::XWell::TubHeadPr])),
flow_bhp( unit_system.to_si(M::pressure, xwel[VI::XWell::FlowBHP])),
wct( unit_system.to_si(M::water_cut, xwel[VI::XWell::WatCut])),
gor( unit_system.to_si(M::gas_oil_ratio, xwel[VI::XWell::GORatio])),

View File

@@ -568,7 +568,7 @@ namespace {
+ xWell[Ix::WatPrRate];
xWell[Ix::VoidPrRate] = get("WVPR");
xWell[Ix::TubHeadPr] = get("WTHP");
xWell[Ix::FlowBHP] = get("WBHP");
xWell[Ix::WatCut] = get("WWCT");
xWell[Ix::GORatio] = get("WGOR");
@@ -598,6 +598,7 @@ namespace {
{
using Ix = ::Opm::RestartIO::Helpers::VectorItems::XWell::index;
xWell[Ix::TubHeadPr] = get("WTHP");
xWell[Ix::FlowBHP] = get("WBHP");
// Note: Assign both water and gas cumulatives to support
@@ -687,6 +688,7 @@ namespace {
return smry.has(key) ? smry.get(key) : 0.0;
};
xWell[Ix::TubHeadPr] = get("WTHP");
xWell[Ix::FlowBHP] = get("WBHP");
xWell[Ix::PrimGuideRate] = xWell[Ix::PrimGuideRate_2] = -get("WOIGR");

View File

@@ -1171,7 +1171,8 @@ namespace {
// 2) Restore other well quantities (really only xw.bhp)
xw.bhp = usys.to_si(M::pressure, xwel[VI::XWell::index::FlowBHP]);
xw.thp = xw.temperature = 0.0;
xw.thp = usys.to_si(M::pressure, xwel[VI::XWell::index::TubHeadPr]);
xw.temperature = 0.0;
// 3) Restore connection flow rates (xw.connections[i].rates)
// and pressure values (xw.connections[i].pressure).

View File

@@ -142,6 +142,7 @@ namespace {
{
const auto& vectors = requiredRestartVectors();
const std::vector<ParamCTorArgs> extra_well_vectors {
{ "WTHP", Opm::EclIO::SummaryNode::Type::Pressure },
{ "WBHP", Opm::EclIO::SummaryNode::Type::Pressure },
{ "WGVIR", Opm::EclIO::SummaryNode::Type::Rate },
{ "WWVIR", Opm::EclIO::SummaryNode::Type::Rate },

View File

@@ -237,6 +237,7 @@ TSTEP -- 8
state.update("WWCT:OP_1" , 0.625);
state.update("WGOR:OP_1" , 234.5);
state.update("WBHP:OP_1" , 314.15);
state.update("WTHP:OP_1" , 123.45);
state.update("WOPTH:OP_1", 345.6);
state.update("WWPTH:OP_1", 456.7);
state.update("WGPTH:OP_1", 567.8);
@@ -265,6 +266,7 @@ TSTEP -- 8
state.update("WWCT:OP_2" , 0.0);
state.update("WGOR:OP_2" , 0.0);
state.update("WBHP:OP_2" , 400.6);
state.update("WTHP:OP_2" , 234.5);
state.update("WOPTH:OP_2", 0.0);
state.update("WWPTH:OP_2", 0.0);
state.update("WGPTH:OP_2", 0.0);
@@ -293,6 +295,7 @@ TSTEP -- 8
state.update("WWCT:OP_3" , 0.0625);
state.update("WGOR:OP_3" , 1234.5);
state.update("WBHP:OP_3" , 314.15);
state.update("WTHP:OP_3" , 246.9);
state.update("WOPTH:OP_3", 2345.6);
state.update("WWPTH:OP_3", 3456.7);
state.update("WGPTH:OP_3", 4567.8);
@@ -601,6 +604,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step1)
BOOST_CHECK_CLOSE(xwell[i0 + Ix::LiqPrRate], 1.0 + 2.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::VoidPrRate], 4.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::TubHeadPr], 123.45, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::FlowBHP], 314.15 , 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::WatCut] , 0.625, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::GORatio], 234.5 , 1.0e-10);
@@ -645,6 +649,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step1)
BOOST_CHECK_CLOSE(xwell[i1 + Ix::GasPrRate], -200.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::VoidPrRate], -1234.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::TubHeadPr], 234.5, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::FlowBHP], 400.6, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatInjTotal], 1000.0, 1.0e-10);
@@ -736,6 +741,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step2)
BOOST_CHECK_CLOSE(xwell[i0 + Ix::LiqPrRate], 1.0 + 2.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::VoidPrRate], 4.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::TubHeadPr], 123.45, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::FlowBHP], 314.15, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::WatCut] , 0.625, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i0 + Ix::GORatio], 234.5, 1.0e-10);
@@ -781,6 +787,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step2)
BOOST_CHECK_CLOSE(xwell[i1 + Ix::LiqPrRate],
xwell[i1 + Ix::WatPrRate], 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::TubHeadPr], 234.5, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::FlowBHP], 400.6, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatInjTotal], 1000.0, 1.0e-10);
@@ -829,6 +836,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step2)
BOOST_CHECK_CLOSE(xwell[i2 + Ix::LiqPrRate], 11.0 + 12.0, 1.0e-10); // LPR
BOOST_CHECK_CLOSE(xwell[i2 + Ix::VoidPrRate], 14.0, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i2 + Ix::TubHeadPr], 246.9, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i2 + Ix::FlowBHP], 314.15, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i2 + Ix::WatCut] , 0.0625, 1.0e-10);
BOOST_CHECK_CLOSE(xwell[i2 + Ix::GORatio], 1234.5, 1.0e-10);