storing the wellbore diameters for model and simulators.

Will be used in the shear rate calculation.
This commit is contained in:
Kai Bao 2015-06-05 16:10:03 +02:00
parent 93cdeac34a
commit 6807fc58b8
4 changed files with 17 additions and 4 deletions

View File

@ -84,6 +84,7 @@ namespace Opm {
const bool has_shrate,
const std::vector<double>& wells_rep_radius,
const std::vector<double>& wells_perf_length,
const std::vector<double>& 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<double> wells_rep_radius_;
std::vector<double> wells_perf_length_;
// wellbore diameters
std::vector<double> wells_bore_diameter_;
// shear-thinning factor for cell faces
std::vector<double> shear_mult_faces_;

View File

@ -89,6 +89,7 @@ namespace Opm {
const bool has_shrate,
const std::vector<double>& wells_rep_radius,
const std::vector<double>& wells_perf_length,
const std::vector<double>& 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]) {

View File

@ -143,6 +143,7 @@ namespace Opm
std::vector<double> wells_rep_radius_;
std::vector<double> wells_perf_length_;
std::vector<double> 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<int,int>& 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<double>& wells_rep_radius,
std::vector<double>& wells_perf_length);
std::vector<double>& wells_perf_length,
std::vector<double>& wells_bore_diameter);
};

View File

@ -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<double>& wells_rep_radius,
std::vector<double>& wells_perf_length)
std::vector<double>& wells_perf_length,
std::vector<double>& 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<int,int> 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) {