21 #ifndef OPM_SIMULATORBASE_HEADER_INCLUDED
22 #define OPM_SIMULATORBASE_HEADER_INCLUDED
25 #include <opm/core/utility/parameters/ParameterGroup.hpp>
26 #include <opm/common/ErrorMacros.hpp>
35 #include <opm/core/grid.h>
36 #include <opm/core/wells.h>
37 #include <opm/core/well_controls.h>
38 #include <opm/core/pressure/flow_bc.h>
40 #include <opm/core/simulator/SimulatorReport.hpp>
41 #include <opm/core/simulator/SimulatorTimer.hpp>
42 #include <opm/core/simulator/AdaptiveSimulatorTimer.hpp>
43 #include <opm/core/utility/StopWatch.hpp>
44 #include <opm/core/io/vtk/writeVtkData.hpp>
45 #include <opm/core/utility/miscUtilities.hpp>
46 #include <opm/core/utility/miscUtilitiesBlackoil.hpp>
48 #include <opm/core/props/rock/RockCompressibility.hpp>
50 #include <opm/core/simulator/BlackoilState.hpp>
51 #include <opm/core/simulator/AdaptiveTimeStepping.hpp>
52 #include <opm/core/transport/reorder/TransportSolverCompressibleTwophaseReorder.hpp>
54 #include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
55 #include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
56 #include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
57 #include <opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp>
60 #include <boost/filesystem.hpp>
61 #include <boost/lexical_cast.hpp>
72 #include <unordered_map>
79 template <
class Simulator>
83 template <
class Implementation>
126 const RockCompressibility* rock_comp_props,
128 const double* gravity,
131 std::shared_ptr<EclipseState> eclipse_state,
132 OutputWriter& output_writer,
133 const std::vector<double>& threshold_pressures_by_face);
142 SimulatorReport
run(SimulatorTimer& timer,
143 ReservoirState& state);
146 Implementation&
asImpl() {
return *
static_cast<Implementation*
>(
this); }
147 const Implementation&
asImpl()
const {
return *
static_cast<const Implementation*
>(
this); }
150 WellsManager& wells_manager,
151 WellState& well_state,
154 std::unique_ptr<Solver>
createSolver(
const Wells* wells);
159 const BlackoilState& x,
201 #endif // OPM_SIMULATORBASE_HEADER_INCLUDED
Definition: GeoProps.hpp:53
GridT Grid
Definition: SimulatorFullyImplicitBlackoil.hpp:39
Definition: BlackoilPropsAdInterface.hpp:38
const double * gravity_
Definition: SimulatorBase.hpp:178
const RockCompressibility * rock_comp_props_
Definition: SimulatorBase.hpp:177
Definition: AdditionalObjectDeleter.hpp:22
ModelTraits< BlackoilModel< Grid > >::ModelParameters ModelParameters
Definition: BlackoilModelBase.hpp:108
const DerivedGeology & geo_
Definition: SimulatorBase.hpp:180
BlackoilState ReservoirState
Definition: SimulatorFullyImplicitBlackoil.hpp:37
Definition: WellStateFullyImplicitBlackoil.hpp:41
const Grid & grid_
Definition: SimulatorBase.hpp:175
Traits::Grid Grid
Definition: SimulatorBase.hpp:92
bool terminal_output_
Definition: SimulatorBase.hpp:186
SimulatorBase(const parameter::ParameterGroup ¶m, const Grid &grid, const DerivedGeology &geo, BlackoilPropsAdInterface &props, const RockCompressibility *rock_comp_props, NewtonIterationBlackoilInterface &linsolver, const double *gravity, const bool disgas, const bool vapoil, std::shared_ptr< EclipseState > eclipse_state, OutputWriter &output_writer, const std::vector< double > &threshold_pressures_by_face)
Definition: SimulatorBase_impl.hpp:28
Implementation & asImpl()
Definition: SimulatorBase.hpp:146
std::unique_ptr< Solver > createSolver(const Wells *wells)
Definition: SimulatorBase_impl.hpp:333
const Implementation & asImpl() const
Definition: SimulatorBase.hpp:147
Solver::SolverParameters SolverParameters
Definition: SimulatorBase.hpp:168
Traits::Solver Solver
Definition: SimulatorBase.hpp:93
RateConverterType rateConverter_
Definition: SimulatorBase.hpp:191
A Newton solver class suitable for general fully-implicit models.
Definition: NewtonSolver.hpp:33
Class collecting all necessary components for a two-phase simulation.
Definition: SimulatorBase.hpp:84
bool is_parallel_run_
Definition: SimulatorBase.hpp:195
void handleAdditionalWellInflow(SimulatorTimer &timer, WellsManager &wells_manager, WellState &well_state, const Wells *wells)
Definition: SimulatorBase_impl.hpp:326
Traits::OutputWriter OutputWriter
Definition: SimulatorBase.hpp:91
NewtonIterationBlackoilInterface & solver_
Definition: SimulatorBase.hpp:181
SolverParameters solver_param_
Definition: SimulatorBase.hpp:172
Traits::ReservoirState ReservoirState
Definition: SimulatorBase.hpp:89
Interface class for (linear) solvers for the fully implicit black-oil system.
Definition: NewtonIterationBlackoilInterface.hpp:31
Model::ModelParameters ModelParameters
Definition: SimulatorBase.hpp:167
std::vector< int > allcells_
Definition: SimulatorBase.hpp:183
const parameter::ParameterGroup param_
Definition: SimulatorBase.hpp:170
const bool has_disgas_
Definition: SimulatorBase.hpp:184
void computeRESV(const std::size_t step, const Wells *wells, const BlackoilState &x, WellState &xw)
Definition: SimulatorBase_impl.hpp:356
Definition: RateConverter.hpp:353
Traits::Model Model
Definition: SimulatorBase.hpp:166
Definition: SimulatorBase.hpp:80
RateConverter::SurfaceToReservoirVoidage< BlackoilPropsAdInterface, std::vector< int > > RateConverterType
Definition: SimulatorBase.hpp:165
BlackoilPropsAdInterface & props_
Definition: SimulatorBase.hpp:176
Wrapper class for VTK, Matlab, and ECL output.
Definition: SimulatorFullyImplicitBlackoilOutput.hpp:195
OutputWriter & output_writer_
Definition: SimulatorBase.hpp:190
Definition: BlackoilModel.hpp:43
std::shared_ptr< EclipseState > eclipse_state_
Definition: SimulatorBase.hpp:188
const bool has_vapoil_
Definition: SimulatorBase.hpp:185
ModelParameters model_param_
Definition: SimulatorBase.hpp:171
SimulatorReport run(SimulatorTimer &timer, ReservoirState &state)
Definition: SimulatorBase_impl.hpp:77
std::vector< double > threshold_pressures_by_face_
Definition: SimulatorBase.hpp:193
Definition: NewtonSolver.hpp:45
Traits::WellState WellState
Definition: SimulatorBase.hpp:90