using legacyDepth_ for the perfoation depth

for StandardWell. It turns out that it can be different with the
grid.getCellDepth() from the parser.
This commit is contained in:
Kai Bao 2017-08-01 16:11:55 +02:00
parent 6e0da756dc
commit 4f716a633d
5 changed files with 13 additions and 12 deletions

View File

@ -116,6 +116,7 @@ namespace Opm
virtual void init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
const VFPProperties* vfp_properties_arg,
const std::vector<double>& depth_arg,
const double gravity_arg,
const int num_cells);

View File

@ -45,12 +45,19 @@ namespace Opm
init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
const VFPProperties* vfp_properties_arg,
const std::vector<double>& depth_arg,
const double gravity_arg,
const int num_cells)
{
WellInterface<TypeTag>::init(phase_usage_arg, active_arg,
vfp_properties_arg, gravity_arg, num_cells);
vfp_properties_arg, depth_arg,
gravity_arg, num_cells);
perf_depth_.resize(numberOfPerforations(), 0.);
for (int perf = 0; perf < numberOfPerforations(); ++perf) {
const int cell_idx = wellCells()[perf];
perf_depth_[perf] = depth_arg[cell_idx];
}
// setup sparsity pattern for the matrices
//[A C^T [x = [ res

View File

@ -84,7 +84,7 @@ namespace Opm {
// TODO: to see whether we can postpone of the intialization of the well containers to
// optimize the usage of the following several member variables
for (auto& well : well_container_) {
well->init(&phase_usage_, &active_, vfp_properties_, gravity_, nc);
well->init(&phase_usage_, &active_, vfp_properties_, depth_arg, gravity_, nc);
}
}

View File

@ -134,6 +134,7 @@ namespace Opm
virtual void init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
const VFPProperties* vfp_properties_arg,
const std::vector<double>& depth_arg,
const double gravity_arg,
const int num_cells);
@ -262,6 +263,7 @@ namespace Opm
// well index for each perforation
std::vector<double> well_index_;
// TODO: it might should go to StandardWell
// depth for each perforation
std::vector<double> perf_depth_;

View File

@ -83,16 +83,6 @@ namespace Opm
std::copy(wells->sat_table_id + perf_index_begin,
wells->sat_table_id + perf_index_end,
saturation_table_number_.begin() );
// TODO: not sure about the processing of depth for perforations here
// Will revisit here later. There are different ways and the definition for different wells
// can be different, it is possible that we need to remove this from the WellInterface
perf_depth_.resize(number_of_perforations_, 0.);
const auto& completion_set = well->getCompletions(time_step);
for (int i = 0; i < number_of_perforations_; ++i) {
perf_depth_[i] = completion_set.get(i).getCenterDepth();
}
}
well_efficiency_factor_ = 1.0;
@ -108,6 +98,7 @@ namespace Opm
init(const PhaseUsage* phase_usage_arg,
const std::vector<bool>* active_arg,
const VFPProperties* vfp_properties_arg,
const std::vector<double>& /* depth_arg */,
const double gravity_arg,
const int /* num_cells */)
{