mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add dissolved_gas_rate and vaporized_oil_rate to SingleWellState
This commit is contained in:
@@ -1189,8 +1189,9 @@ namespace Opm
|
|||||||
|
|
||||||
this->duneDSolver_.reset();
|
this->duneDSolver_.reset();
|
||||||
|
|
||||||
well_state.wellVaporizedOilRates(index_of_well_) = 0.;
|
auto& ws = well_state.well(this->index_of_well_);
|
||||||
well_state.wellDissolvedGasRates(index_of_well_) = 0.;
|
ws.dissolved_gas_rate = 0;
|
||||||
|
ws.vaporized_oil_rate = 0;
|
||||||
|
|
||||||
// for the black oil cases, there will be four equations,
|
// for the black oil cases, there will be four equations,
|
||||||
// the first three of them are the mass balance equations, the last one is the pressure equations.
|
// the first three of them are the mass balance equations, the last one is the pressure equations.
|
||||||
@@ -1284,8 +1285,8 @@ namespace Opm
|
|||||||
|
|
||||||
// updating the solution gas rate and solution oil rate
|
// updating the solution gas rate and solution oil rate
|
||||||
if (this->isProducer()) {
|
if (this->isProducer()) {
|
||||||
well_state.wellDissolvedGasRates(index_of_well_) += perf_dis_gas_rate;
|
ws.dissolved_gas_rate += perf_dis_gas_rate;
|
||||||
well_state.wellVaporizedOilRates(index_of_well_) += perf_vap_oil_rate;
|
ws.vaporized_oil_rate += perf_vap_oil_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
// store the perf pressure and rates
|
// store the perf pressure and rates
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ public:
|
|||||||
double bhp{0};
|
double bhp{0};
|
||||||
double thp{0};
|
double thp{0};
|
||||||
double temperature{};
|
double temperature{};
|
||||||
|
double dissolved_gas_rate{0};
|
||||||
|
double vaporized_oil_rate{0};
|
||||||
Events events;
|
Events events;
|
||||||
Well::InjectorCMode injection_cmode{Well::InjectorCMode::CMODE_UNDEFINED};
|
Well::InjectorCMode injection_cmode{Well::InjectorCMode::CMODE_UNDEFINED};
|
||||||
Well::ProducerCMode production_cmode{Well::ProducerCMode::CMODE_UNDEFINED};
|
Well::ProducerCMode production_cmode{Well::ProducerCMode::CMODE_UNDEFINED};
|
||||||
|
|||||||
@@ -423,10 +423,10 @@ namespace Opm
|
|||||||
|
|
||||||
// TODO: it probably can be static member for StandardWell
|
// TODO: it probably can be static member for StandardWell
|
||||||
const double volume = 0.002831684659200; // 0.1 cu ft;
|
const double volume = 0.002831684659200; // 0.1 cu ft;
|
||||||
|
auto& ws = well_state.well(this->index_of_well_);
|
||||||
|
|
||||||
// the solution gas rate and solution oil rate needs to be reset to be zero for well_state.
|
ws.vaporized_oil_rate = 0;
|
||||||
well_state.wellVaporizedOilRates(index_of_well_) = 0.;
|
ws.dissolved_gas_rate = 0;
|
||||||
well_state.wellDissolvedGasRates(index_of_well_) = 0.;
|
|
||||||
|
|
||||||
const int np = number_of_phases_;
|
const int np = number_of_phases_;
|
||||||
|
|
||||||
@@ -562,8 +562,8 @@ namespace Opm
|
|||||||
|
|
||||||
// updating the solution gas rate and solution oil rate
|
// updating the solution gas rate and solution oil rate
|
||||||
if (this->isProducer()) {
|
if (this->isProducer()) {
|
||||||
well_state.wellDissolvedGasRates(index_of_well_) += perf_dis_gas_rate;
|
ws.dissolved_gas_rate += perf_dis_gas_rate;
|
||||||
well_state.wellVaporizedOilRates(index_of_well_) += perf_vap_oil_rate;
|
ws.vaporized_oil_rate += perf_vap_oil_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (has_energy) {
|
if constexpr (has_energy) {
|
||||||
|
|||||||
@@ -254,9 +254,6 @@ void WellState::init(const std::vector<double>& cellPressures,
|
|||||||
}
|
}
|
||||||
|
|
||||||
well_reservoir_rates_.clear();
|
well_reservoir_rates_.clear();
|
||||||
well_dissolved_gas_rates_.clear();
|
|
||||||
well_vaporized_oil_rates_.clear();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
const auto& wg_events = schedule[report_step].wellgroup_events();
|
const auto& wg_events = schedule[report_step].wellgroup_events();
|
||||||
for (const auto& ecl_well : wells_ecl) {
|
for (const auto& ecl_well : wells_ecl) {
|
||||||
@@ -292,8 +289,6 @@ void WellState::init(const std::vector<double>& cellPressures,
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->well_reservoir_rates_.add(wname, std::vector<double>(np, 0));
|
this->well_reservoir_rates_.add(wname, std::vector<double>(np, 0));
|
||||||
this->well_dissolved_gas_rates_.add(wname, 0);
|
|
||||||
this->well_vaporized_oil_rates_.add(wname, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int w = 0; w < nw; ++w) {
|
for (int w = 0; w < nw; ++w) {
|
||||||
@@ -541,8 +536,8 @@ WellState::report(const int* globalCellIdxMap,
|
|||||||
well.rates.set(rt::alq, 0.0);
|
well.rates.set(rt::alq, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
well.rates.set(rt::dissolved_gas, this->well_dissolved_gas_rates_[well_index]);
|
well.rates.set(rt::dissolved_gas, ws.dissolved_gas_rate);
|
||||||
well.rates.set(rt::vaporized_oil, this->well_vaporized_oil_rates_[well_index]);
|
well.rates.set(rt::vaporized_oil, ws.vaporized_oil_rate);
|
||||||
|
|
||||||
{
|
{
|
||||||
auto& curr = well.current_control;
|
auto& curr = well.current_control;
|
||||||
|
|||||||
@@ -161,18 +161,6 @@ public:
|
|||||||
return well_reservoir_rates_[well_index];
|
return well_reservoir_rates_[well_index];
|
||||||
}
|
}
|
||||||
|
|
||||||
double& wellDissolvedGasRates(std::size_t well_index)
|
|
||||||
{
|
|
||||||
return well_dissolved_gas_rates_[well_index];
|
|
||||||
}
|
|
||||||
|
|
||||||
double& wellVaporizedOilRates(std::size_t well_index)
|
|
||||||
{
|
|
||||||
return well_vaporized_oil_rates_[well_index];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const SegmentState& segments(const std::size_t well_index) const {
|
const SegmentState& segments(const std::size_t well_index) const {
|
||||||
return this->segment_state[well_index];
|
return this->segment_state[well_index];
|
||||||
@@ -351,11 +339,11 @@ private:
|
|||||||
std::optional<GlobalWellInfo> global_well_info;
|
std::optional<GlobalWellInfo> global_well_info;
|
||||||
ALQState alq_state;
|
ALQState alq_state;
|
||||||
bool do_glift_optimization_;
|
bool do_glift_optimization_;
|
||||||
|
PhaseUsage phase_usage_;
|
||||||
|
|
||||||
WellContainer<SingleWellState> wells_;
|
WellContainer<SingleWellState> wells_;
|
||||||
WellContainer<const ParallelWellInfo*> parallel_well_info_;
|
WellContainer<const ParallelWellInfo*> parallel_well_info_;
|
||||||
WellContainer<std::vector<double>> wellrates_;
|
WellContainer<std::vector<double>> wellrates_;
|
||||||
PhaseUsage phase_usage_;
|
|
||||||
WellContainer<PerfData> perfdata;
|
WellContainer<PerfData> perfdata;
|
||||||
|
|
||||||
// The well_rates variable is defined for all wells on all processors. The
|
// The well_rates variable is defined for all wells on all processors. The
|
||||||
@@ -367,14 +355,6 @@ private:
|
|||||||
// or voidage phase rates
|
// or voidage phase rates
|
||||||
WellContainer<std::vector<double>> well_reservoir_rates_;
|
WellContainer<std::vector<double>> well_reservoir_rates_;
|
||||||
|
|
||||||
// dissolved gas rates or solution gas production rates
|
|
||||||
// should be zero for injection wells
|
|
||||||
WellContainer<double> well_dissolved_gas_rates_;
|
|
||||||
|
|
||||||
// vaporized oil rates or solution oil producation rates
|
|
||||||
// should be zero for injection wells
|
|
||||||
WellContainer<double> well_vaporized_oil_rates_;
|
|
||||||
|
|
||||||
WellContainer<SegmentState> segment_state;
|
WellContainer<SegmentState> segment_state;
|
||||||
|
|
||||||
// Productivity Index
|
// Productivity Index
|
||||||
|
|||||||
Reference in New Issue
Block a user