Endpoint scaling and hysteresis for gwseg.

Activation of eps and hysteresis treatment for gwseg. Also some
additional initialization.
This commit is contained in:
osae 2014-02-18 13:49:35 +01:00
parent 995064635f
commit dbe6d2911d
3 changed files with 17 additions and 2 deletions

View File

@ -58,8 +58,8 @@ namespace Opm
// Unfortunate lack of pointer smartness here...
const int sat_samples = param.getDefault("sat_tab_size", 200);
std::string threephase_model = param.getDefault<std::string>("threephase_model", "simple");
if (deck.hasField("ENDSCALE") && threephase_model != "simple") {
OPM_THROW(std::runtime_error, "Sorry, end point scaling currently available for the 'simple' model only.");
if (deck.hasField("ENDSCALE") && threephase_model != "gwseg") {
OPM_THROW(std::runtime_error, "Sorry, end point scaling currently available for the 'gwseg' model only.");
}
if (sat_samples > 1) {
if (threephase_model == "stone2") {

View File

@ -646,6 +646,13 @@ namespace Opm
{
if (scr.empty() && su.empty() && (sxcr.empty() || !do_3pt_) && s0.empty()) {
data.doNotScale = true;
data.smin = sl_tab;
if (oil) {
data.smax = (s0_tab < 0.0) ? 1.0 - su_tab : 1.0 - su_tab - s0_tab;
} else {
data.smax = su_tab;
}
data.scr = scr_tab;
} else {
data.doNotScale = false;
data.do_3pt = do_3pt_;

View File

@ -73,6 +73,14 @@ namespace Opm
const int* cells,
double* smin,
double* smax) const = 0;
/// Update saturation state for the hysteresis tracking
/// \param[in] n Number of data points.
/// \param[in] s Array of nP saturation values.
virtual void updateSatHyst(const int n,
const int* cells,
const double* s) = 0;
};