Added constructor taking parameters to RockCompressibility.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-03-19 14:30:44 +01:00
parent e29dd18d77
commit fe8f2e566f
2 changed files with 14 additions and 0 deletions

View File

@ -19,12 +19,22 @@
#include <opm/core/fluid/RockCompressibility.hpp>
#include <opm/core/eclipse/EclipseGridParser.hpp>
#include <opm/core/utility/parameters/ParameterGroup.hpp>
#include <opm/core/utility/Units.hpp>
#include <opm/core/utility/ErrorMacros.hpp>
#include <opm/core/utility/linearInterpolation.hpp>
namespace Opm
{
RockCompressibility::RockCompressibility(const parameter::ParameterGroup& param)
: pref_(0.0),
rock_comp_(0.0)
{
pref_ = param.getDefault("rock_compressibility_pref", 100*unit::barsa);
pref_ = param.getDefault("rock_compressibility", 0.0);
}
RockCompressibility::RockCompressibility(const EclipseGridParser& deck)
: pref_(0.0),
rock_comp_(0.0)

View File

@ -26,6 +26,7 @@ namespace Opm
{
class EclipseGridParser;
namespace parameter { class ParameterGroup; }
class RockCompressibility
{
@ -33,6 +34,9 @@ namespace Opm
/// Construct from input deck.
RockCompressibility(const EclipseGridParser& deck);
/// Construct from parameters.
RockCompressibility(const parameter::ParameterGroup& param);
/// Porosity multiplier.
double poroMult(double pressure);