SimulatorFullyImplicitCompressiblePolymer.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2014 SINTEF ICT, Applied Mathematics.
3  Copyright 2014 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_SIMULATORFULLYIMPLICITCOMPRESSIBLEPOLYMER_HEADER_INCLUDED
22 #define OPM_SIMULATORFULLYIMPLICITCOMPRESSIBLEPOLYMER_HEADER_INCLUDED
23 
24 #include <opm/core/utility/parameters/ParameterGroup.hpp>
25 #include <opm/common/ErrorMacros.hpp>
26 
27 #include <opm/autodiff/GeoProps.hpp>
28 #include <opm/autodiff/BlackoilPropsAdInterface.hpp>
29 #include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
30 #include <opm/autodiff/SimulatorBase.hpp>
31 
34 #include <opm/core/grid.h>
35 #include <opm/core/wells.h>
36 #include <opm/core/pressure/flow_bc.h>
37 
38 #include <opm/core/simulator/SimulatorReport.hpp>
39 #include <opm/core/simulator/SimulatorTimer.hpp>
40 #include <opm/core/utility/StopWatch.hpp>
41 #include <opm/core/io/eclipse/EclipseWriter.hpp>
42 #include <opm/core/io/vtk/writeVtkData.hpp>
43 #include <opm/core/utility/miscUtilities.hpp>
44 #include <opm/core/utility/miscUtilitiesBlackoil.hpp>
45 
46 #include <opm/core/wells/WellsManager.hpp>
47 
48 #include <opm/core/props/rock/RockCompressibility.hpp>
49 
50 #include <opm/core/grid/ColumnExtract.hpp>
53 #include <opm/core/simulator/WellState.hpp>
54 #include <opm/core/transport/reorder/TransportSolverCompressibleTwophaseReorder.hpp>
55 
56 #include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
57 #include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
58 #include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
59 #include <opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp>
60 #include <opm/parser/eclipse/Deck/Deck.hpp>
61 #include <boost/filesystem.hpp>
62 #include <boost/scoped_ptr.hpp>
63 #include <boost/lexical_cast.hpp>
64 
65 #include <numeric>
66 #include <fstream>
67 #include <iostream>
68 
69 namespace Opm
70 {
71  template <class GridT>
73 
74  template <class GridT>
75  struct SimulatorTraits<SimulatorFullyImplicitCompressiblePolymer<GridT> >
76  {
79  typedef BlackoilOutputWriter OutputWriter;
80  typedef GridT Grid;
83  struct Model
84  {
85  typedef parameter::ParameterGroup ModelParameters;
86  };
87  };
88 
90  template <class GridT>
92  : public SimulatorBase<SimulatorFullyImplicitCompressiblePolymer<GridT> >
93  {
95  typedef SimulatorBase<ThisType> BaseType;
96  typedef typename BaseType::Solver Solver;
97 
98  public:
100  SimulatorFullyImplicitCompressiblePolymer(const parameter::ParameterGroup& param,
101  const GridT& grid,
102  const DerivedGeology& geo,
103  BlackoilPropsAdInterface& props,
104  const PolymerPropsAd& polymer_props,
105  const RockCompressibility* rock_comp_props,
106  std::shared_ptr<EclipseState> eclipse_state,
107  BlackoilOutputWriter& output_writer,
108  Opm::DeckConstPtr& deck,
109  NewtonIterationBlackoilInterface& linsolver,
110  const double* gravity);
111 
112  std::unique_ptr<Solver> createSolver(const Wells* wells);
113 
114  void handleAdditionalWellInflow(SimulatorTimer& timer,
115  WellsManager& wells_manager,
116  typename BaseType::WellState& well_state,
117  const Wells* wells);
118 private:
119  Opm::DeckConstPtr deck_;
120  const PolymerPropsAd& polymer_props_;
121  };
122 
123 } // namespace Opm
124 
126 
127 #endif // OPM_SIMULATORFULLYIMPLICITCOMPRESSIBLEPOLYMER_HEADER_INCLUDED
BlackoilOutputWriter OutputWriter
Definition: SimulatorFullyImplicitCompressiblePolymer.hpp:79
GridT Grid
Definition: SimulatorFullyImplicitCompressiblePolymer.hpp:80
Definition: CompressibleTpfaPolymer.hpp:32
PolymerBlackoilState ReservoirState
Definition: SimulatorFullyImplicitCompressiblePolymer.hpp:77
WellStateFullyImplicitBlackoilPolymer WellState
Definition: SimulatorFullyImplicitCompressiblePolymer.hpp:78
SimulatorFullyImplicitCompressiblePolymer(const parameter::ParameterGroup &param, const GridT &grid, const DerivedGeology &geo, BlackoilPropsAdInterface &props, const PolymerPropsAd &polymer_props, const RockCompressibility *rock_comp_props, std::shared_ptr< EclipseState > eclipse_state, BlackoilOutputWriter &output_writer, Opm::DeckConstPtr &deck, NewtonIterationBlackoilInterface &linsolver, const double *gravity)
Initialise from parameters and objects to observe.
Definition: SimulatorFullyImplicitCompressiblePolymer_impl.hpp:29
parameter::ParameterGroup ModelParameters
Definition: SimulatorFullyImplicitCompressiblePolymer.hpp:85
Class collecting all necessary components for a two-phase simulation.
Definition: SimulatorFullyImplicitCompressiblePolymer.hpp:72
std::unique_ptr< Solver > createSolver(const Wells *wells)
Definition: SimulatorFullyImplicitCompressiblePolymer_impl.hpp:60
Definition: WellStateFullyImplicitBlackoilPolymer.hpp:28
Definition: PolymerBlackoilState.hpp:33
Definition: PolymerPropsAd.hpp:32
Definition: FullyImplicitCompressiblePolymerSolver.hpp:53
void handleAdditionalWellInflow(SimulatorTimer &timer, WellsManager &wells_manager, typename BaseType::WellState &well_state, const Wells *wells)
Definition: SimulatorFullyImplicitCompressiblePolymer_impl.hpp:74
FullyImplicitCompressiblePolymerSolver Solver
Definition: SimulatorFullyImplicitCompressiblePolymer.hpp:81