mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Changed to use new table api from opm-parser.
This commit is contained in:
@@ -50,9 +50,13 @@ namespace Opm
|
||||
if (rocktabTables.size() != 1)
|
||||
OPM_THROW(std::runtime_error, "Can only handle a single region in ROCKTAB.");
|
||||
|
||||
p_ = rocktabTable.getPressureColumn();
|
||||
poromult_ = rocktabTable.getPoreVolumeMultiplierColumn();
|
||||
transmult_ = rocktabTable.getTransmissibilityMultiplierColumn();
|
||||
p_ = rocktabTable.getColumn("PO").vectorCopy( );
|
||||
poromult_ = rocktabTable.getColumn("PV_MULT").vectorCopy();
|
||||
if (rocktabTable.hasColumn("PV_MULT_TRAN")) {
|
||||
transmult_ = rocktabTable.getColumn("PV_MULT_TRAN").vectorCopy();
|
||||
} else {
|
||||
transmult_ = rocktabTable.getColumn("PV_MULT_TRANX").vectorCopy();
|
||||
}
|
||||
} else if (deck->hasKeyword("ROCK")) {
|
||||
Opm::DeckKeywordConstPtr rockKeyword = deck->getKeyword("ROCK");
|
||||
if (rockKeyword->size() != 1) {
|
||||
|
||||
@@ -541,27 +541,25 @@ namespace Opm{
|
||||
if (fluidSystem_ == FluidSystem::BlackOil) {
|
||||
if (satFamily_ == SaturationFunctionFamily::FamilyI) {
|
||||
if (!sgofTables.empty()) {
|
||||
auto sg = sgofTables.getTable<SgofTable>(satnumIdx).getSgColumn();
|
||||
auto krog = sgofTables.getTable<SgofTable>(satnumIdx).getKrogColumn();
|
||||
krog_value=Opm::linearInterpolation(sg, krog,unscaledEpsInfo_[satnumIdx].Sgl);
|
||||
const auto& table = sgofTables.getTable<SgofTable>(satnumIdx);
|
||||
krog_value = table.evaluate( "KROG" , unscaledEpsInfo_[satnumIdx].Sgl );
|
||||
} else {
|
||||
assert(!slgofTables.empty());
|
||||
auto sl = slgofTables.getTable<SlgofTable>(satnumIdx).getSlColumn();
|
||||
auto krog = slgofTables.getTable<SlgofTable>(satnumIdx).getKrogColumn();
|
||||
krog_value=Opm::linearInterpolation(sl, krog, unscaledEpsInfo_[satnumIdx].Sgl);
|
||||
const auto& table = slgofTables.getTable<SlgofTable>(satnumIdx);
|
||||
krog_value = table.evaluate( "KROG" , unscaledEpsInfo_[satnumIdx].Sgl );
|
||||
}
|
||||
{
|
||||
const auto& table = swofTables.getTable<SwofTable>(satnumIdx);
|
||||
krow_value = table.evaluate("KROW" , unscaledEpsInfo_[satnumIdx].Swl);
|
||||
}
|
||||
auto sw = swofTables.getTable<SwofTable>(satnumIdx).getSwColumn();
|
||||
auto krow = swofTables.getTable<SwofTable>(satnumIdx).getKrowColumn();
|
||||
krow_value = Opm::linearInterpolation(sw, krow,unscaledEpsInfo_[satnumIdx].Swl);
|
||||
}
|
||||
if (satFamily_ == SaturationFunctionFamily::FamilyII) {
|
||||
assert(!sof3Tables.empty());
|
||||
const auto& table = sof3Tables.getTable<Sof3Table>(satnumIdx);
|
||||
const double Sou = 1.- unscaledEpsInfo_[satnumIdx].Swl - unscaledEpsInfo_[satnumIdx].Sgl;
|
||||
auto so = sof3Tables.getTable<Sof3Table>(satnumIdx).getSoColumn();
|
||||
auto krow = sof3Tables.getTable<Sof3Table>(satnumIdx).getKrowColumn();
|
||||
auto krog = sof3Tables.getTable<Sof3Table>(satnumIdx).getKrogColumn();
|
||||
krow_value = Opm::linearInterpolation(so, krow, Sou);
|
||||
krog_value = Opm::linearInterpolation(so, krog, Sou);
|
||||
|
||||
krow_value = table.evaluate("KROW" , Sou);
|
||||
krog_value = table.evaluate("KROG" , Sou);
|
||||
}
|
||||
if (krow_value != krog_value) {
|
||||
std::string msg = "Warning: Krow(sSomax) should equal Krog(Somax).";
|
||||
|
||||
@@ -294,10 +294,11 @@ namespace Opm
|
||||
if (rec[i].live_oil_table_index > 0) {
|
||||
if (rsvdTables.size() > 0 && size_t(rec[i].live_oil_table_index) <= rsvdTables.size()) {
|
||||
const RsvdTable& rsvdTable = rsvdTables.getTable<RsvdTable>(i);
|
||||
std::vector<double> depthColumn = rsvdTable.getColumn("DEPTH").vectorCopy();
|
||||
std::vector<double> rsColumn = rsvdTable.getColumn("RS").vectorCopy();
|
||||
rs_func_.push_back(std::make_shared<Miscibility::RsVD>(props,
|
||||
cell,
|
||||
rsvdTable.getDepthColumn(),
|
||||
rsvdTable.getRsColumn()));
|
||||
depthColumn , rsColumn));
|
||||
} else {
|
||||
OPM_THROW(std::runtime_error, "Cannot initialise: RSVD table " << (rec[i].live_oil_table_index) << " not available.");
|
||||
}
|
||||
@@ -327,10 +328,13 @@ namespace Opm
|
||||
if (rec[i].wet_gas_table_index > 0) {
|
||||
if (rvvdTables.size() > 0 && size_t(rec[i].wet_gas_table_index) <= rvvdTables.size()) {
|
||||
const RvvdTable& rvvdTable = rvvdTables.getTable<RvvdTable>(i);
|
||||
std::vector<double> depthColumn = rvvdTable.getColumn("DEPTH").vectorCopy();
|
||||
std::vector<double> rvColumn = rvvdTable.getColumn("RV").vectorCopy();
|
||||
|
||||
rv_func_.push_back(std::make_shared<Miscibility::RvVD>(props,
|
||||
cell,
|
||||
rvvdTable.getDepthColumn(),
|
||||
rvvdTable.getRvColumn()));
|
||||
depthColumn , rvColumn));
|
||||
|
||||
} else {
|
||||
OPM_THROW(std::runtime_error, "Cannot initialise: RVVD table " << (rec[i].wet_gas_table_index) << " not available.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user