All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
TransportSolverTwophaseImplicit.hpp
1 /*
2  Copyright 2011 SINTEF ICT, Applied Mathematics.
3  Copyright 2011 Statoil ASA.
4 
5  This file is part of the Open Porous Media Project (OPM).
6 
7  OPM is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  OPM is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with OPM. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef OPM_TRANSPORTSOLVERTWOPHASEIMPLICIT_HEADER_INCLUDED
22 #define OPM_TRANSPORTSOLVERTWOPHASEIMPLICIT_HEADER_INCLUDED
23 
24 #include <opm/core/transport/TransportSolverTwophaseInterface.hpp>
25 #include <opm/core/transport/implicit/SimpleFluid2pWrappingProps.hpp>
27 #include <opm/core/transport/implicit/ImplicitTransport.hpp>
28 #include <opm/core/transport/implicit/transport_source.h>
29 #include <opm/core/transport/implicit/CSRMatrixUmfpackSolver.hpp>
30 #include <opm/core/transport/implicit/NormSupport.hpp>
31 #include <opm/core/transport/implicit/ImplicitAssembly.hpp>
32 #include <opm/core/transport/implicit/ImplicitTransport.hpp>
33 #include <opm/core/transport/implicit/JacobianSystem.hpp>
34 #include <opm/core/transport/implicit/CSRMatrixBlockAssembler.hpp>
35 #include <opm/core/utility/parameters/ParameterGroup.hpp>
36 #include <opm/core/props/IncompPropertiesInterface.hpp>
37 #include <opm/core/grid.h>
38 #include <opm/core/linalg/LinearSolverFactory.hpp>
39 
40 #include <memory>
41 #include <vector>
42 
43 
44 
45 namespace Opm
46 {
47 
48  // Implicit transport solver using Newton-Raphson.
50  {
51  public:
59  TransportSolverTwophaseImplicit(const UnstructuredGrid& grid,
60  const Opm::IncompPropertiesInterface& props,
61  const std::vector<double>& porevol,
62  const double* gravity,
63  const std::vector<double>& half_trans,
64  const ParameterGroup& param);
65 
67 
74  virtual void solve(const double* porevolume,
75  const double* source,
76  const double dt,
77  TwophaseState& state);
78 
79  private:
80  // Disallow copying and assignment.
83 
84  // Defining types for the underlying transport solver.
89  template <class Vector>
90  class MaxNorm {
91  public:
92  static double
93  norm(const Vector& v) {
95  }
96  };
98  JacSys ,
99  MaxNorm ,
104 
105  // Data members.
109  TransportSolver tsolver_;
110  const UnstructuredGrid& grid_;
112  const Opm::IncompPropertiesInterface& props_;
113  TransportSource* tsrc_;
114  double initial_porevolume_cell0_;
115  };
116 
117 } // namespace Opm
118 
119 #endif // OPM_TRANSPORTSOLVERTWOPHASEIMPLICIT_HEADER_INCLUDED
Definition: TwophaseState.hpp:27
Definition: TransportSolverTwophaseImplicit.hpp:49
Definition: transport_source.h:43
Definition: JacobianSystem.hpp:109
Definition: SimpleFluid2pWrappingProps.hpp:37
Base class for two-phase incompressible transport solvers.
Definition: TransportSolverTwophaseInterface.hpp:30
Definition: SinglePointUpwindTwoPhase.hpp:278
Definition: ImplicitTransport.hpp:45
TransportSolverTwophaseImplicit(const UnstructuredGrid &grid, const Opm::IncompPropertiesInterface &props, const std::vector< double > &porevol, const double *gravity, const std::vector< double > &half_trans, const ParameterGroup &param)
Construct solver.
Definition: TransportSolverTwophaseImplicit.cpp:42
Definition: CSRMatrixUmfpackSolver.hpp:47
Definition: JacobianSystem.hpp:223
ParameterGroup is a class that is used to provide run-time parameters.
Definition: ParameterGroup.hpp:81
virtual void solve(const double *porevolume, const double *source, const double dt, TwophaseState &state)
Solve for saturation at next timestep.
Definition: TransportSolverTwophaseImplicit.cpp:74
Definition: JacobianSystem.hpp:89
Definition: JacobianSystem.hpp:78
Definition: JacobianSystem.hpp:65
Definition: ImplicitTransport.hpp:105
Numerical model and support classes needed to model transport of two incompressible fluid phases...
Abstract base class for incompressible fluid and reservoir properties.
Definition: IncompPropertiesInterface.hpp:35