20 #ifndef OPM_FLOWMAINSEQUENTIAL_HEADER_INCLUDED 21 #define OPM_FLOWMAINSEQUENTIAL_HEADER_INCLUDED 25 #include <opm/autodiff/FlowMain.hpp> 33 template <
class Gr
id,
class Simulator>
38 using Base::eclipse_state_;
40 using Base::fis_solver_;
41 using Base::parallel_information_;
48 void printStartupMessage()
50 if (Base::output_cout_) {
52 std::cout <<
"**********************************************************************\n";
54 std::cout <<
"* This is Flow-Sequential (version " << version <<
")" 55 << std::string(17 - version.size(),
' ') <<
"*\n";
57 std::cout <<
"* Flow-Sequential is a simulator for fully implicit three-phase, *\n";
58 std::cout <<
"* black-oil flow, and is part of OPM. *\n";
59 std::cout <<
"* For more information see http://opm-project.org *\n";
61 std::cout <<
"**********************************************************************\n\n";
76 void setupLinearSolver()
78 const std::string cprSolver =
"cpr";
79 const std::string interleavedSolver =
"interleaved";
80 const std::string directSolver =
"direct";
81 std::string flowDefaultSolver = interleavedSolver;
83 if (!param_.has(
"solver_approach")) {
84 if (eclipse_state_->getSimulationConfig().useCPR()) {
85 flowDefaultSolver = cprSolver;
89 const std::string solver_approach = param_.getDefault(
"solver_approach", flowDefaultSolver);
91 if (solver_approach == cprSolver) {
92 OPM_THROW( std::runtime_error ,
"CPR solver is not ready for use with sequential simulator.");
93 }
else if (solver_approach == interleavedSolver) {
94 if (!param_.has(
"require_full_sparsity_pattern")) {
95 param_.insertParameter(
"require_full_sparsity_pattern",
"true");
98 }
else if (solver_approach == directSolver) {
101 OPM_THROW( std::runtime_error ,
"Internal error - solver approach " << solver_approach <<
" not recognized.");
112 void createSimulator()
115 if (!param_.has(
"min_iter")) {
116 param_.insertParameter(
"min_iter",
"0");
120 Base::simulator_.reset(
new Simulator(Base::param_,
121 Base::grid_init_->grid(),
124 Base::rock_comp_->isActive() ? Base::rock_comp_.
get() :
nullptr,
126 Base::gravity_.data(),
127 Base::deck_->hasKeyword(
"DISGAS"),
128 Base::deck_->hasKeyword(
"VAPOIL"),
129 Base::eclipse_state_,
130 *Base::output_writer_,
131 Base::threshold_pressures_));
141 #endif // OPM_FLOWMAINSEQUENTIAL_HEADER_INCLUDED Definition: FlowMainSequential.hpp:34
This class solves the fully implicit black-oil system by simply concatenating the Jacobian matrices a...
Definition: NewtonIterationBlackoilSimple.hpp:37
std::string moduleVersionName()
Return the version name of the module, for example "2015.10" (for a release branch) or "2016...
Definition: moduleVersion.cpp:28
This class solves the fully implicit black-oil system by solving the reduced system (after eliminatin...
Definition: NewtonIterationBlackoilInterleaved.hpp:90
This class encapsulates the setup and running of a simulator based on an input deck.
Definition: FlowMain.hpp:122
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: AdditionalObjectDeleter.hpp:22