typo correction and message output adjustment for WTEST

recovering the const for updateWellStateWithTarget

there is no functional change.
This commit is contained in:
Kai Bao 2018-11-23 13:11:48 +01:00
parent 680c45b8f8
commit 3dac7266b0
7 changed files with 16 additions and 16 deletions

View File

@ -324,8 +324,6 @@ namespace Opm {
for (const auto& testWell : wellsForTesting) {
const std::string& well_name = testWell.first;
const std::string msg = std::string("well ") + well_name + std::string(" is tested");
OpmLog::info(msg);
// this is the well we will test
WellInterfacePtr well = createWellForWellTest(well_name, timeStepIdx);

View File

@ -117,8 +117,8 @@ namespace Opm
WellState& well_state) override;
/// updating the well state based the current control mode
virtual void updateWellStateWithTarget(/* const */ Simulator& ebos_simulator,
WellState& well_state) /* const */ override;
virtual void updateWellStateWithTarget(const Simulator& ebos_simulator,
WellState& well_state) const override;
/// check whether the well equations get converged for this well
virtual ConvergenceReport getWellConvergence(const std::vector<double>& B_avg) const override;

View File

@ -252,8 +252,8 @@ namespace Opm
template <typename TypeTag>
void
MultisegmentWell<TypeTag>::
updateWellStateWithTarget(/* const */ Simulator& ebos_simulator,
WellState& well_state) /* const */
updateWellStateWithTarget(const Simulator& ebos_simulator,
WellState& well_state) const
{
// Updating well state bas on well control
// Target values are used as initial conditions for BHP, THP, and SURFACE_RATE

View File

@ -139,8 +139,8 @@ namespace Opm
const double dt,
WellState& well_state) override;
virtual void updateWellStateWithTarget(/* const */ Simulator& ebos_simulator,
WellState& well_state) /* const */ override;
virtual void updateWellStateWithTarget(const Simulator& ebos_simulator,
WellState& well_state) const override;
/// check whether the well equations get converged for this well
virtual ConvergenceReport getWellConvergence(const std::vector<double>& B_avg) const override;

View File

@ -1088,8 +1088,8 @@ namespace Opm
template<typename TypeTag>
void
StandardWell<TypeTag>::
updateWellStateWithTarget(/* const */ Simulator& ebos_simulator,
WellState& well_state) /* const */
updateWellStateWithTarget(const Simulator& ebos_simulator,
WellState& well_state) const
{
// number of phases
const int np = number_of_phases_;
@ -1337,7 +1337,7 @@ namespace Opm
// checking whether the well can operate under the THP constraints.
if (this->wellHasTHPConstraints()) {
this->operability_status_.has_thp_constaint = true;
this->operability_status_.has_thp_constraint = true;
checkOperabilityUnderTHPLimitProducer(ebos_simulator);
this->operability_status_.can_produce_inject_with_current_bhp =
canProduceInjectWithCurrentBhp(ebos_simulator, well_state);

View File

@ -172,8 +172,8 @@ namespace Opm
const WellState& well_state,
std::vector<double>& well_potentials) = 0;
virtual void updateWellStateWithTarget(/* const */ Simulator& ebos_simulator,
WellState& well_state) /* const */ = 0;
virtual void updateWellStateWithTarget(const Simulator& ebos_simulator,
WellState& well_state) const = 0;
void updateWellControl(/* const */ Simulator& ebos_simulator,
WellState& well_state,
@ -403,7 +403,7 @@ namespace Opm
return false;
} else {
return ( (isOperableUnderBHPLimit() || isOperableUnderTHPLimit()) &&
!(has_thp_constaint && !can_produce_inject_with_current_bhp) );
!(has_thp_constraint && !can_produce_inject_with_current_bhp) );
}
}
@ -421,7 +421,7 @@ namespace Opm
can_obtain_bhp_with_thp_limit = true;
obey_bhp_limit_with_thp_limit = true;
can_produce_inject_with_current_bhp = true;
has_thp_constaint = false;
has_thp_constraint = false;
}
// whether the well can be operated under bhp limit
@ -443,7 +443,7 @@ namespace Opm
// it might be updated with other criterion with investigation with more cases.
bool can_produce_inject_with_current_bhp = true;
// whether the well has a THP constraint
bool has_thp_constaint = false;
bool has_thp_constraint = false;
};
}

View File

@ -949,6 +949,8 @@ namespace Opm
const double simulation_time, const int report_step, const bool terminal_output,
const WellState& well_state, WellTestState& welltest_state)
{
OpmLog::debug(" well " + name() + " is being tested for economic limits");
WellState well_state_copy = well_state;
updatePrimaryVariables(well_state_copy);