[feature] Added two-phase executable for numEq = 2.

This commit is contained in:
Robert Kloefkorn
2017-06-27 14:04:59 +02:00
parent f5501198e2
commit ce7f3f46a1
5 changed files with 57 additions and 5 deletions

View File

@@ -86,21 +86,22 @@ enum WellVariablePositions {
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, Simulator) Simulator;
typedef typename GET_PROP_TYPE(TypeTag, IntensiveQuantities) IntensiveQuantities;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef double Scalar;
static const int numEq = BlackoilIndices::numEq;
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 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<double, /*size=*/numEq + numWellEq> EvalWell;
typedef DenseAd::Evaluation<double, /*size=*/numEq> Eval;
typedef DenseAd::Evaluation<Scalar, /*size=*/numEq + numWellEq> EvalWell;
typedef DenseAd::Evaluation<Scalar, /*size=*/numEq> Eval;
typedef Ewoms::BlackOilPolymerModule<TypeTag> PolymerModule;
// For the conversion between the surface volume rate and resrevoir voidage rate

View File

@@ -239,7 +239,7 @@ namespace Opm {
}
// add trivial equation for 2p cases (Only support water + oil)
if (numComp == 2) {
if (numComp < numEq ) {
assert(!active_[ Gas ]);
invDuneD_[w][w][Gas][Gas] = 1.0;
}