mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
cleaning up StandardWellsDense
removing more unused stuff.
This commit is contained in:
parent
63c418c02f
commit
8ddd197dcf
@ -64,9 +64,11 @@ namespace Opm
|
||||
using typename WellInterface<TypeTag>::BVector;
|
||||
using typename WellInterface<TypeTag>::Eval;
|
||||
|
||||
static const int numWellEq = GET_PROP_VALUE(TypeTag, EnablePolymer)? 3:numEq; // //numEq; //number of wellEq is only for 3 for polymer
|
||||
static const int numWellEq = GET_PROP_VALUE(TypeTag, EnablePolymer)? numEq-1 : numEq; // //numEq; //number of wellEq is only numEq for polymer
|
||||
static const int contiSolventEqIdx = BlackoilIndices::contiSolventEqIdx;
|
||||
static const int contiPolymerEqIdx = BlackoilIndices::contiPolymerEqIdx;
|
||||
static const int solventSaturationIdx = BlackoilIndices::solventSaturationIdx;
|
||||
static const int polymerConcentrationIdx = BlackoilIndices::polymerConcentrationIdx;
|
||||
|
||||
typedef DenseAd::Evaluation<double, /*size=*/numEq + numWellEq> EvalWell;
|
||||
|
||||
|
@ -56,7 +56,6 @@
|
||||
#include<dune/istl/matrixmatrix.hh>
|
||||
|
||||
#include <opm/material/densead/Math.hpp>
|
||||
#include <opm/material/densead/Evaluation.hpp>
|
||||
|
||||
#include <opm/simulators/WellSwitchingLogger.hpp>
|
||||
|
||||
@ -65,14 +64,6 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
enum WellVariablePositions {
|
||||
XvarWell = 0,
|
||||
WFrac = 1,
|
||||
GFrac = 2,
|
||||
SFrac = 3
|
||||
};
|
||||
|
||||
|
||||
/// Class for handling the standard well model.
|
||||
template<typename TypeTag>
|
||||
class StandardWellsDense {
|
||||
@ -93,19 +84,13 @@ enum WellVariablePositions {
|
||||
|
||||
static const int numEq = BlackoilIndices::numEq;
|
||||
static const int numWellEq = GET_PROP_VALUE(TypeTag, EnablePolymer)? numEq-1 : numEq; // //numEq; //number of wellEq is only numEq for polymer
|
||||
static const int contiSolventEqIdx = BlackoilIndices::contiSolventEqIdx;
|
||||
static const int contiPolymerEqIdx = BlackoilIndices::contiPolymerEqIdx;
|
||||
static const int solventSaturationIdx = BlackoilIndices::solventSaturationIdx;
|
||||
static const int polymerConcentrationIdx = BlackoilIndices::polymerConcentrationIdx;
|
||||
|
||||
// TODO: where we should put these types, WellInterface or Well Model?
|
||||
// or there is some other strategy, like TypeTag
|
||||
typedef Dune::FieldVector<Scalar, numEq > VectorBlockType;
|
||||
typedef Dune::FieldMatrix<Scalar, numEq, numEq > MatrixBlockType;
|
||||
typedef Dune::BCRSMatrix <MatrixBlockType> Mat;
|
||||
typedef Dune::BlockVector<VectorBlockType> BVector;
|
||||
|
||||
typedef DenseAd::Evaluation<Scalar, /*size=*/numEq> Eval;
|
||||
typedef Ewoms::BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
|
||||
// For the conversion between the surface volume rate and resrevoir voidage rate
|
||||
@ -156,10 +141,6 @@ enum WellVariablePositions {
|
||||
WellState& well_state,
|
||||
bool only_wells);
|
||||
|
||||
void localInvert(Mat& istlA) const;
|
||||
|
||||
void print(Mat& istlA) const;
|
||||
|
||||
// substract Binv(D)rw from r;
|
||||
void apply( BVector& r) const;
|
||||
|
||||
@ -295,23 +276,6 @@ enum WellVariablePositions {
|
||||
|
||||
mutable BVector scaleAddRes_;
|
||||
|
||||
using WellMapType = typename WellState::WellMapType;
|
||||
using WellMapEntryType = typename WellState::mapentry_t;
|
||||
|
||||
// a tuple type for ratio limit check.
|
||||
// first value indicates whether ratio limit is violated, when the ratio limit is not violated, the following three
|
||||
// values should not be used.
|
||||
// second value indicates whehter there is only one connection left.
|
||||
// third value indicates the indx of the worst-offending connection.
|
||||
// the last value indicates the extent of the violation for the worst-offending connection, which is defined by
|
||||
// the ratio of the actual value to the value of the violated limit.
|
||||
using RatioCheckTuple = std::tuple<bool, bool, int, double>;
|
||||
|
||||
enum ConnectionIndex {
|
||||
INVALIDCONNECTION = -10000
|
||||
};
|
||||
|
||||
|
||||
void setupCompressedToCartesian(const int* global_cell, int number_of_cells, std::map<int,int>& cartesian_to_compressed ) const;
|
||||
|
||||
void computeRepRadiusPerfLength(const Grid& grid);
|
||||
|
@ -137,12 +137,7 @@ namespace Opm {
|
||||
OPM_THROW(std::logic_error, "Could not find well " << well_name << " in wells_ecl ");
|
||||
}
|
||||
|
||||
// TODO: The following should not happen, right?
|
||||
const Well* well_ecl = wells_ecl_[index_well];
|
||||
if (well_ecl->getStatus(current_timeIdx_) == WellCommon::SHUT) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (well_ecl->isMultiSegment(current_timeIdx_)) {
|
||||
OPM_THROW(Opm::NumericalProblem, "Not handling Multisegment Wells for now");
|
||||
}
|
||||
@ -217,40 +212,8 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
localInvert(Mat& istlA) const
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// applying the well residual to reservoir residuals
|
||||
// r = r - duneC_^T * invDuneD_ * resWell_
|
||||
// TODO: for this, we should calcuate the duneC_^T * invDuneD_ * resWell_ for each
|
||||
// well, then sum them up and apply to r finally
|
||||
// In a more general case, the number of the equations for reservoir and wells can be different,
|
||||
// we need to think about the possible data types can be faced.
|
||||
// we do not want to expose the some well related data type even inside the Well Model
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
print(Mat& istlA) const
|
||||
{
|
||||
for (auto row = istlA.begin(), rowend = istlA.end(); row != rowend; ++row ) {
|
||||
for (auto col = row->begin(), colend = row->end(); col != colend; ++col ) {
|
||||
std::cout << row.index() << " " << col.index() << "/n \n"<<(*col) << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
@ -263,13 +226,6 @@ namespace Opm {
|
||||
for (auto& well : well_container_) {
|
||||
well->apply(r);
|
||||
}
|
||||
|
||||
/* assert( invDrw_.size() == invDuneD_.N() );
|
||||
|
||||
// invDrw_ = invDuneD_ * resWell_
|
||||
invDuneD_.mv(resWell_,invDrw_);
|
||||
// r = r - duneC_^T * invDrw_
|
||||
duneC_.mmtv(invDrw_, r); */
|
||||
}
|
||||
|
||||
|
||||
@ -290,19 +246,6 @@ namespace Opm {
|
||||
for (auto& well : well_container_) {
|
||||
well->apply(x, Ax);
|
||||
}
|
||||
|
||||
/* assert( Bx_.size() == duneB_.N() );
|
||||
|
||||
BVector& invDBx = invDrw_;
|
||||
assert( invDBx.size() == invDuneD_.N());
|
||||
|
||||
// Bx_ = duneB_ * x
|
||||
duneB_.mv(x, Bx_);
|
||||
// invDBx = invDuneD_ * Bx_
|
||||
invDuneD_.mv(Bx_, invDBx);
|
||||
// Ax = Ax - duneC_^T * invDBx
|
||||
duneC_.mmtv(invDBx,Ax);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@ -310,10 +253,6 @@ namespace Opm {
|
||||
|
||||
|
||||
// Ax = Ax - alpha * C D^-1 B x
|
||||
// TODO: for the new Well Model, we will calcuate
|
||||
// C D^-1 B for each well and sum it up
|
||||
// while it can be implemented in the function apply()
|
||||
// then this function does not need to change
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
|
Loading…
Reference in New Issue
Block a user