adding segment volume / dt to BlackoilMultiSegmentModel

to handle the wellbore volume effects.
This commit is contained in:
Kai Bao 2015-10-14 17:24:05 +02:00
parent d5f917d1ac
commit 847ae2ef8c
2 changed files with 16 additions and 0 deletions

View File

@ -203,6 +203,10 @@ namespace Opm {
std::vector<int> top_well_segments_;
// segment volume by dt (time step)
// to handle the volume effects of the segment
V segvdt_;
// return wells object
// TODO: remove this wells structure
using Base::wells;

View File

@ -122,6 +122,18 @@ namespace Opm {
top_well_segments_ = well_state.topSegmentLoc();
//TODO: handle the volume related.
// again, we need a global wells class
const int nw = wellsMultiSegment().size();
const int nseg_total = well_state.numSegments();
std::vector<double> segment_volume;
segment_volume.reserve(nseg_total);
for (int w = 0; w < nw; ++w) {
WellMultiSegmentConstPtr well = wellsMultiSegment()[w];
const std::vector<double>& segment_volume_well = well->segmentVolume();
segment_volume.insert(segment_volume.end(), segment_volume_well.begin(), segment_volume_well.end());
}
assert(int(segment_volume.size()) == nseg_total);
segvdt_ = Eigen::Map<V>(segment_volume.data(), nseg_total) / dt;
}