Merge pull request #1153 from babrodtk/hysteresis_output

Added functions in SaturationProps for hysteresis IO
This commit is contained in:
Atgeirr Flø Rasmussen 2017-04-07 15:54:26 +02:00 committed by GitHub
commit 208e394e3d
2 changed files with 124 additions and 0 deletions

View File

@ -270,6 +270,94 @@ namespace Opm
} }
/// Set hysteresis parameters for gas-oil
/// \param[in] n Number of data points.
/// \param[in] pcswmdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::pcSwMdc(...))
/// \param[in] krnswdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::krnSwMdc(...))
void SaturationPropsFromDeck::setGasOilHystParams(const int n,
const int* cells,
const double* pcswmdc,
const double* krnswdc)
{
assert(cells != 0);
if (materialLawManager_->enableHysteresis()) {
for (int i = 0; i < n; ++i) {
materialLawManager_->setGasOilHysteresisParams(pcswmdc[i], krnswdc[i], cells[i]);
}
}
}
/// Get hysteresis parameters for gas-oil
/// \param[in] n Number of data points.
/// \param[in] pcswmdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::pcSwMdc(...))
/// \param[in] krnswdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::krnSwMdc(...))
void SaturationPropsFromDeck::getGasOilHystParams(const int n,
const int* cells,
double* pcswmdc,
double* krnswdc) const
{
assert(cells != 0);
if (materialLawManager_->enableHysteresis()) {
for (int i = 0; i < n; ++i) {
materialLawManager_->gasOilHysteresisParams(pcswmdc[i], krnswdc[i], cells[i]);
}
}
else {
for (int i = 0; i < n; ++i) {
//Signify non-physical values since not enabled
pcswmdc[i] = 2.0;
krnswdc[i] = 2.0;
}
}
}
/// Set hysteresis parameters for oil-water
/// \param[in] n Number of data points.
/// \param[in] pcswmdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::pcSwMdc(...))
/// \param[in] krnswdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::krnSwMdc(...))
void SaturationPropsFromDeck::setOilWaterHystParams(const int n,
const int* cells,
const double* pcswmdc,
const double* krnswdc)
{
assert(cells != 0);
if (materialLawManager_->enableHysteresis()) {
for (int i = 0; i < n; ++i) {
materialLawManager_->setOilWaterHysteresisParams(pcswmdc[i], krnswdc[i], cells[i]);
}
}
}
/// Get hysteresis parameters for oil-water
/// \param[in] n Number of data points.
/// \param[in] pcswmdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::pcSwMdc(...))
/// \param[in] krnswdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::krnSwMdc(...))
void SaturationPropsFromDeck::getOilWaterHystParams(const int n,
const int* cells,
double* pcswmdc,
double* krnswdc) const
{
assert(cells != 0);
if (materialLawManager_->enableHysteresis()) {
for (int i = 0; i < n; ++i) {
materialLawManager_->oilWaterHysteresisParams(pcswmdc[i], krnswdc[i], cells[i]);
}
}
else {
for (int i = 0; i < n; ++i) {
//Signify non-physical values since not enabled
pcswmdc[i] = 2.0;
krnswdc[i] = 2.0;
}
}
}
/// Update capillary pressure scaling according to pressure diff. and initial water saturation. /// Update capillary pressure scaling according to pressure diff. and initial water saturation.
/// \param[in] cell Cell index. /// \param[in] cell Cell index.
/// \param[in] pcow P_oil - P_water. /// \param[in] pcow P_oil - P_water.

View File

@ -121,6 +121,42 @@ namespace Opm
const int* cells, const int* cells,
const double* s); const double* s);
/// Set hysteresis parameters for gas-oil
/// \param[in] n Number of data points.
/// \param[in] pcswmdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::pcSwMdc(...))
/// \param[in] krnswdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::krnSwMdc(...))
void setGasOilHystParams(const int n,
const int* cells,
const double* pcswmdc,
const double* krnswdc);
/// Get hysteresis parameters for gas-oil
/// \param[in] n Number of data points.
/// \param[in] pcswmdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::pcSwMdc(...))
/// \param[in] krnswdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::krnSwMdc(...))
void getGasOilHystParams(const int n,
const int* cells,
double* pcswmdc,
double* krnswdc) const;
/// Set hysteresis parameters for oil-water
/// \param[in] n Number of data points.
/// \param[in] pcswmdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::pcSwMdc(...))
/// \param[in] krnswdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::krnSwMdc(...))
void setOilWaterHystParams(const int n,
const int* cells,
const double* pcswmdc,
const double* krnswdc);
/// Get hysteresis parameters for oil-water
/// \param[in] n Number of data points.
/// \param[in] pcswmdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::pcSwMdc(...))
/// \param[in] krnswdc Array of hysteresis parameters (@see EclHysteresisTwoPhaseLawParams::krnSwMdc(...))
void getOilWaterHystParams(const int n,
const int* cells,
double* pcswmdc,
double* krnswdc) const;
/// Update capillary pressure scaling according to pressure diff. and initial water saturation. /// Update capillary pressure scaling according to pressure diff. and initial water saturation.
/// \param[in] cell Cell index. /// \param[in] cell Cell index.
/// \param[in] pcow P_oil - P_water. /// \param[in] pcow P_oil - P_water.