Loading...
Searching...
No Matches
Rock.hpp
/*
Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
Copyright 2009, 2010 Statoil ASA.
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/>.
*/
#ifndef OPM_ROCK_HEADER_INCLUDED
#define OPM_ROCK_HEADER_INCLUDED
#include <opm/porsol/common/Matrix.hpp>
#include <opm/porsol/common/ReservoirPropertyCommon.hpp>
#include <opm/input/eclipse/Deck/Deck.hpp>
namespace Opm
{
template <int dim>
class Rock
{
public:
typedef ImmutableCMatrix PermTensor;
typedef OwnCMatrix MutablePermTensor;
typedef SharedCMatrix SharedPermTensor;
Rock();
void init(const Opm::Deck& deck,
const std::vector<int>& global_cell,
const double perm_threshold = 0.0);
void init(const int num_cells,
const double uniform_poro,
const double uniform_perm);
double porosity(int cell_index) const;
PermTensor permeability(int cell_index) const;
SharedPermTensor permeabilityModifiable(int cell_index);
protected:
// Methods
void assignPorosity(const Opm::Deck& deck,
const std::vector<int>& global_cell);
void assignPermeability(const Opm::Deck& deck,
const std::vector<int>& global_cell,
const double perm_threshold);
// Data members.
std::vector<double> porosity_;
std::vector<double> permeability_;
std::vector<unsigned char> permfield_valid_;
PermeabilityKind permeability_kind_;
};
} // namespace Opm
#include "Rock_impl.hpp"
#endif // OPM_ROCK_HEADER_INCLUDED
Opm::Rock
A property class for porous media rock.
Definition ImplicitTransportDefs.hpp:76
Opm::Rock::permeability
PermTensor permeability(int cell_index) const
Read-access to permeability.
Definition Rock_impl.hpp:84
Opm::Rock::permeabilityModifiable
SharedPermTensor permeabilityModifiable(int cell_index)
Read- and write-access to permeability.
Definition Rock_impl.hpp:95
Opm::Rock::MutablePermTensor
OwnCMatrix MutablePermTensor
Tensor type to be used for holding copies of permeability tensors.
Definition Rock.hpp:41
Opm::Rock::SharedPermTensor
SharedCMatrix SharedPermTensor
Tensor type for read and write access to permeability.
Definition Rock.hpp:43
Opm::Rock::PermTensor
ImmutableCMatrix PermTensor
Tensor type for read-only access to permeability.
Definition Rock.hpp:39
Opm::Rock::Rock
Rock()
Default constructor.
Definition Rock_impl.hpp:37
Opm::Rock::porosity
double porosity(int cell_index) const
Read-access to porosity.
Definition Rock_impl.hpp:76
Opm::Rock::init
void init(const Opm::Deck &deck, const std::vector< int > &global_cell, const double perm_threshold=0.0)
Initialize from a grdecl file.
Definition Rock_impl.hpp:44
Opm
Inverting small matrices.
Definition ImplicitAssembly.hpp:43
Opm::PermeabilityKind
PermeabilityKind
Enum for the kind of permeability field originally retrieved.
Definition ReservoirPropertyCommon.hpp:50
Opm::OwnCMatrix
FullMatrix< double, OwnData, COrdering > OwnCMatrix
Convenience typedefs for C-ordered.
Definition Matrix.hpp:579