Added reading of WGRUPCON, also added guide_rates to the well groups. Fixed a small bug in calculateWDP

This commit is contained in:
Kjetil Olsen Lye
2012-04-13 10:32:36 +02:00
parent 74fc0a5c25
commit f1cc0d56e8
6 changed files with 138 additions and 45 deletions

View File

@@ -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?