2015-09-21 10:25:29 -05:00
|
|
|
/*
|
|
|
|
Copyright 2013 SINTEF ICT, Applied Mathematics.
|
|
|
|
Copyright 2015 Andreas Lauser
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OPM_SIMULATORFULLYIMPLICITBLACKOILMULTISEGMENT_HEADER_INCLUDED
|
|
|
|
#define OPM_SIMULATORFULLYIMPLICITBLACKOILMULTISEGMENT_HEADER_INCLUDED
|
|
|
|
|
2015-11-20 08:25:23 -06:00
|
|
|
#include <opm/autodiff/SimulatorBase.hpp>
|
2015-09-21 10:25:29 -05:00
|
|
|
|
|
|
|
|
2015-11-18 06:10:43 -06:00
|
|
|
#include <opm/autodiff/NonlinearSolver.hpp>
|
2015-09-21 10:25:29 -05:00
|
|
|
#include <opm/autodiff/BlackoilMultiSegmentModel.hpp>
|
|
|
|
#include <opm/autodiff/WellStateMultiSegment.hpp>
|
|
|
|
|
|
|
|
namespace Opm {
|
|
|
|
|
|
|
|
template <class GridT>
|
|
|
|
class SimulatorFullyImplicitBlackoilMultiSegment;
|
|
|
|
|
2016-05-09 10:44:59 -05:00
|
|
|
class MultisegmentWells;
|
|
|
|
|
2015-09-21 10:25:29 -05:00
|
|
|
template <class GridT>
|
|
|
|
struct SimulatorTraits<SimulatorFullyImplicitBlackoilMultiSegment<GridT> >
|
|
|
|
{
|
|
|
|
typedef WellStateMultiSegment WellState;
|
|
|
|
typedef BlackoilState ReservoirState;
|
|
|
|
typedef BlackoilOutputWriter OutputWriter;
|
|
|
|
typedef GridT Grid;
|
|
|
|
typedef BlackoilMultiSegmentModel<Grid> Model;
|
2015-11-18 06:10:43 -06:00
|
|
|
typedef NonlinearSolver<Model> Solver;
|
2016-05-09 10:44:59 -05:00
|
|
|
typedef MultisegmentWells WellModel;
|
2015-09-21 10:25:29 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
/// a simulator for the blackoil model
|
|
|
|
template <class GridT>
|
|
|
|
class SimulatorFullyImplicitBlackoilMultiSegment
|
|
|
|
: public SimulatorBase<SimulatorFullyImplicitBlackoilMultiSegment<GridT> >
|
|
|
|
{
|
2015-12-08 05:52:51 -06:00
|
|
|
public:
|
2015-09-21 10:25:29 -05:00
|
|
|
typedef SimulatorBase<SimulatorFullyImplicitBlackoilMultiSegment<GridT> > Base;
|
|
|
|
typedef SimulatorFullyImplicitBlackoilMultiSegment<GridT> ThisType;
|
|
|
|
typedef SimulatorTraits<ThisType> Traits;
|
|
|
|
typedef typename Traits::ReservoirState ReservoirState;
|
|
|
|
typedef typename Traits::WellState WellState;
|
2015-09-22 10:15:55 -05:00
|
|
|
typedef typename Traits::Solver Solver;
|
2016-05-09 10:44:59 -05:00
|
|
|
typedef typename Traits::WellModel WellModel;
|
2015-12-08 05:52:51 -06:00
|
|
|
|
2015-09-21 10:25:29 -05:00
|
|
|
// forward the constructor to the base class
|
2017-04-28 08:36:25 -05:00
|
|
|
SimulatorFullyImplicitBlackoilMultiSegment(const ParameterGroup& param,
|
2015-09-21 10:25:29 -05:00
|
|
|
const GridT& grid,
|
2015-11-30 17:05:09 -06:00
|
|
|
DerivedGeology& geo,
|
2016-12-29 09:35:24 -06:00
|
|
|
BlackoilPropsAdFromDeck& props,
|
2015-09-21 10:25:29 -05:00
|
|
|
const RockCompressibility* rock_comp_props,
|
|
|
|
NewtonIterationBlackoilInterface& linsolver,
|
|
|
|
const double* gravity,
|
|
|
|
const bool disgas,
|
|
|
|
const bool vapoil,
|
|
|
|
std::shared_ptr<EclipseState> eclipse_state,
|
2017-10-29 15:06:19 -05:00
|
|
|
std::shared_ptr<Schedule> schedule,
|
|
|
|
std::shared_ptr<SummaryConfig> summary_config,
|
2015-09-21 10:25:29 -05:00
|
|
|
BlackoilOutputWriter& output_writer,
|
2016-09-12 05:31:59 -05:00
|
|
|
const std::vector<double>& threshold_pressures_by_face,
|
|
|
|
const std::unordered_set<std::string>& defunct_well_names)
|
2015-09-21 10:25:29 -05:00
|
|
|
: Base(param, grid, geo, props, rock_comp_props, linsolver, gravity, disgas, vapoil,
|
2017-10-29 15:06:19 -05:00
|
|
|
eclipse_state, schedule, summary_config, output_writer, threshold_pressures_by_face, defunct_well_names)
|
2015-09-21 10:25:29 -05:00
|
|
|
{}
|
|
|
|
|
2015-09-22 10:15:55 -05:00
|
|
|
|
2015-09-21 10:25:29 -05:00
|
|
|
SimulatorReport run(SimulatorTimer& timer,
|
|
|
|
ReservoirState& state);
|
|
|
|
|
|
|
|
protected:
|
2015-09-22 10:15:55 -05:00
|
|
|
|
2016-05-09 10:44:59 -05:00
|
|
|
std::unique_ptr<Solver> createSolver(const WellModel& well_model);
|
2015-09-22 10:15:55 -05:00
|
|
|
|
2015-09-21 10:25:29 -05:00
|
|
|
using Base::output_writer_;
|
|
|
|
using Base::param_;
|
|
|
|
using Base::solver_;
|
|
|
|
using Base::terminal_output_;
|
|
|
|
using Base::eclipse_state_;
|
2017-10-29 15:06:19 -05:00
|
|
|
using Base::schedule_;
|
|
|
|
using Base::summary_config_;
|
2015-09-21 10:25:29 -05:00
|
|
|
using Base::grid_;
|
|
|
|
using Base::props_;
|
|
|
|
using Base::is_parallel_run_;
|
|
|
|
using Base::allcells_;
|
2015-09-22 10:15:55 -05:00
|
|
|
using Base::model_param_;
|
|
|
|
using Base::geo_;
|
|
|
|
using Base::rock_comp_props_;
|
|
|
|
using Base::has_disgas_;
|
|
|
|
using Base::has_vapoil_;
|
2015-09-21 10:25:29 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Opm
|
|
|
|
|
|
|
|
#include "SimulatorFullyImplicitBlackoilMultiSegment_impl.hpp"
|
|
|
|
|
|
|
|
#endif // OPM_SIMULATORFULLYIMPLICITBLACKOILMULTISEGMENT_HEADER_INCLUDED
|