Merge pull request #2856 from plgbrts/temp

fix temperature reporting for injectors
This commit is contained in:
Atgeirr Flø Rasmussen 2020-10-22 14:25:35 +02:00 committed by GitHub
commit 5d48923994
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,13 +68,13 @@ namespace Opm
open_for_output_.assign(nw, true);
bhp_.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);
int connpos = 0;
for (int w = 0; w < nw; ++w) {
const Well& well = wells_ecl[w];
// Initialize bhp(), thp(), wellRates().
// Initialize bhp(), thp(), wellRates(), temperature().
initSingleWell(cellPressures, w, well, pu, summary_state);
// Setup wellname -> well index mapping.
@ -248,6 +248,10 @@ namespace Opm
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();
if ( num_perf_this_well == 0 ) {
// No perforations of the well. Initialize to zero.