mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
recovering the running of flow_ebos for 2p + dummy phase.
This commit is contained in:
@@ -66,13 +66,14 @@ namespace Opm
|
|||||||
using typename Base::BVector;
|
using typename Base::BVector;
|
||||||
using typename Base::Eval;
|
using typename Base::Eval;
|
||||||
|
|
||||||
typedef Dune::FieldVector<Scalar, numWellEq> VectorBlockWellType;
|
|
||||||
typedef Dune::BlockVector<VectorBlockWellType> BVectorWell;
|
|
||||||
|
|
||||||
// sparsity pattern for the matrices
|
// sparsity pattern for the matrices
|
||||||
//[A C^T [x = [ res
|
//[A C^T [x = [ res
|
||||||
// B D ] x_well] res_well]
|
// B D ] x_well] res_well]
|
||||||
|
|
||||||
|
// the vector type for the res_well and x_well
|
||||||
|
typedef Dune::FieldVector<Scalar, numWellEq> VectorBlockWellType;
|
||||||
|
typedef Dune::BlockVector<VectorBlockWellType> BVectorWell;
|
||||||
|
|
||||||
// the matrix type for the diagonal matrix D
|
// the matrix type for the diagonal matrix D
|
||||||
typedef Dune::FieldMatrix<Scalar, numWellEq, numWellEq > DiagMatrixBlockWellType;
|
typedef Dune::FieldMatrix<Scalar, numWellEq, numWellEq > DiagMatrixBlockWellType;
|
||||||
typedef Dune::BCRSMatrix <DiagMatrixBlockWellType> DiagMatWell;
|
typedef Dune::BCRSMatrix <DiagMatrixBlockWellType> DiagMatWell;
|
||||||
|
|||||||
@@ -105,7 +105,10 @@ namespace Opm
|
|||||||
setWellVariables(const WellState& well_state)
|
setWellVariables(const WellState& well_state)
|
||||||
{
|
{
|
||||||
const int nw = well_state.bhp().size();
|
const int nw = well_state.bhp().size();
|
||||||
for (int eqIdx = 0; eqIdx < numWellEq; ++eqIdx) {
|
// TODO: using numComp here is only to make the 2p + dummy phase work
|
||||||
|
// TODO: in theory, we should use numWellEq here.
|
||||||
|
// for (int eqIdx = 0; eqIdx < numWellEq; ++eqIdx) {
|
||||||
|
for (int eqIdx = 0; eqIdx < numComponents(); ++eqIdx) {
|
||||||
const unsigned int idx = nw * eqIdx + indexOfWell();
|
const unsigned int idx = nw * eqIdx + indexOfWell();
|
||||||
assert( eqIdx < well_variables_.size() );
|
assert( eqIdx < well_variables_.size() );
|
||||||
assert( idx < well_state.wellSolutions().size() );
|
assert( idx < well_state.wellSolutions().size() );
|
||||||
@@ -616,10 +619,10 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add a trivial equation for the dummy phase for 2p cases (Only support water + oil)
|
// add a trivial equation for the dummy phase for 2p cases (Only support water + oil)
|
||||||
/* if ( numComp < numWellEq ) {
|
if ( numComp < numWellEq ) {
|
||||||
assert(!active()[ Gas ]);
|
assert(!active()[ Gas ]);
|
||||||
invDuneD_[0][0][Gas][Gas] = 1.0;
|
invDuneD_[0][0][Gas][Gas] = 1.0;
|
||||||
} */
|
}
|
||||||
|
|
||||||
// Store the perforation phase flux for later usage.
|
// Store the perforation phase flux for later usage.
|
||||||
if (has_solvent && componentIdx == contiSolventEqIdx) {// if (flowPhaseToEbosCompIdx(componentIdx) == Solvent)
|
if (has_solvent && componentIdx == contiSolventEqIdx) {// if (flowPhaseToEbosCompIdx(componentIdx) == Solvent)
|
||||||
@@ -656,11 +659,6 @@ namespace Opm
|
|||||||
invDuneD_[0][0][componentIdx][pvIdx] += resWell_loc.derivative(pvIdx+numEq);
|
invDuneD_[0][0][componentIdx][pvIdx] += resWell_loc.derivative(pvIdx+numEq);
|
||||||
}
|
}
|
||||||
resWell_[0][componentIdx] += resWell_loc.value();
|
resWell_[0][componentIdx] += resWell_loc.value();
|
||||||
|
|
||||||
// add trivial equation for polymer
|
|
||||||
/* if (has_polymer) {
|
|
||||||
invDuneD_[0][0][contiPolymerEqIdx][polymerConcentrationIdx] = 1.0;
|
|
||||||
} */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// do the local inversion of D.
|
// do the local inversion of D.
|
||||||
|
|||||||
Reference in New Issue
Block a user