Merge pull request #881 from totto82/fix_dz

Use cell thickness from EclipseGrid in the well transsmissibility
This commit is contained in:
Atgeirr Flø Rasmussen 2015-09-15 13:17:18 +02:00
commit 65e6fe79cd
2 changed files with 18 additions and 1 deletions

View File

@ -164,6 +164,7 @@ namespace Opm
const int* cart_dims, const int* cart_dims,
FC begin_face_centroids, FC begin_face_centroids,
int dimensions, int dimensions,
std::vector<double>& dz,
std::vector<std::string>& well_names, std::vector<std::string>& well_names,
std::vector<WellData>& well_data, std::vector<WellData>& well_data,
std::map<std::string, int> & well_names_to_index, std::map<std::string, int> & well_names_to_index,

View File

@ -107,6 +107,7 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
const int* cart_dims, const int* cart_dims,
FC begin_face_centroids, FC begin_face_centroids,
int dimensions, int dimensions,
std::vector<double>& dz,
std::vector<std::string>& well_names, std::vector<std::string>& well_names,
std::vector<WellData>& well_data, std::vector<WellData>& well_data,
std::map<std::string, int>& well_names_to_index, std::map<std::string, int>& well_names_to_index,
@ -178,9 +179,14 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
OPM_MESSAGE("**** Warning: Well bore internal radius set to " << radius); OPM_MESSAGE("**** Warning: Well bore internal radius set to " << radius);
} }
const std::array<double, 3> cubical = std::array<double, 3> cubical =
WellsManagerDetail::getCubeDim<3>(c2f, begin_face_centroids, cell); WellsManagerDetail::getCubeDim<3>(c2f, begin_face_centroids, cell);
// overwrite dz values calculated in getCubeDim.
if (dz.size() > 0) {
cubical[2] = dz[cell];
}
const double* cell_perm = &permeability[dimensions*dimensions*cell]; const double* cell_perm = &permeability[dimensions*dimensions*cell];
pd.well_index = pd.well_index =
WellsManagerDetail::computeWellIndex(radius, cubical, cell_perm, WellsManagerDetail::computeWellIndex(radius, cubical, cell_perm,
@ -369,10 +375,20 @@ WellsManager::init(const Opm::EclipseStateConstPtr eclipseState,
DoubleArray ntg_glob(eclipseState, "NTG", 1.0); DoubleArray ntg_glob(eclipseState, "NTG", 1.0);
NTGArray ntg(ntg_glob, global_cell); NTGArray ntg(ntg_glob, global_cell);
EclipseGridConstPtr eclGrid = eclipseState->getEclipseGrid();
// use cell thickness (dz) from eclGrid
// dz overwrites values calculated by WellDetails::getCubeDim
std::vector<double> dz(number_of_cells);
for (int cell = 0; cell < number_of_cells; ++cell) {
dz[cell] = eclGrid->getCellThicknes(global_cell[cell]);
}
createWellsFromSpecs(wells, timeStep, cell_to_faces, createWellsFromSpecs(wells, timeStep, cell_to_faces,
cart_dims, cart_dims,
begin_face_centroids, begin_face_centroids,
dimensions, dimensions,
dz,
well_names, well_data, well_names_to_index, well_names, well_data, well_names_to_index,
pu, cartesian_to_compressed, permeability, ntg, pu, cartesian_to_compressed, permeability, ntg,
wells_on_proc); wells_on_proc);