From c6e240daae78d3ae9368284016a7ff44f17ef385 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Mon, 1 Jun 2015 10:52:49 +0200 Subject: [PATCH] Adding the flag for PLYSHLOG keyword. --- examples/flow_polymer.cpp | 1 + opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp | 3 +++ opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp | 2 ++ .../fullyimplicit/FullyImplicitBlackoilPolymerSolver.hpp | 2 ++ .../fullyimplicit/FullyImplicitBlackoilPolymerSolver_impl.hpp | 2 ++ .../fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp | 3 +++ .../SimulatorFullyImplicitBlackoilPolymer_impl.hpp | 3 +++ 7 files changed, 16 insertions(+) diff --git a/examples/flow_polymer.cpp b/examples/flow_polymer.cpp index 70482c259..699cbe6dc 100644 --- a/examples/flow_polymer.cpp +++ b/examples/flow_polymer.cpp @@ -279,6 +279,7 @@ try grav, deck->hasKeyword("DISGAS"), deck->hasKeyword("VAPOIL"), + deck->hasKeyword("PLYSHLOG"), polymer, eclipseState, outputWriter, diff --git a/opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp b/opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp index 1a725631d..1887e6ac5 100644 --- a/opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp +++ b/opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp @@ -66,6 +66,7 @@ namespace Opm { /// \param[in] has_disgas turn on dissolved gas /// \param[in] has_vapoil turn on vaporized oil feature /// \param[in] has_polymer turn on polymer feature + /// \param[in] has_plyshlog true when PLYSHLOG keyword available /// \param[in] terminal_output request output to cout/cerr BlackoilPolymerModel(const typename Base::ModelParameters& param, const Grid& grid, @@ -78,6 +79,7 @@ namespace Opm { const bool has_disgas, const bool has_vapoil, const bool has_polymer, + const bool has_plyshlog, const bool terminal_output); /// Called once before each time step. @@ -122,6 +124,7 @@ namespace Opm { const PolymerPropsAd& polymer_props_ad_; const bool has_polymer_; + const bool has_plyshlog_; const int poly_pos_; V cmax_; diff --git a/opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp b/opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp index 1cdf4473d..35dcc3431 100644 --- a/opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp +++ b/opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp @@ -85,11 +85,13 @@ namespace Opm { const bool has_disgas, const bool has_vapoil, const bool has_polymer, + const bool has_plyshlog, const bool terminal_output) : Base(param, grid, fluid, geo, rock_comp_props, wells, linsolver, has_disgas, has_vapoil, terminal_output), polymer_props_ad_(polymer_props_ad), has_polymer_(has_polymer), + has_plyshlog_(has_plyshlog), poly_pos_(detail::polymerPos(fluid.phaseUsage())) { if (has_polymer_) { diff --git a/opm/polymer/fullyimplicit/FullyImplicitBlackoilPolymerSolver.hpp b/opm/polymer/fullyimplicit/FullyImplicitBlackoilPolymerSolver.hpp index 8eca14100..a35aaeac0 100644 --- a/opm/polymer/fullyimplicit/FullyImplicitBlackoilPolymerSolver.hpp +++ b/opm/polymer/fullyimplicit/FullyImplicitBlackoilPolymerSolver.hpp @@ -108,6 +108,7 @@ namespace Opm { const bool has_disgas, const bool has_vapoil, const bool has_polymer, + const bool has_plyshlog, const bool terminal_output); /// \brief Set threshold pressures that prevent or reduce flow. @@ -205,6 +206,7 @@ namespace Opm { const bool has_disgas_; const bool has_vapoil_; const bool has_polymer_; + const bool has_plyshlog_; const int poly_pos_; SolverParameter param_; diff --git a/opm/polymer/fullyimplicit/FullyImplicitBlackoilPolymerSolver_impl.hpp b/opm/polymer/fullyimplicit/FullyImplicitBlackoilPolymerSolver_impl.hpp index 4cd62d7df..056f1279e 100644 --- a/opm/polymer/fullyimplicit/FullyImplicitBlackoilPolymerSolver_impl.hpp +++ b/opm/polymer/fullyimplicit/FullyImplicitBlackoilPolymerSolver_impl.hpp @@ -220,6 +220,7 @@ namespace detail { const bool has_disgas, const bool has_vapoil, const bool has_polymer, + const bool has_plyshlog, const bool terminal_output) : grid_ (grid) , fluid_ (fluid) @@ -237,6 +238,7 @@ namespace detail { , has_disgas_(has_disgas) , has_vapoil_(has_vapoil) , has_polymer_(has_polymer) + , has_plyshlog_(has_plyshlog) , poly_pos_(detail::polymerPos(fluid.phaseUsage())) , param_( param ) , use_threshold_pressure_(false) diff --git a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp index 923c92041..7bc71b15f 100644 --- a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp +++ b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp @@ -116,6 +116,7 @@ namespace Opm const bool disgas, const bool vapoil, const bool polymer, + const bool plyshlog, std::shared_ptr eclipse_state, BlackoilOutputWriter& output_writer, Opm::DeckConstPtr& deck, @@ -131,6 +132,8 @@ namespace Opm private: const PolymerPropsAd& polymer_props_; bool has_polymer_; + /// flag for PLYSHLOG keywords + bool has_plyshlog_; DeckConstPtr deck_; }; diff --git a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp index 29f4393d7..94be35d02 100644 --- a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp +++ b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp @@ -34,6 +34,7 @@ namespace Opm const bool has_disgas, const bool has_vapoil, const bool has_polymer, + const bool has_plyshlog, std::shared_ptr eclipse_state, BlackoilOutputWriter& output_writer, Opm::DeckConstPtr& deck, @@ -52,6 +53,7 @@ namespace Opm threshold_pressures_by_face) , polymer_props_(polymer_props) , has_polymer_(has_polymer) + , has_plyshlog_(has_plyshlog) , deck_(deck) { } @@ -77,6 +79,7 @@ namespace Opm BaseType::has_disgas_, BaseType::has_vapoil_, has_polymer_, + has_plyshlog_, BaseType::terminal_output_)); if (!BaseType::threshold_pressures_by_face_.empty()) {