From 6807fc58b893a9606383259842f049f35bd62ed3 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Fri, 5 Jun 2015 16:10:03 +0200 Subject: [PATCH] storing the wellbore diameters for model and simulators. Will be used in the shear rate calculation. --- opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp | 3 +++ opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp | 4 +++- .../SimulatorFullyImplicitBlackoilPolymer.hpp | 5 ++++- .../SimulatorFullyImplicitBlackoilPolymer_impl.hpp | 9 +++++++-- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp b/opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp index cddf3677c..c8ba0ef7d 100644 --- a/opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp +++ b/opm/polymer/fullyimplicit/BlackoilPolymerModel.hpp @@ -84,6 +84,7 @@ namespace Opm { const bool has_shrate, const std::vector& wells_rep_radius, const std::vector& wells_perf_length, + const std::vector& wells_bore_diameter, const bool terminal_output); /// Called once before each time step. @@ -146,6 +147,8 @@ namespace Opm { // to be used in shear-thinning computation. std::vector wells_rep_radius_; std::vector wells_perf_length_; + // wellbore diameters + std::vector wells_bore_diameter_; // shear-thinning factor for cell faces std::vector shear_mult_faces_; diff --git a/opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp b/opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp index 2b12cb8ed..723492627 100644 --- a/opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp +++ b/opm/polymer/fullyimplicit/BlackoilPolymerModel_impl.hpp @@ -89,6 +89,7 @@ namespace Opm { const bool has_shrate, const std::vector& wells_rep_radius, const std::vector& wells_perf_length, + const std::vector& wells_bore_diameter, const bool terminal_output) : Base(param, grid, fluid, geo, rock_comp_props, wells, linsolver, has_disgas, has_vapoil, terminal_output), @@ -98,7 +99,8 @@ namespace Opm { has_shrate_(has_shrate), poly_pos_(detail::polymerPos(fluid.phaseUsage())), wells_rep_radius_(wells_rep_radius), - wells_perf_length_(wells_perf_length) + wells_perf_length_(wells_perf_length), + wells_bore_diameter_(wells_bore_diameter) { if (has_polymer_) { if (!active_[Water]) { diff --git a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp index 7a8e02f1c..49e7be303 100644 --- a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp +++ b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer.hpp @@ -143,6 +143,7 @@ namespace Opm std::vector wells_rep_radius_; std::vector wells_perf_length_; + std::vector wells_bore_diameter_; // generate the mapping from Cartesian grid cells to global compressed cells, // copied from opm-core, to be used in function computeRepRadiusPerfLength() @@ -150,13 +151,15 @@ namespace Opm setupCompressedToCartesian(const int* global_cell, int number_of_cells, std::map& cartesian_to_compressed); // calculate the representative radius and length for for well peforations + // and store the wellbore diameters // it will be used in the shear-thinning calcluation only. void computeRepRadiusPerfLength(const Opm::EclipseStateConstPtr eclipseState, const size_t timeStep, const GridT& grid, std::vector& wells_rep_radius, - std::vector& wells_perf_length); + std::vector& wells_perf_length, + std::vector& wells_bore_diameter); }; diff --git a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp index a8626ec42..6b4c2ea23 100644 --- a/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp +++ b/opm/polymer/fullyimplicit/SimulatorFullyImplicitBlackoilPolymer_impl.hpp @@ -86,6 +86,7 @@ namespace Opm has_shrate_, wells_rep_radius_, wells_perf_length_, + wells_bore_diameter_, BaseType::terminal_output_)); if (!BaseType::threshold_pressures_by_face_.empty()) { @@ -125,7 +126,7 @@ namespace Opm polymer_inflow_c); well_state.polymerInflow() = polymer_inflow_c; - computeRepRadiusPerfLength(BaseType::eclipse_state_, timer.currentStepNum(), BaseType::grid_, wells_rep_radius_, wells_perf_length_); + computeRepRadiusPerfLength(BaseType::eclipse_state_, timer.currentStepNum(), BaseType::grid_, wells_rep_radius_, wells_perf_length_, wells_bore_diameter_); } @@ -154,7 +155,8 @@ namespace Opm const size_t timeStep, const GridT& grid, std::vector& wells_rep_radius, - std::vector& wells_perf_length) + std::vector& wells_perf_length, + std::vector& wells_bore_diameter) { // TODO, the function does not work for parallel running @@ -175,9 +177,11 @@ namespace Opm wells_rep_radius.clear(); wells_perf_length.clear(); + wells_bore_diameter.clear(); wells_rep_radius.reserve(n_perf); wells_perf_length.reserve(n_perf); + wells_bore_diameter.reserve(n_perf); std::map cartesian_to_compressed; @@ -248,6 +252,7 @@ namespace Opm double repR = std::sqrt(re * radius); wells_rep_radius.push_back(repR); wells_perf_length.push_back(perf_length); + wells_bore_diameter.push_back(2. * radius); } } else { if (completion->getState() != WellCompletion::SHUT) {