mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-06 22:43:01 -06:00
Added param initializer on fluids with param to addjust table length.
Moved internal class SatFunc to SatFuncStone2.
This commit is contained in:
parent
cf9b9cdf20
commit
94c04f343d
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <opm/core/fluid/BlackoilPropertiesFromDeck.hpp>
|
#include <opm/core/fluid/BlackoilPropertiesFromDeck.hpp>
|
||||||
|
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -34,6 +34,20 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BlackoilPropertiesFromDeck::BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
||||||
|
const UnstructuredGrid& grid,
|
||||||
|
const parameter::ParameterGroup& param)
|
||||||
|
{
|
||||||
|
rock_.init(deck, grid);
|
||||||
|
pvt_.init(deck);
|
||||||
|
satprops_.init(deck, grid, param);
|
||||||
|
|
||||||
|
if (pvt_.numPhases() != satprops_.numPhases()) {
|
||||||
|
THROW("BlackoilPropertiesBasic::BlackoilPropertiesBasic() - Inconsistent number of phases in pvt data ("
|
||||||
|
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BlackoilPropertiesFromDeck::~BlackoilPropertiesFromDeck()
|
BlackoilPropertiesFromDeck::~BlackoilPropertiesFromDeck()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <opm/core/fluid/blackoil/BlackoilPvtProperties.hpp>
|
#include <opm/core/fluid/blackoil/BlackoilPvtProperties.hpp>
|
||||||
#include <opm/core/fluid/SaturationPropsFromDeck.hpp>
|
#include <opm/core/fluid/SaturationPropsFromDeck.hpp>
|
||||||
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
||||||
|
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||||
|
|
||||||
struct UnstructuredGrid;
|
struct UnstructuredGrid;
|
||||||
|
|
||||||
@ -43,8 +44,10 @@ namespace Opm
|
|||||||
/// 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);
|
||||||
|
BlackoilPropertiesFromDeck(const EclipseGridParser& deck,
|
||||||
|
const UnstructuredGrid& grid,
|
||||||
|
const parameter::ParameterGroup& param);
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
virtual ~BlackoilPropertiesFromDeck();
|
virtual ~BlackoilPropertiesFromDeck();
|
||||||
|
|
||||||
|
@ -19,10 +19,11 @@
|
|||||||
|
|
||||||
#ifndef OPM_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
|
#ifndef OPM_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
|
||||||
#define OPM_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
|
#define OPM_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
|
||||||
|
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||||
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
#include <opm/core/eclipse/EclipseGridParser.hpp>
|
||||||
#include <opm/core/utility/UniformTableLinear.hpp>
|
#include <opm/core/utility/UniformTableLinear.hpp>
|
||||||
#include <opm/core/fluid/blackoil/BlackoilPhases.hpp>
|
#include <opm/core/fluid/blackoil/BlackoilPhases.hpp>
|
||||||
|
#include <opm/core/fluid/SatFuncStone2.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
struct UnstructuredGrid;
|
struct UnstructuredGrid;
|
||||||
@ -44,6 +45,10 @@ namespace Opm
|
|||||||
void init(const EclipseGridParser& deck,
|
void init(const EclipseGridParser& deck,
|
||||||
const UnstructuredGrid& grid);
|
const UnstructuredGrid& grid);
|
||||||
|
|
||||||
|
void init(const EclipseGridParser& deck,
|
||||||
|
const UnstructuredGrid& grid,
|
||||||
|
const parameter::ParameterGroup& param);
|
||||||
|
|
||||||
/// \return P, the number of phases.
|
/// \return P, the number of phases.
|
||||||
int numPhases() const;
|
int numPhases() const;
|
||||||
|
|
||||||
@ -87,31 +92,11 @@ namespace Opm
|
|||||||
double* smax) const;
|
double* smax) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PhaseUsage phase_usage_;
|
PhaseUsage phase_usage_;
|
||||||
class SatFuncSet
|
std::vector<SatFuncStone2> satfuncset_;
|
||||||
{
|
|
||||||
public:
|
|
||||||
void init(const EclipseGridParser& deck, const int table_num, PhaseUsage phase_usg);
|
|
||||||
void evalKr(const double* s, double* kr) const;
|
|
||||||
void evalKrDeriv(const double* s, double* kr, double* dkrds) const;
|
|
||||||
void evalPc(const double* s, double* pc) const;
|
|
||||||
void evalPcDeriv(const double* s, double* pc, double* dpcds) const;
|
|
||||||
double smin_[PhaseUsage::MaxNumPhases];
|
|
||||||
double smax_[PhaseUsage::MaxNumPhases];
|
|
||||||
private:
|
|
||||||
PhaseUsage phase_usage; // A copy of the outer class' phase_usage_.
|
|
||||||
UniformTableLinear<double> krw_;
|
|
||||||
UniformTableLinear<double> krow_;
|
|
||||||
UniformTableLinear<double> pcow_;
|
|
||||||
UniformTableLinear<double> krg_;
|
|
||||||
UniformTableLinear<double> krog_;
|
|
||||||
UniformTableLinear<double> pcog_;
|
|
||||||
double krocw_; // = krow_(s_wc)
|
|
||||||
};
|
|
||||||
std::vector<SatFuncSet> satfuncset_;
|
|
||||||
std::vector<int> cell_to_func_; // = SATNUM - 1
|
std::vector<int> cell_to_func_; // = SATNUM - 1
|
||||||
|
|
||||||
const SatFuncSet& funcForCell(const int cell) const;
|
const SatFuncStone2& funcForCell(const int cell) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user