Extract functionality to update target rates to SingleWellState

This commit is contained in:
Joakim Hove
2021-11-03 12:30:40 +01:00
parent 5a986ee430
commit 05317e1d72
8 changed files with 170 additions and 130 deletions
+12 -7
View File
@@ -546,10 +546,10 @@ BOOST_AUTO_TEST_CASE(TESTSegmentState2) {
BOOST_AUTO_TEST_CASE(TESTPerfData) {
Opm::PerfData pd1(3, true, 3);
Opm::PerfData pd2(3, true, 3);
Opm::PerfData pd3(2, true, 3);
Opm::PerfData pd4(3, false, 3);
Opm::PerfData pd1(3, 100, true, 3);
Opm::PerfData pd2(3, 100, true, 3);
Opm::PerfData pd3(2, 100, true, 3);
Opm::PerfData pd4(3, 100, false, 3);
for (std::size_t i = 0; i < 3; i++) {
@@ -575,9 +575,14 @@ BOOST_AUTO_TEST_CASE(TESTPerfData) {
BOOST_AUTO_TEST_CASE(TestSingleWellState) {
Opm::ParallelWellInfo pinfo;
std::vector<Opm::PerforationData> connections = {{0,1,1,0},{1,1,1,1},{2,1,1,2}};
Opm::SingleWellState ws1("W1", pinfo, true, connections, 3, 1);
Opm::SingleWellState ws2("W2", pinfo, true, connections, 3, 2);
Opm::SingleWellState ws3("W3", pinfo, false, connections, 3, 3);
Opm::PhaseUsage pu;
// This is totally bonkers, but the pu needs a complete deck to initialize properly
pu.num_phases = 3;
Opm::SingleWellState ws1("W1", pinfo, true, 100, connections, pu, 1);
Opm::SingleWellState ws2("W2", pinfo, true, 100, connections, pu, 2);
Opm::SingleWellState ws3("W3", pinfo, false, 100, connections, pu, 3);
ws1.bhp = 100;
ws1.thp = 200;