fix temperature reporting for injectors

This commit is contained in:
Paul Egberts
2020-10-14 17:52:04 +02:00
parent f528adb604
commit 9ecd153099

View File

@@ -68,13 +68,13 @@ namespace Opm
open_for_output_.assign(nw, true); open_for_output_.assign(nw, true);
bhp_.resize(nw, 0.0); bhp_.resize(nw, 0.0);
thp_.resize(nw, 0.0); thp_.resize(nw, 0.0);
temperature_.resize(nw, 273.15 + 20); // standard temperature for now temperature_.resize(nw, 273.15 + 15.56); // standard condition temperature
wellrates_.resize(nw * np, 0.0); wellrates_.resize(nw * np, 0.0);
int connpos = 0; int connpos = 0;
for (int w = 0; w < nw; ++w) { for (int w = 0; w < nw; ++w) {
const Well& well = wells_ecl[w]; const Well& well = wells_ecl[w];
// Initialize bhp(), thp(), wellRates(). // Initialize bhp(), thp(), wellRates(), temperature().
initSingleWell(cellPressures, w, well, pu, summary_state); initSingleWell(cellPressures, w, well, pu, summary_state);
// Setup wellname -> well index mapping. // Setup wellname -> well index mapping.
@@ -248,6 +248,10 @@ namespace Opm
wellrates_[np*w + p] = 0.0; wellrates_[np*w + p] = 0.0;
} }
if ( well.isInjector() ) {
temperature_[w] = well.injectionControls(summary_state).temperature;
}
const int num_perf_this_well = well_perf_data_[w].size(); const int num_perf_this_well = well_perf_data_[w].size();
if ( num_perf_this_well == 0 ) { if ( num_perf_this_well == 0 ) {
// No perforations of the well. Initialize to zero. // No perforations of the well. Initialize to zero.