Minor fixes based on PR comments
- fix comments, typos add missing reference arguments.
This commit is contained in:
parent
0fb81945f6
commit
e1298ff21b
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2012 SINTEF ICT, Applied Mathematics.
|
Copyright 2012 SINTEF ICT, Applied Mathematics.
|
||||||
Copyright 2015 IRIS AS
|
Copyright 2016 IRIS AS
|
||||||
|
|
||||||
This file is part of the Open Porous Media project (OPM).
|
This file is part of the Open Porous Media project (OPM).
|
||||||
|
|
||||||
@ -331,12 +331,12 @@ namespace Opm
|
|||||||
const double* permeability)
|
const double* permeability)
|
||||||
: w_(0), is_parallel_run_(false)
|
: w_(0), is_parallel_run_(false)
|
||||||
{
|
{
|
||||||
std::vector<double> well_potensials;
|
std::vector<double> dummy_well_potentials;
|
||||||
init(eclipseState, timeStep, UgGridHelpers::numCells(grid),
|
init(eclipseState, timeStep, UgGridHelpers::numCells(grid),
|
||||||
UgGridHelpers::globalCell(grid), UgGridHelpers::cartDims(grid),
|
UgGridHelpers::globalCell(grid), UgGridHelpers::cartDims(grid),
|
||||||
UgGridHelpers::dimensions(grid),
|
UgGridHelpers::dimensions(grid),
|
||||||
UgGridHelpers::cell2Faces(grid), UgGridHelpers::beginFaceCentroids(grid),
|
UgGridHelpers::cell2Faces(grid), UgGridHelpers::beginFaceCentroids(grid),
|
||||||
permeability, well_potensials);
|
permeability, dummy_well_potentials);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -730,7 +730,6 @@ namespace Opm
|
|||||||
void WellsManager::setupGuideRates(std::vector<WellConstPtr>& wells, const size_t timeStep, std::vector<WellData>& well_data, std::map<std::string, int>& well_names_to_index,
|
void WellsManager::setupGuideRates(std::vector<WellConstPtr>& wells, const size_t timeStep, std::vector<WellData>& well_data, std::map<std::string, int>& well_names_to_index,
|
||||||
const PhaseUsage& phaseUsage, const std::vector<double>& well_potentials)
|
const PhaseUsage& phaseUsage, const std::vector<double>& well_potentials)
|
||||||
{
|
{
|
||||||
|
|
||||||
const int np = phaseUsage.num_phases;
|
const int np = phaseUsage.num_phases;
|
||||||
for (auto wellIter = wells.begin(); wellIter != wells.end(); ++wellIter ) {
|
for (auto wellIter = wells.begin(); wellIter != wells.end(); ++wellIter ) {
|
||||||
WellConstPtr well = *wellIter;
|
WellConstPtr well = *wellIter;
|
||||||
@ -757,7 +756,7 @@ namespace Opm
|
|||||||
} else {
|
} else {
|
||||||
OPM_THROW(std::runtime_error, "Unknown well type " << well_data[wix].type << " for well " << well->name());
|
OPM_THROW(std::runtime_error, "Unknown well type " << well_data[wix].type << " for well " << well->name());
|
||||||
}
|
}
|
||||||
} else if (well_potentials.size() > 0) { // default: calculate guiderates from well potentials
|
} else if (well_potentials.size() > 0) { // default: calculate guide rates from well potentials
|
||||||
|
|
||||||
// Note: Modification of the guide rate using GUIDERAT is not supported
|
// Note: Modification of the guide rate using GUIDERAT is not supported
|
||||||
switch (well->getPreferredPhase()) {
|
switch (well->getPreferredPhase()) {
|
||||||
@ -771,7 +770,7 @@ namespace Opm
|
|||||||
wellnode.prodSpec().guide_rate_type_ = ProductionSpecification::WATER;
|
wellnode.prodSpec().guide_rate_type_ = ProductionSpecification::WATER;
|
||||||
} else {
|
} else {
|
||||||
wellnode.injSpec().guide_rate_ = well_potentials[np*wix + water_index];
|
wellnode.injSpec().guide_rate_ = well_potentials[np*wix + water_index];
|
||||||
// Guide rates applies to the phase tht the well is injecting i.e water
|
// Guide rates applies to the phase that the well is injecting i.e water
|
||||||
wellnode.injSpec().guide_rate_type_ = InjectionSpecification::RAT;
|
wellnode.injSpec().guide_rate_type_ = InjectionSpecification::RAT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -786,7 +785,7 @@ namespace Opm
|
|||||||
wellnode.prodSpec().guide_rate_type_ = ProductionSpecification::OIL;
|
wellnode.prodSpec().guide_rate_type_ = ProductionSpecification::OIL;
|
||||||
} else {
|
} else {
|
||||||
wellnode.injSpec().guide_rate_ = well_potentials[np*wix + oil_index];
|
wellnode.injSpec().guide_rate_ = well_potentials[np*wix + oil_index];
|
||||||
// Guide rates applies to the phase tht the well is injecting i.e. oil
|
// Guide rates applies to the phase that the well is injecting i.e. oil
|
||||||
wellnode.injSpec().guide_rate_type_ = InjectionSpecification::RAT;
|
wellnode.injSpec().guide_rate_type_ = InjectionSpecification::RAT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -801,7 +800,7 @@ namespace Opm
|
|||||||
wellnode.prodSpec().guide_rate_type_ = ProductionSpecification::GAS;
|
wellnode.prodSpec().guide_rate_type_ = ProductionSpecification::GAS;
|
||||||
} else {
|
} else {
|
||||||
wellnode.injSpec().guide_rate_ = well_potentials[np*wix + gas_index];
|
wellnode.injSpec().guide_rate_ = well_potentials[np*wix + gas_index];
|
||||||
// Guide rates applies to the phase tht the well is injecting i.e gas
|
// Guide rates applies to the phase that the well is injecting i.e gas
|
||||||
wellnode.injSpec().guide_rate_type_ = InjectionSpecification::RAT;
|
wellnode.injSpec().guide_rate_type_ = InjectionSpecification::RAT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -87,7 +87,7 @@ namespace Opm
|
|||||||
FC begin_face_centroids,
|
FC begin_face_centroids,
|
||||||
const double* permeability,
|
const double* permeability,
|
||||||
bool is_parallel_run=false,
|
bool is_parallel_run=false,
|
||||||
const std::vector<double> well_potentials={});
|
const std::vector<double>& well_potentials={});
|
||||||
|
|
||||||
WellsManager(const Opm::EclipseStateConstPtr eclipseState,
|
WellsManager(const Opm::EclipseStateConstPtr eclipseState,
|
||||||
const size_t timeStep,
|
const size_t timeStep,
|
||||||
@ -155,7 +155,7 @@ namespace Opm
|
|||||||
const C2F& cell_to_faces,
|
const C2F& cell_to_faces,
|
||||||
FC begin_face_centroids,
|
FC begin_face_centroids,
|
||||||
const double* permeability,
|
const double* permeability,
|
||||||
const std::vector<double> well_potentials);
|
const std::vector<double>& well_potentials);
|
||||||
// Disable copying and assignment.
|
// Disable copying and assignment.
|
||||||
WellsManager(const WellsManager& other);
|
WellsManager(const WellsManager& other);
|
||||||
WellsManager& operator=(const WellsManager& other);
|
WellsManager& operator=(const WellsManager& other);
|
||||||
|
@ -327,7 +327,7 @@ WellsManager(const Opm::EclipseStateConstPtr eclipseState,
|
|||||||
FC begin_face_centroids,
|
FC begin_face_centroids,
|
||||||
const double* permeability,
|
const double* permeability,
|
||||||
bool is_parallel_run,
|
bool is_parallel_run,
|
||||||
std::vector<double> well_potentials)
|
const std::vector<double>& well_potentials)
|
||||||
: w_(0), is_parallel_run_(is_parallel_run)
|
: w_(0), is_parallel_run_(is_parallel_run)
|
||||||
{
|
{
|
||||||
init(eclipseState, timeStep, number_of_cells, global_cell,
|
init(eclipseState, timeStep, number_of_cells, global_cell,
|
||||||
@ -347,7 +347,7 @@ WellsManager::init(const Opm::EclipseStateConstPtr eclipseState,
|
|||||||
const C2F& cell_to_faces,
|
const C2F& cell_to_faces,
|
||||||
FC begin_face_centroids,
|
FC begin_face_centroids,
|
||||||
const double* permeability,
|
const double* permeability,
|
||||||
const std::vector<double> well_potentials)
|
const std::vector<double>& well_potentials)
|
||||||
{
|
{
|
||||||
if (dimensions != 3) {
|
if (dimensions != 3) {
|
||||||
OPM_THROW(std::runtime_error,
|
OPM_THROW(std::runtime_error,
|
||||||
|
Loading…
Reference in New Issue
Block a user