mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
flow: let the wells be managed by EclProblem
This commit is contained in:
@@ -82,6 +82,7 @@ namespace Opm
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
|
||||
|
||||
static const int numEq = Indices::numEq;
|
||||
typedef double Scalar;
|
||||
@@ -121,7 +122,7 @@ namespace Opm
|
||||
const int indexOfWell() const;
|
||||
|
||||
/// Well cells.
|
||||
const std::vector<int>& cells() {return well_cells_; }
|
||||
const std::vector<int>& cells() const {return well_cells_; }
|
||||
|
||||
/// Well type, INJECTOR or PRODUCER.
|
||||
WellType wellType() const;
|
||||
@@ -142,20 +143,19 @@ namespace Opm
|
||||
|
||||
virtual void solveEqAndUpdateWellState(WellState& well_state) = 0;
|
||||
|
||||
virtual void assembleWellEq(Simulator& ebosSimulator,
|
||||
virtual void assembleWellEq(const Simulator& ebosSimulator,
|
||||
const double dt,
|
||||
WellState& well_state,
|
||||
bool only_wells) = 0;
|
||||
WellState& well_state) = 0;
|
||||
|
||||
void updateWellTestState(const WellState& well_state,
|
||||
const double& simulationTime,
|
||||
const bool& writeMessageToOPMLog,
|
||||
WellTestState& wellTestState) const;
|
||||
|
||||
WellTestState& wellTestState
|
||||
) const;
|
||||
|
||||
void setWellEfficiencyFactor(const double efficiency_factor);
|
||||
|
||||
void computeRepRadiusPerfLength(const Grid& grid, const std::map<int, int>& cartesian_to_compressed);
|
||||
void computeRepRadiusPerfLength(const Grid& grid, const std::vector<int>& cartesian_to_compressed);
|
||||
|
||||
/// using the solution x to recover the solution xw for wells and applying
|
||||
/// xw to update Well State
|
||||
@@ -196,6 +196,20 @@ namespace Opm
|
||||
virtual void addWellContributions(Mat&) const
|
||||
{}
|
||||
|
||||
virtual void addCellRates(RateVector& rates, int cellIdx) const
|
||||
{}
|
||||
|
||||
template <class EvalWell>
|
||||
Eval restrictEval(const EvalWell& in) const
|
||||
{
|
||||
Eval out = 0.0;
|
||||
out.setValue(in.value());
|
||||
for(int eqIdx = 0; eqIdx < numEq;++eqIdx) {
|
||||
out.setDerivative(eqIdx, in.derivative(eqIdx));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
void closeCompletions(WellTestState& wellTestState);
|
||||
|
||||
const Well* wellEcl() const;
|
||||
|
||||
Reference in New Issue
Block a user