Added setup functions which take arguments directly (do not use ParamterGroup)
This commit is contained in:
parent
6b37e011ae
commit
e8ad818ce2
@ -46,6 +46,26 @@ namespace Opm
|
||||
pvt_.mu(1, 0, 0, &viscosity_[0]);
|
||||
}
|
||||
|
||||
IncompPropertiesBasic::IncompPropertiesBasic(const int num_phases,
|
||||
const SaturationPropsBasic::RelPermFunc& relpermfunc,
|
||||
const std::vector<double>& rho,
|
||||
const std::vector<double>& mu,
|
||||
const double porosity,
|
||||
const double permeability,
|
||||
const int dim,
|
||||
const int num_cells)
|
||||
{
|
||||
rock_.init(dim, num_cells, porosity, permeability);
|
||||
pvt_.init(num_phases, rho, mu);
|
||||
satprops_.init(num_phases, relpermfunc);
|
||||
if (pvt_.numPhases() != satprops_.numPhases()) {
|
||||
THROW("IncompPropertiesBasic::IncompPropertiesBasic() - Inconsistent number of phases in pvt data ("
|
||||
<< pvt_.numPhases() << ") and saturation-dependent function data (" << satprops_.numPhases() << ").");
|
||||
}
|
||||
viscosity_.resize(pvt_.numPhases());
|
||||
pvt_.mu(1, 0, 0, &viscosity_[0]);
|
||||
}
|
||||
|
||||
IncompPropertiesBasic::~IncompPropertiesBasic()
|
||||
{
|
||||
}
|
||||
|
@ -53,6 +53,17 @@ namespace Opm
|
||||
const int dim,
|
||||
const int num_cells);
|
||||
|
||||
|
||||
/// Construct from arguments a basic two phase fluid.
|
||||
IncompPropertiesBasic(const int num_phases,
|
||||
const SaturationPropsBasic::RelPermFunc& relpermfunc,
|
||||
const std::vector<double>& rho,
|
||||
const std::vector<double>& mu,
|
||||
const double porosity,
|
||||
const double permeability,
|
||||
const int dim,
|
||||
const int num_cells);
|
||||
|
||||
/// Destructor.
|
||||
virtual ~IncompPropertiesBasic();
|
||||
|
||||
|
@ -59,6 +59,20 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
void PvtPropertiesBasic::init(const int num_phases,
|
||||
const std::vector<double> rho,
|
||||
const std::vector<double> mu)
|
||||
{
|
||||
if (num_phases > 3 || num_phases < 1) {
|
||||
THROW("PvtPropertiesBasic::init() illegal num_phases: " << num_phases);
|
||||
}
|
||||
// We currently do not allow the user to set B.
|
||||
formation_volume_factor_.clear();
|
||||
formation_volume_factor_.resize(num_phases, 1.0);
|
||||
density_ = rho;
|
||||
viscosity_ = mu;
|
||||
}
|
||||
|
||||
const double* PvtPropertiesBasic::surfaceDensities() const
|
||||
{
|
||||
return &density_[0];
|
||||
|
@ -44,6 +44,11 @@ namespace Opm
|
||||
/// mu1 [mu2, mu3] (1.0) Viscosity in cP
|
||||
void init(const parameter::ParameterGroup& param);
|
||||
|
||||
/// Initialize from argument Basic multi phase fluid pvt properties.
|
||||
void init(const int num_phases,
|
||||
const std::vector<double> rho,
|
||||
const std::vector<double> mu);
|
||||
|
||||
/// Number of active phases.
|
||||
int numPhases() const;
|
||||
|
||||
|
@ -45,6 +45,16 @@ namespace Opm
|
||||
/// relperm_func ("Linear") Must be "Constant", "Linear" or "Quadratic".
|
||||
void init(const parameter::ParameterGroup& param);
|
||||
|
||||
enum RelPermFunc { Constant, Linear, Quadratic };
|
||||
|
||||
/// Initialize from arguments a basic Saturation property.
|
||||
void init(const int num_phases,
|
||||
const RelPermFunc& relperm_func)
|
||||
{
|
||||
num_phases_ = num_phases;
|
||||
relperm_func_ = relperm_func;
|
||||
}
|
||||
|
||||
/// \return P, the number of phases.
|
||||
int numPhases() const;
|
||||
|
||||
@ -83,8 +93,9 @@ namespace Opm
|
||||
void satRange(const int n,
|
||||
double* smin,
|
||||
double* smax) const;
|
||||
|
||||
|
||||
private:
|
||||
enum RelPermFunc { Constant, Linear, Quadratic };
|
||||
int num_phases_;
|
||||
RelPermFunc relperm_func_;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user