Scaling of capillary pressure.
This commit is contained in:
parent
e06fb0e5d4
commit
6e00befef6
@ -55,6 +55,7 @@ namespace Opm
|
|||||||
double krSlopeCrit;
|
double krSlopeCrit;
|
||||||
double scaleKr(double s, double kr, double krsr_tab) const;
|
double scaleKr(double s, double kr, double krsr_tab) const;
|
||||||
double scaleKrDeriv(double s, double krDeriv) const; // Returns scaleKr'(kr(scaleSat(s)))*kr'((scaleSat(s))
|
double scaleKrDeriv(double s, double krDeriv) const; // Returns scaleKr'(kr(scaleSat(s)))*kr'((scaleSat(s))
|
||||||
|
double pcFactor; // Scaling factor for capillary pressure.
|
||||||
void printMe(std::ostream & out);
|
void printMe(std::ostream & out);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -99,6 +100,8 @@ namespace Opm
|
|||||||
double sogcr_; // Critical oil-in-gas-and-connate-water saturation.
|
double sogcr_; // Critical oil-in-gas-and-connate-water saturation.
|
||||||
double krorw_; // Oil relperm at critical water saturation.
|
double krorw_; // Oil relperm at critical water saturation.
|
||||||
double krorg_; // Oil relperm at critical gas saturation.
|
double krorg_; // Oil relperm at critical gas saturation.
|
||||||
|
double pcwmax_; // Max oil-water capillary pressure.
|
||||||
|
double pcgmax_; // Max gas-oil capillary pressure.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PhaseUsage phase_usage; // A copy of the outer class' phase_usage_.
|
PhaseUsage phase_usage; // A copy of the outer class' phase_usage_.
|
||||||
@ -182,6 +185,7 @@ namespace Opm
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pcwmax_ = pcow.front();
|
||||||
}
|
}
|
||||||
if (phase_usage.phase_used[Vapour]) {
|
if (phase_usage.phase_used[Vapour]) {
|
||||||
Opm::SgofTable sgof(deck->getKeyword("SGOF"), table_num);
|
Opm::SgofTable sgof(deck->getKeyword("SGOF"), table_num);
|
||||||
@ -234,6 +238,7 @@ namespace Opm
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pcgmax_ = pcog.back();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,12 +553,12 @@ namespace Opm
|
|||||||
if (this->phase_usage.phase_used[BlackoilPhases::Aqua]) {
|
if (this->phase_usage.phase_used[BlackoilPhases::Aqua]) {
|
||||||
int pos = this->phase_usage.phase_pos[BlackoilPhases::Aqua];
|
int pos = this->phase_usage.phase_pos[BlackoilPhases::Aqua];
|
||||||
double _sw = epst->wat.scaleSatPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
double _sw = epst->wat.scaleSatPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
||||||
pc[pos] = this->pcow_(_sw);
|
pc[pos] = epst->wat.pcFactor*this->pcow_(_sw);
|
||||||
}
|
}
|
||||||
if (this->phase_usage.phase_used[BlackoilPhases::Vapour]) {
|
if (this->phase_usage.phase_used[BlackoilPhases::Vapour]) {
|
||||||
int pos = this->phase_usage.phase_pos[BlackoilPhases::Vapour];
|
int pos = this->phase_usage.phase_pos[BlackoilPhases::Vapour];
|
||||||
double _sg = epst->gas.scaleSatPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
double _sg = epst->gas.scaleSatPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
||||||
pc[pos] = this->pcog_(_sg);
|
pc[pos] = epst->gas.pcFactor*this->pcog_(_sg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -602,16 +602,16 @@ namespace Opm
|
|||||||
if (this->phase_usage.phase_used[BlackoilPhases::Aqua]) {
|
if (this->phase_usage.phase_used[BlackoilPhases::Aqua]) {
|
||||||
int pos = this->phase_usage.phase_pos[BlackoilPhases::Aqua];
|
int pos = this->phase_usage.phase_pos[BlackoilPhases::Aqua];
|
||||||
double _sw = epst->wat.scaleSatPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
double _sw = epst->wat.scaleSatPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
||||||
pc[pos] = this->pcow_(s[pos]);
|
pc[pos] = epst->wat.pcFactor*this->pcow_(s[pos]);
|
||||||
double _dsdsw = epst->wat.scaleSatDerivPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
double _dsdsw = epst->wat.scaleSatDerivPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
||||||
dpcds[np*pos + pos] = _dsdsw*this->pcow_.derivative(_sw);
|
dpcds[np*pos + pos] = epst->wat.pcFactor*_dsdsw*this->pcow_.derivative(_sw);
|
||||||
}
|
}
|
||||||
if (this->phase_usage.phase_used[BlackoilPhases::Vapour]) {
|
if (this->phase_usage.phase_used[BlackoilPhases::Vapour]) {
|
||||||
int pos = this->phase_usage.phase_pos[BlackoilPhases::Vapour];
|
int pos = this->phase_usage.phase_pos[BlackoilPhases::Vapour];
|
||||||
double _sg = epst->gas.scaleSatPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
double _sg = epst->gas.scaleSatPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
||||||
pc[pos] = this->pcog_(_sg);
|
pc[pos] = epst->gas.pcFactor*this->pcog_(_sg);
|
||||||
double _dsdsg = epst->gas.scaleSatDerivPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
double _dsdsg = epst->gas.scaleSatDerivPc(s[pos], this->smin_[pos], this->smax_[pos]);
|
||||||
dpcds[np*pos + pos] = _dsdsg*this->pcog_.derivative(_sg);
|
dpcds[np*pos + pos] = epst->gas.pcFactor*_dsdsg*this->pcog_.derivative(_sg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,13 +178,15 @@ namespace Opm
|
|||||||
const double s0_tab,
|
const double s0_tab,
|
||||||
const double krsr_tab,
|
const double krsr_tab,
|
||||||
const double krmax_tab,
|
const double krmax_tab,
|
||||||
|
const double pcmax_tab,
|
||||||
const std::vector<double>& sl,
|
const std::vector<double>& sl,
|
||||||
const std::vector<double>& scr,
|
const std::vector<double>& scr,
|
||||||
const std::vector<double>& su,
|
const std::vector<double>& su,
|
||||||
const std::vector<double>& sxcr,
|
const std::vector<double>& sxcr,
|
||||||
const std::vector<double>& s0,
|
const std::vector<double>& s0,
|
||||||
const std::vector<double>& krsr,
|
const std::vector<double>& krsr,
|
||||||
const std::vector<double>& krmax);
|
const std::vector<double>& krmax,
|
||||||
|
const std::vector<double>& pcmax);
|
||||||
|
|
||||||
bool columnIsMasked_(Opm::DeckConstPtr deck,
|
bool columnIsMasked_(Opm::DeckConstPtr deck,
|
||||||
const std::string& keywordName,
|
const std::string& keywordName,
|
||||||
|
@ -431,6 +431,8 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
std::vector<double> swl, swcr, swu, sgl, sgcr, sgu, sowcr, sogcr;
|
std::vector<double> swl, swcr, swu, sgl, sgcr, sgu, sowcr, sogcr;
|
||||||
std::vector<double> krw, krg, kro, krwr, krgr, krorw, krorg;
|
std::vector<double> krw, krg, kro, krwr, krgr, krorw, krorg;
|
||||||
|
std::vector<double> pcw, pcg;
|
||||||
|
const std::vector<double> dummy;
|
||||||
// Initialize saturation scaling parameter
|
// Initialize saturation scaling parameter
|
||||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||||
std::string("SWL"), swl);
|
std::string("SWL"), swl);
|
||||||
@ -462,6 +464,10 @@ namespace Opm
|
|||||||
std::string("KRORW"), krorw);
|
std::string("KRORW"), krorw);
|
||||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||||
std::string("KRORG"), krorg);
|
std::string("KRORG"), krorg);
|
||||||
|
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||||
|
std::string("PCW"), pcw);
|
||||||
|
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||||
|
std::string("PCG"), pcg);
|
||||||
|
|
||||||
eps_transf_.resize(number_of_cells);
|
eps_transf_.resize(number_of_cells);
|
||||||
|
|
||||||
@ -474,31 +480,95 @@ namespace Opm
|
|||||||
for (int cell = 0; cell < number_of_cells; ++cell) {
|
for (int cell = 0; cell < number_of_cells; ++cell) {
|
||||||
if (oilWater) {
|
if (oilWater) {
|
||||||
// ### krw
|
// ### krw
|
||||||
initEPSParam(cell, eps_transf_[cell].wat, false, funcForCell(cell).smin_[wpos], funcForCell(cell).swcr_, funcForCell(cell).smax_[wpos],
|
initEPSParam(cell, eps_transf_[cell].wat, false,
|
||||||
funcForCell(cell).sowcr_, -1.0, funcForCell(cell).krwr_, funcForCell(cell).krwmax_, swl, swcr, swu, sowcr, sgl, krwr, krw);
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).swcr_,
|
||||||
|
funcForCell(cell).smax_[wpos],
|
||||||
|
funcForCell(cell).sowcr_,
|
||||||
|
-1.0,
|
||||||
|
funcForCell(cell).krwr_,
|
||||||
|
funcForCell(cell).krwmax_,
|
||||||
|
funcForCell(cell).pcwmax_,
|
||||||
|
swl, swcr, swu, sowcr, sgl, krwr, krw, pcw);
|
||||||
// ### krow
|
// ### krow
|
||||||
initEPSParam(cell, eps_transf_[cell].watoil, true, 0.0, funcForCell(cell).sowcr_, funcForCell(cell).smin_[wpos],
|
initEPSParam(cell, eps_transf_[cell].watoil, true,
|
||||||
funcForCell(cell).swcr_, -1.0, funcForCell(cell).krorw_, funcForCell(cell).kromax_, swl, sowcr, swl, swcr, sgl, krorw, kro);
|
0.0,
|
||||||
|
funcForCell(cell).sowcr_,
|
||||||
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).swcr_,
|
||||||
|
-1.0,
|
||||||
|
funcForCell(cell).krorw_,
|
||||||
|
funcForCell(cell).kromax_,
|
||||||
|
0.0,
|
||||||
|
swl, sowcr, swl, swcr, sgl, krorw, kro, dummy);
|
||||||
} else if (oilGas) {
|
} else if (oilGas) {
|
||||||
// ### krg
|
// ### krg
|
||||||
initEPSParam(cell, eps_transf_[cell].gas, false, funcForCell(cell).smin_[gpos], funcForCell(cell).sgcr_, funcForCell(cell).smax_[gpos],
|
initEPSParam(cell, eps_transf_[cell].gas, false,
|
||||||
funcForCell(cell).sogcr_, -1.0, funcForCell(cell).krgr_, funcForCell(cell).krgmax_, sgl, sgcr, sgu, sogcr, swl, krgr, krg);
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).sgcr_,
|
||||||
|
funcForCell(cell).smax_[gpos],
|
||||||
|
funcForCell(cell).sogcr_,
|
||||||
|
-1.0,
|
||||||
|
funcForCell(cell).krgr_,
|
||||||
|
funcForCell(cell).krgmax_,
|
||||||
|
funcForCell(cell).pcgmax_,
|
||||||
|
sgl, sgcr, sgu, sogcr, swl, krgr, krg, pcg);
|
||||||
// ### krog
|
// ### krog
|
||||||
initEPSParam(cell, eps_transf_[cell].gasoil, true, 0.0, funcForCell(cell).sogcr_, funcForCell(cell).smin_[gpos],
|
initEPSParam(cell, eps_transf_[cell].gasoil, true,
|
||||||
funcForCell(cell).sgcr_, -1.0, funcForCell(cell).krorg_, funcForCell(cell).kromax_, sgl, sogcr, sgl, sgcr, swl, krorg, kro);
|
0.0,
|
||||||
|
funcForCell(cell).sogcr_,
|
||||||
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).sgcr_,
|
||||||
|
-1.0,
|
||||||
|
funcForCell(cell).krorg_,
|
||||||
|
funcForCell(cell).kromax_,
|
||||||
|
0.0,
|
||||||
|
sgl, sogcr, sgl, sgcr, swl, krorg, kro, dummy);
|
||||||
} else if (threephase) {
|
} else if (threephase) {
|
||||||
// ### krw
|
// ### krw
|
||||||
initEPSParam(cell, eps_transf_[cell].wat, false, funcForCell(cell).smin_[wpos], funcForCell(cell).swcr_, funcForCell(cell).smax_[wpos], funcForCell(cell).sowcr_,
|
initEPSParam(cell, eps_transf_[cell].wat, false,
|
||||||
funcForCell(cell).smin_[gpos], funcForCell(cell).krwr_, funcForCell(cell).krwmax_, swl, swcr, swu, sowcr, sgl, krwr, krw);
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).swcr_,
|
||||||
|
funcForCell(cell).smax_[wpos],
|
||||||
|
funcForCell(cell).sowcr_,
|
||||||
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).krwr_,
|
||||||
|
funcForCell(cell).krwmax_,
|
||||||
|
funcForCell(cell).pcwmax_,
|
||||||
|
swl, swcr, swu, sowcr, sgl, krwr, krw, pcw);
|
||||||
// ### krow
|
// ### krow
|
||||||
initEPSParam(cell, eps_transf_[cell].watoil, true, 0.0, funcForCell(cell).sowcr_, funcForCell(cell).smin_[wpos], funcForCell(cell).swcr_,
|
initEPSParam(cell, eps_transf_[cell].watoil, true,
|
||||||
funcForCell(cell).smin_[gpos], funcForCell(cell).krorw_, funcForCell(cell).kromax_, swl, sowcr, swl, swcr, sgl, krorw, kro);
|
0.0,
|
||||||
|
funcForCell(cell).sowcr_,
|
||||||
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).swcr_,
|
||||||
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).krorw_,
|
||||||
|
funcForCell(cell).kromax_,
|
||||||
|
0.0,
|
||||||
|
swl, sowcr, swl, swcr, sgl, krorw, kro, dummy);
|
||||||
// ### krg
|
// ### krg
|
||||||
initEPSParam(cell, eps_transf_[cell].gas, false, funcForCell(cell).smin_[gpos], funcForCell(cell).sgcr_, funcForCell(cell).smax_[gpos], funcForCell(cell).sogcr_,
|
initEPSParam(cell, eps_transf_[cell].gas, false,
|
||||||
funcForCell(cell).smin_[wpos], funcForCell(cell).krgr_, funcForCell(cell).krgmax_, sgl, sgcr, sgu, sogcr, swl, krgr, krg);
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).sgcr_,
|
||||||
|
funcForCell(cell).smax_[gpos],
|
||||||
|
funcForCell(cell).sogcr_,
|
||||||
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).krgr_,
|
||||||
|
funcForCell(cell).krgmax_,
|
||||||
|
funcForCell(cell).pcgmax_,
|
||||||
|
sgl, sgcr, sgu, sogcr, swl, krgr, krg, pcg);
|
||||||
// ### krog
|
// ### krog
|
||||||
initEPSParam(cell, eps_transf_[cell].gasoil, true, 0.0, funcForCell(cell).sogcr_, funcForCell(cell).smin_[gpos], funcForCell(cell).sgcr_,
|
initEPSParam(cell, eps_transf_[cell].gasoil, true,
|
||||||
funcForCell(cell).smin_[wpos], funcForCell(cell).krorg_, funcForCell(cell).kromax_, sgl, sogcr, sgl, sgcr, swl, krorg, kro);
|
0.0,
|
||||||
|
funcForCell(cell).sogcr_,
|
||||||
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).sgcr_,
|
||||||
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).krorg_,
|
||||||
|
funcForCell(cell).kromax_,
|
||||||
|
0.0,
|
||||||
|
sgl, sogcr, sgl, sgcr, swl, krorg, kro, dummy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -514,6 +584,8 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
std::vector<double> iswl, iswcr, iswu, isgl, isgcr, isgu, isowcr, isogcr;
|
std::vector<double> iswl, iswcr, iswu, isgl, isgcr, isgu, isowcr, isogcr;
|
||||||
std::vector<double> ikrw, ikrg, ikro, ikrwr, ikrgr, ikrorw, ikrorg;
|
std::vector<double> ikrw, ikrg, ikro, ikrwr, ikrgr, ikrorw, ikrorg;
|
||||||
|
std::vector<double> ipcw, ipcg;
|
||||||
|
const std::vector<double> dummy;
|
||||||
// Initialize hysteresis saturation scaling parameters
|
// Initialize hysteresis saturation scaling parameters
|
||||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||||
std::string("ISWL"), iswl);
|
std::string("ISWL"), iswl);
|
||||||
@ -545,6 +617,10 @@ namespace Opm
|
|||||||
std::string("IKRORW"), ikrorw);
|
std::string("IKRORW"), ikrorw);
|
||||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||||
std::string("IKRORG"), ikrorg);
|
std::string("IKRORG"), ikrorg);
|
||||||
|
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||||
|
std::string("IPCW"), ipcw);
|
||||||
|
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||||
|
std::string("IPCG"), ipcg);
|
||||||
|
|
||||||
eps_transf_hyst_.resize(number_of_cells);
|
eps_transf_hyst_.resize(number_of_cells);
|
||||||
sat_hyst_.resize(number_of_cells);
|
sat_hyst_.resize(number_of_cells);
|
||||||
@ -558,31 +634,95 @@ namespace Opm
|
|||||||
for (int cell = 0; cell < number_of_cells; ++cell) {
|
for (int cell = 0; cell < number_of_cells; ++cell) {
|
||||||
if (oilWater) {
|
if (oilWater) {
|
||||||
// ### krw
|
// ### krw
|
||||||
initEPSParam(cell, eps_transf_hyst_[cell].wat, false, funcForCell(cell).smin_[wpos], funcForCell(cell).swcr_, funcForCell(cell).smax_[wpos],
|
initEPSParam(cell, eps_transf_hyst_[cell].wat, false,
|
||||||
funcForCell(cell).sowcr_, -1.0, funcForCell(cell).krwr_, funcForCell(cell).krwmax_, iswl, iswcr, iswu, isowcr, isgl, ikrwr, ikrw);
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).swcr_,
|
||||||
|
funcForCell(cell).smax_[wpos],
|
||||||
|
funcForCell(cell).sowcr_,
|
||||||
|
-1.0,
|
||||||
|
funcForCell(cell).krwr_,
|
||||||
|
funcForCell(cell).krwmax_,
|
||||||
|
funcForCell(cell).pcwmax_,
|
||||||
|
iswl, iswcr, iswu, isowcr, isgl, ikrwr, ikrw, ipcw);
|
||||||
// ### krow
|
// ### krow
|
||||||
initEPSParam(cell, eps_transf_hyst_[cell].watoil, true, 0.0, funcForCell(cell).sowcr_, funcForCell(cell).smin_[wpos],
|
initEPSParam(cell, eps_transf_hyst_[cell].watoil, true,
|
||||||
funcForCell(cell).swcr_, -1.0, funcForCell(cell).krorw_, funcForCell(cell).kromax_, iswl, isowcr, iswl, iswcr, isgl, ikrorw, ikro);
|
0.0,
|
||||||
|
funcForCell(cell).sowcr_,
|
||||||
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).swcr_,
|
||||||
|
-1.0,
|
||||||
|
funcForCell(cell).krorw_,
|
||||||
|
funcForCell(cell).kromax_,
|
||||||
|
0.0,
|
||||||
|
iswl, isowcr, iswl, iswcr, isgl, ikrorw, ikro, dummy);
|
||||||
} else if (oilGas) {
|
} else if (oilGas) {
|
||||||
// ### krg
|
// ### krg
|
||||||
initEPSParam(cell, eps_transf_hyst_[cell].gas, false, funcForCell(cell).smin_[gpos], funcForCell(cell).sgcr_, funcForCell(cell).smax_[gpos],
|
initEPSParam(cell, eps_transf_hyst_[cell].gas, false,
|
||||||
funcForCell(cell).sogcr_, -1.0, funcForCell(cell).krgr_, funcForCell(cell).krgmax_, isgl, isgcr, isgu, isogcr, iswl, ikrgr, ikrg);
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).sgcr_,
|
||||||
|
funcForCell(cell).smax_[gpos],
|
||||||
|
funcForCell(cell).sogcr_,
|
||||||
|
-1.0,
|
||||||
|
funcForCell(cell).krgr_,
|
||||||
|
funcForCell(cell).krgmax_,
|
||||||
|
funcForCell(cell).pcgmax_,
|
||||||
|
isgl, isgcr, isgu, isogcr, iswl, ikrgr, ikrg, ipcg);
|
||||||
// ### krog
|
// ### krog
|
||||||
initEPSParam(cell, eps_transf_hyst_[cell].gasoil, true, 0.0, funcForCell(cell).sogcr_, funcForCell(cell).smin_[gpos],
|
initEPSParam(cell, eps_transf_hyst_[cell].gasoil, true,
|
||||||
funcForCell(cell).sgcr_, -1.0, funcForCell(cell).krorg_, funcForCell(cell).kromax_, isgl, isogcr, isgl, isgcr, iswl, ikrorg, ikro);
|
0.0,
|
||||||
|
funcForCell(cell).sogcr_,
|
||||||
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).sgcr_,
|
||||||
|
-1.0,
|
||||||
|
funcForCell(cell).krorg_,
|
||||||
|
funcForCell(cell).kromax_,
|
||||||
|
0.0,
|
||||||
|
isgl, isogcr, isgl, isgcr, iswl, ikrorg, ikro, dummy);
|
||||||
} else if (threephase) {
|
} else if (threephase) {
|
||||||
// ### krw
|
// ### krw
|
||||||
initEPSParam(cell, eps_transf_hyst_[cell].wat, false, funcForCell(cell).smin_[wpos], funcForCell(cell).swcr_, funcForCell(cell).smax_[wpos], funcForCell(cell).sowcr_,
|
initEPSParam(cell, eps_transf_hyst_[cell].wat, false,
|
||||||
funcForCell(cell).smin_[gpos], funcForCell(cell).krwr_, funcForCell(cell).krwmax_, iswl, iswcr, iswu, isowcr, isgl, ikrwr, ikrw);
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).swcr_,
|
||||||
|
funcForCell(cell).smax_[wpos],
|
||||||
|
funcForCell(cell).sowcr_,
|
||||||
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).krwr_,
|
||||||
|
funcForCell(cell).krwmax_,
|
||||||
|
funcForCell(cell).pcwmax_,
|
||||||
|
iswl, iswcr, iswu, isowcr, isgl, ikrwr, ikrw, ipcw);
|
||||||
// ### krow
|
// ### krow
|
||||||
initEPSParam(cell, eps_transf_hyst_[cell].watoil, true, 0.0, funcForCell(cell).sowcr_, funcForCell(cell).smin_[wpos], funcForCell(cell).swcr_,
|
initEPSParam(cell, eps_transf_hyst_[cell].watoil, true,
|
||||||
funcForCell(cell).smin_[gpos], funcForCell(cell).krorw_, funcForCell(cell).kromax_, iswl, isowcr, iswl, iswcr, isgl, ikrorw, ikro);
|
0.0,
|
||||||
|
funcForCell(cell).sowcr_,
|
||||||
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).swcr_,
|
||||||
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).krorw_,
|
||||||
|
funcForCell(cell).kromax_,
|
||||||
|
0.0,
|
||||||
|
iswl, isowcr, iswl, iswcr, isgl, ikrorw, ikro, dummy);
|
||||||
// ### krg
|
// ### krg
|
||||||
initEPSParam(cell, eps_transf_hyst_[cell].gas, false, funcForCell(cell).smin_[gpos], funcForCell(cell).sgcr_, funcForCell(cell).smax_[gpos], funcForCell(cell).sogcr_,
|
initEPSParam(cell, eps_transf_hyst_[cell].gas, false,
|
||||||
funcForCell(cell).smin_[wpos], funcForCell(cell).krgr_, funcForCell(cell).krgmax_, isgl, isgcr, isgu, isogcr, iswl, ikrgr, ikrg);
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).sgcr_,
|
||||||
|
funcForCell(cell).smax_[gpos],
|
||||||
|
funcForCell(cell).sogcr_,
|
||||||
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).krgr_,
|
||||||
|
funcForCell(cell).krgmax_,
|
||||||
|
funcForCell(cell).pcgmax_,
|
||||||
|
isgl, isgcr, isgu, isogcr, iswl, ikrgr, ikrg, ipcg);
|
||||||
// ### krog
|
// ### krog
|
||||||
initEPSParam(cell, eps_transf_hyst_[cell].gasoil, true, 0.0, funcForCell(cell).sogcr_, funcForCell(cell).smin_[gpos], funcForCell(cell).sgcr_,
|
initEPSParam(cell, eps_transf_hyst_[cell].gasoil, true,
|
||||||
funcForCell(cell).smin_[wpos], funcForCell(cell).krorg_, funcForCell(cell).kromax_, isgl, isogcr, isgl, isgcr, iswl, ikrorg, ikro);
|
0.0,
|
||||||
|
funcForCell(cell).sogcr_,
|
||||||
|
funcForCell(cell).smin_[gpos],
|
||||||
|
funcForCell(cell).sgcr_,
|
||||||
|
funcForCell(cell).smin_[wpos],
|
||||||
|
funcForCell(cell).krorg_,
|
||||||
|
funcForCell(cell).kromax_,
|
||||||
|
0.0,
|
||||||
|
isgl, isogcr, isgl, isgcr, iswl, ikrorg, ikro, dummy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -747,6 +887,16 @@ namespace Opm
|
|||||||
param_col[table_num] = enkrvd.getColumn(itab); // itab=[1-7]: krw krg kro krwr krgr krorw krorg
|
param_col[table_num] = enkrvd.getColumn(itab); // itab=[1-7]: krw krg kro krwr krgr krorw krorg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (useKeyword && (keyword[0] == 'P' || keyword[1] == 'P') ) {
|
||||||
|
if (useAqua && (keyword == std::string("PCW") || keyword == std::string("IPCW")) ) {
|
||||||
|
scaleparam.resize(number_of_cells);
|
||||||
|
for (int i=0; i<number_of_cells; ++i)
|
||||||
|
scaleparam[i] = funcForCell(i).pcwmax_;
|
||||||
|
} else if (useVapour && (keyword == std::string("PCG") || keyword == std::string("IPCG")) ) {
|
||||||
|
scaleparam.resize(number_of_cells);
|
||||||
|
for (int i=0; i<number_of_cells; ++i)
|
||||||
|
scaleparam[i] = funcForCell(i).pcgmax_;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scaleparam.empty()) {
|
if (scaleparam.empty()) {
|
||||||
@ -802,13 +952,15 @@ namespace Opm
|
|||||||
const double s0_tab, // threephase complementary minimum saturation (-1.0 indicates 2-phase)
|
const double s0_tab, // threephase complementary minimum saturation (-1.0 indicates 2-phase)
|
||||||
const double krsr_tab, // relperm at displacing critical saturation
|
const double krsr_tab, // relperm at displacing critical saturation
|
||||||
const double krmax_tab, // relperm at maximum saturation
|
const double krmax_tab, // relperm at maximum saturation
|
||||||
|
const double pcmax_tab, // cap-pres at maximum saturation (zero => no scaling)
|
||||||
const std::vector<double>& sl, // For krow/krog calculations this is not used
|
const std::vector<double>& sl, // For krow/krog calculations this is not used
|
||||||
const std::vector<double>& scr,
|
const std::vector<double>& scr,
|
||||||
const std::vector<double>& su, // For krow/krog calculations this is SWL/SGL
|
const std::vector<double>& su, // For krow/krog calculations this is SWL/SGL
|
||||||
const std::vector<double>& sxcr,
|
const std::vector<double>& sxcr,
|
||||||
const std::vector<double>& s0,
|
const std::vector<double>& s0,
|
||||||
const std::vector<double>& krsr,
|
const std::vector<double>& krsr,
|
||||||
const std::vector<double>& krmax)
|
const std::vector<double>& krmax,
|
||||||
|
const std::vector<double>& pcmax) // For krow/krog calculations this is not used
|
||||||
{
|
{
|
||||||
if (scr.empty() && su.empty() && (sxcr.empty() || !do_3pt_) && s0.empty()) {
|
if (scr.empty() && su.empty() && (sxcr.empty() || !do_3pt_) && s0.empty()) {
|
||||||
data.doNotScale = true;
|
data.doNotScale = true;
|
||||||
@ -876,6 +1028,12 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (std::fabs(pcmax_tab) < 1.0e-8 || pcmax.empty() || pcmax_tab*pcmax[cell] < 0.0) {
|
||||||
|
data.pcFactor = 1.0;
|
||||||
|
} else {
|
||||||
|
data.pcFactor = pcmax[cell]/pcmax_tab;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
Loading…
Reference in New Issue
Block a user