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
commit 064d408b20
7 changed files with 26 additions and 26 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

@ -26,7 +26,8 @@
namespace Opm
{
// This file should be removed in the future.
// Holding off until refactoring of SaturationPropsFromDeck class is done.
} // namespace Opm

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];

View File

@ -12,6 +12,8 @@ noinst_PROGRAMS = \
bo_resprop_test \
monotcubicinterpolator_test \
param_test \
pvt_test \
relperm_test \
sparsetable_test \
sparsevector_test \
test_cartgrid \
@ -21,9 +23,7 @@ test_read_vag \
test_readpolymer \
test_sf2p \
test_writeVtkData \
unit_test \
pvt_test \
relperm_test
unit_test
bo_resprop_test_SOURCES = bo_resprop_test.cpp
@ -33,6 +33,10 @@ monotcubicinterpolator_test_SOURCES = monotcubicinterpolator_test.cpp
param_test_SOURCES = param_test.cpp
param_test_LDADD = $(LDADD) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
pvt_test_SOURCES = pvt_test.cpp
relperm_test_SOURCES = relperm_test.cpp
sparsetable_test_SOURCES = sparsetable_test.cpp
sparsetable_test_LDADD = $(LDADD) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
@ -56,12 +60,6 @@ test_writeVtkData_SOURCES = test_writeVtkData.cpp
unit_test_SOURCES = unit_test.cpp
pvt_test_SOURCES = pvt_test.cpp
pvt_test_LDADD = $(LDADD)
relperm_test_SOURCES = relperm_test.cpp
relperm_test_LDADD = $(LDADD)
if UMFPACK
noinst_PROGRAMS += test_cfs_tpfa

View File

@ -112,29 +112,29 @@ int main(int argc, char** argv)
double A[max_np*max_np*n];
double dA[max_np*max_np*n];
props.matrix(n, p, z, cells, A, dA);
std::copy(A, A + np*np, std::ostream_iterator<double>(aos, " "));
std::copy(dA, dA + np*np, std::ostream_iterator<double>(aos, " "));
std::copy(A, A + np*np*n, std::ostream_iterator<double>(aos, " "));
std::copy(dA, dA + np*np*n, std::ostream_iterator<double>(aos, " "));
aos << std::endl;
double mu[max_np];
//double dmu[max_np];//not implemented
props.viscosity(n, p, z, cells, mu, 0);
std::copy(mu, mu + np, std::ostream_iterator<double>(muos, " "));
//std::copy(dmu, dmu + np, std::ostream_iterator<double>(muos, " "));
std::copy(mu, mu + np*n, std::ostream_iterator<double>(muos, " "));
//std::copy(dmu, dmu + np*n, std::ostream_iterator<double>(muos, " "));
aos << std::endl;
double b[max_np];
double dbdp[max_np];
pvt.dBdp(n, p, z, b, dbdp);
std::copy(b, b + np, std::ostream_iterator<double>(bos, " "));
std::copy(dbdp, dbdp + np, std::ostream_iterator<double>(bos, " "));
std::copy(b, b + np*n, std::ostream_iterator<double>(bos, " "));
std::copy(dbdp, dbdp + np*n, std::ostream_iterator<double>(bos, " "));
bos << std::endl;
double rs[max_np];
double drs[max_np];
//pvt.R(n, p, z, rs);
pvt.dRdp(n, p, z, rs,drs);
std::copy(rs, rs + np, std::ostream_iterator<double>(rsos, " "));
std::copy(drs, drs + np, std::ostream_iterator<double>(rsos, " "));
std::copy(rs, rs + np*n, std::ostream_iterator<double>(rsos, " "));
std::copy(drs, drs + np*n, std::ostream_iterator<double>(rsos, " "));
rsos << std::endl;
}
}