fixed naming conventions, messages and comments

This commit is contained in:
Franz G. Fuchs 2019-01-21 08:26:28 +01:00
parent 26bc063a0c
commit 7f1df40b74
9 changed files with 34 additions and 35 deletions

View File

@ -939,10 +939,9 @@ namespace Opm {
BlackoilWellModel<TypeTag>::
updateWellControls()
{
// Even if there no wells active locally, we cannot
// return as the Destructor of the DeferredLogger
// uses global communication. For no well active globally
// we simply return.
// Even if there are no wells active locally, we cannot
// return as the DeferredLogger uses global communication.
// For no well active globally we simply return.
if( !wellsActive() ) return ;
Opm::DeferredLogger local_deferredLogger;

View File

@ -352,7 +352,7 @@ namespace Opm
virtual void wellTestingPhysical(Simulator& simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger) override;
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) override;
virtual void updateWaterThroughput(const double dt, WellState& well_state) const override;
};

View File

@ -1897,7 +1897,7 @@ namespace Opm
MultisegmentWell<TypeTag>::
wellTestingPhysical(Simulator& simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger)
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger)
{
const std::string msg = "Support of well testing for physical limits for multisegment wells is not "
"implemented yet, wellTestingPhysical() for " + name() + " will do nothing";

View File

@ -414,7 +414,7 @@ namespace Opm
virtual void wellTestingPhysical(Simulator& simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger) override;
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) override;
virtual void updateWaterThroughput(const double dt, WellState& well_state) const override;
};

View File

@ -419,7 +419,7 @@ namespace Opm
virtual void wellTestingPhysical(Simulator& simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger) override;
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) override;
// calculate the skin pressure based on water velocity, throughput and polymer concentration.
// throughput is used to describe the formation damage during water/polymer injection.

View File

@ -2868,7 +2868,7 @@ namespace Opm
StandardWellV<TypeTag>::
wellTestingPhysical(Simulator& ebos_simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger)
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger)
{
OpmLog::debug(" well " + name() + " is being tested for physical limits");
@ -2903,7 +2903,7 @@ namespace Opm
updatePrimaryVariables(well_state_copy);
initPrimaryVariablesEvaluation();
const bool converged = this->solveWellEqUntilConverged(ebos_simulator, B_avg, well_state_copy, deferredLogger);
const bool converged = this->solveWellEqUntilConverged(ebos_simulator, B_avg, well_state_copy, deferred_logger);
if (!converged) {
const std::string msg = " well " + name() + " did not get converged during well testing for physical reason";

View File

@ -2748,7 +2748,7 @@ namespace Opm
StandardWell<TypeTag>::
wellTestingPhysical(Simulator& ebos_simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger)
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger)
{
OpmLog::debug(" well " + name() + " is being tested for physical limits");
@ -2783,7 +2783,7 @@ namespace Opm
updatePrimaryVariables(well_state_copy);
initPrimaryVariablesEvaluation();
const bool converged = this->solveWellEqUntilConverged(ebos_simulator, B_avg, well_state_copy, deferredLogger);
const bool converged = this->solveWellEqUntilConverged(ebos_simulator, B_avg, well_state_copy, deferred_logger);
if (!converged) {
const std::string msg = " well " + name() + " did not get converged during well testing for physical reason";

View File

@ -183,7 +183,7 @@ namespace Opm
void updateWellControl(/* const */ Simulator& ebos_simulator,
WellState& well_state,
Opm::DeferredLogger& deferredLogger) /* const */;
Opm::DeferredLogger& deferred_logger) /* const */;
virtual void updatePrimaryVariables(const WellState& well_state) const = 0;
@ -229,7 +229,7 @@ namespace Opm
const double simulation_time, const int report_step,
const WellTestConfig::Reason testing_reason,
/* const */ WellState& well_state, WellTestState& welltest_state,
Opm::DeferredLogger& deferredLogger);
Opm::DeferredLogger& deferred_logger);
void updatePerforatedCell(std::vector<bool>& is_cell_perforated);
@ -375,11 +375,11 @@ namespace Opm
void wellTestingEconomic(Simulator& simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
const WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger);
const WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger);
virtual void wellTestingPhysical(Simulator& simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger) = 0;
WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger) = 0;
void updateWellTestStateEconomic(const WellState& well_state,
const double simulation_time,
@ -393,12 +393,12 @@ namespace Opm
void solveWellForTesting(Simulator& ebosSimulator, WellState& well_state,
const std::vector<double>& B_avg,
Opm::DeferredLogger& deferredLogger);
Opm::DeferredLogger& deferred_logger);
bool solveWellEqUntilConverged(Simulator& ebosSimulator,
const std::vector<double>& B_avg,
WellState& well_state,
Opm::DeferredLogger& deferredLogger);
Opm::DeferredLogger& deferred_logger);
void scaleProductivityIndex(const int perfIdx, double& productivity_index);

View File

