mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
cleaning up some comments.
This commit is contained in:
parent
cb897b07d0
commit
0f3e34bb25
@ -153,8 +153,7 @@ namespace Opm {
|
|||||||
typedef typename ModelTraits<Implementation>::ModelParameters ModelParameters;
|
typedef typename ModelTraits<Implementation>::ModelParameters ModelParameters;
|
||||||
typedef typename ModelTraits<Implementation>::SolutionState SolutionState;
|
typedef typename ModelTraits<Implementation>::SolutionState SolutionState;
|
||||||
|
|
||||||
// for the conversion between the surface volume rate and resrevoir voidage rate
|
// 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.
|
|
||||||
using RateConverterType = RateConverter::
|
using RateConverterType = RateConverter::
|
||||||
SurfaceToReservoirVoidage<BlackoilPropsAdInterface, std::vector<int> >;
|
SurfaceToReservoirVoidage<BlackoilPropsAdInterface, std::vector<int> >;
|
||||||
|
|
||||||
@ -313,8 +312,8 @@ namespace Opm {
|
|||||||
const std::vector<int>& fipnum);
|
const std::vector<int>& fipnum);
|
||||||
|
|
||||||
/// Function to compute the resevoir voidage for the production wells.
|
/// Function to compute the resevoir voidage for the production wells.
|
||||||
/// TODO: it is just prototyping, and not sure where is the best place to
|
/// TODO: Probably should go to well model, while we then have duplications there.
|
||||||
/// put this function yet.
|
/// With time, it looks like probably the time to introduce a base class for Well Models.
|
||||||
void computeWellVoidageRates(const ReservoirState& reservoir_state,
|
void computeWellVoidageRates(const ReservoirState& reservoir_state,
|
||||||
const WellState& well_state,
|
const WellState& well_state,
|
||||||
std::vector<double>& well_voidage_rates,
|
std::vector<double>& well_voidage_rates,
|
||||||
|
@ -2630,10 +2630,6 @@ namespace detail {
|
|||||||
global_number_wells = info.communicator().sum(global_number_wells);
|
global_number_wells = info.communicator().sum(global_number_wells);
|
||||||
if ( 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()));
|
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> well_rates(np, 0.0);
|
||||||
std::vector<double> convert_coeff(np);
|
std::vector<double> convert_coeff(np, 1.0);
|
||||||
|
|
||||||
|
|
||||||
if ( !well_voidage_rates.empty() ) {
|
if ( !well_voidage_rates.empty() ) {
|
||||||
@ -2661,16 +2657,13 @@ namespace detail {
|
|||||||
well_rates.begin(), std::negate<double>());
|
well_rates.begin(), std::negate<double>());
|
||||||
|
|
||||||
const int fipreg = 0; // Not considering FIP for the moment.
|
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);
|
rate_converter_.calcCoeff(well_rates, fipreg, convert_coeff);
|
||||||
well_voidage_rates[w] = std::inner_product(well_rates.begin(), well_rates.end(),
|
well_voidage_rates[w] = std::inner_product(well_rates.begin(), well_rates.end(),
|
||||||
convert_coeff.begin(), 0.0);
|
convert_coeff.begin(), 0.0);
|
||||||
} else {
|
} else {
|
||||||
// TODO: it is possible we should use the distribution coeffs from
|
// TODO: Not sure whether will encounter situation with all zero rates
|
||||||
// the well controls.
|
// and whether it will cause problem here.
|
||||||
// It will be problem if the rates are all zero here.
|
|
||||||
// It also raises the question where we should call this function.
|
|
||||||
std::copy(well_state.wellRates().begin() + np * w,
|
std::copy(well_state.wellRates().begin() + np * w,
|
||||||
well_state.wellRates().begin() + np * (w + 1),
|
well_state.wellRates().begin() + np * (w + 1),
|
||||||
well_rates.begin());
|
well_rates.begin());
|
||||||
|
@ -779,7 +779,7 @@ namespace Opm
|
|||||||
// revising the interface for the better implementation later.
|
// revising the interface for the better implementation later.
|
||||||
WellNode* well_node = dynamic_cast<Opm::WellNode *>(well_collection_->findNode(std::string(wells().name[w])));
|
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.
|
// The targets of the wells should be updated.
|
||||||
if (well_node->individualControl()) {
|
if (well_node->individualControl()) {
|
||||||
if (ctrl_index == well_node->groupControlIndex()) {
|
if (ctrl_index == well_node->groupControlIndex()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user