mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added reading of WGRUPCON, also added guide_rates to the well groups. Fixed a small bug in calculateWDP
This commit is contained in:
@@ -416,11 +416,18 @@ namespace Opm
|
||||
|
||||
// Is this correct wrt. depth_ref?
|
||||
double cell_depth = grid.cell_centroids[3*cell+2];
|
||||
|
||||
|
||||
double saturation_sum = 0.0;
|
||||
for(size_t i = 0; i < densities.size(); i++) {
|
||||
saturation_sum += saturations[densities.size()*cell + i];
|
||||
}
|
||||
if(saturation_sum == 0) {
|
||||
saturation_sum = 1.0;
|
||||
}
|
||||
double density = 0.0;
|
||||
for(size_t i = 0; i < densities.size(); i++) {
|
||||
// Is this a smart way of doing it?
|
||||
density += saturations[densities.size()*cell+i]*densities[i];
|
||||
density += saturations[densities.size()*cell+i]*densities[i]/saturation_sum;
|
||||
}
|
||||
|
||||
// Is the sign correct?
|
||||
|
||||
Reference in New Issue
Block a user