Read DISGAS and VAPOIL from deck and pass them to the simulator

This commit is contained in:
Tor Harald Sandve
2014-05-27 13:36:22 +02:00
parent aecfa3ed50
commit 8a600747fa
8 changed files with 33 additions and 10 deletions

View File

@@ -218,7 +218,10 @@ try
rock_comp->isActive() ? rock_comp.get() : 0, rock_comp->isActive() ? rock_comp.get() : 0,
wells, wells,
*fis_solver, *fis_solver,
grav); grav,
deck->hasKeyword("DISGAS"),
deck->hasKeyword("VAPOIL") );
SimulatorReport episodeReport = simulator.run(simtimer, state, well_state); SimulatorReport episodeReport = simulator.run(simtimer, state, well_state);
++simtimer; ++simtimer;

View File

@@ -104,7 +104,7 @@ try
Opm::NewtonIterationBlackoilSimple fis_solver(param); Opm::NewtonIterationBlackoilSimple fis_solver(param);
Opm::FullyImplicitBlackoilSolver<UnstructuredGrid> solver(param, *g, props, geo, 0, *wells, fis_solver); Opm::FullyImplicitBlackoilSolver<UnstructuredGrid> solver(param, *g, props, geo, 0, *wells, fis_solver, /*hasDisgas*/ true, /*hasVapoil=*/false);
Opm::BlackoilState state; Opm::BlackoilState state;
initStateBasic(*g, props0, param, 0.0, state); initStateBasic(*g, props0, param, 0.0, state);

View File

@@ -94,6 +94,8 @@ namespace Opm
phase_usage_ = phaseUsageFromDeck(deck); phase_usage_ = phaseUsageFromDeck(deck);
// Surface densities. Accounting for different orders in eclipse and our code. // Surface densities. Accounting for different orders in eclipse and our code.
Opm::DeckKeywordConstPtr densityKeyword = deck->getKeyword("DENSITY"); Opm::DeckKeywordConstPtr densityKeyword = deck->getKeyword("DENSITY");
int numRegions = densityKeyword->size(); int numRegions = densityKeyword->size();

View File

@@ -360,6 +360,8 @@ namespace Opm
std::unique_ptr<SaturationPropsInterface> satprops_; std::unique_ptr<SaturationPropsInterface> satprops_;
PhaseUsage phase_usage_; PhaseUsage phase_usage_;
bool has_vapoil_;
bool has_disgas_;
// The PVT region which is to be used for each cell // The PVT region which is to be used for each cell
std::vector<int> cellPvtRegionIdx_; std::vector<int> cellPvtRegionIdx_;

View File

@@ -70,7 +70,9 @@ namespace Opm {
const DerivedGeology& geo , const DerivedGeology& geo ,
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
const Wells& wells, const Wells& wells,
const NewtonIterationBlackoilInterface& linsolver); const NewtonIterationBlackoilInterface& linsolver,
const bool has_disgas,
const bool has_vapoil );
/// Take a single forward step, modifiying /// Take a single forward step, modifiying
/// state.pressure() /// state.pressure()
@@ -144,6 +146,8 @@ namespace Opm {
HelperOps ops_; HelperOps ops_;
const WellOps wops_; const WellOps wops_;
const M grav_; const M grav_;
const bool has_disgas_;
const bool has_vapoil_;
double dp_max_rel_; double dp_max_rel_;
double ds_max_; double ds_max_;
double drs_max_rel_; double drs_max_rel_;

View File

@@ -219,7 +219,9 @@ namespace {
const DerivedGeology& geo , const DerivedGeology& geo ,
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
const Wells& wells, const Wells& wells,
const NewtonIterationBlackoilInterface& linsolver) const NewtonIterationBlackoilInterface& linsolver,
const bool has_disgas,
const bool has_vapoil)
: grid_ (grid) : grid_ (grid)
, fluid_ (fluid) , fluid_ (fluid)
, geo_ (geo) , geo_ (geo)
@@ -232,6 +234,8 @@ namespace {
, ops_ (grid) , ops_ (grid)
, wops_ (wells) , wops_ (wells)
, grav_ (gravityOperator(grid_, ops_, geo_)) , grav_ (gravityOperator(grid_, ops_, geo_))
, has_disgas_(has_disgas)
, has_vapoil_(has_vapoil)
, dp_max_rel_ (1.0e9) , dp_max_rel_ (1.0e9)
, ds_max_ (0.2) , ds_max_ (0.2)
, drs_max_rel_ (1.0e9) , drs_max_rel_ (1.0e9)

View File

@@ -74,7 +74,9 @@ namespace Opm
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
WellsManager& wells_manager, WellsManager& wells_manager,
NewtonIterationBlackoilInterface& linsolver, NewtonIterationBlackoilInterface& linsolver,
const double* gravity); const double* gravity,
const bool disgas,
const bool vapoil );
/// Run the simulation. /// Run the simulation.
/// This will run succesive timesteps until timer.done() is true. It will /// This will run succesive timesteps until timer.done() is true. It will

View File

@@ -66,7 +66,9 @@ namespace Opm
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
WellsManager& wells_manager, WellsManager& wells_manager,
NewtonIterationBlackoilInterface& linsolver, NewtonIterationBlackoilInterface& linsolver,
const double* gravity); const double* gravity,
bool has_disgas,
bool has_vapoil );
SimulatorReport run(SimulatorTimer& timer, SimulatorReport run(SimulatorTimer& timer,
BlackoilState& state, BlackoilState& state,
@@ -107,10 +109,12 @@ namespace Opm
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
WellsManager& wells_manager, WellsManager& wells_manager,
NewtonIterationBlackoilInterface& linsolver, NewtonIterationBlackoilInterface& linsolver,
const double* gravity) const double* gravity,
const bool has_disgas,
const bool has_vapoil )
{ {
pimpl_.reset(new Impl(param, grid, props, rock_comp_props, wells_manager, linsolver, gravity)); pimpl_.reset(new Impl(param, grid, props, rock_comp_props, wells_manager, linsolver, gravity, has_disgas, has_vapoil));
} }
@@ -192,7 +196,9 @@ namespace Opm
const RockCompressibility* rock_comp_props, const RockCompressibility* rock_comp_props,
WellsManager& wells_manager, WellsManager& wells_manager,
NewtonIterationBlackoilInterface& linsolver, NewtonIterationBlackoilInterface& linsolver,
const double* gravity) const double* gravity,
const bool has_disgas,
const bool has_vapoil)
: grid_(grid), : grid_(grid),
props_(props), props_(props),
rock_comp_props_(rock_comp_props), rock_comp_props_(rock_comp_props),
@@ -200,7 +206,7 @@ namespace Opm
wells_(wells_manager.c_wells()), wells_(wells_manager.c_wells()),
gravity_(gravity), gravity_(gravity),
geo_(grid_, props_, gravity_), geo_(grid_, props_, gravity_),
solver_(param, grid_, props_, geo_, rock_comp_props, *wells_manager.c_wells(), linsolver) solver_(param, grid_, props_, geo_, rock_comp_props, *wells_manager.c_wells(), linsolver, has_disgas, has_vapoil)
/* param.getDefault("nl_pressure_residual_tolerance", 0.0), /* param.getDefault("nl_pressure_residual_tolerance", 0.0),
param.getDefault("nl_pressure_change_tolerance", 1.0), param.getDefault("nl_pressure_change_tolerance", 1.0),
param.getDefault("nl_pressure_maxiter", 10), param.getDefault("nl_pressure_maxiter", 10),