Read ROCK from EclipseState, not Deck

This commit is contained in:
Jørgen Kvalsvik 2016-12-20 12:24:27 +01:00
parent ec060d513b
commit ad4033b9dc
3 changed files with 8 additions and 13 deletions

View File

@ -46,7 +46,7 @@ try
// Define rock and fluid properties
IncompPropertiesFromDeck incomp_properties(deck, eclipseState, *grid.c_grid());
RockCompressibility rock_comp(deck, eclipseState);
RockCompressibility rock_comp(eclipseState);
// Finally handle the wells
WellsManager wells(eclipseState , 0 , *grid.c_grid(), incomp_properties.permeability());

View File

@ -41,8 +41,7 @@ namespace Opm
rock_comp_ = param.getDefault("rock_compressibility", 0.0)/unit::barsa;
}
RockCompressibility::RockCompressibility(const Opm::Deck& deck,
const Opm::EclipseState& eclipseState,
RockCompressibility::RockCompressibility(const Opm::EclipseState& eclipseState,
const bool is_io_rank)
: pref_(0.0),
rock_comp_(0.0)
@ -61,21 +60,19 @@ namespace Opm
} else {
transmult_ = rocktabTable.getColumn("PV_MULT_TRANX").vectorCopy();
}
} else if (deck.hasKeyword("ROCK")) {
const auto& rockKeyword = deck.getKeyword("ROCK");
} else if (!tables.getRockTable().empty()) {
const auto& rockKeyword = tables.getRockTable();
if (rockKeyword.size() != 1) {
if (is_io_rank) {
OpmLog::warning("Can only handle a single region in ROCK ("
+ std::to_string(rockKeyword.size())
+ " regions specified)."
+ " Ignoring all except for the first.\n"
+ "In file " + rockKeyword.getFileName()
+ ", line " + std::to_string(rockKeyword.getLineNumber()) + "\n");
+ " Ignoring all except for the first.\n");
}
}
pref_ = rockKeyword.getRecord(0).getItem("PREF").getSIDouble(0);
rock_comp_ = rockKeyword.getRecord(0).getItem("COMPRESSIBILITY").getSIDouble(0);
pref_ = rockKeyword[0].reference_pressure;
rock_comp_ = rockKeyword[0].compressibility;
} else {
OpmLog::warning("No rock compressibility data found in deck (ROCK or ROCKTAB).");
}

View File

@ -20,7 +20,6 @@
#ifndef OPM_ROCKCOMPRESSIBILITY_HEADER_INCLUDED
#define OPM_ROCKCOMPRESSIBILITY_HEADER_INCLUDED
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <vector>
@ -35,8 +34,7 @@ namespace Opm
public:
/// Construct from input deck.
/// Looks for the keywords ROCK and ROCKTAB.
RockCompressibility(const Opm::Deck& deck,
const Opm::EclipseState& eclipseState,
RockCompressibility(const Opm::EclipseState& eclipseState,
const bool is_io_rank = true);
/// Construct from parameters.