added: RST CONV support for polymer, solvent and brine

This commit is contained in:
Arne Morten Kvarving
2024-01-22 09:58:06 +01:00
parent e585e14ef6
commit 873102e9ea
5 changed files with 35 additions and 30 deletions

View File

@@ -320,7 +320,10 @@ namespace Opm {
schedule[timer.reportStepNum()].rst_config(),
{getIdx(FluidSystem::oilPhaseIdx),
getIdx(FluidSystem::gasPhaseIdx),
getIdx(FluidSystem::waterPhaseIdx)});
getIdx(FluidSystem::waterPhaseIdx),
contiPolymerEqIdx,
contiBrineEqIdx,
contiSolventEqIdx});
return report;
}

View File

@@ -34,7 +34,7 @@ namespace Opm {
void RSTConv::init(const std::size_t numCells,
const RSTConfig& rst_config,
const std::array<int,3>& compIdx)
const std::array<int,6>& compIdx)
{
const auto kw = rst_config.keywords.find("CONV");
if (kw == rst_config.keywords.end()) {
@@ -46,9 +46,9 @@ void RSTConv::init(const std::size_t numCells,
N_ = kw->second;
compIdx_ = compIdx;
cnv_X_.resize(3);
for (std::size_t i = 0; i < 3; ++i) {
if (compIdx_[i] != -1) {
cnv_X_.resize(6);
for (std::size_t i = 0; i < 6; ++i) {
if (compIdx_[i] > -1) {
cnv_X_[i].resize(numCells);
}
}

View File

@@ -45,10 +45,10 @@ public:
//! \brief Init state at beginning of step.
//! \param numCells Global number of active cells in the model
//! \param rst_config RPTRST configuration
//! \param compIdx Component index for phases {OIL, GAS, WAT}, -1 if inactive
//! \param compIdx Component index for phases {OIL, GAS, WAT, POLYMER, BRINE, SOLVENT}, negative if inactive
void init(const std::size_t numCells,
const RSTConfig& rst_config,
const std::array<int,3>& compIdx);
const std::array<int,6>& compIdx);
//! \brief Adds the CONV output for given residual vector.
template<class ResidualVector>
@@ -71,7 +71,7 @@ private:
const std::vector<int>& globalCell_; //!< Global cell indices
Parallel::Communication comm_; //!< Communicator
std::vector<std::vector<int>> cnv_X_; //!< Counts of worst cells for RPTRST CONV
std::array<int,3> compIdx_; //!< Component indices
std::array<int,6> compIdx_; //!< Component indices
int N_ = 0; //!< Number of cells to consider
};