Changed to extrapolation outside tables for pormult. Added facetags to the grid structure. Changed default fluid to Linear.

This commit is contained in:
Halvor Møll Nilsen 2012-08-14 09:36:19 +02:00
parent 497c45b78b
commit 1f7ec7fa39
3 changed files with 19 additions and 6 deletions

View File

@ -69,7 +69,8 @@ namespace Opm
const double cpnorm = rock_comp_*(pressure - pref_);
return (1.0 + cpnorm + 0.5*cpnorm*cpnorm);
} else {
return Opm::linearInterpolation(p_, poromult_, pressure);
// return Opm::linearInterpolation(p_, poromult_, pressure);
return Opm::linearInterpolationExtrap(p_, poromult_, pressure);
}
}
@ -78,8 +79,11 @@ namespace Opm
if (p_.empty()) {
return rock_comp_;
} else {
const double poromult = Opm::linearInterpolation(p_, poromult_, pressure);
const double dporomultdp = Opm::linearInterpolationDerivative(p_, poromult_, pressure);
//const double poromult = Opm::linearInterpolation(p_, poromult_, pressure);
//const double dporomultdp = Opm::linearInterpolationDerivative(p_, poromult_, pressure);
const double poromult = Opm::linearInterpolationExtrap(p_, poromult_, pressure);
const double dporomultdp = Opm::linearInterpolationDerivativeExtrap(p_, poromult_, pressure);
return dporomultdp/poromult;
}
}

View File

@ -114,7 +114,8 @@ namespace Opm
THROW("SaturationPropsBasic::init() illegal num_phases: " << num_phases);
}
num_phases_ = num_phases;
std::string rpf = param.getDefault("relperm_func", std::string("Unset"));
//std::string rpf = param.getDefault("relperm_func", std::string("Unset"));
std::string rpf = param.getDefault("relperm_func", std::string("Linear"));
if (rpf == "Constant") {
relperm_func_ = Constant;
if(num_phases!=1){

View File

@ -30,6 +30,10 @@
#if HAVE_DUNE_ISTL
#include <opm/core/linalg/LinearSolverIstl.hpp>
#endif
#if HAVE_AGMG
#include <opm/core/linalg/LinearSolverAGMG.hpp>
#endif
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/core/utility/ErrorMacros.hpp>
@ -69,7 +73,11 @@ namespace Opm
solver_.reset(new LinearSolverIstl(param));
#endif
}
else if (ls == "agmg") {
#if HAVE_AGMG
solver_.reset(new LinearSolverAGMG(param));
#endif
}
else {
THROW("Linear solver " << ls << " is unknown.");
}