Update WellState::temperature()

This commit is contained in:
Joakim Hove
2021-05-14 08:23:46 +02:00
parent 6af03f4a6a
commit 203cc2ff73
3 changed files with 5 additions and 5 deletions

View File

@@ -1955,7 +1955,7 @@ namespace Opm {
const auto well_index = wm.second[ 0 ];
const auto& rst_well = rst_wells.at( wm.first );
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) {
well_state.currentProductionControls()[ well_index ] = rst_well.current_control.prod;
@@ -3367,7 +3367,7 @@ namespace Opm {
}
weighted_temperature = well_info.communication().sum(weighted_temperature);
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

View File

@@ -194,7 +194,7 @@ data::Wells WellState::report(const int* globalCellIdxMap,
auto& well = pwinfo.isOwner() ? dw[ itr.first ] : dummyWell;
well.bhp = this->bhp(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& wv = this->wellRates();

View File

@@ -88,8 +88,8 @@ public:
double thp(std::size_t well_index) const { return thp_[well_index]; }
/// One temperature per well.
std::vector<double>& temperature() { return temperature_; }
const std::vector<double>& temperature() const { return temperature_; }
void update_temperature(std::size_t well_index, double value) { temperature_[well_index] = value; }
double temperature(std::size_t well_index) const { return temperature_[well_index]; }
/// One rate per well and phase.
std::vector<double>& wellRates() { return wellrates_; }