Add class SegmentState

This commit is contained in:
Joakim Hove
2021-05-30 18:35:32 +02:00
parent 702dc3a924
commit 5dc267c6f5
4 changed files with 114 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
#include <opm/simulators/wells/GlobalWellInfo.hpp>
#include <opm/simulators/wells/ParallelWellInfo.hpp>
#include <opm/simulators/wells/WellState.hpp>
#include <opm/simulators/wells/SegmentState.hpp>
#include <opm/simulators/wells/WellContainer.hpp>
#include <opm/parser/eclipse/Python/Python.hpp>
@@ -522,5 +523,20 @@ BOOST_AUTO_TEST_CASE(TESTWellContainer) {
BOOST_CHECK(!wx.has_value());
}
BOOST_AUTO_TEST_CASE(TESTSegmentState) {
const Setup setup{ "msw.data" };
const auto& well = setup.sched.getWell("PROD01", 0);
const auto& segments = well.getSegments();
Opm::SegmentState ss1(3, segments);
Opm::SegmentState ss2;
ss1.pressure_drop_hydrostatic[0] = 1;
ss1.pressure_drop_friction[0] = 2;
ss1.pressure_drop_accel[0] = 3;
BOOST_CHECK_EQUAL(ss1.pressure_drop(0), 6);
}
BOOST_AUTO_TEST_SUITE_END()