mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapt the the table related API changes of opm-parser
This commit is contained in:
parent
b0c6fff9f0
commit
36e3538b04
@ -24,8 +24,6 @@
|
||||
#include <opm/core/utility/ErrorMacros.hpp>
|
||||
#include <opm/core/utility/linearInterpolation.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Utility/RocktabTable.hpp>
|
||||
#include <opm/parser/eclipse/Utility/RockTable.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -40,39 +38,30 @@ namespace Opm
|
||||
rock_comp_ = param.getDefault("rock_compressibility", 0.0)/unit::barsa;
|
||||
}
|
||||
|
||||
RockCompressibility::RockCompressibility(Opm::DeckConstPtr deck)
|
||||
RockCompressibility::RockCompressibility(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState)
|
||||
: pref_(0.0),
|
||||
rock_comp_(0.0)
|
||||
{
|
||||
if (deck->hasKeyword("ROCKTAB")) {
|
||||
Opm::DeckKeywordConstPtr rtKeyword = deck->getKeyword("ROCKTAB");
|
||||
if (rtKeyword->size() != 1)
|
||||
const auto& rocktabTables = eclipseState->getRocktabTables();
|
||||
if (rocktabTables.size() > 0) {
|
||||
if (rocktabTables.size() != 1)
|
||||
OPM_THROW(std::runtime_error, "Can only handle a single region in ROCKTAB.");
|
||||
|
||||
// the number of colums of the "ROCKTAB" keyword
|
||||
// depends on the presence of the "RKTRMDIR"
|
||||
// keyword. Messy stuff...
|
||||
bool isDirectional = deck->hasKeyword("RKTRMDIR");
|
||||
if (isDirectional)
|
||||
{
|
||||
// well, okay. we don't support non-isotropic
|
||||
// transmissibility multipliers yet
|
||||
OPM_THROW(std::runtime_error, "Support for non-isotropic "
|
||||
"transmissibility multipliers is not implemented yet.");
|
||||
};
|
||||
|
||||
Opm::RocktabTable rocktabTable(rtKeyword, isDirectional);
|
||||
|
||||
p_ = rocktabTable.getPressureColumn();
|
||||
poromult_ = rocktabTable.getPoreVolumeMultiplierColumn();
|
||||
transmult_ = rocktabTable.getTransmissibilityMultiplierColumn();
|
||||
p_ = rocktabTables[0].getPressureColumn();
|
||||
poromult_ = rocktabTables[0].getPoreVolumeMultiplierColumn();
|
||||
transmult_ = rocktabTables[0].getTransmissibilityMultiplierColumn();
|
||||
} else if (deck->hasKeyword("ROCK")) {
|
||||
Opm::RockTable rockTable(deck->getKeyword("ROCK"));
|
||||
if (rockTable.numRows() != 1)
|
||||
OPM_THROW(std::runtime_error, "Can only handle a single region in ROCK.");
|
||||
Opm::DeckKeywordConstPtr rockKeyword = deck->getKeyword("ROCK");
|
||||
if (rockKeyword->size() != 1) {
|
||||
// here it would be better not to use std::cout directly but to add the
|
||||
// warning to some "warning list"...
|
||||
std::cout << "Can only handle a single region in ROCK ("<<rockKeyword->size()<<" regions specified)."
|
||||
<< " Ignoring all except for the first.\n";
|
||||
}
|
||||
|
||||
pref_ = rockTable.getPressureColumn()[0];
|
||||
rock_comp_ = rockTable.getCompressibilityColumn()[0];
|
||||
pref_ = rockKeyword->getRecord(0)->getItem("PREF")->getSIDouble(0);
|
||||
rock_comp_ = rockKeyword->getRecord(0)->getItem("COMPRESSIBILITY")->getSIDouble(0);
|
||||
} else {
|
||||
std::cout << "**** warning: no rock compressibility data found in deck (ROCK or ROCKTAB)." << std::endl;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define OPM_ROCKCOMPRESSIBILITY_HEADER_INCLUDED
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -34,7 +35,8 @@ namespace Opm
|
||||
public:
|
||||
/// Construct from input deck.
|
||||
/// Looks for the keywords ROCK and ROCKTAB.
|
||||
RockCompressibility(Opm::DeckConstPtr deck);
|
||||
RockCompressibility(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState);
|
||||
|
||||
/// Construct from parameters.
|
||||
/// Accepts the following parameters (with defaults).
|
||||
|
@ -161,18 +161,21 @@ namespace Opm
|
||||
const Funcs& funcForCell(const int cell) const;
|
||||
template<class T>
|
||||
void initEPS(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroids,
|
||||
int dimensions);
|
||||
template<class T>
|
||||
void initEPSHyst(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroids,
|
||||
int dimensions);
|
||||
template<class T>
|
||||
void initEPSKey(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroids,
|
||||
|
@ -29,8 +29,6 @@
|
||||
|
||||
#include <opm/parser/eclipse/Utility/EndscaleWrapper.hpp>
|
||||
#include <opm/parser/eclipse/Utility/ScalecrsWrapper.hpp>
|
||||
#include <opm/parser/eclipse/Utility/EnptvdTable.hpp>
|
||||
#include <opm/parser/eclipse/Utility/EnkrvdTable.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@ -63,7 +61,7 @@ namespace Opm
|
||||
template <class SatFuncSet>
|
||||
template<class T>
|
||||
void SaturationPropsFromDeck<SatFuncSet>::init(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr /*eclState*/,
|
||||
Opm::EclipseStateConstPtr eclState,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroids,
|
||||
@ -130,7 +128,7 @@ namespace Opm
|
||||
// Initialize tables.
|
||||
satfuncset_.resize(num_tables);
|
||||
for (int table = 0; table < num_tables; ++table) {
|
||||
satfuncset_[table].init(deck, table, phase_usage_, samples);
|
||||
satfuncset_[table].init(eclState, table, phase_usage_, samples);
|
||||
}
|
||||
|
||||
// Check EHYSTR status
|
||||
@ -192,7 +190,7 @@ namespace Opm
|
||||
// TODO: ENPTVD/ENKRVD: Too few tables gives a cryptical message from parser,
|
||||
// superfluous tables are ignored by the parser without any warning ...
|
||||
|
||||
initEPS(deck, number_of_cells, global_cell, begin_cell_centroids,
|
||||
initEPS(deck, eclState, number_of_cells, global_cell, begin_cell_centroids,
|
||||
dimensions);
|
||||
|
||||
if (do_hyst_) {
|
||||
@ -233,7 +231,7 @@ namespace Opm
|
||||
// to be a scaled version of the drainage curve (confer Norne model).
|
||||
}
|
||||
|
||||
initEPSHyst(deck, number_of_cells, global_cell, begin_cell_centroids,
|
||||
initEPSHyst(deck, eclState, number_of_cells, global_cell, begin_cell_centroids,
|
||||
dimensions);
|
||||
}
|
||||
}
|
||||
@ -460,6 +458,7 @@ namespace Opm
|
||||
template <class SatFuncSet>
|
||||
template<class T>
|
||||
void SaturationPropsFromDeck<SatFuncSet>::initEPS(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroid,
|
||||
@ -470,39 +469,39 @@ namespace Opm
|
||||
std::vector<double> pcw, pcg;
|
||||
const std::vector<double> dummy;
|
||||
// Initialize saturation scaling parameter
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("SWL"), swl);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("SWU"), swu);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("SWCR"), swcr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("SGL"), sgl);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("SGU"), sgu);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("SGCR"), sgcr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("SOWCR"), sowcr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("SOGCR"), sogcr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("KRW"), krw);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("KRG"), krg);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("KRO"), kro);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("KRWR"), krwr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("KRGR"), krgr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("KRORW"), krorw);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("KRORG"), krorg);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("PCW"), pcw);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("PCG"), pcg);
|
||||
|
||||
eps_transf_.resize(number_of_cells);
|
||||
@ -613,6 +612,7 @@ namespace Opm
|
||||
template <class SatFuncSet>
|
||||
template<class T>
|
||||
void SaturationPropsFromDeck<SatFuncSet>::initEPSHyst(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroid,
|
||||
@ -623,39 +623,39 @@ namespace Opm
|
||||
std::vector<double> ipcw, ipcg;
|
||||
const std::vector<double> dummy;
|
||||
// Initialize hysteresis saturation scaling parameters
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("ISWL"), iswl);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("ISWU"), iswu);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("ISWCR"), iswcr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("ISGL"), isgl);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("ISGU"), isgu);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("ISGCR"), isgcr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("ISOWCR"), isowcr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("ISOGCR"), isogcr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IKRW"), ikrw);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IKRG"), ikrg);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IKRO"), ikro);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IKRWR"), ikrwr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IKRGR"), ikrgr);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IKRORW"), ikrorw);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IKRORG"), ikrorg);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IPCW"), ipcw);
|
||||
initEPSKey(deck, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
initEPSKey(deck, eclipseState, number_of_cells, global_cell, begin_cell_centroid, dimensions,
|
||||
std::string("IPCG"), ipcg);
|
||||
|
||||
eps_transf_hyst_.resize(number_of_cells);
|
||||
@ -767,6 +767,7 @@ namespace Opm
|
||||
template <class SatFuncSet>
|
||||
template<class T>
|
||||
void SaturationPropsFromDeck<SatFuncSet>::initEPSKey(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroid,
|
||||
@ -849,14 +850,15 @@ namespace Opm
|
||||
OPM_THROW(std::runtime_error, " -- unknown keyword: '" << keyword << "'");
|
||||
}
|
||||
if (!useKeyword && itab > 0) {
|
||||
int num_tables = deck->getKeyword("ENPTVD")->size();
|
||||
const auto& enptvdTables = eclipseState->getEnptvdTables();
|
||||
int num_tables = enptvdTables.size();
|
||||
param_col.resize(num_tables);
|
||||
depth_col.resize(num_tables);
|
||||
col_names.resize(9);
|
||||
for (int table_num=0; table_num<num_tables; ++table_num) {
|
||||
Opm::SingleRecordTable enptvd(deck->getKeyword("ENPTVD"), col_names, table_num);
|
||||
depth_col[table_num] = enptvd.getColumn(0); // depth
|
||||
param_col[table_num] = enptvd.getColumn(itab); // itab=[1-8]: swl swcr swu sgl sgcr sgu sowcr sogcr
|
||||
const auto& enptvdTable = enptvdTables[table_num];
|
||||
depth_col[table_num] = enptvdTable.getDepthColumn();
|
||||
param_col[table_num] = enptvdTable.getColumn(itab); // itab=[1-8]: swl swcr swu sgl sgcr sgu sowcr sogcr
|
||||
}
|
||||
}
|
||||
} else if ((keyword[0] == 'K' && (useKeyword || hasENKRVD)) || (keyword[1] == 'K' && useKeyword) ) {
|
||||
@ -913,14 +915,15 @@ namespace Opm
|
||||
OPM_THROW(std::runtime_error, " -- unknown keyword: '" << keyword << "'");
|
||||
}
|
||||
if (!useKeyword && itab > 0) {
|
||||
int num_tables = deck->getKeyword("ENKRVD")->size();
|
||||
const auto& enkrvdTables = eclipseState->getEnkrvdTables();
|
||||
int num_tables = enkrvdTables.size();
|
||||
param_col.resize(num_tables);
|
||||
depth_col.resize(num_tables);
|
||||
col_names.resize(8);
|
||||
for (int table_num=0; table_num<num_tables; ++table_num) {
|
||||
Opm::SingleRecordTable enkrvd(deck->getKeyword("ENKRVD"), col_names, table_num);
|
||||
depth_col[table_num] = enkrvd.getColumn(0); // depth
|
||||
param_col[table_num] = enkrvd.getColumn(itab); // itab=[1-7]: krw krg kro krwr krgr krorw krorg
|
||||
const auto &enkrvdTable = enkrvdTables[table_num];
|
||||
depth_col[table_num] = enkrvdTable.getDepthColumn();
|
||||
param_col[table_num] = enkrvdTable.getColumn(itab); // itab=[1-7]: krw krg kro krwr krgr krorw krorg
|
||||
}
|
||||
}
|
||||
} else if (useKeyword && (keyword[0] == 'P' || keyword[1] == 'P') ) {
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <opm/core/utility/RegionMapping.hpp>
|
||||
#include <opm/core/utility/Units.hpp>
|
||||
#include <opm/parser/eclipse/Utility/EquilWrapper.hpp>
|
||||
#include <opm/parser/eclipse/Utility/SingleRecordTable.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#include <array>
|
||||
@ -279,15 +278,15 @@ namespace Opm
|
||||
// Create Rs functions.
|
||||
rs_func_.reserve(rec.size());
|
||||
if (deck->hasKeyword("DISGAS")) {
|
||||
const std::vector<RsvdTable>& rsvdTables = eclipseState->getRsvdTables();
|
||||
for (size_t i = 0; i < rec.size(); ++i) {
|
||||
const int cell = *(eqlmap.cells(i).begin());
|
||||
if (rec[i].live_oil_table_index > 0) {
|
||||
if (deck->hasKeyword("RSVD") &&
|
||||
size_t(rec[i].live_oil_table_index) <= deck->getKeyword("RSVD")->size()) {
|
||||
Opm::SingleRecordTable rsvd(deck->getKeyword("RSVD"),std::vector<std::string>{"vd", "rs"},rec[i].live_oil_table_index-1);
|
||||
std::vector<double> vd(rsvd.getColumn("vd"));
|
||||
std::vector<double> rs(rsvd.getColumn("rs"));
|
||||
rs_func_.push_back(std::make_shared<Miscibility::RsVD>(props, cell, vd, rs));
|
||||
if (rsvdTables.size() > 0 && size_t(rec[i].live_oil_table_index) <= rsvdTables.size()) {
|
||||
rs_func_.push_back(std::make_shared<Miscibility::RsVD>(props,
|
||||
cell,
|
||||
rsvdTables[i].getDepthColumn(),
|
||||
rsvdTables[i].getRsColumn()));
|
||||
} else {
|
||||
OPM_THROW(std::runtime_error, "Cannot initialise: RSVD table " << (rec[i].live_oil_table_index) << " not available.");
|
||||
}
|
||||
@ -310,15 +309,15 @@ namespace Opm
|
||||
|
||||
rv_func_.reserve(rec.size());
|
||||
if (deck->hasKeyword("VAPOIL")) {
|
||||
const std::vector<RvvdTable>& rvvdTables = eclipseState->getRvvdTables();
|
||||
for (size_t i = 0; i < rec.size(); ++i) {
|
||||
const int cell = *(eqlmap.cells(i).begin());
|
||||
if (rec[i].wet_gas_table_index > 0) {
|
||||
if (deck->hasKeyword("RVVD") &&
|
||||
size_t(rec[i].wet_gas_table_index) <= deck->getKeyword("RVVD")->size()) {
|
||||
Opm::SingleRecordTable rvvd(deck->getKeyword("RVVD"),std::vector<std::string>{"vd", "rv"},rec[i].wet_gas_table_index-1);
|
||||
std::vector<double> vd(rvvd.getColumn("vd"));
|
||||
std::vector<double> rv(rvvd.getColumn("rv"));
|
||||
rv_func_.push_back(std::make_shared<Miscibility::RvVD>(props, cell, vd, rv));
|
||||
if (rvvdTables.size() > 0 && size_t(rec[i].wet_gas_table_index) <= rvvdTables.size()) {
|
||||
rv_func_.push_back(std::make_shared<Miscibility::RvVD>(props,
|
||||
cell,
|
||||
rvvdTables[i].getDepthColumn(),
|
||||
rvvdTables[i].getRvColumn()));
|
||||
} else {
|
||||
OPM_THROW(std::runtime_error, "Cannot initialise: RVVD table " << (rec[i].wet_gas_table_index) << " not available.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user