@ -431,7 +431,7 @@ namespace Opm
WellInterface<TypeTag>::
updateWellControl(/* const */ Simulator& ebos_simulator,
WellState& well_state,
Opm::DeferredLogger& deferredLogger) /* const */
Opm::DeferredLogger& deferred_logger) /* const */
{
auto cc = Dune::MPIHelper::getCollectiveCommunication();
const int np = number_of_phases_;
@ -472,11 +472,11 @@ namespace Opm
} else {
// before we figure out to handle it, we give some debug information here
if ( well_controls_iget_type(wc, ctrl_index) == BHP && !operability_status_.isOperableUnderBHPLimit() ) {
OpmLog::debug("well " + name() + " breaks the BHP limit, while it is not operable under BHP limit");
deferred_logger.debug("well " + name() + " breaks the BHP limit, while it is not operable under BHP limit");
}
if ( well_controls_iget_type(wc, ctrl_index) == THP && !operability_status_.isOperableUnderTHPLimit() ) {
OpmLog::debug("well " + name() + " breaks the THP limit, while it is not operable under THP limit");
deferred_logger.debug("well " + name() + " breaks the THP limit, while it is not operable under THP limit");
}
}
}
@ -501,10 +501,10 @@ namespace Opm
ss << " Switching control mode for well " << name()
<< " from " << modestring[from]
<< " to " << modestring[to];
if (cc.size()>1) {
if (cc.size() > 1) {
ss << " on rank " << cc.rank();
}
deferredLogger.info(ss.str());
deferred_logger.info(ss.str());
}
if (updated_control_index != old_control_index) { // || well_collection_->groupControlActive()) {
@ -937,16 +937,16 @@ namespace Opm
const WellTestConfig::Reason testing_reason,
/* const */ WellState& well_state,
WellTestState& well_test_state,
Opm::DeferredLogger& deferredLogger)
Opm::DeferredLogger& deferred_logger)
{
if (testing_reason == WellTestConfig::Reason::PHYSICAL) {
wellTestingPhysical(simulator, B_avg, simulation_time, report_step,
well_state, well_test_state, deferredLogger);
well_state, well_test_state, deferred_logger);
}
if (testing_reason == WellTestConfig::Reason::ECONOMIC) {
wellTestingEconomic(simulator, B_avg, simulation_time, report_step,
well_state, well_test_state, deferredLogger);
well_state, well_test_state, deferred_logger);
}
}
@ -959,9 +959,9 @@ namespace Opm
WellInterface<TypeTag>::
wellTestingEconomic(Simulator& simulator, const std::vector<double>& B_avg,
const double simulation_time, const int report_step,
const WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferredLogger)
const WellState& well_state, WellTestState& welltest_state, Opm::DeferredLogger& deferred_logger)
{
OpmLog::debug(" well " + name() + " is being tested for economic limits");
deferred_logger.debug(" well " + name() + " is being tested for economic limits");
WellState well_state_copy = well_state;
@ -977,7 +977,7 @@ namespace Opm
// untill the number of closed completions do not increase anymore.
while (testWell) {
const size_t original_number_closed_completions = welltest_state_temp.sizeCompletions();
solveWellForTesting(simulator, well_state_copy, B_avg, deferredLogger);
solveWellForTesting(simulator, well_state_copy, B_avg, deferred_logger);
updateWellTestState(well_state_copy, simulation_time, /*writeMessageToOPMLog=*/ false, welltest_state_temp);
closeCompletions(welltest_state_temp);
@ -1165,7 +1165,7 @@ namespace Opm
solveWellEqUntilConverged(Simulator& ebosSimulator,
const std::vector<double>& B_avg,
WellState& well_state,
Opm::DeferredLogger& deferredLogger)
Opm::DeferredLogger& deferred_logger)
{
const int max_iter = param_.max_welleq_iter_;
int it = 0;
@ -1184,7 +1184,7 @@ namespace Opm
++it;
solveEqAndUpdateWellState(well_state);
updateWellControl(ebosSimulator, well_state, deferredLogger);
updateWellControl(ebosSimulator, well_state, deferred_logger);
initPrimaryVariablesEvaluation();
} while (it < max_iter);
@ -1235,16 +1235,16 @@ namespace Opm
WellInterface<TypeTag>::
solveWellForTesting(Simulator& ebosSimulator, WellState& well_state,
const std::vector<double>& B_avg,
Opm::DeferredLogger& deferredLogger)
Opm::DeferredLogger& deferred_logger)
{
// keep a copy of the original well state
const WellState well_state0 = well_state;
const bool converged = solveWellEqUntilConverged(ebosSimulator, B_avg, well_state, deferredLogger);
const bool converged = solveWellEqUntilConverged(ebosSimulator, B_avg, well_state, deferred_logger);
if (converged) {
OpmLog::debug("WellTest: Well equation for well " + name() + " solution gets converged");
deferred_logger.debug("WellTest: Well equation for well " + name() + " converged");
} else {
const int max_iter = param_.max_welleq_iter_;
OpmLog::debug("WellTest: Well equation for well" +name() + " solution failed in getting converged with "
deferred_logger.debug("WellTest: Well equation for well " +name() + " failed converging in "
+ std::to_string(max_iter) + " iterations");
well_state = well_state0;
}