2014-02-25 09:52:10 +08:00
|
|
|
/*
|
|
|
|
|
Copyright 2014 SINTEF ICT, Applied Mathematics.
|
2014-03-17 10:54:29 +08:00
|
|
|
Copyright 2014 STATOIL ASA.
|
2014-02-25 09:52:10 +08:00
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2013-12-06 22:13:29 +08:00
|
|
|
#ifndef OPM_POLYMERPROPSAD_HEADED_INLCUDED
|
|
|
|
|
#define OPM_POLYMERPROPSAD_HEADED_INLCUDED
|
|
|
|
|
|
|
|
|
|
#include <cmath>
|
|
|
|
|
#include <vector>
|
2014-03-14 14:12:26 +08:00
|
|
|
#include <opm/autodiff/AutoDiffBlock.hpp>
|
|
|
|
|
#include <opm/autodiff/AutoDiffHelpers.hpp>
|
2013-12-09 20:33:05 +08:00
|
|
|
#include <opm/polymer/PolymerProperties.hpp>
|
2013-12-06 22:13:29 +08:00
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
namespace Opm {
|
2013-12-06 22:13:29 +08:00
|
|
|
|
|
|
|
|
class PolymerPropsAd
|
|
|
|
|
{
|
|
|
|
|
public:
|
2014-02-25 09:52:10 +08:00
|
|
|
/// \return Reference rock density.
|
2013-12-12 20:29:40 +08:00
|
|
|
double rockDensity() const;
|
2014-02-25 09:52:10 +08:00
|
|
|
|
|
|
|
|
/// \return The value of dead pore volume.
|
2013-12-12 22:46:29 +08:00
|
|
|
double deadPoreVol() const;
|
2014-02-25 09:52:10 +08:00
|
|
|
|
|
|
|
|
/// \return The max concentration injected.
|
2014-01-14 12:59:45 +08:00
|
|
|
double cMax() const;
|
2014-02-25 09:52:10 +08:00
|
|
|
|
2015-06-02 14:30:01 +02:00
|
|
|
/// \ return The water velcoity or shear rate in the PLYSHLOG table
|
|
|
|
|
const std::vector<double>& shearWaterVelocity() const;
|
|
|
|
|
|
|
|
|
|
/// \ return The viscosity reducation factor in the PLYSHLOG table
|
|
|
|
|
const std::vector<double>& shearViscosityReductionFactor() const;
|
|
|
|
|
|
|
|
|
|
/// \ return The reference polymer concentration for PLYSHLOG table
|
|
|
|
|
double plyshlogRefConc() const;
|
|
|
|
|
|
|
|
|
|
/// \ return The flag indicating if reference salinity is specified in PLYSHLOG keyword
|
|
|
|
|
bool hasPlyshlogRefSalinity() const;
|
|
|
|
|
|
|
|
|
|
/// \ return The flag indicating if reference temperature is specified in PLYSHLOG keyword
|
|
|
|
|
bool hasPlyshlogRefTemp() const;
|
|
|
|
|
|
|
|
|
|
/// \ return The reference salinity in PLYSHLOG keyword
|
|
|
|
|
double plyshlogRefSalinity() const;
|
|
|
|
|
|
|
|
|
|
/// \ return The reference temperature in PLYSHLOG keyword
|
|
|
|
|
double plyshlogRefTemp() const;
|
|
|
|
|
|
|
|
|
|
double viscMult(double c) const; // multipler interpolated from PLYVISC table
|
|
|
|
|
|
2014-01-10 14:15:24 +08:00
|
|
|
typedef AutoDiffBlock<double> ADB;
|
2013-12-06 22:13:29 +08:00
|
|
|
typedef ADB::V V;
|
2014-01-10 14:15:24 +08:00
|
|
|
|
2015-06-02 14:30:01 +02:00
|
|
|
V viscMult(const V& c) const;
|
|
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \return Array of n viscosity multiplier from PLVISC table.
|
|
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
/// Constructor wrapping a polymer props.
|
2013-12-09 20:33:05 +08:00
|
|
|
PolymerPropsAd(const PolymerProperties& polymer_props);
|
|
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
/// Destructor.
|
2013-12-06 22:13:29 +08:00
|
|
|
~PolymerPropsAd();
|
2014-02-25 09:52:10 +08:00
|
|
|
|
|
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \param[in] visc Array of 2 viscosity value.
|
|
|
|
|
/// \return value of inverse effective water viscosity.
|
2013-12-09 20:33:05 +08:00
|
|
|
V
|
|
|
|
|
effectiveInvWaterVisc(const V& c,const double* visc) const;
|
|
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \param[in] visc Array of 2 viscosity value
|
|
|
|
|
/// \return value of inverse effective water viscosity.
|
2013-12-09 20:33:05 +08:00
|
|
|
ADB
|
|
|
|
|
effectiveInvWaterVisc(const ADB& c,const double* visc) const;
|
2014-02-25 09:52:10 +08:00
|
|
|
|
|
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \return Array of n mc values, here mc means m(c) * c.
|
2013-12-09 20:33:05 +08:00
|
|
|
V
|
|
|
|
|
polymerWaterVelocityRatio(const V& c) const;
|
|
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \return Array of n mc values, here mc means m(c) * c.
|
2013-12-09 20:33:05 +08:00
|
|
|
ADB
|
|
|
|
|
polymerWaterVelocityRatio(const ADB& c) const;
|
|
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \param[in] cmax_cells Array of n polymer concentraion values
|
|
|
|
|
/// that the cell experienced.
|
|
|
|
|
/// \return Array of n adsorption values.
|
2013-12-11 22:52:11 +08:00
|
|
|
V
|
2013-12-12 21:58:25 +08:00
|
|
|
adsorption(const V& c, const V& cmax_cells) const;
|
2013-12-11 22:52:11 +08:00
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \param[in] cmax_cells Array of n polymer concentraion values
|
|
|
|
|
/// that the cell experienced.
|
|
|
|
|
/// \return Array of n adsorption values.
|
2013-12-11 22:52:11 +08:00
|
|
|
ADB
|
2013-12-12 21:58:25 +08:00
|
|
|
adsorption(const ADB& c, const ADB& cmax_cells) const;
|
2013-12-11 22:52:11 +08:00
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \param[in] cmax_cells Array of n polymer concentraion values
|
|
|
|
|
/// that the cell experienced.
|
|
|
|
|
/// \param[in] relperm Array of n relative water relperm values.
|
|
|
|
|
/// \return Array of n adsorption values.
|
2013-12-11 22:52:11 +08:00
|
|
|
V
|
|
|
|
|
effectiveRelPerm(const V& c, const V& cmax_cells, const V& relperm) const;
|
|
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
|
|
|
|
|
/// \param[in] c Array of n polymer concentraion values.
|
|
|
|
|
/// \param[in] cmax_cells Array of n polymer concentraion values
|
|
|
|
|
/// that the cell experienced.
|
|
|
|
|
/// \param[in] relperm Array of n relative water relperm values.
|
|
|
|
|
/// \return Array of n adsorption values.
|
2013-12-11 22:52:11 +08:00
|
|
|
ADB
|
2015-05-29 16:31:32 +02:00
|
|
|
effectiveRelPerm(const ADB& c, const ADB& cmax_cells, const ADB& krw) const;
|
2014-01-10 14:15:24 +08:00
|
|
|
|
2013-12-06 22:13:29 +08:00
|
|
|
private:
|
2013-12-09 20:33:05 +08:00
|
|
|
const PolymerProperties& polymer_props_;
|
2013-12-06 22:13:29 +08:00
|
|
|
};
|
|
|
|
|
|
2014-02-25 09:52:10 +08:00
|
|
|
} //namespace Opm
|
2013-12-06 22:13:29 +08:00
|
|
|
|
|
|
|
|
#endif// OPM_POLYMERPROPSAD_HEADED_INLCUDED
|