Merge pull request #735 from joakim-hove/wells-refdepth

Using Parser to calculate well reference depth.
This commit is contained in:
Joakim Hove 2015-01-26 13:43:41 +01:00
commit dc544abe37

View File

@ -137,11 +137,7 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
well_names.push_back(well->name());
{
WellData wd;
// If defaulted, set refdepth to a marker
// value, will be changed after getting perforation
// data to the centroid of the cell of the top well
// perforation.
wd.reference_bhp_depth = (well->getRefDepthDefaulted()) ? -1e100 : well->getRefDepth();
wd.reference_bhp_depth = well->getRefDepth();
wd.welspecsline = -1;
if (well->isInjector( timeStep ))
wd.type = INJECTOR;
@ -208,26 +204,6 @@ void WellsManager::createWellsFromSpecs(std::vector<WellConstPtr>& wells, size_t
assert (dimensions == 3);
for (int w = 0; w < num_wells; ++w) {
num_perfs += wellperf_data[w].size();
if (well_data[w].reference_bhp_depth == -1e100) {
// It was defaulted. Set reference depth to minimum perforation depth.
double min_depth = 1e100;
int num_wperfs = wellperf_data[w].size();
for (int perf = 0; perf < num_wperfs; ++perf) {
using UgGridHelpers::increment;
using UgGridHelpers::getCoordinate;
const CC& cc =
increment(begin_cell_centroids,
wellperf_data[w][perf].cell,
dimensions);
const double depth = getCoordinate(cc, 2);
min_depth = std::min(min_depth, depth);
}
well_data[w].reference_bhp_depth = min_depth;
}
}
// Create the well data structures.