calculating the mass flow rate for the segments.

This commit is contained in:
Kai Bao 2015-10-16 13:21:02 +02:00
parent 3b3ac203d9
commit 93a86019af
2 changed files with 10 additions and 0 deletions

View File

@ -205,6 +205,9 @@ namespace Opm {
// the current one at the current iteration.
std::vector<ADB> segment_comp_surf_volume_current_;
// the mass flow rate in the segments
ADB segment_mass_flow_rates_;
const std::vector<WellMultiSegmentConstPtr> wells_multisegment_;
std::vector<int> top_well_segments_;

View File

@ -86,6 +86,7 @@ namespace Opm {
, well_segment_pressures_delta_(ADB::null())
, segment_comp_surf_volume_initial_(fluid.numPhases())
, segment_comp_surf_volume_current_(fluid.numPhases(), ADB::null())
, segment_mass_flow_rates_(ADB::null())
, wells_multisegment_(wells_multisegment)
{
// Modify the wops_.well_cell member, since the
@ -1854,6 +1855,12 @@ namespace Opm {
segment_comp_surf_volume_current_[phase] = segment_surface_volume * mix[phase];
}
// Mass flow rate of the segments
segment_mass_flow_rates_ = ADB::constant(V::Zero(nseg_total));
for (int phase = 0; phase < np; ++phase) {
segment_mass_flow_rates_ += surf_dens[pu.phase_pos[phase]] * segqs[phase];
}
#if 0
std::cout << " output the well_segment_densities_ " << std::endl;
std::cout << well_segment_densities_.value() << std::endl;