Merge branch 'master' into nonuniform_fluid_tables

Conflicts:
	opm/core/fluid/BlackoilPropertiesFromDeck.cpp
	opm/core/fluid/BlackoilPropertiesFromDeck.hpp
	opm/core/fluid/SaturationPropsFromDeck.cpp
This commit is contained in:
Atgeirr Flø Rasmussen
2012-09-04 13:34:30 +02:00
4 changed files with 9 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ namespace Opm
const UnstructuredGrid& grid)
{
rock_.init(deck, grid);
pvt_.init(deck, 1025);
pvt_.init(deck, 200);
SaturationPropsFromDeck<SatFuncStone2Uniform>* ptr
= new SaturationPropsFromDeck<SatFuncStone2Uniform>();
satprops_.reset(ptr);

View File

@@ -56,7 +56,7 @@ namespace Opm
/// pvt_tab_size (200) number of uniform sample points for dead-oil pvt tables.
/// sat_tab_size (200) number of uniform sample points for saturation tables.
/// threephase_model("simple") three-phase relperm model (accepts "simple" and "stone2").
/// For both parameters, a 0 or negative value indicates that no spline fitting is to
/// For both size parameters, a 0 or negative value indicates that no spline fitting is to
/// be done, and the input fluid data used directly for linear interpolation.
BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
const UnstructuredGrid& grid,

View File

@@ -549,9 +549,9 @@ namespace Opm
const std::vector<double>& sg_deck = deck.getFloatingPointValue("SGAS");
for (int c = 0; c < num_cells; ++c) {
int c_deck = (grid.global_cell == NULL) ? c : grid.global_cell[c];
s[2*c] = sw_deck[c_deck];
s[2*c + 1] = 1.0 - (sw_deck[c_deck] + sg_deck[c_deck]);
s[2*c + 2] = sg_deck[c_deck];
s[3*c] = sw_deck[c_deck];
s[3*c + 1] = 1.0 - (sw_deck[c_deck] + sg_deck[c_deck]);
s[3*c + 2] = sg_deck[c_deck];
p[c] = p_deck[c_deck];
}
} else {

View File

@@ -665,7 +665,8 @@ namespace Opm
double well_rate_total = 0.0;
double well_rate_water = 0.0;
for (int perf = wells.well_connpos[w]; perf < wells.well_connpos[w + 1]; ++perf) {
const double perf_rate = well_perfrates[perf]*(unit::day/unit::second);
const double perf_rate = unit::convert::to(well_perfrates[perf],
unit::cubic(unit::meter)/unit::day);
well_rate_total += perf_rate;
if (perf_rate > 0.0) {
// Injection.
@@ -674,9 +675,9 @@ namespace Opm
// Production.
const int cell = wells.well_cells[perf];
double mob[max_np];
props.relperm(1, &s[2*cell], &cell, mob, 0);
props.relperm(1, &s[np*cell], &cell, mob, 0);
double visc[max_np];
props.viscosity(1, &p[cell], &z[2*cell], &cell, visc, 0);
props.viscosity(1, &p[cell], &z[np*cell], &cell, visc, 0);
double tmob = 0;
for(int i = 0; i < np; ++i) {
mob[i] /= visc[i];