Read ROCK from EclipseState, not Deck
This commit is contained in:
parent
ec060d513b
commit
ad4033b9dc
@ -46,7 +46,7 @@ try
|
|||||||
|
|
||||||
// Define rock and fluid properties
|
// Define rock and fluid properties
|
||||||
IncompPropertiesFromDeck incomp_properties(deck, eclipseState, *grid.c_grid());
|
IncompPropertiesFromDeck incomp_properties(deck, eclipseState, *grid.c_grid());
|
||||||
RockCompressibility rock_comp(deck, eclipseState);
|
RockCompressibility rock_comp(eclipseState);
|
||||||
|
|
||||||
// Finally handle the wells
|
// Finally handle the wells
|
||||||
WellsManager wells(eclipseState , 0 , *grid.c_grid(), incomp_properties.permeability());
|
WellsManager wells(eclipseState , 0 , *grid.c_grid(), incomp_properties.permeability());
|
||||||
|
@ -41,8 +41,7 @@ namespace Opm
|
|||||||
rock_comp_ = param.getDefault("rock_compressibility", 0.0)/unit::barsa;
|
rock_comp_ = param.getDefault("rock_compressibility", 0.0)/unit::barsa;
|
||||||
}
|
}
|
||||||
|
|
||||||
RockCompressibility::RockCompressibility(const Opm::Deck& deck,
|
RockCompressibility::RockCompressibility(const Opm::EclipseState& eclipseState,
|
||||||
const Opm::EclipseState& eclipseState,
|
|
||||||
const bool is_io_rank)
|
const bool is_io_rank)
|
||||||
: pref_(0.0),
|
: pref_(0.0),
|
||||||
rock_comp_(0.0)
|
rock_comp_(0.0)
|
||||||
@ -61,21 +60,19 @@ namespace Opm
|
|||||||
} else {
|
} else {
|
||||||
transmult_ = rocktabTable.getColumn("PV_MULT_TRANX").vectorCopy();
|
transmult_ = rocktabTable.getColumn("PV_MULT_TRANX").vectorCopy();
|
||||||
}
|
}
|
||||||
} else if (deck.hasKeyword("ROCK")) {
|
} else if (!tables.getRockTable().empty()) {
|
||||||
const auto& rockKeyword = deck.getKeyword("ROCK");
|
const auto& rockKeyword = tables.getRockTable();
|
||||||
if (rockKeyword.size() != 1) {
|
if (rockKeyword.size() != 1) {
|
||||||
if (is_io_rank) {
|
if (is_io_rank) {
|
||||||
OpmLog::warning("Can only handle a single region in ROCK ("
|
OpmLog::warning("Can only handle a single region in ROCK ("
|
||||||
+ std::to_string(rockKeyword.size())
|
+ std::to_string(rockKeyword.size())
|
||||||
+ " regions specified)."
|
+ " regions specified)."
|
||||||
+ " Ignoring all except for the first.\n"
|
+ " Ignoring all except for the first.\n");
|
||||||
+ "In file " + rockKeyword.getFileName()
|
|
||||||
+ ", line " + std::to_string(rockKeyword.getLineNumber()) + "\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pref_ = rockKeyword.getRecord(0).getItem("PREF").getSIDouble(0);
|
pref_ = rockKeyword[0].reference_pressure;
|
||||||
rock_comp_ = rockKeyword.getRecord(0).getItem("COMPRESSIBILITY").getSIDouble(0);
|
rock_comp_ = rockKeyword[0].compressibility;
|
||||||
} else {
|
} else {
|
||||||
OpmLog::warning("No rock compressibility data found in deck (ROCK or ROCKTAB).");
|
OpmLog::warning("No rock compressibility data found in deck (ROCK or ROCKTAB).");
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#ifndef OPM_ROCKCOMPRESSIBILITY_HEADER_INCLUDED
|
#ifndef OPM_ROCKCOMPRESSIBILITY_HEADER_INCLUDED
|
||||||
#define OPM_ROCKCOMPRESSIBILITY_HEADER_INCLUDED
|
#define OPM_ROCKCOMPRESSIBILITY_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
|
||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -35,8 +34,7 @@ namespace Opm
|
|||||||
public:
|
public:
|
||||||
/// Construct from input deck.
|
/// Construct from input deck.
|
||||||
/// Looks for the keywords ROCK and ROCKTAB.
|
/// Looks for the keywords ROCK and ROCKTAB.
|
||||||
RockCompressibility(const Opm::Deck& deck,
|
RockCompressibility(const Opm::EclipseState& eclipseState,
|
||||||
const Opm::EclipseState& eclipseState,
|
|
||||||
const bool is_io_rank = true);
|
const bool is_io_rank = true);
|
||||||
|
|
||||||
/// Construct from parameters.
|
/// Construct from parameters.
|
||||||
|
Loading…
Reference in New Issue
Block a user