Restart: Save/Restore Cumulative Injected Reservoir Volume
This commit adds support for persisting the *VIT cumulative summary vector at the well, group, and field levels in the simulation restart files. Connection level currently not supported.
This commit is contained in:
parent
467f7879a6
commit
1113c25eb1
@ -65,6 +65,7 @@ struct RstGroup {
|
||||
double voidage_production_total;
|
||||
double water_injection_total;
|
||||
double gas_injection_total;
|
||||
double voidage_injection_total;
|
||||
double oil_production_potential;
|
||||
double water_production_potential;
|
||||
double history_total_oil_production;
|
||||
|
@ -102,6 +102,7 @@ struct RstWell {
|
||||
double void_total;
|
||||
double water_inj_total;
|
||||
double gas_inj_total;
|
||||
double void_inj_total;
|
||||
double gas_fvf;
|
||||
double bhp_target_double;
|
||||
double hist_oil_total;
|
||||
|
@ -72,14 +72,14 @@ public:
|
||||
const std::vector<std::string> restart_group_keys = {"GOPP", "GWPP", "GOPR", "GWPR", "GGPR",
|
||||
"GVPR", "GWIR", "GGIR", "GWCT", "GGOR",
|
||||
"GOPT", "GWPT", "GGPT", "GVPT", "GWIT",
|
||||
"GGIT",
|
||||
"GGIT", "GVIT",
|
||||
"GOPTH", "GWPTH", "GGPTH",
|
||||
"GWITH", "GGITH"};
|
||||
|
||||
const std::vector<std::string> restart_field_keys = {"FOPP", "FWPP", "FOPR", "FWPR", "FGPR",
|
||||
"FVPR", "FWIR", "FGIR", "FWCT", "FGOR",
|
||||
"FOPT", "FWPT", "FGPT", "FVPT", "FWIT",
|
||||
"FGIT",
|
||||
"FGIT", "FVIT",
|
||||
"FOPTH", "FWPTH", "FGPTH",
|
||||
"FWITH", "FGITH"};
|
||||
|
||||
@ -98,6 +98,7 @@ public:
|
||||
{"GVPT", 13},
|
||||
{"GWIT", 15},
|
||||
{"GGIT", 16},
|
||||
{"GVIT", 17},
|
||||
{"GOPP", 22},
|
||||
{"GWPP", 23},
|
||||
{"GOPTH", 135},
|
||||
@ -135,6 +136,7 @@ public:
|
||||
{"FVPT", 13},
|
||||
{"FWIT", 15},
|
||||
{"FGIT", 16},
|
||||
{"FVIT", 17},
|
||||
{"FOPP", 22},
|
||||
{"FWPP", 23},
|
||||
{"FOPTH", 135},
|
||||
|
@ -67,8 +67,9 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
VoidPrTotal = 13, // Group's total cumulative reservoir
|
||||
// voidage production
|
||||
|
||||
WatInjTotal = 15, // Group's total cumulative water injection
|
||||
GasInjTotal = 16, // Group's total cumulative gas injection
|
||||
WatInjTotal = 15, // Group's total cumulative water injection
|
||||
GasInjTotal = 16, // Group's total cumulative gas injection
|
||||
VoidInjTotal = 17, // Group's total cumulative reservoir volume injection
|
||||
|
||||
OilPrPot = 22, // Group's oil production potential
|
||||
WatPrPot = 23, // Group's water production potential
|
||||
|
@ -146,8 +146,9 @@ namespace Opm { namespace RestartIO { namespace Helpers { namespace VectorItems
|
||||
VoidPrTotal = 21, // Well's total cumulative reservoir
|
||||
// voidage production
|
||||
|
||||
WatInjTotal = 23, // Well's total cumulative water injection
|
||||
GasInjTotal = 24, // Well's total cumulative gas injection
|
||||
WatInjTotal = 23, // Well's total cumulative water injection
|
||||
GasInjTotal = 24, // Well's total cumulative gas injection
|
||||
VoidInjTotal = 25, // Well's total cumulative reservoir volume injection
|
||||
|
||||
GasFVF = 34, // Well's producing gas formation volume factor.
|
||||
|
||||
|
@ -64,6 +64,7 @@ RstGroup::RstGroup(const ::Opm::UnitSystem& unit_system,
|
||||
voidage_production_total( unit_system.to_si(M::geometric_volume, xgrp[VI::XGroup::VoidPrTotal])),
|
||||
water_injection_total( unit_system.to_si(M::liquid_surface_volume, xgrp[VI::XGroup::WatInjTotal])),
|
||||
gas_injection_total( unit_system.to_si(M::gas_surface_volume, xgrp[VI::XGroup::GasInjTotal])),
|
||||
voidage_injection_total( unit_system.to_si(M::volume, xgrp[VI::XGroup::VoidInjTotal])),
|
||||
oil_production_potential( unit_system.to_si(M::liquid_surface_volume, xgrp[VI::XGroup::OilPrPot])),
|
||||
water_production_potential( unit_system.to_si(M::liquid_surface_volume, xgrp[VI::XGroup::WatPrPot])),
|
||||
history_total_oil_production( unit_system.to_si(M::liquid_surface_volume, xgrp[VI::XGroup::HistOilPrTotal])),
|
||||
|
@ -94,6 +94,7 @@ RstWell::RstWell(const ::Opm::UnitSystem& unit_system,
|
||||
void_total( unit_system.to_si(M::volume, xwel[VI::XWell::VoidPrTotal])),
|
||||
water_inj_total( unit_system.to_si(M::liquid_surface_volume, xwel[VI::XWell::WatInjTotal])),
|
||||
gas_inj_total( unit_system.to_si(M::gas_surface_volume, xwel[VI::XWell::GasInjTotal])),
|
||||
void_inj_total( unit_system.to_si(M::volume, xwel[VI::XWell::VoidInjTotal])),
|
||||
gas_fvf( xwel[VI::XWell::GasFVF]),
|
||||
bhp_target_double( unit_system.to_si(M::pressure, xwel[VI::XWell::BHPTarget])),
|
||||
hist_oil_total( unit_system.to_si(M::liquid_surface_volume, xwel[VI::XWell::HistOilPrTotal])),
|
||||
|
@ -596,6 +596,7 @@ namespace {
|
||||
// case of well alternating between injecting water and gas.
|
||||
xWell[Ix::WatInjTotal] = get("WWIT");
|
||||
xWell[Ix::GasInjTotal] = get("WGIT");
|
||||
xWell[Ix::VoidInjTotal] = get("WVIT");
|
||||
xWell[Ix::HistWatInjTotal] = get("WWITH");
|
||||
xWell[Ix::HistGasInjTotal] = get("WGITH");
|
||||
}
|
||||
|
@ -1336,6 +1336,7 @@ namespace {
|
||||
|
||||
smry.update(key("WWIT"), xwel[VI::XWell::index::WatInjTotal]);
|
||||
smry.update(key("WGIT"), xwel[VI::XWell::index::GasInjTotal]);
|
||||
smry.update(key("WVIT"), xwel[VI::XWell::index::VoidInjTotal]);
|
||||
|
||||
smry.update(key("WOPTH"), xwel[VI::XWell::index::HistOilPrTotal]);
|
||||
smry.update(key("WWPTH"), xwel[VI::XWell::index::HistWatPrTotal]);
|
||||
@ -1373,6 +1374,7 @@ namespace {
|
||||
|
||||
smry.update(key("WIT"), xgrp[VI::XGroup::index::WatInjTotal]);
|
||||
smry.update(key("GIT"), xgrp[VI::XGroup::index::GasInjTotal]);
|
||||
smry.update(key("VIT"), xgrp[VI::XGroup::index::VoidInjTotal]);
|
||||
|
||||
smry.update(key("OPTH"), xgrp[VI::XGroup::index::HistOilPrTotal]);
|
||||
smry.update(key("WPTH"), xgrp[VI::XGroup::index::HistWatPrTotal]);
|
||||
|
@ -131,8 +131,9 @@ namespace {
|
||||
ParamCTorArgs{ "GPI" , Type::Rate },
|
||||
ParamCTorArgs{ "WIT" , Type::Total },
|
||||
ParamCTorArgs{ "GIT" , Type::Total },
|
||||
ParamCTorArgs{ "VIT" , Type::Total },
|
||||
ParamCTorArgs{ "WITH", Type::Total },
|
||||
ParamCTorArgs{ "GITH", Type::Total }
|
||||
ParamCTorArgs{ "GITH", Type::Total },
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -233,6 +233,7 @@ TSTEP -- 8
|
||||
state.update("WGIR:OP_1" , 0.0);
|
||||
state.update("WWIT:OP_1" , 0.0);
|
||||
state.update("WGIT:OP_1" , 0.0);
|
||||
state.update("WVIT:OP_1" , 0.0);
|
||||
state.update("WWCT:OP_1" , 0.625);
|
||||
state.update("WGOR:OP_1" , 234.5);
|
||||
state.update("WBHP:OP_1" , 314.15);
|
||||
@ -256,6 +257,7 @@ TSTEP -- 8
|
||||
state.update("WGIR:OP_2" , 200.0);
|
||||
state.update("WWIT:OP_2" , 1000.0);
|
||||
state.update("WGIT:OP_2" , 2000.0);
|
||||
state.update("WVIT:OP_2" , 1234.5);
|
||||
state.update("WWCT:OP_2" , 0.0);
|
||||
state.update("WGOR:OP_2" , 0.0);
|
||||
state.update("WBHP:OP_2" , 400.6);
|
||||
@ -279,6 +281,7 @@ TSTEP -- 8
|
||||
state.update("WGIR:OP_3" , 0.0);
|
||||
state.update("WWIT:OP_3" , 0.0);
|
||||
state.update("WGIT:OP_3" , 0.0);
|
||||
state.update("WVIT:OP_3" , 0.0);
|
||||
state.update("WWCT:OP_3" , 0.0625);
|
||||
state.update("WGOR:OP_3" , 1234.5);
|
||||
state.update("WBHP:OP_3" , 314.15);
|
||||
@ -621,6 +624,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step1)
|
||||
|
||||
BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatInjTotal], 1000.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(xwell[i1 + Ix::GasInjTotal], 2000.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(xwell[i1 + Ix::VoidInjTotal], 1234.5, 1.0e-10);
|
||||
|
||||
// Bg = VGIR / GIR = 1234.0 / 200.0
|
||||
BOOST_CHECK_CLOSE(xwell[i1 + Ix::GasFVF], 6.17, 1.0e-10);
|
||||
@ -730,6 +734,7 @@ BOOST_AUTO_TEST_CASE (Dynamic_Well_Data_Step2)
|
||||
|
||||
BOOST_CHECK_CLOSE(xwell[i1 + Ix::WatInjTotal], 1000.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(xwell[i1 + Ix::GasInjTotal], 2000.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(xwell[i1 + Ix::VoidInjTotal], 1234.5, 1.0e-10);
|
||||
|
||||
// Copy of WWIR
|
||||
BOOST_CHECK_CLOSE(xwell[i1 + Ix::item37],
|
||||
|
@ -229,6 +229,7 @@ Opm::SummaryState sim_state()
|
||||
state.update("WGIR:OP_1" , 0.0);
|
||||
state.update("WWIT:OP_1" , 0.0);
|
||||
state.update("WGIT:OP_1" , 0.0);
|
||||
state.update("WVIT:OP_1" , 0.0);
|
||||
state.update("WWCT:OP_1" , 0.625);
|
||||
state.update("WGOR:OP_1" , 234.5);
|
||||
state.update("WBHP:OP_1" , 314.15);
|
||||
@ -252,6 +253,7 @@ Opm::SummaryState sim_state()
|
||||
state.update("WGIR:OP_2" , 200.0);
|
||||
state.update("WWIT:OP_2" , 1000.0);
|
||||
state.update("WGIT:OP_2" , 2000.0);
|
||||
state.update("WVIT:OP_2" , 1234.5);
|
||||
state.update("WWCT:OP_2" , 0.0);
|
||||
state.update("WGOR:OP_2" , 0.0);
|
||||
state.update("WBHP:OP_2" , 400.6);
|
||||
@ -275,6 +277,7 @@ Opm::SummaryState sim_state()
|
||||
state.update("WGIR:OP_3" , 0.0);
|
||||
state.update("WWIT:OP_3" , 0.0);
|
||||
state.update("WGIT:OP_3" , 0.0);
|
||||
state.update("WVIT:OP_3" , 0.0);
|
||||
state.update("WWCT:OP_3" , 0.0625);
|
||||
state.update("WGOR:OP_3" , 1234.5);
|
||||
state.update("WBHP:OP_3" , 314.15);
|
||||
@ -298,6 +301,7 @@ Opm::SummaryState sim_state()
|
||||
state.update("GGIR:OP" , - 65536.0);
|
||||
state.update("GWIT:OP" , 31415.9);
|
||||
state.update("GGIT:OP" , 27182.8);
|
||||
state.update("GVIT:OP" , 44556.6);
|
||||
state.update("GWCT:OP" , 0.625);
|
||||
state.update("GGOR:OP" , 1234.5);
|
||||
state.update("GGVIR:OP", 123.45);
|
||||
@ -320,6 +324,7 @@ Opm::SummaryState sim_state()
|
||||
state.update("FGIR" , - 655360.0);
|
||||
state.update("FWIT" , 314159.2);
|
||||
state.update("FGIT" , 271828.1);
|
||||
state.update("FVIT" , 445566.77);
|
||||
state.update("FWCT" , 0.625);
|
||||
state.update("FGOR" , 1234.5);
|
||||
state.update("FOPTH", 56789.01);
|
||||
@ -829,6 +834,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
||||
BOOST_CHECK(rstSumState.has("WVPT:OP_1"));
|
||||
BOOST_CHECK(rstSumState.has("WWIT:OP_1"));
|
||||
BOOST_CHECK(rstSumState.has("WGIT:OP_1"));
|
||||
BOOST_CHECK(rstSumState.has("WVIT:OP_1"));
|
||||
BOOST_CHECK(rstSumState.has("WOPTH:OP_1"));
|
||||
BOOST_CHECK(rstSumState.has("WGPTH:OP_1"));
|
||||
BOOST_CHECK(rstSumState.has("WWPTH:OP_1"));
|
||||
@ -841,6 +847,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WVPT:OP_1"), 40.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WWIT:OP_1"), 0.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WGIT:OP_1"), 0.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WVIT:OP_1"), 0.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WOPTH:OP_1"), 345.6, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WWPTH:OP_1"), 456.7, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WGPTH:OP_1"), 567.8, 1.0e-10);
|
||||
@ -854,6 +861,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
||||
BOOST_CHECK(rstSumState.has("WVPT:OP_2"));
|
||||
BOOST_CHECK(rstSumState.has("WWIT:OP_2"));
|
||||
BOOST_CHECK(rstSumState.has("WGIT:OP_2"));
|
||||
BOOST_CHECK(rstSumState.has("WVIT:OP_2"));
|
||||
BOOST_CHECK(rstSumState.has("WOPTH:OP_2"));
|
||||
BOOST_CHECK(rstSumState.has("WGPTH:OP_2"));
|
||||
BOOST_CHECK(rstSumState.has("WWPTH:OP_2"));
|
||||
@ -866,6 +874,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WVPT:OP_2"), 0.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WWIT:OP_2"), 1000.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WGIT:OP_2"), 2000.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WVIT:OP_2"), 1234.5, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WOPTH:OP_2"), 0.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WGPTH:OP_2"), 0.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("WWPTH:OP_2"), 0.0, 1.0e-10);
|
||||
@ -879,6 +888,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
||||
BOOST_CHECK(rstSumState.has("GVPT:OP"));
|
||||
BOOST_CHECK(rstSumState.has("GWIT:OP"));
|
||||
BOOST_CHECK(rstSumState.has("GGIT:OP"));
|
||||
BOOST_CHECK(rstSumState.has("GVIT:OP"));
|
||||
BOOST_CHECK(rstSumState.has("GOPTH:OP"));
|
||||
BOOST_CHECK(rstSumState.has("GGPTH:OP"));
|
||||
BOOST_CHECK(rstSumState.has("GWPTH:OP"));
|
||||
@ -891,6 +901,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("GVPT:OP"), 1400.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("GWIT:OP"), 31415.9, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("GGIT:OP"), 27182.8, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("GVIT:OP"), 44556.6, 1.0e-10);
|
||||
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("GOPTH:OP"), 5678.90, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("GGPTH:OP"), 7890.12, 1.0e-10);
|
||||
@ -905,6 +916,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
||||
BOOST_CHECK(rstSumState.has("FVPT"));
|
||||
BOOST_CHECK(rstSumState.has("FWIT"));
|
||||
BOOST_CHECK(rstSumState.has("FGIT"));
|
||||
BOOST_CHECK(rstSumState.has("FVIT"));
|
||||
BOOST_CHECK(rstSumState.has("FOPTH"));
|
||||
BOOST_CHECK(rstSumState.has("FGPTH"));
|
||||
BOOST_CHECK(rstSumState.has("FWPTH"));
|
||||
@ -917,6 +929,7 @@ BOOST_AUTO_TEST_CASE(Restore_Cumulatives)
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("FVPT"), 14000.0, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("FWIT"), 314159.2, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("FGIT"), 271828.1, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("FVIT"), 445566.77, 1.0e-10);
|
||||
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("FOPTH"), 56789.01, 1.0e-10);
|
||||
BOOST_CHECK_CLOSE(rstSumState.get("FGPTH"), 78901.23, 1.0e-10);
|
||||
|
Loading…
Reference in New Issue
Block a user