opm-upscaling
Loading...
Searching...
No Matches
ImplicitCapillarity.hpp
1//===========================================================================
2//
3// File: ImplicitCapillarity.hpp
4//
5// Created: Thu May 6 15:29:51 2010
6//
7// Author(s): Atgeirr F Rasmussen <atgeirr@sintef.no>
8// Jostein R Natvig <jostein.r.natvig@sintef.no>
9//
10// $Date$
11//
12// $Revision$
13//
14//===========================================================================
15
16/*
17 Copyright 2010 SINTEF ICT, Applied Mathematics.
18 Copyright 2010 Statoil ASA.
19
20 This file is part of The Open Reservoir Simulator Project (OpenRS).
21
22 OpenRS is free software: you can redistribute it and/or modify
23 it under the terms of the GNU General Public License as published by
24 the Free Software Foundation, either version 3 of the License, or
25 (at your option) any later version.
26
27 OpenRS is distributed in the hope that it will be useful,
28 but WITHOUT ANY WARRANTY; without even the implied warranty of
29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 GNU General Public License for more details.
31
32 You should have received a copy of the GNU General Public License
33 along with OpenRS. If not, see <http://www.gnu.org/licenses/>.
34*/
35
36#ifndef OPENRS_IMPLICITCAPILLARITY_HEADER
37#define OPENRS_IMPLICITCAPILLARITY_HEADER
38
39
40#include <opm/porsol/euler/EulerUpstreamResidual.hpp>
41#include <opm/common/utility/parameters/ParameterGroup.hpp>
42#include <opm/common/utility/numeric/SparseVector.hpp>
43#include <opm/porsol/mimetic/IncompFlowSolverHybrid.hpp>
44#include <opm/porsol/mimetic/MimeticIPEvaluator.hpp>
45
46namespace Opm {
47
50 template <class GridInterface, class ReservoirProperties, class BoundaryConditions,
51 template <class, class> class InnerProd = MimeticIPEvaluator>
53 {
54 public:
56 ReservoirProperties,
57 BoundaryConditions,
58 InnerProd> PressureSolver;
59
67 const ReservoirProperties& resprop,
68 const BoundaryConditions& boundary);
72 void init(const Opm::ParameterGroup& param);
76 void init(const Opm::ParameterGroup& param,
77 const GridInterface& grid,
78 const ReservoirProperties& resprop,
79 const BoundaryConditions& boundary);
83 void initObj(const GridInterface& grid,
84 const ReservoirProperties& resprop,
85 const BoundaryConditions& boundary);
86
87
96 template <class PressureSolution>
97 void transportSolve(std::vector<double>& saturation,
98 const double time,
99 const typename GridInterface::Vector& gravity,
100 const PressureSolution& pressure_sol,
101 const Opm::SparseVector<double>& injection_rates) const;
102
103 protected:
104 typedef typename GridInterface::CellIterator CIt;
105 typedef typename CIt::FaceIterator FIt;
106 typedef typename FIt::Vector Vector;
107
108 mutable PressureSolver psolver_;
109
110 void checkAndPossiblyClampSat(std::vector<double>& s) const;
111
113 ReservoirProperties,
114 BoundaryConditions> residual_;
115
116 bool method_viscous_;
117 bool method_gravity_;
118 bool check_sat_;
119 bool clamp_sat_;
120 double residual_tolerance_;
121 int linsolver_verbosity_;
122 int linsolver_type_;
123 double update_relaxation_;
124
125 };
126
127} // namespace Opm
128
129
130#include "ImplicitCapillarity_impl.hpp"
131
132
133
134#endif // OPENRS_IMPLICITCAPILLARITY_HEADER
Class for doing simple transport by explicit Euler upstream method for general grid.
Definition EulerUpstreamResidual.hpp:58
void initObj(const GridInterface &grid, const ReservoirProperties &resprop, const BoundaryConditions &boundary)
Definition ImplicitCapillarity_impl.hpp:111
ImplicitCapillarity()
Definition ImplicitCapillarity_impl.hpp:58
void init(const Opm::ParameterGroup &param, const GridInterface &grid, const ReservoirProperties &resprop, const BoundaryConditions &boundary)
void init(const Opm::ParameterGroup &param)
Definition ImplicitCapillarity_impl.hpp:89
ImplicitCapillarity(const GridInterface &grid, const ReservoirProperties &resprop, const BoundaryConditions &boundary)
void transportSolve(std::vector< double > &saturation, const double time, const typename GridInterface::Vector &gravity, const PressureSolution &pressure_sol, const Opm::SparseVector< double > &injection_rates) const
Solve transport equation.
Solve mixed formulation of incompressible flow modelled by Darcy's law.
Definition IncompFlowSolverHybrid.hpp:365
Definition MimeticIPEvaluator.hpp:85
Inverting small matrices.
Definition ImplicitAssembly.hpp:43