Accounting for (constant) formation volume factor in incompressible fluids.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-04-20 14:00:38 +02:00
parent 11389cdd54
commit ce74f956e7
3 changed files with 30 additions and 8 deletions

View File

@ -87,7 +87,7 @@ namespace Opm
/// \return Array of P density values. /// \return Array of P density values.
const double* IncompPropertiesFromDeck::density() const const double* IncompPropertiesFromDeck::density() const
{ {
return pvt_.surfaceDensities(); return pvt_.reservoirDensities();
} }
/// \param[in] n Number of data points. /// \param[in] n Number of data points.

View File

@ -51,18 +51,23 @@ namespace Opm
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 };
density_[phase_usage.phase_pos[PhaseUsage::Aqua]] = d[ECL_water]; surface_density_[phase_usage.phase_pos[PhaseUsage::Aqua]] = d[ECL_water];
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.
// We will modify them with formation volume factors if found.
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];
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.
@ -76,6 +81,7 @@ namespace Opm
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];
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");
@ -84,7 +90,13 @@ namespace Opm
const double* PvtPropertiesIncompFromDeck::surfaceDensities() const const double* PvtPropertiesIncompFromDeck::surfaceDensities() const
{ {
return density_.data(); return surface_density_.data();
}
const double* PvtPropertiesIncompFromDeck::reservoirDensities() const
{
return reservoir_density_.data();
} }

View File

@ -31,9 +31,6 @@ namespace Opm
/// eclipse input (keywords DENSITY, PVTW, PVCDO). /// eclipse input (keywords DENSITY, PVTW, PVCDO).
/// ///
/// All phases are incompressible and have constant viscosities. /// All phases are incompressible and have constant viscosities.
/// For all the methods, the following apply: p and z are unused.
/// Output arrays shall be of size n*numPhases(), and must be valid
/// before calling the method.
/// NOTE: This class is intentionally similar to BlackoilPvtProperties. /// NOTE: This class is intentionally similar to BlackoilPvtProperties.
class PvtPropertiesIncompFromDeck class PvtPropertiesIncompFromDeck
{ {
@ -51,11 +48,24 @@ namespace Opm
/// \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.
/// Note: a reasonable question to ask is why there can be
/// different densities at surface and reservoir conditions,
/// when the phases are assumed incompressible. The answer is
/// that even if we approximate the phases as being
/// incompressible during simulation, the density difference
/// between surface and reservoir may be larger. For accurate
/// reporting and using data given in terms of surface values,
/// we need to handle this difference.
/// \return Array of size numPhases().
const double* reservoirDensities() const;
/// Viscosities. /// Viscosities.
const double* viscosity() const; const double* viscosity() const;
private: private:
std::tr1::array<double, 2> density_; std::tr1::array<double, 2> surface_density_;
std::tr1::array<double, 2> reservoir_density_;
std::tr1::array<double, 2> viscosity_; std::tr1::array<double, 2> viscosity_;
}; };