removing two functions from WellInterface

computeWellConnectionPressures() and computeAccumWell().
They belongs to the implementation details of well models now.
This commit is contained in:
Kai Bao 2017-09-05 11:20:43 +02:00
parent 8922f3e041
commit 3e2a34239c
7 changed files with 23 additions and 48 deletions

View File

@ -109,12 +109,6 @@ namespace Opm
const std::vector<double>& B_avg,
const ModelParameters& param) const;
/// computing the accumulation term for later use in well mass equations
virtual void computeAccumWell();
virtual void computeWellConnectionPressures(const Simulator& ebosSimulator,
const WellState& well_state);
/// Ax = Ax - C D^-1 B x
virtual void apply(const BVector& x, BVector& Ax) const;
/// r = r - C D^-1 Rw
@ -135,8 +129,8 @@ namespace Opm
virtual void solveEqAndUpdateWellState(const ModelParameters& param,
WellState& well_state); // const?
virtual void calculateExplictQuantities(const Simulator& ebosSimulator,
const WellState& well_state); // should be const?
virtual void calculateExplicitQuantities(const Simulator& ebosSimulator,
const WellState& well_state); // should be const?
/// number of segments for this well
/// int number_of_segments_;
@ -251,6 +245,9 @@ namespace Opm
const BlackoilModelParameters& param,
WellState& well_state) const;
// computing the accumulation term for later use in well mass equations
void computeAccumWell();
// void computePerfRate() will be a key function here.
};

View File

@ -353,21 +353,6 @@ namespace Opm
template<typename TypeTag>
void
MultisegmentWell<TypeTag>::
computeWellConnectionPressures(const Simulator& ebosSimulator,
const WellState& well_state)
{
// TODO: the name of the function need to change.
// it will be calculating the pressure difference between the perforation and grid cells
// With MS well, the depth of the perforation is not necessarily the center of the grid cells.
}
template<typename TypeTag>
void
MultisegmentWell<TypeTag>::
@ -522,8 +507,8 @@ namespace Opm
template<typename TypeTag>
void
MultisegmentWell<TypeTag>::
calculateExplictQuantities(const Simulator& ebosSimulator,
const WellState& well_state)
calculateExplicitQuantities(const Simulator& ebosSimulator,
const WellState& well_state)
{
}

View File

@ -125,12 +125,6 @@ namespace Opm
const std::vector<double>& B_avg,
const ModelParameters& param) const;
/// computing the accumulation term for later use in well mass equations
virtual void computeAccumWell();
virtual void computeWellConnectionPressures(const Simulator& ebosSimulator,
const WellState& xw);
/// Ax = Ax - C D^-1 B x
virtual void apply(const BVector& x, BVector& Ax) const;
/// r = r - C D^-1 Rw
@ -151,8 +145,8 @@ namespace Opm
virtual void solveEqAndUpdateWellState(const ModelParameters& param,
WellState& well_state);
virtual void calculateExplictQuantities(const Simulator& ebosSimulator,
const WellState& well_state); // should be const?
virtual void calculateExplicitQuantities(const Simulator& ebosSimulator,
const WellState& well_state); // should be const?
protected:
// protected functions from the Base class
@ -268,6 +262,12 @@ namespace Opm
const std::vector<double>& rvmax_perf,
const std::vector<double>& surf_dens_perf);
// computing the accumulation term for later use in well mass equations
void computeAccumWell();
void computeWellConnectionPressures(const Simulator& ebosSimulator,
const WellState& xw);
// TODO: to check whether all the paramters are required
void computePerfRate(const IntensiveQuantities& intQuants,
const std::vector<EvalWell>& mob_perfcells_dense,

View File

@ -1507,8 +1507,8 @@ namespace Opm
template<typename TypeTag>
void
StandardWell<TypeTag>::
calculateExplictQuantities(const Simulator& ebosSimulator,
const WellState& well_state)
calculateExplicitQuantities(const Simulator& ebosSimulator,
const WellState& well_state)
{
computeWellConnectionPressures(ebosSimulator, well_state);
computeAccumWell();

View File

@ -235,7 +235,7 @@ namespace Opm {
// twice at the beginning of the time step
/// Calculating the explict quantities used in the well calculation. By explicit, we mean they are cacluated
/// at the beginning of the time step and no derivatives are included in these quantities
void calculateExplictQuantities(const Simulator& ebosSimulator,
void calculateExplicitQuantities(const Simulator& ebosSimulator,
const WellState& xw) const;
SimulatorReport solveWellEq(Simulator& ebosSimulator,

View File

@ -183,7 +183,7 @@ namespace Opm {
initPrimaryVariablesEvaluation();
if (iterationIdx == 0) {
calculateExplictQuantities(ebosSimulator, well_state);
calculateExplicitQuantities(ebosSimulator, well_state);
}
if (param_.solve_welleq_initially_ && iterationIdx == 0) {
@ -533,11 +533,11 @@ namespace Opm {
template<typename TypeTag>
void
StandardWellsDense<TypeTag>::
calculateExplictQuantities(const Simulator& ebosSimulator,
calculateExplicitQuantities(const Simulator& ebosSimulator,
const WellState& xw) const
{
for (auto& well : well_container_) {
well->calculateExplictQuantities(ebosSimulator, xw);
well->calculateExplicitQuantities(ebosSimulator, xw);
}
}

View File

@ -179,13 +179,6 @@ namespace Opm
const WellState& well_state,
std::vector<double>& well_potentials) = 0;
virtual void computeAccumWell() = 0;
// TODO: it should come with a different name
// for MS well, the definition is different and should not use this name anymore
virtual void computeWellConnectionPressures(const Simulator& ebosSimulator,
const WellState& xw) = 0;
virtual void updateWellStateWithTarget(const int current,
WellState& xw) const = 0;
@ -194,8 +187,8 @@ namespace Opm
virtual void updatePrimaryVariables(const WellState& well_state) const = 0;
virtual void calculateExplictQuantities(const Simulator& ebosSimulator,
const WellState& xw) = 0; // should be const?
virtual void calculateExplicitQuantities(const Simulator& ebosSimulator,
const WellState& xw) = 0; // should be const?
protected: