correcting a bug in pressure initialization in WellStateMultiSegment

for the pressure of top segment and peforations.
This commit is contained in:
Kai Bao
2015-10-07 15:22:13 +02:00
parent 5d5ae7d271
commit 8c522ccc34
3 changed files with 22 additions and 2 deletions

View File

@@ -791,6 +791,16 @@ namespace detail {
}
}
#if 0
std::cout << " state.bhp " << std::endl;
std::cout << state.bhp.value() << std::endl;
std::cout << " perf_press " << std::endl;
std::cout << perf_press << std::endl;
std::cout << " avg_press " << std::endl;
std::cout << avg_press << std::endl;
#endif
// Use cell values for the temperature as the wells don't knows its temperature yet.
const ADB perf_temp = subset(state.temperature, well_cells);

View File

@@ -321,6 +321,15 @@ namespace Opm {
start_segment += nseg;
}
#if 0
std::cout << " state.segp " << std::endl;
std::cout << state.segp.value() << std::endl;
std::cout << " perf_press " << std::endl;
std::cout << perf_press << std::endl;
std::cout << " avg_press " << std::endl;
std::cout << avg_press << std::endl;
#endif
// Use cell values for the temperature as the wells don't knows its temperature yet.
const ADB perf_temp = subset(state.temperature, well_cells);

View File

@@ -213,7 +213,7 @@ namespace Opm
for (int p = 0; p < np; ++p) {
perfPhaseRates()[np * (i + start_perforation) + p] = wellrates_[np * w + p] / double(number_of_perforations);
}
perfpress_[i + start_perforation] = state.pressure()[wells[w]->wellCells()[i + start_perforation]];
perfpress_[i + start_perforation] = state.pressure()[wells[w]->wellCells()[i]];
}
// 5. Segment rates and pressures
@@ -222,7 +222,8 @@ namespace Opm
// when under bhp control.
// the seg_rates will related to the sum of the perforation rates, and also trying to keep consistent with the
// well rates. Most importantly, the segment rates of the top segment is the same with the well rates
for (int i = 0; i < number_of_segments; ++i) {
segpress_[start_segment] = bhp_[w];
for (int i = 1; i < number_of_segments; ++i) {
/* for (int p = 0; p < np; ++p) {
segphaserates_[np * (i + start_segment) + p] = 0.;
} */