SimulatorFullyImplicitBlackoilMultiSegment.hpp
1 /*
2  Copyright 2013 SINTEF ICT, Applied Mathematics.
3  Copyright 2015 Andreas Lauser
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_SIMULATORFULLYIMPLICITBLACKOILMULTISEGMENT_HEADER_INCLUDED
22 #define OPM_SIMULATORFULLYIMPLICITBLACKOILMULTISEGMENT_HEADER_INCLUDED
23 
24 #include <opm/autodiff/SimulatorBase.hpp>
25 
26 
27 #include <opm/autodiff/NonlinearSolver.hpp>
28 #include <opm/autodiff/BlackoilMultiSegmentModel.hpp>
29 #include <opm/autodiff/WellStateMultiSegment.hpp>
30 
31 namespace Opm {
32 
33 template <class GridT>
35 
36 class MultisegmentWells;
37 
38 template <class GridT>
40 {
42  typedef BlackoilState ReservoirState;
44  typedef GridT Grid;
48 };
49 
51 template <class GridT>
53  : public SimulatorBase<SimulatorFullyImplicitBlackoilMultiSegment<GridT> >
54 {
55 public:
58  typedef SimulatorTraits<ThisType> Traits;
59  typedef typename Traits::ReservoirState ReservoirState;
60  typedef typename Traits::WellState WellState;
61  typedef typename Traits::Solver Solver;
62  typedef typename Traits::WellModel WellModel;
63 
64  // forward the constructor to the base class
65  SimulatorFullyImplicitBlackoilMultiSegment(const ParameterGroup& param,
66  const GridT& grid,
67  DerivedGeology& geo,
69  const RockCompressibility* rock_comp_props,
71  const double* gravity,
72  const bool disgas,
73  const bool vapoil,
74  std::shared_ptr<EclipseState> eclipse_state,
75  BlackoilOutputWriter& output_writer,
76  const std::vector<double>& threshold_pressures_by_face,
77  const std::unordered_set<std::string>& defunct_well_names)
78  : Base(param, grid, geo, props, rock_comp_props, linsolver, gravity, disgas, vapoil,
79  eclipse_state, output_writer, threshold_pressures_by_face, defunct_well_names)
80  {}
81 
82 
83  SimulatorReport run(SimulatorTimer& timer,
84  ReservoirState& state);
85 
86 protected:
87 
88  std::unique_ptr<Solver> createSolver(const WellModel& well_model);
89 
90  using Base::output_writer_;
91  using Base::param_;
92  using Base::solver_;
93  using Base::terminal_output_;
94  using Base::eclipse_state_;
95  using Base::grid_;
96  using Base::props_;
97  using Base::is_parallel_run_;
98  using Base::allcells_;
99  using Base::model_param_;
100  using Base::geo_;
101  using Base::rock_comp_props_;
102  using Base::has_disgas_;
103  using Base::has_vapoil_;
104 };
105 
106 } // namespace Opm
107 
108 #include "SimulatorFullyImplicitBlackoilMultiSegment_impl.hpp"
109 
110 #endif // OPM_SIMULATORFULLYIMPLICITBLACKOILMULTISEGMENT_HEADER_INCLUDED
A nonlinear solver class suitable for general fully-implicit models, as well as pressure, transport and sequential models.
Definition: NonlinearSolver.hpp:37
Class collecting all necessary components for a two-phase simulation.
Definition: SimulatorBase.hpp:85
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: AdditionalObjectDeleter.hpp:22
A model implementation for three-phase black oil with support for multi-segment wells.
Definition: BlackoilMultiSegmentModel.hpp:55
a simulator for the blackoil model
Definition: SimulatorFullyImplicitBlackoilMultiSegment.hpp:34
Class containing static geological properties that are derived from grid and petrophysical properties...
Definition: GeoProps.hpp:59
Wrapper class for VTK, Matlab, and ECL output.
Definition: SimulatorFullyImplicitBlackoilOutput.hpp:206
Interface class for (linear) solvers for the fully implicit black-oil system.
Definition: NewtonIterationBlackoilInterface.hpp:31
This class implements the AD-adapted fluid interface for three-phase black-oil.
Definition: BlackoilPropsAdFromDeck.hpp:61
The state of a set of multi-sgemnet wells.
Definition: WellStateMultiSegment.hpp:45
Definition: SimulatorBase.hpp:81
Class for handling the multi-segment well model.
Definition: MultisegmentWells.hpp:55