mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Massive whitespace cleanup: entire fluid subdir.
This commit is contained in:
parent
f68c289e9d
commit
0f91bc6a34
@ -26,20 +26,20 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
|
|
||||||
BlackoilPropertiesBasic::BlackoilPropertiesBasic(const parameter::ParameterGroup& param,
|
BlackoilPropertiesBasic::BlackoilPropertiesBasic(const parameter::ParameterGroup& param,
|
||||||
const int dim,
|
const int dim,
|
||||||
const int num_cells)
|
const int num_cells)
|
||||||
{
|
{
|
||||||
double poro = param.getDefault("porosity", 1.0);
|
double poro = param.getDefault("porosity", 1.0);
|
||||||
using namespace Opm::unit;
|
using namespace Opm::unit;
|
||||||
using namespace Opm::prefix;
|
using namespace Opm::prefix;
|
||||||
double perm = param.getDefault("permeability", 100.0)*milli*darcy;
|
double perm = param.getDefault("permeability", 100.0)*milli*darcy;
|
||||||
rock_.init(dim, num_cells, poro, perm);
|
rock_.init(dim, num_cells, poro, perm);
|
||||||
pvt_.init(param);
|
pvt_.init(param);
|
||||||
satprops_.init(param);
|
satprops_.init(param);
|
||||||
if (pvt_.numPhases() != satprops_.numPhases()) {
|
if (pvt_.numPhases() != satprops_.numPhases()) {
|
||||||
THROW("BlackoilPropertiesBasic::BlackoilPropertiesBasic() - Inconsistent number of phases in pvt data ("
|
THROW("BlackoilPropertiesBasic::BlackoilPropertiesBasic() - Inconsistent number of phases in pvt data ("
|
||||||
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BlackoilPropertiesBasic::~BlackoilPropertiesBasic()
|
BlackoilPropertiesBasic::~BlackoilPropertiesBasic()
|
||||||
@ -90,11 +90,11 @@ namespace Opm
|
|||||||
/// \param[out] dmudp If non-null: array of nP viscosity derivative values,
|
/// \param[out] dmudp If non-null: array of nP viscosity derivative values,
|
||||||
/// array must be valid before calling.
|
/// array must be valid before calling.
|
||||||
void BlackoilPropertiesBasic::viscosity(const int n,
|
void BlackoilPropertiesBasic::viscosity(const int n,
|
||||||
const double* p,
|
const double* p,
|
||||||
const double* z,
|
const double* z,
|
||||||
const int* /*cells*/,
|
const int* /*cells*/,
|
||||||
double* mu,
|
double* mu,
|
||||||
double* dmudp) const
|
double* dmudp) const
|
||||||
{
|
{
|
||||||
if (dmudp) {
|
if (dmudp) {
|
||||||
THROW("BlackoilPropertiesBasic::viscosity() -- derivatives of viscosity not yet implemented.");
|
THROW("BlackoilPropertiesBasic::viscosity() -- derivatives of viscosity not yet implemented.");
|
||||||
@ -114,16 +114,16 @@ namespace Opm
|
|||||||
/// array must be valid before calling. The matrices are output
|
/// array must be valid before calling. The matrices are output
|
||||||
/// in Fortran order.
|
/// in Fortran order.
|
||||||
void BlackoilPropertiesBasic::matrix(const int n,
|
void BlackoilPropertiesBasic::matrix(const int n,
|
||||||
const double* /*p*/,
|
const double* /*p*/,
|
||||||
const double* /*z*/,
|
const double* /*z*/,
|
||||||
const int* /*cells*/,
|
const int* /*cells*/,
|
||||||
double* A,
|
double* A,
|
||||||
double* dAdp) const
|
double* dAdp) const
|
||||||
{
|
{
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
ASSERT(np <= 2);
|
ASSERT(np <= 2);
|
||||||
double B[2]; // Must be enough since component classes do not handle more than 2.
|
double B[2]; // Must be enough since component classes do not handle more than 2.
|
||||||
pvt_.B(1, 0, 0, B);
|
pvt_.B(1, 0, 0, B);
|
||||||
// Compute A matrix
|
// Compute A matrix
|
||||||
// #pragma omp parallel for
|
// #pragma omp parallel for
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
@ -152,8 +152,8 @@ namespace Opm
|
|||||||
/// of a call to the method matrix().
|
/// of a call to the method matrix().
|
||||||
/// \param[out] rho Array of nP density values, array must be valid before calling.
|
/// \param[out] rho Array of nP density values, array must be valid before calling.
|
||||||
void BlackoilPropertiesBasic::density(const int n,
|
void BlackoilPropertiesBasic::density(const int n,
|
||||||
const double* A,
|
const double* A,
|
||||||
double* rho) const
|
double* rho) const
|
||||||
{
|
{
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
const double* sdens = pvt_.surfaceDensities();
|
const double* sdens = pvt_.surfaceDensities();
|
||||||
@ -186,10 +186,10 @@ namespace Opm
|
|||||||
/// m_{ij} = \frac{dkr_i}{ds^j},
|
/// m_{ij} = \frac{dkr_i}{ds^j},
|
||||||
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
||||||
void BlackoilPropertiesBasic::relperm(const int n,
|
void BlackoilPropertiesBasic::relperm(const int n,
|
||||||
const double* s,
|
const double* s,
|
||||||
const int* /*cells*/,
|
const int* /*cells*/,
|
||||||
double* kr,
|
double* kr,
|
||||||
double* dkrds) const
|
double* dkrds) const
|
||||||
{
|
{
|
||||||
satprops_.relperm(n, s, kr, dkrds);
|
satprops_.relperm(n, s, kr, dkrds);
|
||||||
}
|
}
|
||||||
@ -205,10 +205,10 @@ namespace Opm
|
|||||||
/// m_{ij} = \frac{dpc_i}{ds^j},
|
/// m_{ij} = \frac{dpc_i}{ds^j},
|
||||||
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
||||||
void BlackoilPropertiesBasic::capPress(const int n,
|
void BlackoilPropertiesBasic::capPress(const int n,
|
||||||
const double* s,
|
const double* s,
|
||||||
const int* /*cells*/,
|
const int* /*cells*/,
|
||||||
double* pc,
|
double* pc,
|
||||||
double* dpcds) const
|
double* dpcds) const
|
||||||
{
|
{
|
||||||
satprops_.capPress(n, s, pc, dpcds);
|
satprops_.capPress(n, s, pc, dpcds);
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ namespace Opm
|
|||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const
|
double* smax) const
|
||||||
{
|
{
|
||||||
satprops_.satRange(n, smin, smax);
|
satprops_.satRange(n, smin, smax);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,16 +35,16 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Construct from parameters.
|
/// Construct from parameters.
|
||||||
/// The following parameters are accepted (defaults):
|
/// The following parameters are accepted (defaults):
|
||||||
/// num_phases (2) Must be 1 or 2.
|
/// num_phases (2) Must be 1 or 2.
|
||||||
/// relperm_func ("Linear") Must be "Constant", "Linear" or "Quadratic".
|
/// relperm_func ("Linear") Must be "Constant", "Linear" or "Quadratic".
|
||||||
/// rho1 [rho2, rho3] (1.0e3) Density in kg/m^3
|
/// rho1 [rho2, rho3] (1.0e3) Density in kg/m^3
|
||||||
/// mu1 [mu2, mu3] (1.0) Viscosity in cP
|
/// mu1 [mu2, mu3] (1.0) Viscosity in cP
|
||||||
/// porosity (1.0) Porosity
|
/// porosity (1.0) Porosity
|
||||||
/// permeability (100.0) Permeability in mD
|
/// permeability (100.0) Permeability in mD
|
||||||
BlackoilPropertiesBasic(const parameter::ParameterGroup& param,
|
BlackoilPropertiesBasic(const parameter::ParameterGroup& param,
|
||||||
const int dim,
|
const int dim,
|
||||||
const int num_cells);
|
const int num_cells);
|
||||||
|
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
virtual ~BlackoilPropertiesBasic();
|
virtual ~BlackoilPropertiesBasic();
|
||||||
@ -151,7 +151,7 @@ namespace Opm
|
|||||||
double* dpcds) const;
|
double* dpcds) const;
|
||||||
|
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// In cell cells[i], saturation of phase p is allowed to be
|
/// In cell cells[i], saturation of phase p is allowed to be
|
||||||
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
|
@ -33,10 +33,10 @@ namespace Opm
|
|||||||
satprops_.reset(ptr);
|
satprops_.reset(ptr);
|
||||||
ptr->init(deck, grid, 200);
|
ptr->init(deck, grid, 200);
|
||||||
|
|
||||||
if (pvt_.numPhases() != satprops_->numPhases()) {
|
if (pvt_.numPhases() != satprops_->numPhases()) {
|
||||||
THROW("BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck() - Inconsistent number of phases in pvt data ("
|
THROW("BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck() - Inconsistent number of phases in pvt data ("
|
||||||
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_->numPhases() << ").");
|
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_->numPhases() << ").");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
||||||
@ -319,7 +319,7 @@ namespace Opm
|
|||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const
|
double* smax) const
|
||||||
{
|
{
|
||||||
satprops_->satRange(n, cells, smin, smax);
|
satprops_->satRange(n, cells, smin, smax);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,15 +41,15 @@ namespace Opm
|
|||||||
public:
|
public:
|
||||||
/// Initialize from deck and grid.
|
/// Initialize from deck and grid.
|
||||||
/// \param[in] deck Deck input parser
|
/// \param[in] deck Deck input parser
|
||||||
/// \param[in] grid Grid to which property object applies, needed for the
|
/// \param[in] grid Grid to which property object applies, needed for the
|
||||||
/// mapping from cell indices (typically from a processed grid)
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
/// to logical cartesian indices consistent with the deck.
|
/// to logical cartesian indices consistent with the deck.
|
||||||
BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
||||||
const UnstructuredGrid& grid);
|
const UnstructuredGrid& grid);
|
||||||
|
|
||||||
/// Initialize from deck, grid and parameters.
|
/// Initialize from deck, grid and parameters.
|
||||||
/// \param[in] deck Deck input parser
|
/// \param[in] deck Deck input parser
|
||||||
/// \param[in] grid Grid to which property object applies, needed for the
|
/// \param[in] grid Grid to which property object applies, needed for the
|
||||||
/// mapping from cell indices (typically from a processed grid)
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
/// to logical cartesian indices consistent with the deck.
|
/// to logical cartesian indices consistent with the deck.
|
||||||
/// \param[in] param Parameters. Accepted parameters include:
|
/// \param[in] param Parameters. Accepted parameters include:
|
||||||
@ -167,9 +167,9 @@ namespace Opm
|
|||||||
double* dpcds) const;
|
double* dpcds) const;
|
||||||
|
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// In cell cells[i], saturation of phase p is allowed to be
|
/// In cell cells[i], saturation of phase p is allowed to be
|
||||||
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
/// \param[in] cells Array of n cell indices.
|
/// \param[in] cells Array of n cell indices.
|
||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
|
@ -138,9 +138,9 @@ namespace Opm
|
|||||||
double* dpcds) const = 0;
|
double* dpcds) const = 0;
|
||||||
|
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// In cell cells[i], saturation of phase p is allowed to be
|
/// In cell cells[i], saturation of phase p is allowed to be
|
||||||
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
/// \param[in] cells Array of n cell indices.
|
/// \param[in] cells Array of n cell indices.
|
||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
|
@ -28,22 +28,22 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
|
|
||||||
IncompPropertiesBasic::IncompPropertiesBasic(const parameter::ParameterGroup& param,
|
IncompPropertiesBasic::IncompPropertiesBasic(const parameter::ParameterGroup& param,
|
||||||
const int dim,
|
const int dim,
|
||||||
const int num_cells)
|
const int num_cells)
|
||||||
{
|
{
|
||||||
double poro = param.getDefault("porosity", 1.0);
|
double poro = param.getDefault("porosity", 1.0);
|
||||||
using namespace Opm::unit;
|
using namespace Opm::unit;
|
||||||
using namespace Opm::prefix;
|
using namespace Opm::prefix;
|
||||||
double perm = param.getDefault("permeability", 100.0)*milli*darcy;
|
double perm = param.getDefault("permeability", 100.0)*milli*darcy;
|
||||||
rock_.init(dim, num_cells, poro, perm);
|
rock_.init(dim, num_cells, poro, perm);
|
||||||
pvt_.init(param);
|
pvt_.init(param);
|
||||||
satprops_.init(param);
|
satprops_.init(param);
|
||||||
if (pvt_.numPhases() != satprops_.numPhases()) {
|
if (pvt_.numPhases() != satprops_.numPhases()) {
|
||||||
THROW("IncompPropertiesBasic::IncompPropertiesBasic() - Inconsistent number of phases in pvt data ("
|
THROW("IncompPropertiesBasic::IncompPropertiesBasic() - Inconsistent number of phases in pvt data ("
|
||||||
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
||||||
}
|
}
|
||||||
viscosity_.resize(pvt_.numPhases());
|
viscosity_.resize(pvt_.numPhases());
|
||||||
pvt_.mu(1, 0, 0, &viscosity_[0]);
|
pvt_.mu(1, 0, 0, &viscosity_[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
IncompPropertiesBasic::IncompPropertiesBasic(const int num_phases,
|
IncompPropertiesBasic::IncompPropertiesBasic(const int num_phases,
|
||||||
@ -56,14 +56,14 @@ namespace Opm
|
|||||||
const int num_cells)
|
const int num_cells)
|
||||||
{
|
{
|
||||||
rock_.init(dim, num_cells, por, perm);
|
rock_.init(dim, num_cells, por, perm);
|
||||||
pvt_.init(num_phases, rho, mu);
|
pvt_.init(num_phases, rho, mu);
|
||||||
satprops_.init(num_phases, relpermfunc);
|
satprops_.init(num_phases, relpermfunc);
|
||||||
if (pvt_.numPhases() != satprops_.numPhases()) {
|
if (pvt_.numPhases() != satprops_.numPhases()) {
|
||||||
THROW("IncompPropertiesBasic::IncompPropertiesBasic() - Inconsistent number of phases in pvt data ("
|
THROW("IncompPropertiesBasic::IncompPropertiesBasic() - Inconsistent number of phases in pvt data ("
|
||||||
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
||||||
}
|
}
|
||||||
viscosity_.resize(pvt_.numPhases());
|
viscosity_.resize(pvt_.numPhases());
|
||||||
pvt_.mu(1, 0, 0, &viscosity_[0]);
|
pvt_.mu(1, 0, 0, &viscosity_[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
IncompPropertiesBasic::~IncompPropertiesBasic()
|
IncompPropertiesBasic::~IncompPropertiesBasic()
|
||||||
@ -109,7 +109,7 @@ namespace Opm
|
|||||||
/// \return Array of P viscosity values.
|
/// \return Array of P viscosity values.
|
||||||
const double* IncompPropertiesBasic::viscosity() const
|
const double* IncompPropertiesBasic::viscosity() const
|
||||||
{
|
{
|
||||||
return &viscosity_[0];
|
return &viscosity_[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \return Array of P density values.
|
/// \return Array of P density values.
|
||||||
@ -117,7 +117,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
// No difference between reservoir and surface densities
|
// No difference between reservoir and surface densities
|
||||||
// modelled by this class.
|
// modelled by this class.
|
||||||
return pvt_.surfaceDensities();
|
return pvt_.surfaceDensities();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \return Array of P density values.
|
/// \return Array of P density values.
|
||||||
@ -125,7 +125,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
// No difference between reservoir and surface densities
|
// No difference between reservoir and surface densities
|
||||||
// modelled by this class.
|
// modelled by this class.
|
||||||
return pvt_.surfaceDensities();
|
return pvt_.surfaceDensities();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
@ -138,10 +138,10 @@ namespace Opm
|
|||||||
/// m_{ij} = \frac{dkr_i}{ds^j},
|
/// m_{ij} = \frac{dkr_i}{ds^j},
|
||||||
/// and is output in Fortran order (m_00 m_10 m_20 m_01 ...)
|
/// and is output in Fortran order (m_00 m_10 m_20 m_01 ...)
|
||||||
void IncompPropertiesBasic::relperm(const int n,
|
void IncompPropertiesBasic::relperm(const int n,
|
||||||
const double* s,
|
const double* s,
|
||||||
const int* /*cells*/,
|
const int* /*cells*/,
|
||||||
double* kr,
|
double* kr,
|
||||||
double* dkrds) const
|
double* dkrds) const
|
||||||
{
|
{
|
||||||
satprops_.relperm(n, s, kr, dkrds);
|
satprops_.relperm(n, s, kr, dkrds);
|
||||||
}
|
}
|
||||||
@ -157,10 +157,10 @@ namespace Opm
|
|||||||
/// m_{ij} = \frac{dpc_i}{ds^j},
|
/// m_{ij} = \frac{dpc_i}{ds^j},
|
||||||
/// and is output in Fortran order (m_00 m_10 m_20 m_01 ...)
|
/// and is output in Fortran order (m_00 m_10 m_20 m_01 ...)
|
||||||
void IncompPropertiesBasic::capPress(const int n,
|
void IncompPropertiesBasic::capPress(const int n,
|
||||||
const double* s,
|
const double* s,
|
||||||
const int* /*cells*/,
|
const int* /*cells*/,
|
||||||
double* pc,
|
double* pc,
|
||||||
double* dpcds) const
|
double* dpcds) const
|
||||||
{
|
{
|
||||||
satprops_.capPress(n, s, pc, dpcds);
|
satprops_.capPress(n, s, pc, dpcds);
|
||||||
}
|
}
|
||||||
@ -174,11 +174,11 @@ namespace Opm
|
|||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
||||||
void IncompPropertiesBasic::satRange(const int n,
|
void IncompPropertiesBasic::satRange(const int n,
|
||||||
const int* /*cells*/,
|
const int* /*cells*/,
|
||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const
|
double* smax) const
|
||||||
{
|
{
|
||||||
satprops_.satRange(n, smin, smax);
|
satprops_.satRange(n, smin, smax);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -42,29 +42,29 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Construct from parameters.
|
/// Construct from parameters.
|
||||||
/// The following parameters are accepted (defaults):
|
/// The following parameters are accepted (defaults):
|
||||||
/// num_phases (2) Must be 1 or 2.
|
/// num_phases (2) Must be 1 or 2.
|
||||||
/// relperm_func ("Linear") Must be "Constant", "Linear" or "Quadratic".
|
/// relperm_func ("Linear") Must be "Constant", "Linear" or "Quadratic".
|
||||||
/// rho1 [rho2, rho3] (1.0e3) Density in kg/m^3
|
/// rho1 [rho2, rho3] (1.0e3) Density in kg/m^3
|
||||||
/// mu1 [mu2, mu3] (1.0) Viscosity in cP
|
/// mu1 [mu2, mu3] (1.0) Viscosity in cP
|
||||||
/// porosity (1.0) Porosity
|
/// porosity (1.0) Porosity
|
||||||
/// permeability (100.0) Permeability in mD
|
/// permeability (100.0) Permeability in mD
|
||||||
IncompPropertiesBasic(const parameter::ParameterGroup& param,
|
IncompPropertiesBasic(const parameter::ParameterGroup& param,
|
||||||
const int dim,
|
const int dim,
|
||||||
const int num_cells);
|
const int num_cells);
|
||||||
|
|
||||||
|
|
||||||
/// Construct from arguments a basic two phase fluid.
|
/// Construct from arguments a basic two phase fluid.
|
||||||
IncompPropertiesBasic(const int num_phases,
|
IncompPropertiesBasic(const int num_phases,
|
||||||
const SaturationPropsBasic::RelPermFunc& relpermfunc,
|
const SaturationPropsBasic::RelPermFunc& relpermfunc,
|
||||||
const std::vector<double>& rho,
|
const std::vector<double>& rho,
|
||||||
const std::vector<double>& mu,
|
const std::vector<double>& mu,
|
||||||
const double porosity,
|
const double porosity,
|
||||||
const double permeability,
|
const double permeability,
|
||||||
const int dim,
|
const int dim,
|
||||||
const int num_cells);
|
const int num_cells);
|
||||||
|
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
virtual ~IncompPropertiesBasic();
|
virtual ~IncompPropertiesBasic();
|
||||||
|
|
||||||
// ---- Rock interface ----
|
// ---- Rock interface ----
|
||||||
@ -132,9 +132,9 @@ namespace Opm
|
|||||||
double* dpcds) const;
|
double* dpcds) const;
|
||||||
|
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// In cell cells[i], saturation of phase p is allowed to be
|
/// In cell cells[i], saturation of phase p is allowed to be
|
||||||
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
/// \param[in] cells Array of n cell indices.
|
/// \param[in] cells Array of n cell indices.
|
||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
@ -145,9 +145,9 @@ namespace Opm
|
|||||||
double* smax) const;
|
double* smax) const;
|
||||||
private:
|
private:
|
||||||
RockBasic rock_;
|
RockBasic rock_;
|
||||||
PvtPropertiesBasic pvt_;
|
PvtPropertiesBasic pvt_;
|
||||||
SaturationPropsBasic satprops_;
|
SaturationPropsBasic satprops_;
|
||||||
std::vector<double> viscosity_;
|
std::vector<double> viscosity_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,15 +27,15 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
|
|
||||||
IncompPropertiesFromDeck::IncompPropertiesFromDeck(const EclipseGridParser& deck,
|
IncompPropertiesFromDeck::IncompPropertiesFromDeck(const EclipseGridParser& deck,
|
||||||
const UnstructuredGrid& grid)
|
const UnstructuredGrid& grid)
|
||||||
{
|
{
|
||||||
rock_.init(deck, grid);
|
rock_.init(deck, grid);
|
||||||
pvt_.init(deck);
|
pvt_.init(deck);
|
||||||
satprops_.init(deck, grid, 200);
|
satprops_.init(deck, grid, 200);
|
||||||
if (pvt_.numPhases() != satprops_.numPhases()) {
|
if (pvt_.numPhases() != satprops_.numPhases()) {
|
||||||
THROW("IncompPropertiesFromDeck::IncompPropertiesFromDeck() - Inconsistent number of phases in pvt data ("
|
THROW("IncompPropertiesFromDeck::IncompPropertiesFromDeck() - Inconsistent number of phases in pvt data ("
|
||||||
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IncompPropertiesFromDeck::~IncompPropertiesFromDeck()
|
IncompPropertiesFromDeck::~IncompPropertiesFromDeck()
|
||||||
@ -81,19 +81,19 @@ namespace Opm
|
|||||||
/// \return Array of P viscosity values.
|
/// \return Array of P viscosity values.
|
||||||
const double* IncompPropertiesFromDeck::viscosity() const
|
const double* IncompPropertiesFromDeck::viscosity() const
|
||||||
{
|
{
|
||||||
return pvt_.viscosity();
|
return pvt_.viscosity();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \return Array of P density values.
|
/// \return Array of P density values.
|
||||||
const double* IncompPropertiesFromDeck::density() const
|
const double* IncompPropertiesFromDeck::density() const
|
||||||
{
|
{
|
||||||
return pvt_.reservoirDensities();
|
return pvt_.reservoirDensities();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \return Array of P density values.
|
/// \return Array of P density values.
|
||||||
const double* IncompPropertiesFromDeck::surfaceDensity() const
|
const double* IncompPropertiesFromDeck::surfaceDensity() const
|
||||||
{
|
{
|
||||||
return pvt_.surfaceDensities();
|
return pvt_.surfaceDensities();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
@ -106,10 +106,10 @@ namespace Opm
|
|||||||
/// m_{ij} = \frac{dkr_i}{ds^j},
|
/// m_{ij} = \frac{dkr_i}{ds^j},
|
||||||
/// and is output in Fortran order (m_00 m_10 m_20 m_01 ...)
|
/// and is output in Fortran order (m_00 m_10 m_20 m_01 ...)
|
||||||
void IncompPropertiesFromDeck::relperm(const int n,
|
void IncompPropertiesFromDeck::relperm(const int n,
|
||||||
const double* s,
|
const double* s,
|
||||||
const int* cells,
|
const int* cells,
|
||||||
double* kr,
|
double* kr,
|
||||||
double* dkrds) const
|
double* dkrds) const
|
||||||
{
|
{
|
||||||
satprops_.relperm(n, s, cells, kr, dkrds);
|
satprops_.relperm(n, s, cells, kr, dkrds);
|
||||||
}
|
}
|
||||||
@ -125,10 +125,10 @@ namespace Opm
|
|||||||
/// m_{ij} = \frac{dpc_i}{ds^j},
|
/// m_{ij} = \frac{dpc_i}{ds^j},
|
||||||
/// and is output in Fortran order (m_00 m_10 m_20 m_01 ...)
|
/// and is output in Fortran order (m_00 m_10 m_20 m_01 ...)
|
||||||
void IncompPropertiesFromDeck::capPress(const int n,
|
void IncompPropertiesFromDeck::capPress(const int n,
|
||||||
const double* s,
|
const double* s,
|
||||||
const int* cells,
|
const int* cells,
|
||||||
double* pc,
|
double* pc,
|
||||||
double* dpcds) const
|
double* dpcds) const
|
||||||
{
|
{
|
||||||
satprops_.capPress(n, s, cells, pc, dpcds);
|
satprops_.capPress(n, s, cells, pc, dpcds);
|
||||||
}
|
}
|
||||||
@ -142,11 +142,11 @@ namespace Opm
|
|||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
||||||
void IncompPropertiesFromDeck::satRange(const int n,
|
void IncompPropertiesFromDeck::satRange(const int n,
|
||||||
const int* cells,
|
const int* cells,
|
||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const
|
double* smax) const
|
||||||
{
|
{
|
||||||
satprops_.satRange(n, cells, smin, smax);
|
satprops_.satRange(n, cells, smin, smax);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -47,13 +47,13 @@ namespace Opm
|
|||||||
public:
|
public:
|
||||||
/// Initialize from deck and grid.
|
/// Initialize from deck and grid.
|
||||||
/// \param deck Deck input parser
|
/// \param deck Deck input parser
|
||||||
/// \param grid Grid to which property object applies, needed for the
|
/// \param grid Grid to which property object applies, needed for the
|
||||||
/// mapping from cell indices (typically from a processed grid)
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
/// to logical cartesian indices consistent with the deck.
|
/// to logical cartesian indices consistent with the deck.
|
||||||
IncompPropertiesFromDeck(const EclipseGridParser& deck,
|
IncompPropertiesFromDeck(const EclipseGridParser& deck,
|
||||||
const UnstructuredGrid& grid);
|
const UnstructuredGrid& grid);
|
||||||
|
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
virtual ~IncompPropertiesFromDeck();
|
virtual ~IncompPropertiesFromDeck();
|
||||||
|
|
||||||
// ---- Rock interface ----
|
// ---- Rock interface ----
|
||||||
@ -121,9 +121,9 @@ namespace Opm
|
|||||||
double* dpcds) const;
|
double* dpcds) const;
|
||||||
|
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// In cell cells[i], saturation of phase p is allowed to be
|
/// In cell cells[i], saturation of phase p is allowed to be
|
||||||
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
/// \param[in] cells Array of n cell indices.
|
/// \param[in] cells Array of n cell indices.
|
||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
@ -134,7 +134,7 @@ namespace Opm
|
|||||||
double* smax) const;
|
double* smax) const;
|
||||||
private:
|
private:
|
||||||
RockFromDeck rock_;
|
RockFromDeck rock_;
|
||||||
PvtPropertiesIncompFromDeck pvt_;
|
PvtPropertiesIncompFromDeck pvt_;
|
||||||
SaturationPropsFromDeck<SatFuncStone2Uniform> satprops_;
|
SaturationPropsFromDeck<SatFuncStone2Uniform> satprops_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,9 +109,9 @@ namespace Opm
|
|||||||
double* pc,
|
double* pc,
|
||||||
double* dpcds) const = 0;
|
double* dpcds) const = 0;
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// In cell cells[i], saturation of phase p is allowed to be
|
/// In cell cells[i], saturation of phase p is allowed to be
|
||||||
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
/// in the interval [smin[i*P + p], smax[i*P + p]].
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
/// \param[in] cells Array of n cell indices.
|
/// \param[in] cells Array of n cell indices.
|
||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
|
@ -34,41 +34,41 @@ namespace Opm
|
|||||||
|
|
||||||
void PvtPropertiesBasic::init(const parameter::ParameterGroup& param)
|
void PvtPropertiesBasic::init(const parameter::ParameterGroup& param)
|
||||||
{
|
{
|
||||||
int num_phases = param.getDefault("num_phases", 2);
|
int num_phases = param.getDefault("num_phases", 2);
|
||||||
if (num_phases > 3 || num_phases < 1) {
|
if (num_phases > 3 || num_phases < 1) {
|
||||||
THROW("PvtPropertiesBasic::init() illegal num_phases: " << num_phases);
|
THROW("PvtPropertiesBasic::init() illegal num_phases: " << num_phases);
|
||||||
}
|
}
|
||||||
density_.resize(num_phases);
|
density_.resize(num_phases);
|
||||||
viscosity_.resize(num_phases);
|
viscosity_.resize(num_phases);
|
||||||
// We currently do not allow the user to set B.
|
// We currently do not allow the user to set B.
|
||||||
formation_volume_factor_.clear();
|
formation_volume_factor_.clear();
|
||||||
formation_volume_factor_.resize(num_phases, 1.0);
|
formation_volume_factor_.resize(num_phases, 1.0);
|
||||||
|
|
||||||
// Setting mu and rho from parameters
|
// Setting mu and rho from parameters
|
||||||
using namespace Opm::prefix;
|
using namespace Opm::prefix;
|
||||||
using namespace Opm::unit;
|
using namespace Opm::unit;
|
||||||
const double kgpm3 = kilogram/cubic(meter);
|
const double kgpm3 = kilogram/cubic(meter);
|
||||||
const double cP = centi*Poise;
|
const double cP = centi*Poise;
|
||||||
std::string rname[3] = { "rho1", "rho2", "rho3" };
|
std::string rname[3] = { "rho1", "rho2", "rho3" };
|
||||||
double rdefault[3] = { 1.0e3, 1.0e3, 1.0e3 };
|
double rdefault[3] = { 1.0e3, 1.0e3, 1.0e3 };
|
||||||
std::string vname[3] = { "mu1", "mu2", "mu3" };
|
std::string vname[3] = { "mu1", "mu2", "mu3" };
|
||||||
double vdefault[3] = { 1.0, 1.0, 1.0 };
|
double vdefault[3] = { 1.0, 1.0, 1.0 };
|
||||||
for (int phase = 0; phase < num_phases; ++phase) {
|
for (int phase = 0; phase < num_phases; ++phase) {
|
||||||
density_[phase] = kgpm3*param.getDefault(rname[phase], rdefault[phase]);
|
density_[phase] = kgpm3*param.getDefault(rname[phase], rdefault[phase]);
|
||||||
viscosity_[phase] = cP*param.getDefault(vname[phase], vdefault[phase]);
|
viscosity_[phase] = cP*param.getDefault(vname[phase], vdefault[phase]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PvtPropertiesBasic::init(const int num_phases,
|
void PvtPropertiesBasic::init(const int num_phases,
|
||||||
const std::vector<double>& rho,
|
const std::vector<double>& rho,
|
||||||
const std::vector<double>& visc)
|
const std::vector<double>& visc)
|
||||||
{
|
{
|
||||||
if (num_phases > 3 || num_phases < 1) {
|
if (num_phases > 3 || num_phases < 1) {
|
||||||
THROW("PvtPropertiesBasic::init() illegal num_phases: " << num_phases);
|
THROW("PvtPropertiesBasic::init() illegal num_phases: " << num_phases);
|
||||||
}
|
}
|
||||||
// We currently do not allow the user to set B.
|
// We currently do not allow the user to set B.
|
||||||
formation_volume_factor_.clear();
|
formation_volume_factor_.clear();
|
||||||
formation_volume_factor_.resize(num_phases, 1.0);
|
formation_volume_factor_.resize(num_phases, 1.0);
|
||||||
density_ = rho;
|
density_ = rho;
|
||||||
viscosity_ = visc;
|
viscosity_ = visc;
|
||||||
}
|
}
|
||||||
@ -87,69 +87,69 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
void PvtPropertiesBasic::mu(const int n,
|
void PvtPropertiesBasic::mu(const int n,
|
||||||
const double* /*p*/,
|
const double* /*p*/,
|
||||||
const double* /*z*/,
|
const double* /*z*/,
|
||||||
double* output_mu) const
|
double* output_mu) const
|
||||||
{
|
{
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
for (int phase = 0; phase < np; ++phase) {
|
for (int phase = 0; phase < np; ++phase) {
|
||||||
// #pragma omp parallel for
|
// #pragma omp parallel for
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
output_mu[np*i + phase] = viscosity_[phase];
|
output_mu[np*i + phase] = viscosity_[phase];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PvtPropertiesBasic::B(const int n,
|
void PvtPropertiesBasic::B(const int n,
|
||||||
const double* /*p*/,
|
const double* /*p*/,
|
||||||
const double* /*z*/,
|
const double* /*z*/,
|
||||||
double* output_B) const
|
double* output_B) const
|
||||||
{
|
{
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
for (int phase = 0; phase < np; ++phase) {
|
for (int phase = 0; phase < np; ++phase) {
|
||||||
// #pragma omp parallel for
|
// #pragma omp parallel for
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
output_B[np*i + phase] = formation_volume_factor_[phase];
|
output_B[np*i + phase] = formation_volume_factor_[phase];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PvtPropertiesBasic::dBdp(const int n,
|
void PvtPropertiesBasic::dBdp(const int n,
|
||||||
const double* /*p*/,
|
const double* /*p*/,
|
||||||
const double* /*z*/,
|
const double* /*z*/,
|
||||||
double* output_B,
|
double* output_B,
|
||||||
double* output_dBdp) const
|
double* output_dBdp) const
|
||||||
{
|
{
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
for (int phase = 0; phase < np; ++phase) {
|
for (int phase = 0; phase < np; ++phase) {
|
||||||
// #pragma omp parallel for
|
// #pragma omp parallel for
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
output_B[np*i + phase] = formation_volume_factor_[phase];
|
output_B[np*i + phase] = formation_volume_factor_[phase];
|
||||||
output_dBdp[np*i + phase] = 0.0;
|
output_dBdp[np*i + phase] = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PvtPropertiesBasic::R(const int n,
|
void PvtPropertiesBasic::R(const int n,
|
||||||
const double* /*p*/,
|
const double* /*p*/,
|
||||||
const double* /*z*/,
|
const double* /*z*/,
|
||||||
double* output_R) const
|
double* output_R) const
|
||||||
{
|
{
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
std::fill(output_R, output_R + n*np, 0.0);
|
std::fill(output_R, output_R + n*np, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PvtPropertiesBasic::dRdp(const int n,
|
void PvtPropertiesBasic::dRdp(const int n,
|
||||||
const double* /*p*/,
|
const double* /*p*/,
|
||||||
const double* /*z*/,
|
const double* /*z*/,
|
||||||
double* output_R,
|
double* output_R,
|
||||||
double* output_dRdp) const
|
double* output_dRdp) const
|
||||||
{
|
{
|
||||||
const int np = numPhases();
|
const int np = numPhases();
|
||||||
std::fill(output_R, output_R + n*np, 0.0);
|
std::fill(output_R, output_R + n*np, 0.0);
|
||||||
std::fill(output_dRdp, output_dRdp + n*np, 0.0);
|
std::fill(output_dRdp, output_dRdp + n*np, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -38,11 +38,11 @@ namespace Opm
|
|||||||
PvtPropertiesBasic();
|
PvtPropertiesBasic();
|
||||||
|
|
||||||
/// Initialize from parameters.
|
/// Initialize from parameters.
|
||||||
/// The following parameters are accepted (defaults):
|
/// The following parameters are accepted (defaults):
|
||||||
/// num_phases (2) Must be 1, 2 or 3.
|
/// num_phases (2) Must be 1, 2 or 3.
|
||||||
/// rho1 [rho2, rho3] (1.0e3) Density in kg/m^3
|
/// rho1 [rho2, rho3] (1.0e3) Density in kg/m^3
|
||||||
/// mu1 [mu2, mu3] (1.0) Viscosity in cP
|
/// mu1 [mu2, mu3] (1.0) Viscosity in cP
|
||||||
void init(const parameter::ParameterGroup& param);
|
void init(const parameter::ParameterGroup& param);
|
||||||
|
|
||||||
/// Initialize from arguments.
|
/// Initialize from arguments.
|
||||||
/// Basic multi phase fluid pvt properties.
|
/// Basic multi phase fluid pvt properties.
|
||||||
@ -55,7 +55,7 @@ namespace Opm
|
|||||||
|
|
||||||
/// Densities of stock components at surface conditions.
|
/// Densities of stock components at surface conditions.
|
||||||
/// \return Array of size numPhases().
|
/// \return Array of size numPhases().
|
||||||
const double* surfaceDensities() const;
|
const double* surfaceDensities() const;
|
||||||
|
|
||||||
/// Viscosity as a function of p and z.
|
/// Viscosity as a function of p and z.
|
||||||
void mu(const int n,
|
void mu(const int n,
|
||||||
@ -90,9 +90,9 @@ namespace Opm
|
|||||||
double* output_dRdp) const;
|
double* output_dRdp) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<double> density_;
|
std::vector<double> density_;
|
||||||
std::vector<double> viscosity_;
|
std::vector<double> viscosity_;
|
||||||
std::vector<double> formation_volume_factor_;
|
std::vector<double> formation_volume_factor_;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,54 +38,54 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
typedef std::vector<std::vector<std::vector<double> > > table_t;
|
typedef std::vector<std::vector<std::vector<double> > > table_t;
|
||||||
// If we need multiple regions, this class and the SinglePvt* classes must change.
|
// If we need multiple regions, this class and the SinglePvt* classes must change.
|
||||||
int region_number = 0;
|
int region_number = 0;
|
||||||
|
|
||||||
PhaseUsage phase_usage = phaseUsageFromDeck(deck);
|
PhaseUsage phase_usage = phaseUsageFromDeck(deck);
|
||||||
if (phase_usage.phase_used[PhaseUsage::Vapour] ||
|
if (phase_usage.phase_used[PhaseUsage::Vapour] ||
|
||||||
!phase_usage.phase_used[PhaseUsage::Aqua] ||
|
!phase_usage.phase_used[PhaseUsage::Aqua] ||
|
||||||
!phase_usage.phase_used[PhaseUsage::Liquid]) {
|
!phase_usage.phase_used[PhaseUsage::Liquid]) {
|
||||||
THROW("PvtPropertiesIncompFromDeck::init() -- must have gas and oil phases (only) in deck input.\n");
|
THROW("PvtPropertiesIncompFromDeck::init() -- must have gas and oil phases (only) in deck input.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Surface densities. Accounting for different orders in eclipse and our code.
|
// Surface densities. Accounting for different orders in eclipse and our code.
|
||||||
if (deck.hasField("DENSITY")) {
|
if (deck.hasField("DENSITY")) {
|
||||||
const std::vector<double>& d = deck.getDENSITY().densities_[region_number];
|
const std::vector<double>& d = deck.getDENSITY().densities_[region_number];
|
||||||
enum { ECL_oil = 0, ECL_water = 1, ECL_gas = 2 };
|
enum { ECL_oil = 0, ECL_water = 1, ECL_gas = 2 };
|
||||||
surface_density_[phase_usage.phase_pos[PhaseUsage::Aqua]] = d[ECL_water];
|
surface_density_[phase_usage.phase_pos[PhaseUsage::Aqua]] = d[ECL_water];
|
||||||
surface_density_[phase_usage.phase_pos[PhaseUsage::Liquid]] = d[ECL_oil];
|
surface_density_[phase_usage.phase_pos[PhaseUsage::Liquid]] = d[ECL_oil];
|
||||||
} else {
|
} else {
|
||||||
THROW("Input is missing DENSITY\n");
|
THROW("Input is missing DENSITY\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make reservoir densities the same as surface densities initially.
|
// Make reservoir densities the same as surface densities initially.
|
||||||
// We will modify them with formation volume factors if found.
|
// We will modify them with formation volume factors if found.
|
||||||
reservoir_density_ = surface_density_;
|
reservoir_density_ = surface_density_;
|
||||||
|
|
||||||
// Water viscosity.
|
// Water viscosity.
|
||||||
if (deck.hasField("PVTW")) {
|
if (deck.hasField("PVTW")) {
|
||||||
const std::vector<double>& pvtw = deck.getPVTW().pvtw_[region_number];
|
const std::vector<double>& pvtw = deck.getPVTW().pvtw_[region_number];
|
||||||
if (pvtw[2] != 0.0 || pvtw[4] != 0.0) {
|
if (pvtw[2] != 0.0 || pvtw[4] != 0.0) {
|
||||||
MESSAGE("Compressibility effects in PVTW are ignored.");
|
MESSAGE("Compressibility effects in PVTW are ignored.");
|
||||||
}
|
}
|
||||||
reservoir_density_[phase_usage.phase_pos[PhaseUsage::Aqua]] /= pvtw[1];
|
reservoir_density_[phase_usage.phase_pos[PhaseUsage::Aqua]] /= pvtw[1];
|
||||||
viscosity_[phase_usage.phase_pos[PhaseUsage::Aqua]] = pvtw[3];
|
viscosity_[phase_usage.phase_pos[PhaseUsage::Aqua]] = pvtw[3];
|
||||||
} else {
|
} else {
|
||||||
// Eclipse 100 default.
|
// Eclipse 100 default.
|
||||||
// viscosity_[phase_usage.phase_pos[PhaseUsage::Aqua]] = 0.5*Opm::prefix::centi*Opm::unit::Poise;
|
// viscosity_[phase_usage.phase_pos[PhaseUsage::Aqua]] = 0.5*Opm::prefix::centi*Opm::unit::Poise;
|
||||||
THROW("Input is missing PVTW\n");
|
THROW("Input is missing PVTW\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Oil viscosity.
|
// Oil viscosity.
|
||||||
if (deck.hasField("PVCDO")) {
|
if (deck.hasField("PVCDO")) {
|
||||||
const std::vector<double>& pvcdo = deck.getPVCDO().pvcdo_[region_number];
|
const std::vector<double>& pvcdo = deck.getPVCDO().pvcdo_[region_number];
|
||||||
if (pvcdo[2] != 0.0 || pvcdo[4] != 0.0) {
|
if (pvcdo[2] != 0.0 || pvcdo[4] != 0.0) {
|
||||||
MESSAGE("Compressibility effects in PVCDO are ignored.");
|
MESSAGE("Compressibility effects in PVCDO are ignored.");
|
||||||
}
|
}
|
||||||
reservoir_density_[phase_usage.phase_pos[PhaseUsage::Liquid]] /= pvcdo[1];
|
reservoir_density_[phase_usage.phase_pos[PhaseUsage::Liquid]] /= pvcdo[1];
|
||||||
viscosity_[phase_usage.phase_pos[PhaseUsage::Liquid]] = pvcdo[3];
|
viscosity_[phase_usage.phase_pos[PhaseUsage::Liquid]] = pvcdo[3];
|
||||||
} else {
|
} else {
|
||||||
THROW("Input is missing PVCDO\n");
|
THROW("Input is missing PVCDO\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const double* PvtPropertiesIncompFromDeck::surfaceDensities() const
|
const double* PvtPropertiesIncompFromDeck::surfaceDensities() const
|
||||||
|
@ -39,14 +39,14 @@ namespace Opm
|
|||||||
PvtPropertiesIncompFromDeck();
|
PvtPropertiesIncompFromDeck();
|
||||||
|
|
||||||
/// Initialize from deck.
|
/// Initialize from deck.
|
||||||
void init(const EclipseGridParser& deck);
|
void init(const EclipseGridParser& deck);
|
||||||
|
|
||||||
/// Number of active phases.
|
/// Number of active phases.
|
||||||
int numPhases() const;
|
int numPhases() const;
|
||||||
|
|
||||||
/// Densities of stock components at surface conditions.
|
/// Densities of stock components at surface conditions.
|
||||||
/// \return Array of size numPhases().
|
/// \return Array of size numPhases().
|
||||||
const double* surfaceDensities() const;
|
const double* surfaceDensities() const;
|
||||||
|
|
||||||
/// Densities of stock components at reservoir conditions.
|
/// Densities of stock components at reservoir conditions.
|
||||||
/// Note: a reasonable question to ask is why there can be
|
/// Note: a reasonable question to ask is why there can be
|
||||||
@ -58,15 +58,15 @@ namespace Opm
|
|||||||
/// reporting and using data given in terms of surface values,
|
/// reporting and using data given in terms of surface values,
|
||||||
/// we need to handle this difference.
|
/// we need to handle this difference.
|
||||||
/// \return Array of size numPhases().
|
/// \return Array of size numPhases().
|
||||||
const double* reservoirDensities() const;
|
const double* reservoirDensities() const;
|
||||||
|
|
||||||
/// Viscosities.
|
/// Viscosities.
|
||||||
const double* viscosity() const;
|
const double* viscosity() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::tr1::array<double, 2> surface_density_;
|
std::tr1::array<double, 2> surface_density_;
|
||||||
std::tr1::array<double, 2> reservoir_density_;
|
std::tr1::array<double, 2> reservoir_density_;
|
||||||
std::tr1::array<double, 2> viscosity_;
|
std::tr1::array<double, 2> viscosity_;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -35,9 +35,9 @@ namespace Opm
|
|||||||
|
|
||||||
/// Initialize with homogenous porosity and permeability.
|
/// Initialize with homogenous porosity and permeability.
|
||||||
void init(const int dimensions,
|
void init(const int dimensions,
|
||||||
const int num_cells,
|
const int num_cells,
|
||||||
const double poro,
|
const double poro,
|
||||||
const double perm);
|
const double perm);
|
||||||
|
|
||||||
/// \return D, the number of spatial dimensions.
|
/// \return D, the number of spatial dimensions.
|
||||||
int numDimensions() const
|
int numDimensions() const
|
||||||
@ -66,7 +66,7 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int dimensions_;
|
int dimensions_;
|
||||||
std::vector<double> porosity_;
|
std::vector<double> porosity_;
|
||||||
std::vector<double> permeability_;
|
std::vector<double> permeability_;
|
||||||
};
|
};
|
||||||
|
@ -69,8 +69,8 @@ namespace Opm
|
|||||||
const double cpnorm = rock_comp_*(pressure - pref_);
|
const double cpnorm = rock_comp_*(pressure - pref_);
|
||||||
return (1.0 + cpnorm + 0.5*cpnorm*cpnorm);
|
return (1.0 + cpnorm + 0.5*cpnorm*cpnorm);
|
||||||
} else {
|
} else {
|
||||||
// return Opm::linearInterpolation(p_, poromult_, pressure);
|
// return Opm::linearInterpolation(p_, poromult_, pressure);
|
||||||
return Opm::linearInterpolationExtrap(p_, poromult_, pressure);
|
return Opm::linearInterpolationExtrap(p_, poromult_, pressure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ namespace Opm
|
|||||||
} else {
|
} else {
|
||||||
//const double poromult = Opm::linearInterpolation(p_, poromult_, pressure);
|
//const double poromult = Opm::linearInterpolation(p_, poromult_, pressure);
|
||||||
//const double dporomultdp = Opm::linearInterpolationDerivative(p_, poromult_, pressure);
|
//const double dporomultdp = Opm::linearInterpolationDerivative(p_, poromult_, pressure);
|
||||||
const double poromult = Opm::linearInterpolationExtrap(p_, poromult_, pressure);
|
const double poromult = Opm::linearInterpolationExtrap(p_, poromult_, pressure);
|
||||||
const double dporomultdp = Opm::linearInterpolationDerivativeExtrap(p_, poromult_, pressure);
|
const double dporomultdp = Opm::linearInterpolationDerivativeExtrap(p_, poromult_, pressure);
|
||||||
|
|
||||||
return dporomultdp/poromult;
|
return dporomultdp/poromult;
|
||||||
|
@ -51,7 +51,7 @@ namespace Opm
|
|||||||
|
|
||||||
/// Initialize from deck and cell mapping.
|
/// Initialize from deck and cell mapping.
|
||||||
/// \param deck Deck input parser
|
/// \param deck Deck input parser
|
||||||
/// \param grid grid to which property object applies, needed for the
|
/// \param grid grid to which property object applies, needed for the
|
||||||
/// mapping from cell indices (typically from a processed grid)
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
/// to logical cartesian indices consistent with the deck.
|
/// to logical cartesian indices consistent with the deck.
|
||||||
void RockFromDeck::init(const EclipseGridParser& deck,
|
void RockFromDeck::init(const EclipseGridParser& deck,
|
||||||
|
@ -37,7 +37,7 @@ namespace Opm
|
|||||||
|
|
||||||
/// Initialize from deck and grid.
|
/// Initialize from deck and grid.
|
||||||
/// \param deck Deck input parser
|
/// \param deck Deck input parser
|
||||||
/// \param grid Grid to which property object applies, needed for the
|
/// \param grid Grid to which property object applies, needed for the
|
||||||
/// mapping from cell indices (typically from a processed grid)
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
/// to logical cartesian indices consistent with the deck.
|
/// to logical cartesian indices consistent with the deck.
|
||||||
void init(const EclipseGridParser& deck,
|
void init(const EclipseGridParser& deck,
|
||||||
|
@ -29,64 +29,64 @@ namespace Opm
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
struct KrFunConstant
|
struct KrFunConstant
|
||||||
{
|
{
|
||||||
double kr(double)
|
double kr(double)
|
||||||
{
|
{
|
||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
double dkrds(double)
|
double dkrds(double)
|
||||||
{
|
{
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct KrFunLinear
|
struct KrFunLinear
|
||||||
{
|
{
|
||||||
double kr(double s)
|
double kr(double s)
|
||||||
{
|
{
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
double dkrds(double)
|
double dkrds(double)
|
||||||
{
|
{
|
||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct KrFunQuadratic
|
struct KrFunQuadratic
|
||||||
{
|
{
|
||||||
double kr(double s)
|
double kr(double s)
|
||||||
{
|
{
|
||||||
return s*s;
|
return s*s;
|
||||||
}
|
}
|
||||||
double dkrds(double s)
|
double dkrds(double s)
|
||||||
{
|
{
|
||||||
return 2.0*s;
|
return 2.0*s;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <class Fun>
|
template <class Fun>
|
||||||
static inline void evalAllKrDeriv(const int n, const int np,
|
static inline void evalAllKrDeriv(const int n, const int np,
|
||||||
const double* s, double* kr, double* dkrds, Fun fun)
|
const double* s, double* kr, double* dkrds, Fun fun)
|
||||||
{
|
{
|
||||||
if (dkrds == 0) {
|
if (dkrds == 0) {
|
||||||
// #pragma omp parallel for
|
// #pragma omp parallel for
|
||||||
for (int i = 0; i < n*np; ++i) {
|
for (int i = 0; i < n*np; ++i) {
|
||||||
kr[i] = fun.kr(s[i]);
|
kr[i] = fun.kr(s[i]);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// #pragma omp parallel for
|
// #pragma omp parallel for
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
std::fill(dkrds + i*np*np, dkrds + (i+1)*np*np, 0.0);
|
std::fill(dkrds + i*np*np, dkrds + (i+1)*np*np, 0.0);
|
||||||
for (int phase = 0; phase < np; ++phase) {
|
for (int phase = 0; phase < np; ++phase) {
|
||||||
kr[i*np + phase] = fun.kr(s[i*np + phase]);
|
kr[i*np + phase] = fun.kr(s[i*np + phase]);
|
||||||
// Only diagonal elements in derivative.
|
// Only diagonal elements in derivative.
|
||||||
dkrds[i*np*np + phase*np + phase] = fun.dkrds(s[i*np + phase]);
|
dkrds[i*np*np + phase*np + phase] = fun.dkrds(s[i*np + phase]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // anon namespace
|
} // anon namespace
|
||||||
@ -109,25 +109,25 @@ namespace Opm
|
|||||||
/// Initialize from parameters.
|
/// Initialize from parameters.
|
||||||
void SaturationPropsBasic::init(const parameter::ParameterGroup& param)
|
void SaturationPropsBasic::init(const parameter::ParameterGroup& param)
|
||||||
{
|
{
|
||||||
int num_phases = param.getDefault("num_phases", 2);
|
int num_phases = param.getDefault("num_phases", 2);
|
||||||
if (num_phases > 2 || num_phases < 1) {
|
if (num_phases > 2 || num_phases < 1) {
|
||||||
THROW("SaturationPropsBasic::init() illegal num_phases: " << num_phases);
|
THROW("SaturationPropsBasic::init() illegal num_phases: " << num_phases);
|
||||||
}
|
}
|
||||||
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"));
|
std::string rpf = param.getDefault("relperm_func", std::string("Linear"));
|
||||||
if (rpf == "Constant") {
|
if (rpf == "Constant") {
|
||||||
relperm_func_ = Constant;
|
relperm_func_ = Constant;
|
||||||
if(num_phases!=1){
|
if(num_phases!=1){
|
||||||
THROW("Constant relperm with more than one phase???");
|
THROW("Constant relperm with more than one phase???");
|
||||||
}
|
}
|
||||||
} else if (rpf == "Linear") {
|
} else if (rpf == "Linear") {
|
||||||
relperm_func_ = Linear;
|
relperm_func_ = Linear;
|
||||||
} else if (rpf == "Quadratic") {
|
} else if (rpf == "Quadratic") {
|
||||||
relperm_func_ = Quadratic;
|
relperm_func_ = Quadratic;
|
||||||
} else {
|
} else {
|
||||||
THROW("SaturationPropsBasic::init() illegal relperm_func: " << rpf);
|
THROW("SaturationPropsBasic::init() illegal relperm_func: " << rpf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ namespace Opm
|
|||||||
/// \return P, the number of phases.
|
/// \return P, the number of phases.
|
||||||
int SaturationPropsBasic::numPhases() const
|
int SaturationPropsBasic::numPhases() const
|
||||||
{
|
{
|
||||||
return num_phases_;
|
return num_phases_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -152,29 +152,29 @@ namespace Opm
|
|||||||
/// m_{ij} = \frac{dkr_i}{ds^j},
|
/// m_{ij} = \frac{dkr_i}{ds^j},
|
||||||
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
||||||
void SaturationPropsBasic::relperm(const int n,
|
void SaturationPropsBasic::relperm(const int n,
|
||||||
const double* s,
|
const double* s,
|
||||||
double* kr,
|
double* kr,
|
||||||
double* dkrds) const
|
double* dkrds) const
|
||||||
{
|
{
|
||||||
switch (relperm_func_) {
|
switch (relperm_func_) {
|
||||||
case Constant:
|
case Constant:
|
||||||
{
|
{
|
||||||
evalAllKrDeriv(n, num_phases_, s, kr, dkrds, KrFunConstant());
|
evalAllKrDeriv(n, num_phases_, s, kr, dkrds, KrFunConstant());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Linear:
|
case Linear:
|
||||||
{
|
{
|
||||||
evalAllKrDeriv(n, num_phases_, s, kr, dkrds, KrFunLinear());
|
evalAllKrDeriv(n, num_phases_, s, kr, dkrds, KrFunLinear());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Quadratic:
|
case Quadratic:
|
||||||
{
|
{
|
||||||
evalAllKrDeriv(n, num_phases_, s, kr, dkrds, KrFunQuadratic());
|
evalAllKrDeriv(n, num_phases_, s, kr, dkrds, KrFunQuadratic());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
THROW("SaturationPropsBasic::relperm() unhandled relperm func type: " << relperm_func_);
|
THROW("SaturationPropsBasic::relperm() unhandled relperm func type: " << relperm_func_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -190,13 +190,13 @@ namespace Opm
|
|||||||
/// m_{ij} = \frac{dpc_i}{ds^j},
|
/// m_{ij} = \frac{dpc_i}{ds^j},
|
||||||
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
||||||
void SaturationPropsBasic::capPress(const int n,
|
void SaturationPropsBasic::capPress(const int n,
|
||||||
const double* /*s*/,
|
const double* /*s*/,
|
||||||
double* pc,
|
double* pc,
|
||||||
double* dpcds) const
|
double* dpcds) const
|
||||||
{
|
{
|
||||||
std::fill(pc, pc + num_phases_*n, 0.0);
|
std::fill(pc, pc + num_phases_*n, 0.0);
|
||||||
if (dpcds) {
|
if (dpcds) {
|
||||||
std::fill(dpcds, dpcds + num_phases_*num_phases_*n, 0.0);
|
std::fill(dpcds, dpcds + num_phases_*num_phases_*n, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,11 +207,11 @@ namespace Opm
|
|||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
||||||
void SaturationPropsBasic::satRange(const int n,
|
void SaturationPropsBasic::satRange(const int n,
|
||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const
|
double* smax) const
|
||||||
{
|
{
|
||||||
std::fill(smin, smin + num_phases_*n, 0.0);
|
std::fill(smin, smin + num_phases_*n, 0.0);
|
||||||
std::fill(smax, smax + num_phases_*n, 1.0);
|
std::fill(smax, smax + num_phases_*n, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,16 +40,16 @@ namespace Opm
|
|||||||
SaturationPropsBasic();
|
SaturationPropsBasic();
|
||||||
|
|
||||||
/// Initialize from parameters.
|
/// Initialize from parameters.
|
||||||
/// The following parameters are accepted (defaults):
|
/// The following parameters are accepted (defaults):
|
||||||
/// num_phases (2) Must be 1 or 2.
|
/// num_phases (2) Must be 1 or 2.
|
||||||
/// relperm_func ("Linear") Must be "Constant", "Linear" or "Quadratic".
|
/// relperm_func ("Linear") Must be "Constant", "Linear" or "Quadratic".
|
||||||
void init(const parameter::ParameterGroup& param);
|
void init(const parameter::ParameterGroup& param);
|
||||||
|
|
||||||
enum RelPermFunc { Constant, Linear, Quadratic };
|
enum RelPermFunc { Constant, Linear, Quadratic };
|
||||||
|
|
||||||
/// Initialize from arguments a basic Saturation property.
|
/// Initialize from arguments a basic Saturation property.
|
||||||
void init(const int num_phases,
|
void init(const int num_phases,
|
||||||
const RelPermFunc& relperm_func)
|
const RelPermFunc& relperm_func)
|
||||||
{
|
{
|
||||||
num_phases_ = num_phases;
|
num_phases_ = num_phases;
|
||||||
relperm_func_ = relperm_func;
|
relperm_func_ = relperm_func;
|
||||||
@ -86,18 +86,18 @@ namespace Opm
|
|||||||
double* pc,
|
double* pc,
|
||||||
double* dpcds) const;
|
double* dpcds) const;
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
||||||
void satRange(const int n,
|
void satRange(const int n,
|
||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const;
|
double* smax) const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int num_phases_;
|
int num_phases_;
|
||||||
RelPermFunc relperm_func_;
|
RelPermFunc relperm_func_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace Opm
|
|||||||
|
|
||||||
/// Initialize from deck and grid.
|
/// Initialize from deck and grid.
|
||||||
/// \param[in] deck Deck input parser
|
/// \param[in] deck Deck input parser
|
||||||
/// \param[in] grid Grid to which property object applies, needed for the
|
/// \param[in] grid Grid to which property object applies, needed for the
|
||||||
/// mapping from cell indices (typically from a processed grid)
|
/// mapping from cell indices (typically from a processed grid)
|
||||||
/// to logical cartesian indices consistent with the deck.
|
/// to logical cartesian indices consistent with the deck.
|
||||||
/// \param[in] samples Number of uniform sample points for saturation tables.
|
/// \param[in] samples Number of uniform sample points for saturation tables.
|
||||||
@ -92,14 +92,14 @@ namespace Opm
|
|||||||
double* pc,
|
double* pc,
|
||||||
double* dpcds) const;
|
double* dpcds) const;
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
||||||
void satRange(const int n,
|
void satRange(const int n,
|
||||||
const int* cells,
|
const int* cells,
|
||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const;
|
double* smax) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PhaseUsage phase_usage_;
|
PhaseUsage phase_usage_;
|
||||||
|
@ -105,7 +105,7 @@ namespace Opm
|
|||||||
template <class SatFuncSet>
|
template <class SatFuncSet>
|
||||||
int SaturationPropsFromDeck<SatFuncSet>::numPhases() const
|
int SaturationPropsFromDeck<SatFuncSet>::numPhases() const
|
||||||
{
|
{
|
||||||
return phase_usage_.num_phases;
|
return phase_usage_.num_phases;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -191,18 +191,18 @@ namespace Opm
|
|||||||
template <class SatFuncSet>
|
template <class SatFuncSet>
|
||||||
void SaturationPropsFromDeck<SatFuncSet>::satRange(const int n,
|
void SaturationPropsFromDeck<SatFuncSet>::satRange(const int n,
|
||||||
const int* cells,
|
const int* cells,
|
||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const
|
double* smax) const
|
||||||
{
|
{
|
||||||
ASSERT (cells != 0);
|
ASSERT (cells != 0);
|
||||||
|
|
||||||
const int np = phase_usage_.num_phases;
|
const int np = phase_usage_.num_phases;
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
for (int p = 0; p < np; ++p) {
|
for (int p = 0; p < np; ++p) {
|
||||||
smin[np*i + p] = funcForCell(cells[i]).smin_[p];
|
smin[np*i + p] = funcForCell(cells[i]).smin_[p];
|
||||||
smax[np*i + p] = funcForCell(cells[i]).smax_[p];
|
smax[np*i + p] = funcForCell(cells[i]).smax_[p];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,11 +65,11 @@ namespace Opm
|
|||||||
double* pc,
|
double* pc,
|
||||||
double* dpcds) const = 0;
|
double* dpcds) const = 0;
|
||||||
|
|
||||||
/// Obtain the range of allowable saturation values.
|
/// Obtain the range of allowable saturation values.
|
||||||
/// \param[in] n Number of data points.
|
/// \param[in] n Number of data points.
|
||||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||||
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
||||||
virtual void satRange(const int n,
|
virtual void satRange(const int n,
|
||||||
const int* cells,
|
const int* cells,
|
||||||
double* smin,
|
double* smin,
|
||||||
double* smax) const = 0;
|
double* smax) const = 0;
|
||||||
|
@ -70,7 +70,7 @@ namespace Opm
|
|||||||
|
|
||||||
/// Densities of stock components at surface conditions.
|
/// Densities of stock components at surface conditions.
|
||||||
/// \return Array of size numPhases().
|
/// \return Array of size numPhases().
|
||||||
const double* surfaceDensities() const;
|
const double* surfaceDensities() const;
|
||||||
|
|
||||||
/// Viscosity as a function of p and z.
|
/// Viscosity as a function of p and z.
|
||||||
void mu(const int n,
|
void mu(const int n,
|
||||||
@ -111,11 +111,11 @@ namespace Opm
|
|||||||
|
|
||||||
PhaseUsage phase_usage_;
|
PhaseUsage phase_usage_;
|
||||||
|
|
||||||
int region_number_;
|
int region_number_;
|
||||||
|
|
||||||
std::vector<std::tr1::shared_ptr<SinglePvtInterface> > props_;
|
std::vector<std::tr1::shared_ptr<SinglePvtInterface> > props_;
|
||||||
|
|
||||||
double densities_[MaxNumPhases];
|
double densities_[MaxNumPhases];
|
||||||
mutable std::vector<double> data1_;
|
mutable std::vector<double> data1_;
|
||||||
mutable std::vector<double> data2_;
|
mutable std::vector<double> data2_;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user