From 418173bbcc58d8bddbaeac66615ecc1e4407e27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Tue, 9 Aug 2022 18:21:39 +0200 Subject: [PATCH] Add Restart Support for NETBALAN Keyword This commit loads NETBALAN parameters from the restart file and forms Network::Balance objects from these parameters. --- CMakeLists_files.cmake | 3 + .../eclipse/Schedule/Network/Balance.hpp | 5 + opm/io/eclipse/rst/netbalan.hpp | 96 ++++++ opm/io/eclipse/rst/state.hpp | 2 + .../eclipse/Schedule/Network/Balance.cpp | 14 + src/opm/input/eclipse/Schedule/Schedule.cpp | 2 + src/opm/io/eclipse/rst/netbalan.cpp | 120 +++++++ src/opm/io/eclipse/rst/state.cpp | 1 + tests/test_rst_netbalan.cpp | 320 ++++++++++++++++++ 9 files changed, 563 insertions(+) create mode 100644 opm/io/eclipse/rst/netbalan.hpp create mode 100644 src/opm/io/eclipse/rst/netbalan.cpp create mode 100644 tests/test_rst_netbalan.cpp diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index a99dfc7de..54b440343 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -302,6 +302,7 @@ if(ENABLE_ECL_OUTPUT) src/opm/io/eclipse/rst/connection.cpp src/opm/io/eclipse/rst/group.cpp src/opm/io/eclipse/rst/header.cpp + src/opm/io/eclipse/rst/netbalan.cpp src/opm/io/eclipse/rst/network.cpp src/opm/io/eclipse/rst/udq.cpp src/opm/io/eclipse/rst/segment.cpp @@ -474,6 +475,7 @@ if(ENABLE_ECL_OUTPUT) tests/test_Restart.cpp tests/test_RFT.cpp tests/test_rst.cpp + tests/test_rst_netbalan.cpp tests/test_Solution.cpp tests/test_Inplace.cpp tests/test_Summary.cpp @@ -930,6 +932,7 @@ if(ENABLE_ECL_OUTPUT) opm/io/eclipse/rst/connection.hpp opm/io/eclipse/rst/group.hpp opm/io/eclipse/rst/header.hpp + opm/io/eclipse/rst/netbalan.hpp opm/io/eclipse/rst/network.hpp opm/io/eclipse/rst/segment.hpp opm/io/eclipse/rst/state.hpp diff --git a/opm/input/eclipse/Schedule/Network/Balance.hpp b/opm/input/eclipse/Schedule/Network/Balance.hpp index 05b69616d..8497d3530 100644 --- a/opm/input/eclipse/Schedule/Network/Balance.hpp +++ b/opm/input/eclipse/Schedule/Network/Balance.hpp @@ -28,6 +28,10 @@ namespace Opm { class UnitSystem; } // namespace Opm +namespace Opm { namespace RestartIO { + class RstNetbalan; +}} // namespace Opm::RestartIO + namespace Opm { namespace Network { class Balance @@ -43,6 +47,7 @@ public: Balance(); explicit Balance(const DeckKeyword& keyword); explicit Balance(bool network_active); + explicit Balance(const RestartIO::RstNetbalan& netbalan); static Balance serializeObject(); diff --git a/opm/io/eclipse/rst/netbalan.hpp b/opm/io/eclipse/rst/netbalan.hpp new file mode 100644 index 000000000..8a003e591 --- /dev/null +++ b/opm/io/eclipse/rst/netbalan.hpp @@ -0,0 +1,96 @@ +/* + Copyright 2022 Equinor ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation, either version 3 of the License, or (at your option) any later + version. + + OPM is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along + with OPM. If not, see . +*/ + +#ifndef RST_NETBALAN_HPP +#define RST_NETBALAN_HPP + +#include +#include +#include +#include + +namespace Opm { + class UnitSystem; +} // namespace Opm + +namespace Opm { namespace RestartIO { + + class RstNetbalan + { + public: + explicit RstNetbalan(const std::vector& intehead, + const std::vector& doubhead, + const UnitSystem& usys); + + double interval() const + { + return this->calc_interval_; + } + + double pressureTolerance() const + { + return this->ptol_; + } + + std::size_t pressureMaxIter() const + { + return this->pressure_max_iter_; + } + + double thpTolerance() const + { + return this->thp_tolerance_; + } + + std::size_t thpMaxIter() const + { + return this->thp_max_iter_; + } + + const std::optional& targetBalanceError() const + { + return this->target_branch_balance_error_; + } + + const std::optional& maxBalanceError() const + { + return this->max_branch_balance_error_; + } + + const std::optional& minTstep() const + { + return this->min_tstep_; + } + + private: + double calc_interval_; + double ptol_; + std::size_t pressure_max_iter_; + + double thp_tolerance_; + std::size_t thp_max_iter_; + + std::optional target_branch_balance_error_{}; + std::optional max_branch_balance_error_{}; + std::optional min_tstep_{}; + }; + +}} // namespace Opm::RestartIO + +#endif // RST_NETBALAN_HPP diff --git a/opm/io/eclipse/rst/state.hpp b/opm/io/eclipse/rst/state.hpp index 2d2681c0b..ea6aa5c8f 100644 --- a/opm/io/eclipse/rst/state.hpp +++ b/opm/io/eclipse/rst/state.hpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -65,6 +66,7 @@ struct RstState ::Opm::UnitSystem unit_system; RstHeader header; RstAquifer aquifers; + RstNetbalan netbalan; RstNetwork network; std::vector wells; std::vector groups; diff --git a/src/opm/input/eclipse/Schedule/Network/Balance.cpp b/src/opm/input/eclipse/Schedule/Network/Balance.cpp index c97a9fca1..25725d166 100644 --- a/src/opm/input/eclipse/Schedule/Network/Balance.cpp +++ b/src/opm/input/eclipse/Schedule/Network/Balance.cpp @@ -19,6 +19,8 @@ #include +#include + #include #include @@ -117,6 +119,18 @@ Balance::Balance(const bool network_active) } } +Balance::Balance(const RestartIO::RstNetbalan& netbalan) + : calc_mode (getNetworkBalancingMode(netbalan.interval())) + , calc_interval (netbalan.interval()) + , ptol (netbalan.pressureTolerance()) + , m_pressure_max_iter (netbalan.pressureMaxIter()) + , m_thp_tolerance (netbalan.thpTolerance()) + , m_thp_max_iter (netbalan.thpMaxIter()) + , target_branch_balance_error(netbalan.targetBalanceError()) + , max_branch_balance_error (netbalan.maxBalanceError()) + , m_min_tstep (netbalan.minTstep()) +{} + Balance::CalcMode Balance::mode() const { return this->calc_mode; } diff --git a/src/opm/input/eclipse/Schedule/Schedule.cpp b/src/opm/input/eclipse/Schedule/Schedule.cpp index 49026e474..813903951 100644 --- a/src/opm/input/eclipse/Schedule/Schedule.cpp +++ b/src/opm/input/eclipse/Schedule/Schedule.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -1756,6 +1757,7 @@ namespace { this->snapshots.back().wtest_config.update( WellTestConfig{rst_state, report_step}); + this->snapshots.back().network_balance.update(Network::Balance { rst_state.netbalan }); if (!rst_state.wlists.empty()) this->snapshots.back().wlist_manager.update( WListManager(rst_state) ); diff --git a/src/opm/io/eclipse/rst/netbalan.cpp b/src/opm/io/eclipse/rst/netbalan.cpp new file mode 100644 index 000000000..927651add --- /dev/null +++ b/src/opm/io/eclipse/rst/netbalan.cpp @@ -0,0 +1,120 @@ +/* + Copyright 2022 Equinor ASA. + + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation, either version 3 of the License, or (at your option) any later + version. + + OPM is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + details. + + You should have received a copy of the GNU General Public License along + with OPM. If not, see . +*/ + +#include + +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +namespace VI = ::Opm::RestartIO::Helpers::VectorItems; + +namespace { + std::size_t maxBalanceIter(const std::vector& intehead) + { + return intehead[VI::intehead::NetbalMaxBalanceIter]; + } + + std::size_t maxTHPIter(const std::vector& intehead) + { + return intehead[VI::intehead::NetbalMaxTHPIter]; + } + + double calcInterval(const std::vector& doubhead, + const Opm::UnitSystem& usys) + { + return usys.to_si(Opm::UnitSystem::measure::time, + doubhead[VI::doubhead::Netbalint]); + } + + double pressureToleranceValue(const std::vector& doubhead, + const Opm::UnitSystem& usys) + { + return usys.to_si(Opm::UnitSystem::measure::pressure, + doubhead[VI::doubhead::Netbalnpre]); + } + + double thpToleranceValue(const std::vector& doubhead, + const Opm::UnitSystem& usys) + { + return usys.to_si(Opm::UnitSystem::measure::pressure, + doubhead[VI::doubhead::Netbalthpc]); + } + + bool is_finite_float(const double x) + { + return std::abs(static_cast(x)) < 1.0e+20f; + } + + std::optional + targetBranchBalanceError(const std::vector& doubhead, + const Opm::UnitSystem& usys) + { + const auto trgBE = doubhead[VI::doubhead::Netbaltarerr]; + + return is_finite_float(trgBE) + ? std::optional{ usys.to_si(Opm::UnitSystem::measure::pressure, trgBE) } + : std::nullopt; + } + + std::optional + maxBranchBalanceError(const std::vector& doubhead, + const Opm::UnitSystem& usys) + { + const auto maxBE = doubhead[VI::doubhead::Netbalmaxerr]; + + return is_finite_float(maxBE) + ? std::optional{ usys.to_si(Opm::UnitSystem::measure::pressure, maxBE) } + : std::nullopt; + } + + std::optional + minimumTimestepSize(const std::vector& doubhead, + const Opm::UnitSystem& usys) + { + const auto minTStep = doubhead[VI::doubhead::Netbalstepsz]; + + return (minTStep != VI::DoubHeadValue::NetBalMinTSDefault) + ? std::optional{ usys.to_si(Opm::UnitSystem::measure::time, minTStep) } + : std::nullopt; + } +} + +Opm::RestartIO::RstNetbalan::RstNetbalan(const std::vector& intehead, + const std::vector& doubhead, + const UnitSystem& usys) + : calc_interval_ (calcInterval(doubhead, usys)) + , ptol_ (pressureToleranceValue(doubhead, usys)) + , pressure_max_iter_ (maxBalanceIter(intehead)) + , thp_tolerance_ (thpToleranceValue(doubhead, usys)) + , thp_max_iter_ (maxTHPIter(intehead)) + , target_branch_balance_error_(targetBranchBalanceError(doubhead, usys)) + , max_branch_balance_error_ (maxBranchBalanceError(doubhead, usys)) + , min_tstep_ (minimumTimestepSize(doubhead, usys)) +{} diff --git a/src/opm/io/eclipse/rst/state.cpp b/src/opm/io/eclipse/rst/state.cpp index c3e944bf9..52335d9c1 100644 --- a/src/opm/io/eclipse/rst/state.cpp +++ b/src/opm/io/eclipse/rst/state.cpp @@ -86,6 +86,7 @@ RstState::RstState(std::shared_ptr rstView, : unit_system(rstView->intehead()[VI::intehead::UNIT]) , header(runspec, unit_system, rstView->intehead(), rstView->logihead(), rstView->doubhead()) , aquifers(rstView, grid, unit_system) + , netbalan(rstView->intehead(), rstView->doubhead(), unit_system) , network(rstView, unit_system) { this->load_tuning(rstView->intehead(), rstView->doubhead()); diff --git a/tests/test_rst_netbalan.cpp b/tests/test_rst_netbalan.cpp new file mode 100644 index 000000000..2c23c9495 --- /dev/null +++ b/tests/test_rst_netbalan.cpp @@ -0,0 +1,320 @@ +/* + Copyright 2022 Equinor ASA + + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#define BOOST_TEST_MODULE test_rst_netbalan + +#include + +#include + +#include +#include + +#include + +#include +#include + +#include +#include +#include + +using NBDims = Opm::RestartIO::InteHEAD::NetBalanceDims; +using NBParams = Opm::RestartIO::DoubHEAD::NetBalanceParams; + +namespace { + Opm::RestartIO::RstNetbalan restart(const NBDims& dims, const NBParams& params) + { + const auto intehead = Opm::RestartIO::InteHEAD{}.netBalanceData(dims).data(); + const auto doubhead = Opm::RestartIO::DoubHEAD{}.netBalParams(params).data(); + + return Opm::RestartIO::RstNetbalan { + intehead, doubhead, Opm::UnitSystem::newMETRIC() + }; + } + + NBDims defaultDims() + { + return { 0, 10 }; + } + + NBParams defaultParams() + { + return NBParams { Opm::UnitSystem::newMETRIC() }; + } + + NBParams norneParams() + { + // Using + // + // NETBALAN + // 0.0 0.2 6* / + // + // as defined in the NORNE_ATW2013.DATA simulation model (opm-tests). + + auto params = NBParams { Opm::UnitSystem::newMETRIC() }; + + params.convTolNodPres = 0.2; // (barsa) + + return params; + } + + NBDims iotaDims() + { + // Using synthetic + // + // NETBALAN + // 1.0 2.0 3 4.0 5 6.0 7.0 8.0 / + + return { 3, 5 }; + } + + NBParams iotaParams() + { + // Using synthetic + // + // NETBALAN + // 1.0 2.0 3 4.0 5 6.0 7.0 8.0 / + + auto params = NBParams { Opm::UnitSystem::newMETRIC() }; + + params.balancingInterval = 1.0; + params.convTolNodPres = 2.0; + params.convTolTHPCalc = 4.0; + params.targBranchBalError = 6.0; + params.maxBranchBalError = 7.0; + params.minTimeStepSize = 8.0; + + return params; + } + + NBParams nupcolParams() + { + auto params = NBParams { Opm::UnitSystem::newMETRIC() }; + + params.balancingInterval = -1.0; + + return params; + } +} // namespace + +// =========================================================================== + +BOOST_AUTO_TEST_SUITE(Restart) + +BOOST_AUTO_TEST_CASE(No_Active_Network) +{ + const auto netbalan = restart(defaultDims(), defaultParams()); + + BOOST_CHECK_CLOSE(netbalan.interval(), 0.0, 1.0e-7); + BOOST_CHECK_CLOSE(netbalan.pressureTolerance(), 0.0*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.pressureMaxIter(), std::size_t{0}); + BOOST_CHECK_CLOSE(netbalan.thpTolerance(), 0.01*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.thpMaxIter(), std::size_t{10}); + + BOOST_CHECK_MESSAGE(! netbalan.targetBalanceError().has_value(), + "Inactive network must not have branch " + "target balance error at restart"); + + BOOST_CHECK_MESSAGE(! netbalan.maxBalanceError().has_value(), + "Inactive network must not have maximum " + "balance error tolerance at restart"); + + BOOST_CHECK_MESSAGE(! netbalan.minTstep().has_value(), + "Inactive network must not have a minimum " + "timestep value at restart"); +} + +BOOST_AUTO_TEST_CASE(Norne) +{ + // Using + // + // NETBALAN + // 0.0 0.2 6* / + // + // as defined in the NORNE_ATW2013.DATA simulation model (opm-tests) + + const auto netbalan = restart(defaultDims(), norneParams()); + + BOOST_CHECK_CLOSE(netbalan.interval(), 0.0, 1.0e-7); + BOOST_CHECK_CLOSE(netbalan.pressureTolerance(), 0.2*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.pressureMaxIter(), std::size_t{0}); + BOOST_CHECK_CLOSE(netbalan.thpTolerance(), 0.01*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.thpMaxIter(), std::size_t{10}); + + BOOST_CHECK_MESSAGE(! netbalan.targetBalanceError().has_value(), + "Norne network must not have branch " + "target balance error at restart"); + + BOOST_CHECK_MESSAGE(! netbalan.maxBalanceError().has_value(), + "Norne network must not have maximum " + "balance error tolerance at restart"); + + BOOST_CHECK_MESSAGE(! netbalan.minTstep().has_value(), + "Norne network must not have a minimum " + "timestep value at restart"); +} + +BOOST_AUTO_TEST_CASE(Iota) +{ + const auto netbalan = restart(iotaDims(), iotaParams()); + + BOOST_CHECK_CLOSE(netbalan.interval(), 1.0*Opm::unit::day, 1.0e-7); + BOOST_CHECK_CLOSE(netbalan.pressureTolerance(), 2.0*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.pressureMaxIter(), std::size_t{3}); + BOOST_CHECK_CLOSE(netbalan.thpTolerance(), 4.0*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.thpMaxIter(), std::size_t{5}); + + BOOST_CHECK_MESSAGE(netbalan.targetBalanceError().has_value(), + "IOTA network must have branch " + "target balance error at restart"); + + BOOST_CHECK_CLOSE(netbalan.targetBalanceError().value(), 6.0*Opm::unit::barsa, 1.0e-7); + + BOOST_CHECK_MESSAGE(netbalan.maxBalanceError().has_value(), + "IOTA network must have maximum " + "balance error tolerance at restart"); + + BOOST_CHECK_CLOSE(netbalan.maxBalanceError().value(), 7.0*Opm::unit::barsa, 1.0e-7); + + BOOST_CHECK_MESSAGE(netbalan.minTstep().has_value(), + "IOTA network must have a minimum " + "timestep value at restart"); + + BOOST_CHECK_CLOSE(netbalan.minTstep().value(), 8.0*Opm::unit::day, 1.0e-7); +} + +BOOST_AUTO_TEST_CASE(Nupcol) +{ + const auto netbalan = restart(defaultDims(), nupcolParams()); + + BOOST_CHECK_CLOSE(netbalan.interval(), -1.0*Opm::unit::day, 1.0e-7); +} + +BOOST_AUTO_TEST_SUITE_END() // Restart + +// --------------------------------------------------------------------------- + +BOOST_AUTO_TEST_SUITE(Balance_Object) + +BOOST_AUTO_TEST_CASE(No_Active_Network) +{ + const auto netbalan = Opm::Network::Balance { + restart(defaultDims(), defaultParams()) + }; + + BOOST_CHECK_MESSAGE(netbalan.mode() == Opm::Network::Balance::CalcMode::TimeStepStart, + "Inactive network must have \"TimeStepStart\" " + "NETBALAN calculation mode"); + + BOOST_CHECK_CLOSE(netbalan.interval(), 0.0, 1.0e-7); + BOOST_CHECK_CLOSE(netbalan.pressure_tolerance(), 0.0, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.pressure_max_iter(), std::size_t{0}); + BOOST_CHECK_CLOSE(netbalan.thp_tolerance(), 0.01*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.thp_max_iter(), std::size_t{10}); + + BOOST_CHECK_MESSAGE(! netbalan.target_balance_error().has_value(), + "Inactive network must not have branch " + "target balance error at restart"); + + BOOST_CHECK_MESSAGE(! netbalan.max_balance_error().has_value(), + "Inactive network must not have maximum " + "balance error tolerance at restart"); + + BOOST_CHECK_MESSAGE(! netbalan.min_tstep().has_value(), + "Inactive network must not have a minimum " + "timestep value at restart"); +} + +BOOST_AUTO_TEST_CASE(Norne) +{ + const auto netbalan = Opm::Network::Balance { + restart(defaultDims(), norneParams()) + }; + + BOOST_CHECK_MESSAGE(netbalan.mode() == Opm::Network::Balance::CalcMode::TimeStepStart, + "Norne network must have \"TimeStepStart\" " + "NETBALAN calculation mode"); + + BOOST_CHECK_CLOSE(netbalan.interval(), 0.0, 1.0e-7); + BOOST_CHECK_CLOSE(netbalan.pressure_tolerance(), 0.2*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.pressure_max_iter(), std::size_t{0}); + BOOST_CHECK_CLOSE(netbalan.thp_tolerance(), 0.01*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.thp_max_iter(), std::size_t{10}); + + BOOST_CHECK_MESSAGE(! netbalan.target_balance_error().has_value(), + "Norne network must not have branch " + "target balance error at restart"); + + BOOST_CHECK_MESSAGE(! netbalan.max_balance_error().has_value(), + "Norne network must not have maximum " + "balance error tolerance at restart"); + + BOOST_CHECK_MESSAGE(! netbalan.min_tstep().has_value(), + "Norne network must not have a minimum " + "timestep value at restart"); +} + +BOOST_AUTO_TEST_CASE(Iota) +{ + const auto netbalan = Opm::Network::Balance { + restart(iotaDims(), iotaParams()) + }; + + BOOST_CHECK_MESSAGE(netbalan.mode() == Opm::Network::Balance::CalcMode::TimeInterval, + "IOTA network must have \"TimeInterval\" " + "NETBALAN calculation mode"); + + BOOST_CHECK_CLOSE(netbalan.interval(), 1.0*Opm::unit::day, 1.0e-7); + BOOST_CHECK_CLOSE(netbalan.pressure_tolerance(), 2.0*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.pressure_max_iter(), std::size_t{3}); + BOOST_CHECK_CLOSE(netbalan.thp_tolerance(), 4.0*Opm::unit::barsa, 1.0e-7); + BOOST_CHECK_EQUAL(netbalan.thp_max_iter(), std::size_t{5}); + + BOOST_CHECK_MESSAGE(netbalan.target_balance_error().has_value(), + "IOTA network must have branch " + "target balance error at restart"); + + BOOST_CHECK_CLOSE(netbalan.target_balance_error().value(), 6.0*Opm::unit::barsa, 1.0e-7); + + BOOST_CHECK_MESSAGE(netbalan.max_balance_error().has_value(), + "IOTA network must have maximum " + "balance error tolerance at restart"); + + BOOST_CHECK_CLOSE(netbalan.max_balance_error().value(), 7.0*Opm::unit::barsa, 1.0e-7); + + BOOST_CHECK_MESSAGE(netbalan.min_tstep().has_value(), + "IOTA network must have a minimum " + "timestep value at restart"); + + BOOST_CHECK_CLOSE(netbalan.min_tstep().value(), 8.0*Opm::unit::day, 1.0e-7); +} + +BOOST_AUTO_TEST_CASE(Nupcol) +{ + const auto netbalan = Opm::Network::Balance { + restart(defaultDims(), nupcolParams()) + }; + + BOOST_CHECK_MESSAGE(netbalan.mode() == Opm::Network::Balance::CalcMode::NUPCOL, + "NUPCOL network must have \"NUPCOL\" " + "NETBALAN calculation mode"); +} + +BOOST_AUTO_TEST_SUITE_END() // Balance_Object