All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
IncompTpfaPolymer.hpp
1 /*
2  Copyright 2012 SINTEF ICT, Applied Mathematics.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef OPM_INCOMPTPFAPOLYMER_HEADER_INCLUDED
21 #define OPM_INCOMPTPFAPOLYMER_HEADER_INCLUDED
22 
23 
24 #include <opm/core/pressure/IncompTpfa.hpp>
25 #include <vector>
26 
27 struct UnstructuredGrid;
28 struct Wells;
29 struct FlowBoundaryConditions;
30 
31 namespace Opm
32 {
33 
34  class IncompPropertiesInterface;
35  class RockCompressibility;
36  class PolymerProperties;
37  class LinearSolverInterface;
38  class PolymerState;
39  class WellState;
40  class SimulationDataContainer;
41 
49  class IncompTpfaPolymer : public IncompTpfa
50  {
51  public:
52 
73  IncompTpfaPolymer(const UnstructuredGrid& grid,
74  const IncompPropertiesInterface& props,
75  const RockCompressibility* rock_comp_props,
76  const PolymerProperties& poly_props,
77  LinearSolverInterface& linsolver,
78  const double residual_tol,
79  const double change_tol,
80  const int maxiter,
81  const double* gravity,
82  const Wells* wells,
83  const std::vector<double>& src,
84  const FlowBoundaryConditions* bcs);
85 
86 
94  void solve(const double dt,
95  PolymerState& state,
96  WellState& well_state);
97 
98  private:
99  virtual void computePerSolveDynamicData(const double dt,
100  const SimulationDataContainer& state,
101  const WellState& well_state);
102  private:
103  // ------ Data that will remain unmodified after construction. ------
104  const PolymerProperties& poly_props_;
105  // ------ Data that will be updated every solve() call. ------
106  const std::vector<double>* c_;
107  const std::vector<double>* cmax_;
108  };
109 
110 } // namespace Opm
111 
112 #endif // OPM_INCOMPTPFAPOLYMER_HEADER_INCLUDED
IncompTpfaPolymer(const UnstructuredGrid &grid, const IncompPropertiesInterface &props, const RockCompressibility *rock_comp_props, const PolymerProperties &poly_props, LinearSolverInterface &linsolver, const double residual_tol, const double change_tol, const int maxiter, const double *gravity, const Wells *wells, const std::vector< double > &src, const FlowBoundaryConditions *bcs)
Construct solver, possibly with rock compressibility.
Definition: IncompTpfaPolymer.cpp:69
Definition: PolymerProperties.hpp:43
Simulator state for a two-phase simulator with polymer.
Definition: PolymerState.hpp:32
void solve(const double dt, PolymerState &state, WellState &well_state)
Solve the pressure equation.
Definition: IncompTpfaPolymer.cpp:100
Encapsulating a tpfa pressure solver for the incompressible-fluid case with polymer.
Definition: IncompTpfaPolymer.hpp:49