mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-26 07:30:08 -05:00
small cleaning up related in compositioal well code
This commit is contained in:
1 parent
b1cc195db9
commit
2139629af1
3 files changed
+20
-18
No files matched your search
@@ -105,11 +105,11 @@ public:
|
||||
void beginReportStep(unsigned report_step);
|
||||
void beginTimeStep();
|
||||
void beginIteration();
|
||||
void restoreLastValidState();
|
||||
void restoreLastValidState();
|
||||
|
||||
void init();
|
||||
void endIteration() const {}
|
||||
void endTimeStep();
|
||||
void endTimeStep();
|
||||
void endEpisode() {}
|
||||
|
||||
void computeTotalRatesForDof(RateVector& /*rate*/, unsigned /*globalIdx*/) const;
|
||||
@@ -136,18 +136,18 @@ public:
|
||||
auto begin() const { return well_container_.begin(); }
|
||||
auto end() const { return well_container_.end(); }
|
||||
|
||||
const SimulatorReportSingle& lastReport() const { return last_report_; }
|
||||
void prepareDeserialize(const int) {}
|
||||
const std::map<std::string, double>& wellOpenTimes() const { return well_open_times_; }
|
||||
const std::map<std::string, double>& wellCloseTimes() const { return well_close_times_; }
|
||||
const WellGroupEvents& reportStepStartEvents() const { return report_step_start_events_; }
|
||||
bool forceShutWellByName(const std::string& well_name, double simulation_time, bool dont_shut_grup_wells);
|
||||
const SimulatorReportSingle& lastReport() const { return last_report_; }
|
||||
void prepareDeserialize(const int) {}
|
||||
const std::map<std::string, double>& wellOpenTimes() const { return well_open_times_; }
|
||||
const std::map<std::string, double>& wellCloseTimes() const { return well_close_times_; }
|
||||
const WellGroupEvents& reportStepStartEvents() const { return report_step_start_events_; }
|
||||
bool forceShutWellByName(const std::string& well_name, double simulation_time, bool dont_shut_grup_wells);
|
||||
|
||||
template <class ReservoirCouplingSlave>
|
||||
void setReservoirCouplingSlave(ReservoirCouplingSlave*) {}
|
||||
template <class ReservoirCouplingSlave>
|
||||
void setReservoirCouplingSlave(ReservoirCouplingSlave*) {}
|
||||
|
||||
template <class ReservoirCouplingMaster>
|
||||
void setReservoirCouplingMaster(ReservoirCouplingMaster*) {}
|
||||
template <class ReservoirCouplingMaster>
|
||||
void setReservoirCouplingMaster(ReservoirCouplingMaster*) {}
|
||||
|
||||
bool getWellConvergence() const;
|
||||
|
||||
@@ -169,8 +169,8 @@ private:
|
||||
// we will need two to handle the changes between time stepping
|
||||
CompWellState<FluidSystem> comp_well_states_;
|
||||
|
||||
// saved state at beginning of report step, used to restore on failed timestep
|
||||
CompWellState<FluidSystem> last_valid_comp_well_states_;
|
||||
// saved state at beginning of report step, used to restore on failed timestep
|
||||
CompWellState<FluidSystem> last_valid_comp_well_states_;
|
||||
|
||||
// this is needed for parallel running, not all the wells will be in the same process
|
||||
std::vector<Well> wells_ecl_;
|
||||
|
||||
@@ -235,11 +235,13 @@ initWellState()
|
||||
|
||||
// Start each report step from freshly initialized schedule state. Retry
|
||||
// recovery still comes from last_valid_comp_well_states_ via
|
||||
// restoreLastValidState()/endTimeStep().
|
||||
// restoreLastValidState()/endTimeStep(). Passing the last valid state as
|
||||
// prev_well_state here would carry dynamic state across report steps, but
|
||||
// that currently changes regression results, so we pass nullptr for now.
|
||||
this->comp_well_states_.init(this->wells_ecl_,
|
||||
cell_pressure, cell_temperature[0], cell_mole_fractions, this->well_connection_data_,
|
||||
this->summary_state_,
|
||||
nullptr);//better but change result &this->last_valid_comp_well_states_);
|
||||
/*prev_well_state=*/nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -584,8 +584,8 @@ updateWellControl(const SummaryState& summary_state,
|
||||
this->well_ecl_.name(), current_rate, rate_limit, well_state.bhp,
|
||||
fmt::join(well_state.surface_phase_rates, ", ")));
|
||||
if (current_rate > rate_limit) {
|
||||
OpmLog::info(fmt::format("Well {} RATE control TRIGGERED: current_rate={:.6e} > rate_limit={:.6e}",
|
||||
this->well_ecl_.name(), current_rate, rate_limit));
|
||||
OpmLog::debug(fmt::format("Well {} RATE control TRIGGERED: current_rate={:.6e} > rate_limit={:.6e}",
|
||||
this->well_ecl_.name(), current_rate, rate_limit));
|
||||
well_state.injection_cmode = WellInjectorCMode::RATE;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user