mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
renaming a few functions
to reflect the functions better. No functional change.
This commit is contained in:
@@ -324,7 +324,7 @@ namespace Opm {
|
||||
|
||||
if( nw > 0 )
|
||||
{
|
||||
wellModel().applySolutionWellState(x, well_state);
|
||||
wellModel().recoverWellSolutionAndUpdateWellState(x, well_state);
|
||||
}
|
||||
report.update_time += perfTimer.stop();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace Opm
|
||||
const int num_cells);
|
||||
|
||||
|
||||
virtual void setWellVariables();
|
||||
virtual void setWellPrimaryVariables();
|
||||
|
||||
// TODO: to check whether all the paramters are required
|
||||
void computePerfRate(const IntensiveQuantities& intQuants,
|
||||
@@ -120,11 +120,6 @@ namespace Opm
|
||||
|
||||
virtual bool crossFlowAllowed(const Simulator& ebosSimulator) const;
|
||||
|
||||
/// updating the well_state based on well solution dwells
|
||||
void updateWellState(const BVectorWell& dwells,
|
||||
const BlackoilModelParameters& param,
|
||||
WellState& well_state) const;
|
||||
|
||||
/// updating the well state based the control mode specified with current
|
||||
// TODO: later will check wheter we need current
|
||||
virtual void updateWellStateWithTarget(const int current,
|
||||
@@ -153,8 +148,8 @@ namespace Opm
|
||||
|
||||
/// using the solution x to recover the solution xw for wells and applying
|
||||
/// xw to update Well State
|
||||
virtual void applySolutionWellState(const BVector& x, const ModelParameters& param,
|
||||
WellState& well_state) const;
|
||||
virtual void recoverWellSolutionAndUpdateWellState(const BVector& x, const ModelParameters& param,
|
||||
WellState& well_state) const;
|
||||
|
||||
/// computing the well potentials for group control
|
||||
virtual void computeWellPotentials(const Simulator& ebosSimulator,
|
||||
@@ -242,6 +237,11 @@ namespace Opm
|
||||
// xw = inv(D)*(rw - C*x)
|
||||
void recoverSolutionWell(const BVector& x, BVectorWell& xw) const;
|
||||
|
||||
// updating the well_state based on well solution dwells
|
||||
void updateWellState(const BVectorWell& dwells,
|
||||
const BlackoilModelParameters& param,
|
||||
WellState& well_state) const;
|
||||
|
||||
// calculate the properties for the well connections
|
||||
// to calulate the pressure difference between well connections.
|
||||
void computePropertiesForWellConnectionPressures(const Simulator& ebosSimulator,
|
||||
@@ -267,9 +267,8 @@ namespace Opm
|
||||
const std::vector<double>& rvmax_perf,
|
||||
const std::vector<double>& surf_dens_perf);
|
||||
|
||||
virtual void wellEqIteration(Simulator& ebosSimulator,
|
||||
const ModelParameters& param,
|
||||
WellState& well_state);
|
||||
virtual void solveEqAndUpdateWellState(const ModelParameters& param,
|
||||
WellState& well_state);
|
||||
|
||||
// TODO: maybe we should provide a light version of computePerfRate, which does not include the
|
||||
// calculation of the derivatives
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Opm
|
||||
|
||||
template<typename TypeTag>
|
||||
void StandardWell<TypeTag>::
|
||||
setWellVariables()
|
||||
setWellPrimaryVariables()
|
||||
{
|
||||
// TODO: using numComp here is only to make the 2p + dummy phase work
|
||||
// TODO: in theory, we should use numWellEq here.
|
||||
@@ -1571,9 +1571,8 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
wellEqIteration(Simulator& ebosSimulator,
|
||||
const ModelParameters& param,
|
||||
WellState& well_state)
|
||||
solveEqAndUpdateWellState(const ModelParameters& param,
|
||||
WellState& well_state)
|
||||
{
|
||||
// We assemble the well equations, then we check the convergence,
|
||||
// which is why we do not put the assembleWellEq here.
|
||||
@@ -1660,9 +1659,9 @@ namespace Opm
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWell<TypeTag>::
|
||||
applySolutionWellState(const BVector& x,
|
||||
const ModelParameters& param,
|
||||
WellState& well_state) const
|
||||
recoverWellSolutionAndUpdateWellState(const BVector& x,
|
||||
const ModelParameters& param,
|
||||
WellState& well_state) const
|
||||
{
|
||||
BVectorWell xw(1);
|
||||
recoverSolutionWell(x, xw);
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Opm {
|
||||
|
||||
// using the solution x to recover the solution xw for wells and applying
|
||||
// xw to update Well State
|
||||
void applySolutionWellState(const BVector& x, WellState& well_state) const;
|
||||
void recoverWellSolutionAndUpdateWellState(const BVector& x, WellState& well_state) const;
|
||||
|
||||
int numWells() const;
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace Opm {
|
||||
|
||||
void computeAccumWells() const;
|
||||
|
||||
void setWellVariables() const;
|
||||
void setWellPrimaryVariables() const;
|
||||
|
||||
// The number of components in the model.
|
||||
int numComponents() const
|
||||
|
||||
@@ -178,8 +178,8 @@ namespace Opm {
|
||||
}
|
||||
|
||||
updateWellControls(well_state);
|
||||
// Set the primary variables for the wells
|
||||
setWellVariables();
|
||||
// Set the well primary variables
|
||||
setWellPrimaryVariables();
|
||||
|
||||
if (iterationIdx == 0) {
|
||||
computeWellConnectionPressures(ebosSimulator, well_state);
|
||||
@@ -285,10 +285,10 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
applySolutionWellState(const BVector& x, WellState& well_state) const
|
||||
recoverWellSolutionAndUpdateWellState(const BVector& x, WellState& well_state) const
|
||||
{
|
||||
for (auto& well : well_container_) {
|
||||
well->applySolutionWellState(x, param_, well_state);
|
||||
well->recoverWellSolutionAndUpdateWellState(x, param_, well_state);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,10 +377,10 @@ namespace Opm {
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
setWellVariables() const
|
||||
setWellPrimaryVariables() const
|
||||
{
|
||||
for (auto& well : well_container_) {
|
||||
well->setWellVariables();
|
||||
well->setWellPrimaryVariables();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ namespace Opm {
|
||||
if( localWellsActive() )
|
||||
{
|
||||
for (auto& well : well_container_) {
|
||||
well->wellEqIteration(ebosSimulator, param_, well_state);
|
||||
well->solveEqAndUpdateWellState(param_, well_state);
|
||||
}
|
||||
}
|
||||
// updateWellControls uses communication
|
||||
@@ -445,7 +445,7 @@ namespace Opm {
|
||||
if( wellsActive() )
|
||||
{
|
||||
updateWellControls(well_state);
|
||||
setWellVariables();
|
||||
setWellPrimaryVariables();
|
||||
}
|
||||
} while (it < 15);
|
||||
|
||||
@@ -638,10 +638,11 @@ namespace Opm {
|
||||
|
||||
// calculate the well potentials
|
||||
setWellSolutions(well_state);
|
||||
setWellVariables();
|
||||
computeWellConnectionPressures(ebos_simulator, well_state);
|
||||
|
||||
// To store well potentials for each well
|
||||
// set the well primary variables, which is used in computePerfRate for computeWellPotentials
|
||||
// TODO: for computeWellPotentials, no derivative is required actually
|
||||
setWellPrimaryVariables();
|
||||
std::vector<double> well_potentials;
|
||||
computeWellPotentials(ebos_simulator, well_state, well_potentials);
|
||||
|
||||
|
||||
@@ -104,15 +104,14 @@ namespace Opm
|
||||
const double gravity_arg,
|
||||
const int num_cells);
|
||||
|
||||
virtual void setWellVariables() = 0;
|
||||
virtual void setWellPrimaryVariables() = 0;
|
||||
|
||||
virtual bool getWellConvergence(Simulator& ebosSimulator,
|
||||
const std::vector<double>& B_avg,
|
||||
const ModelParameters& param) const = 0;
|
||||
|
||||
virtual void wellEqIteration(Simulator& ebosSimulator,
|
||||
const ModelParameters& param,
|
||||
WellState& well_state) = 0;
|
||||
virtual void solveEqAndUpdateWellState(const ModelParameters& param,
|
||||
WellState& well_state) = 0;
|
||||
|
||||
virtual void assembleWellEq(Simulator& ebosSimulator,
|
||||
const double dt,
|
||||
@@ -128,8 +127,8 @@ namespace Opm
|
||||
|
||||
// using the solution x to recover the solution xw for wells and applying
|
||||
// xw to update Well State
|
||||
virtual void applySolutionWellState(const BVector& x, const ModelParameters& param,
|
||||
WellState& well_state) const = 0;
|
||||
virtual void recoverWellSolutionAndUpdateWellState(const BVector& x, const ModelParameters& param,
|
||||
WellState& well_state) const = 0;
|
||||
|
||||
// Ax = Ax - C D^-1 B x
|
||||
virtual void apply(const BVector& x, BVector& Ax) const = 0;
|
||||
|
||||
Reference in New Issue
Block a user