ImplicitCapillarity.hpp
Go to the documentation of this file.
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
41#include <opm/core/utility/parameters/ParameterGroup.hpp>
42#include <opm/core/utility/SparseVector.hpp>
45
46namespace Opm {
47
50 template <class GridInterface, class ReservoirProperties, class BoundaryConditions,
51 template <class, class> class InnerProd = MimeticIPEvaluator>
53 {
54 public:
55 typedef IncompFlowSolverHybrid<GridInterface,
56 ReservoirProperties,
57 BoundaryConditions,
58 InnerProd> PressureSolver;
59
66 ImplicitCapillarity(const GridInterface& grid,
67 const ReservoirProperties& resprop,
68 const BoundaryConditions& boundary);
72 void init(const Opm::parameter::ParameterGroup& param);
76 void init(const Opm::parameter::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
94 template <class PressureSolution>
95 void transportSolve(std::vector<double>& saturation,
96 const double time,
97 const typename GridInterface::Vector& gravity,
98 const PressureSolution& pressure_sol,
99 const Opm::SparseVector<double>& injection_rates) const;
100
101 protected:
102 typedef typename GridInterface::CellIterator CIt;
103 typedef typename CIt::FaceIterator FIt;
104 typedef typename FIt::Vector Vector;
105
107
108 void checkAndPossiblyClampSat(std::vector<double>& s) const;
109
110 EulerUpstreamResidual<GridInterface,
111 ReservoirProperties,
112 BoundaryConditions> residual_;
113
122
123 };
124
125} // namespace Opm
126
127
129
130
131
132#endif // OPENRS_IMPLICITCAPILLARITY_HEADER
Definition: EulerUpstreamResidual.hpp:60
Definition: ImplicitCapillarity.hpp:53
GridInterface::CellIterator CIt
Definition: ImplicitCapillarity.hpp:102
FIt::Vector Vector
Definition: ImplicitCapillarity.hpp:104
bool check_sat_
Definition: ImplicitCapillarity.hpp:116
bool method_viscous_
Definition: ImplicitCapillarity.hpp:114
void initObj(const GridInterface &grid, const ReservoirProperties &resprop, const BoundaryConditions &boundary)
Definition: ImplicitCapillarity_impl.hpp:111
ImplicitCapillarity()
Definition: ImplicitCapillarity_impl.hpp:58
IncompFlowSolverHybrid< GridInterface, ReservoirProperties, BoundaryConditions, InnerProd > PressureSolver
Definition: ImplicitCapillarity.hpp:58
EulerUpstreamResidual< GridInterface, ReservoirProperties, BoundaryConditions > residual_
Definition: ImplicitCapillarity.hpp:112
bool clamp_sat_
Definition: ImplicitCapillarity.hpp:117
ImplicitCapillarity(const GridInterface &grid, const ReservoirProperties &resprop, const BoundaryConditions &boundary)
void init(const Opm::parameter::ParameterGroup &param)
Definition: ImplicitCapillarity_impl.hpp:89
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, evolving.
PressureSolver psolver_
Definition: ImplicitCapillarity.hpp:106
void init(const Opm::parameter::ParameterGroup &param, const GridInterface &grid, const ReservoirProperties &resprop, const BoundaryConditions &boundary)
CIt::FaceIterator FIt
Definition: ImplicitCapillarity.hpp:103
int linsolver_type_
Definition: ImplicitCapillarity.hpp:120
void checkAndPossiblyClampSat(std::vector< double > &s) const
Definition: ImplicitCapillarity_impl.hpp:234
int linsolver_verbosity_
Definition: ImplicitCapillarity.hpp:119
bool method_gravity_
Definition: ImplicitCapillarity.hpp:115
double residual_tolerance_
Definition: ImplicitCapillarity.hpp:118
double update_relaxation_
Definition: ImplicitCapillarity.hpp:121
Solve mixed formulation of incompressible flow modelled by Darcy's law.
Definition: IncompFlowSolverHybrid.hpp:366
Definition: BlackoilFluid.hpp:32