mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-16 01:41:56 -06:00
adding p2s_average to the wellOps for WellMultiSegment
this mapping calculate the averaged perforation properties to their related segments
This commit is contained in:
parent
487f90ee88
commit
bfe77db26f
@ -310,6 +310,22 @@ namespace Opm
|
||||
// s2outlet
|
||||
m_wops_.s2s_outlet = M(m_number_of_segments_, m_number_of_segments_);
|
||||
m_wops_.s2s_outlet.setFromTriplets(s2s_outlet.begin(), s2s_outlet.end());
|
||||
|
||||
m_wops_.p2s_average = M(m_number_of_segments_, m_number_of_perforations_);
|
||||
std::vector<Tri> p2s_average;
|
||||
p2s_average.reserve(m_number_of_segments_);
|
||||
|
||||
for (int s = 0; s < (int)m_number_of_segments_; ++s) {
|
||||
const int nperf = m_segment_perforations_[s].size();
|
||||
if (nperf > 0) {
|
||||
p2s_average.push_back(Tri(s, s, 1.0/nperf));
|
||||
}
|
||||
}
|
||||
|
||||
// constructing the diagonal matrix to do the averaging for p2s
|
||||
M temp_averaging_p2s = M(m_number_of_segments_, m_number_of_segments_);
|
||||
temp_averaging_p2s.setFromTriplets(p2s_average.begin(), p2s_average.end());
|
||||
m_wops_.p2s_average = temp_averaging_p2s * m_wops_.p2s;
|
||||
}
|
||||
|
||||
const std::string& WellMultiSegment::name() const {
|
||||
|
@ -79,6 +79,7 @@ namespace Opm
|
||||
struct WellOps {
|
||||
M s2p; // segment -> perf (scatter)
|
||||
M p2s; // perf -> segment (gather)
|
||||
M p2s_average; // perf -> segment (avarage)
|
||||
// M w2p; // well -> perf (scatter)
|
||||
// M p2w; // perf - > well (gather)
|
||||
// but since only one well, so it is just an arrary
|
||||
|
Loading…
Reference in New Issue
Block a user