mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Resetting WINJMULT dampening factors before fixed BHP calculations
This commit is contained in:
@@ -394,6 +394,8 @@ namespace Opm
|
|||||||
// creating a copy of the well itself, to avoid messing up the explicit information
|
// creating a copy of the well itself, to avoid messing up the explicit information
|
||||||
// during this copy, the only information not copied properly is the well controls
|
// during this copy, the only information not copied properly is the well controls
|
||||||
MultisegmentWell<TypeTag> well_copy(*this);
|
MultisegmentWell<TypeTag> well_copy(*this);
|
||||||
|
well_copy.resetDampening();
|
||||||
|
|
||||||
well_copy.debug_cost_counter_ = 0;
|
well_copy.debug_cost_counter_ = 0;
|
||||||
|
|
||||||
// store a copy of the well state, we don't want to update the real well state
|
// store a copy of the well state, we don't want to update the real well state
|
||||||
|
|||||||
@@ -1522,6 +1522,7 @@ namespace Opm
|
|||||||
// creating a copy of the well itself, to avoid messing up the explicit information
|
// creating a copy of the well itself, to avoid messing up the explicit information
|
||||||
// during this copy, the only information not copied properly is the well controls
|
// during this copy, the only information not copied properly is the well controls
|
||||||
StandardWell<TypeTag> well_copy(*this);
|
StandardWell<TypeTag> well_copy(*this);
|
||||||
|
well_copy.resetDampening();
|
||||||
|
|
||||||
// iterate to get a more accurate well density
|
// iterate to get a more accurate well density
|
||||||
// create a copy of the well_state to use. If the operability checking is sucessful, we use this one
|
// create a copy of the well_state to use. If the operability checking is sucessful, we use this one
|
||||||
|
|||||||
@@ -256,8 +256,6 @@ getInjMult(const int perf,
|
|||||||
Scalar multiplier = 1.;
|
Scalar multiplier = 1.;
|
||||||
|
|
||||||
const auto perf_ecl_index = this->perforationData()[perf].ecl_index;
|
const auto perf_ecl_index = this->perforationData()[perf].ecl_index;
|
||||||
|
|
||||||
|
|
||||||
const bool is_wrev = this->well_ecl_.getInjMultMode() == Well::InjMultMode::WREV;
|
const bool is_wrev = this->well_ecl_.getInjMultMode() == Well::InjMultMode::WREV;
|
||||||
|
|
||||||
const bool active_injmult = (is_wrev && this->well_ecl_.aciveWellInjMult()) ||
|
const bool active_injmult = (is_wrev && this->well_ecl_.aciveWellInjMult()) ||
|
||||||
@@ -277,8 +275,7 @@ getInjMult(const int perf,
|
|||||||
const Scalar prev_multiplier = this->inj_multiplier_[perf_ecl_index] > 0 ? this->inj_multiplier_[perf_ecl_index] : 1.0;
|
const Scalar prev_multiplier = this->inj_multiplier_[perf_ecl_index] > 0 ? this->inj_multiplier_[perf_ecl_index] : 1.0;
|
||||||
if (std::abs(multiplier - prev_multiplier) > osc_threshold) {
|
if (std::abs(multiplier - prev_multiplier) > osc_threshold) {
|
||||||
const Scalar prev2_multiplier = this->inj_multiplier_previter_[perf_ecl_index] > 0 ? this->inj_multiplier_previter_[perf_ecl_index] : 1.0;
|
const Scalar prev2_multiplier = this->inj_multiplier_previter_[perf_ecl_index] > 0 ? this->inj_multiplier_previter_[perf_ecl_index] : 1.0;
|
||||||
const bool oscillating = (multiplier > prev_multiplier && prev_multiplier < prev2_multiplier) ||
|
const bool oscillating = (multiplier - prev_multiplier) * (prev_multiplier - prev2_multiplier) < 0;
|
||||||
(multiplier < prev_multiplier && prev_multiplier > prev2_multiplier);
|
|
||||||
|
|
||||||
const Scalar min_damp_factor = this->param_.inj_mult_min_damp_factor_;
|
const Scalar min_damp_factor = this->param_.inj_mult_min_damp_factor_;
|
||||||
Scalar damp_factor = this->inj_multiplier_damp_factor_[perf_ecl_index];
|
Scalar damp_factor = this->inj_multiplier_damp_factor_[perf_ecl_index];
|
||||||
|
|||||||
@@ -221,6 +221,10 @@ protected:
|
|||||||
Well::InjectionControls& inj_controls,
|
Well::InjectionControls& inj_controls,
|
||||||
Well::ProductionControls& prod_controls) const;
|
Well::ProductionControls& prod_controls) const;
|
||||||
|
|
||||||
|
void resetDampening() {
|
||||||
|
std::fill(this->inj_multiplier_damp_factor_.begin(), this->inj_multiplier_damp_factor_.end(), 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
// definition of the struct OperabilityStatus
|
// definition of the struct OperabilityStatus
|
||||||
struct OperabilityStatus
|
struct OperabilityStatus
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user