From 82eafbb5100b708c0ffad14b7245212aa7a37423 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 18 Nov 2014 08:32:55 +0100 Subject: [PATCH] Renaming well is shut to well is stopped. Rename the the meaning for shut as whats used in Eclipse. STOP: Well stopped off above the formation. I.e. allow for flow in the well. SHUT: Well completely isolated from the formation. The well is removed from the well list. --- opm/core/pressure/tpfa/cfs_tpfa_residual.c | 2 +- opm/core/pressure/tpfa/ifs_tpfa.c | 2 +- opm/core/simulator/WellState.hpp | 2 +- opm/core/well_controls.h | 4 ++-- opm/core/wells/WellsGroup.cpp | 2 +- opm/core/wells/WellsManager.cpp | 2 +- opm/core/wells/well_controls.c | 6 +++--- tests/test_stoppedwells.cpp | 2 +- tests/test_wellcontrols.cpp | 8 ++++---- tests/test_wellsmanager.cpp | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/opm/core/pressure/tpfa/cfs_tpfa_residual.c b/opm/core/pressure/tpfa/cfs_tpfa_residual.c index b773408f5..0d2096119 100644 --- a/opm/core/pressure/tpfa/cfs_tpfa_residual.c +++ b/opm/core/pressure/tpfa/cfs_tpfa_residual.c @@ -869,7 +869,7 @@ assemble_completion_to_well(int i, int w, int c, int nc, int np, W = wells->W; ctrl = W->ctrls[ w ]; - if (well_controls_well_is_shut( ctrl )) { + if (well_controls_well_is_stopped( ctrl )) { /* Interpreting a negative current control index to mean a shut well */ welleq_coeff_shut(np, h, &res, &w2c, &w2w); } diff --git a/opm/core/pressure/tpfa/ifs_tpfa.c b/opm/core/pressure/tpfa/ifs_tpfa.c index a9e2ce73c..724c5b958 100644 --- a/opm/core/pressure/tpfa/ifs_tpfa.c +++ b/opm/core/pressure/tpfa/ifs_tpfa.c @@ -363,7 +363,7 @@ assemble_well_contrib(int nc , for (w = 0; w < W->number_of_wells; w++) { ctrls = W->ctrls[ w ]; - if (well_controls_well_is_shut(ctrls) ) { + if (well_controls_well_is_stopped(ctrls) ) { /* Treat this well as a shut well, isolated from the domain. */ diff --git a/opm/core/simulator/WellState.hpp b/opm/core/simulator/WellState.hpp index 02fa09f00..9e67a7d66 100644 --- a/opm/core/simulator/WellState.hpp +++ b/opm/core/simulator/WellState.hpp @@ -49,7 +49,7 @@ namespace Opm for (int w = 0; w < nw; ++w) { assert((wells->type[w] == INJECTOR) || (wells->type[w] == PRODUCER)); const WellControls* ctrl = wells->ctrls[w]; - if (well_controls_well_is_shut(ctrl)) { + if (well_controls_well_is_stopped(ctrl)) { // Shut well: // 1. Assign zero well rates. for (int p = 0; p < np; ++p) { diff --git a/opm/core/well_controls.h b/opm/core/well_controls.h index 83817bd57..1dd7c0233 100644 --- a/opm/core/well_controls.h +++ b/opm/core/well_controls.h @@ -70,7 +70,7 @@ well_controls_set_current( struct WellControls * ctrl, int current); bool -well_controls_well_is_shut(const struct WellControls * ctrl); +well_controls_well_is_stopped(const struct WellControls * ctrl); bool well_controls_well_is_open(const struct WellControls * ctrl); @@ -79,7 +79,7 @@ void well_controls_open_well( struct WellControls * ctrl); void -well_controls_shut_well( struct WellControls * ctrl); +well_controls_stop_well( struct WellControls * ctrl); int well_controls_add_new(enum WellControlType type , double target , const double * distr , struct WellControls * ctrl); diff --git a/opm/core/wells/WellsGroup.cpp b/opm/core/wells/WellsGroup.cpp index 51a1f4f51..54cb4b83e 100644 --- a/opm/core/wells/WellsGroup.cpp +++ b/opm/core/wells/WellsGroup.cpp @@ -747,7 +747,7 @@ namespace Opm void WellNode::shutWell() { if (shut_well_) { - well_controls_shut_well( wells_->ctrls[self_index_]); + well_controls_stop_well( wells_->ctrls[self_index_]); } else { const double target = 0.0; diff --git a/opm/core/wells/WellsManager.cpp b/opm/core/wells/WellsManager.cpp index 72fb3a14a..79ac6612d 100644 --- a/opm/core/wells/WellsManager.cpp +++ b/opm/core/wells/WellsManager.cpp @@ -414,7 +414,7 @@ namespace Opm if (well->getStatus(timeStep) == WellCommon::STOP) { // STOPed wells are added to the well list with the given controll and closed. - well_controls_shut_well(w_->ctrls[well_index]); + well_controls_stop_well(w_->ctrls[well_index]); } if (well->getStatus(timeStep) == WellCommon::SHUT) { diff --git a/opm/core/wells/well_controls.c b/opm/core/wells/well_controls.c index 1ce6679e7..7a9acfcec 100644 --- a/opm/core/wells/well_controls.c +++ b/opm/core/wells/well_controls.c @@ -228,7 +228,7 @@ well_controls_clone(const struct WellControls *ctrl) well_controls_open_well(new); } else { - well_controls_shut_well(new); + well_controls_stop_well(new); } } } @@ -254,7 +254,7 @@ well_controls_set_current( struct WellControls * ctrl, int current) { ctrl->current = current; } -bool well_controls_well_is_shut(const struct WellControls * ctrl) { +bool well_controls_well_is_stopped(const struct WellControls * ctrl) { return !ctrl->well_is_open; } @@ -266,7 +266,7 @@ void well_controls_open_well( struct WellControls * ctrl) { ctrl->well_is_open = true; } -void well_controls_shut_well( struct WellControls * ctrl) { +void well_controls_stop_well( struct WellControls * ctrl) { ctrl->well_is_open = false; } diff --git a/tests/test_stoppedwells.cpp b/tests/test_stoppedwells.cpp index 5eee914e5..97393f663 100644 --- a/tests/test_stoppedwells.cpp +++ b/tests/test_stoppedwells.cpp @@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells) const Wells* wells = wellsManager.c_wells(); const struct WellControls* ctrls0 = wells->ctrls[0]; const struct WellControls* ctrls1 = wells->ctrls[1]; - BOOST_CHECK(well_controls_well_is_shut(ctrls0)); // injector is stopped + BOOST_CHECK(well_controls_well_is_stopped(ctrls0)); // injector is stopped BOOST_CHECK(well_controls_well_is_open(ctrls1)); WellState wellstate; diff --git a/tests/test_wellcontrols.cpp b/tests/test_wellcontrols.cpp index c5b1f9466..27f989b1d 100644 --- a/tests/test_wellcontrols.cpp +++ b/tests/test_wellcontrols.cpp @@ -103,15 +103,15 @@ BOOST_AUTO_TEST_CASE(OpenClose) struct WellControls * ctrls = well_controls_create(); BOOST_CHECK_EQUAL( true , well_controls_well_is_open(ctrls) ); - BOOST_CHECK_EQUAL( false , well_controls_well_is_shut(ctrls) ); + BOOST_CHECK_EQUAL( false , well_controls_well_is_stopped(ctrls) ); well_controls_open_well( ctrls ); BOOST_CHECK_EQUAL( true , well_controls_well_is_open(ctrls) ); - BOOST_CHECK_EQUAL( false , well_controls_well_is_shut(ctrls) ); + BOOST_CHECK_EQUAL( false , well_controls_well_is_stopped(ctrls) ); - well_controls_shut_well( ctrls ); + well_controls_stop_well( ctrls ); BOOST_CHECK_EQUAL( false , well_controls_well_is_open(ctrls) ); - BOOST_CHECK_EQUAL( true , well_controls_well_is_shut(ctrls) ); + BOOST_CHECK_EQUAL( true , well_controls_well_is_stopped(ctrls) ); well_controls_destroy( ctrls ); } diff --git a/tests/test_wellsmanager.cpp b/tests/test_wellsmanager.cpp index cba21f34e..c6239259c 100644 --- a/tests/test_wellsmanager.cpp +++ b/tests/test_wellsmanager.cpp @@ -294,6 +294,6 @@ BOOST_AUTO_TEST_CASE(WellSTOPOK) { const struct WellControls* ctrls0 = wells->ctrls[0]; const struct WellControls* ctrls1 = wells->ctrls[1]; - BOOST_CHECK(well_controls_well_is_shut(ctrls0)); // The first well is closed + BOOST_CHECK(well_controls_well_is_stopped(ctrls0)); // The first well is closed BOOST_CHECK(well_controls_well_is_open(ctrls1)); // The second well is open }