cleaning up some comments.

This commit is contained in:
Kai Bao 2016-10-27 14:15:07 +02:00
parent cb897b07d0
commit 0f3e34bb25
3 changed files with 9 additions and 17 deletions

View File

@ -153,8 +153,7 @@ namespace Opm {
typedef typename ModelTraits<Implementation>::ModelParameters ModelParameters;
typedef typename ModelTraits<Implementation>::SolutionState SolutionState;
// for the conversion between the surface volume rate and resrevoir voidage rate
// Due to the requirement of the grid information, put the converter in the model.
// For the conversion between the surface volume rate and resrevoir voidage rate
using RateConverterType = RateConverter::
SurfaceToReservoirVoidage<BlackoilPropsAdInterface, std::vector<int> >;
@ -313,8 +312,8 @@ namespace Opm {
const std::vector<int>& fipnum);
/// Function to compute the resevoir voidage for the production wells.
/// TODO: it is just prototyping, and not sure where is the best place to
/// put this function yet.
/// TODO: Probably should go to well model, while we then have duplications there.
/// With time, it looks like probably the time to introduce a base class for Well Models.
void computeWellVoidageRates(const ReservoirState& reservoir_state,
const WellState& well_state,
std::vector<double>& well_voidage_rates,

View File

@ -2630,10 +2630,6 @@ namespace detail {
global_number_wells = info.communicator().sum(global_number_wells);
if ( global_number_wells )
{
// At least one process has resv wells. Therefore rate converter needs
// to calculate averages over regions that might cross process
// borders. This needs to be done by all processes and therefore
// outside of the next if statement.
rate_converter_.defineState(reservoir_state, boost::any_cast<const ParallelISTLInformation&>(linsolver_.parallelInformation()));
}
}
@ -2646,8 +2642,8 @@ namespace detail {
}
}
std::vector<double> well_rates(np);
std::vector<double> convert_coeff(np);
std::vector<double> well_rates(np, 0.0);
std::vector<double> convert_coeff(np, 1.0);
if ( !well_voidage_rates.empty() ) {
@ -2661,16 +2657,13 @@ namespace detail {
well_rates.begin(), std::negate<double>());
const int fipreg = 0; // Not considering FIP for the moment.
// We will need convert_coeff later actually.
// They should all be the same, right?
rate_converter_.calcCoeff(well_rates, fipreg, convert_coeff);
well_voidage_rates[w] = std::inner_product(well_rates.begin(), well_rates.end(),
convert_coeff.begin(), 0.0);
} else {
// TODO: it is possible we should use the distribution coeffs from
// the well controls.
// It will be problem if the rates are all zero here.
// It also raises the question where we should call this function.
// TODO: Not sure whether will encounter situation with all zero rates
// and whether it will cause problem here.
std::copy(well_state.wellRates().begin() + np * w,
well_state.wellRates().begin() + np * (w + 1),
well_rates.begin());

View File

@ -779,7 +779,7 @@ namespace Opm
// revising the interface for the better implementation later.
WellNode* well_node = dynamic_cast<Opm::WellNode *>(well_collection_->findNode(std::string(wells().name[w])));
// When the wells swtiching back and forwards between individual control and group control
// When the wells switching back and forwards between individual control and group control
// The targets of the wells should be updated.
if (well_node->individualControl()) {
if (ctrl_index == well_node->groupControlIndex()) {