mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Update WellState::temperature()
This commit is contained in:
@@ -1955,7 +1955,7 @@ namespace Opm {
|
|||||||
const auto well_index = wm.second[ 0 ];
|
const auto well_index = wm.second[ 0 ];
|
||||||
const auto& rst_well = rst_wells.at( wm.first );
|
const auto& rst_well = rst_wells.at( wm.first );
|
||||||
well_state.update_bhp( well_index, rst_well.bhp);
|
well_state.update_bhp( well_index, rst_well.bhp);
|
||||||
well_state.temperature()[ well_index ] = rst_well.temperature;
|
well_state.update_temperature( well_index, rst_well.temperature);
|
||||||
|
|
||||||
if (rst_well.current_control.isProducer) {
|
if (rst_well.current_control.isProducer) {
|
||||||
well_state.currentProductionControls()[ well_index ] = rst_well.current_control.prod;
|
well_state.currentProductionControls()[ well_index ] = rst_well.current_control.prod;
|
||||||
@@ -3367,7 +3367,7 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
weighted_temperature = well_info.communication().sum(weighted_temperature);
|
weighted_temperature = well_info.communication().sum(weighted_temperature);
|
||||||
total_weight = well_info.communication().sum(total_weight);
|
total_weight = well_info.communication().sum(total_weight);
|
||||||
this->wellState().temperature()[wellID] = weighted_temperature/total_weight;
|
this->wellState().update_temperature(wellID, weighted_temperature/total_weight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ data::Wells WellState::report(const int* globalCellIdxMap,
|
|||||||
auto& well = pwinfo.isOwner() ? dw[ itr.first ] : dummyWell;
|
auto& well = pwinfo.isOwner() ? dw[ itr.first ] : dummyWell;
|
||||||
well.bhp = this->bhp(well_index);
|
well.bhp = this->bhp(well_index);
|
||||||
well.thp = this->thp( well_index );
|
well.thp = this->thp( well_index );
|
||||||
well.temperature = this->temperature().at( well_index );
|
well.temperature = this->temperature( well_index );
|
||||||
|
|
||||||
const auto wellrate_index = well_index * pu.num_phases;
|
const auto wellrate_index = well_index * pu.num_phases;
|
||||||
const auto& wv = this->wellRates();
|
const auto& wv = this->wellRates();
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ public:
|
|||||||
double thp(std::size_t well_index) const { return thp_[well_index]; }
|
double thp(std::size_t well_index) const { return thp_[well_index]; }
|
||||||
|
|
||||||
/// One temperature per well.
|
/// One temperature per well.
|
||||||
std::vector<double>& temperature() { return temperature_; }
|
void update_temperature(std::size_t well_index, double value) { temperature_[well_index] = value; }
|
||||||
const std::vector<double>& temperature() const { return temperature_; }
|
double temperature(std::size_t well_index) const { return temperature_[well_index]; }
|
||||||
|
|
||||||
/// One rate per well and phase.
|
/// One rate per well and phase.
|
||||||
std::vector<double>& wellRates() { return wellrates_; }
|
std::vector<double>& wellRates() { return wellrates_; }
|
||||||
|
|||||||
Reference in New Issue
Block a user