make the deck from opm-parser available to the black-oil PVT property classes

This commit is contained in:
Andreas Lauser 2013-12-12 16:23:56 +01:00
parent 0a8430690f
commit 627b1f3906
4 changed files with 23 additions and 3 deletions

View File

@ -46,6 +46,9 @@
#include <opm/core/simulator/WellState.hpp>
#include <opm/autodiff/SimulatorCompressibleAd.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/filesystem.hpp>
@ -98,10 +101,13 @@ try
if (use_deck) {
std::string deck_filename = param.get<std::string>("deck_filename");
deck.reset(new EclipseGridParser(deck_filename));
Opm::ParserPtr newParser(new Opm::Parser() );
Opm::DeckConstPtr newParserDeck = newParser->parse( deck_filename );
// Grid init
grid.reset(new GridManager(*deck));
// Rock and fluid init
props.reset(new BlackoilPropertiesFromDeck(*deck, *grid->c_grid(), param));
props.reset(new BlackoilPropertiesFromDeck(*deck, newParserDeck, *grid->c_grid(), param));
// check_well_controls = param.getDefault("check_well_controls", false);
// max_well_control_iterations = param.getDefault("max_well_control_iterations", 10);
// Rock compressibility.

View File

@ -49,6 +49,9 @@
#include <opm/autodiff/BlackoilPropsAdFromDeck.hpp>
#include <opm/core/utility/share_obj.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
@ -101,13 +104,17 @@ try
double gravity[3] = { 0.0 };
std::string deck_filename = param.get<std::string>("deck_filename");
deck.reset(new EclipseGridParser(deck_filename));
Opm::ParserPtr newParser(new Opm::Parser() );
Opm::DeckConstPtr newParserDeck = newParser->parse( deck_filename );
// Grid init
grid.reset(new GridManager(*deck));
Opm::EclipseWriter outputWriter(param, share_obj(*deck), share_obj(*grid->c_grid()));
// Rock and fluid init
props.reset(new BlackoilPropertiesFromDeck(*deck, *grid->c_grid(), param));
new_props.reset(new BlackoilPropsAdFromDeck(*deck, *grid->c_grid()));
props.reset(new BlackoilPropertiesFromDeck(*deck, newParserDeck, *grid->c_grid(), param));
new_props.reset(new BlackoilPropsAdFromDeck(*deck, newParserDeck, *grid->c_grid()));
// check_well_controls = param.getDefault("check_well_controls", false);
// max_well_control_iterations = param.getDefault("max_well_control_iterations", 10);
// Rock compressibility.

View File

@ -32,6 +32,8 @@
#include <opm/core/utility/ErrorMacros.hpp>
#include <opm/core/utility/Units.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
namespace Opm
{
@ -45,6 +47,7 @@ namespace Opm
/// Constructor wrapping an opm-core black oil interface.
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const EclipseGridParser& deck,
Opm::DeckConstPtr newParserDeck,
const UnstructuredGrid& grid,
const bool init_rock)
{

View File

@ -22,11 +22,14 @@
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
#include <opm/autodiff/AutoDiffBlock.hpp>
#include <opm/core/props/BlackoilPhases.hpp>
#include <opm/core/props/satfunc/SaturationPropsFromDeck.hpp>
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
#include <opm/core/props/rock/RockFromDeck.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
@ -49,6 +52,7 @@ namespace Opm
public:
/// Constructor wrapping an opm-core black oil interface.
BlackoilPropsAdFromDeck(const EclipseGridParser& deck,
Opm::DeckConstPtr newParserDeck,
const UnstructuredGrid& grid,
const bool init_rock = true );