mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'master' into new_well_formulation
Needed to avoid compile errors with updated opm-core.
This commit is contained in:
commit
5e4dff401c
@ -48,6 +48,8 @@
|
|||||||
|
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
@ -94,6 +96,7 @@ try
|
|||||||
boost::scoped_ptr<GridManager> grid;
|
boost::scoped_ptr<GridManager> grid;
|
||||||
boost::scoped_ptr<BlackoilPropertiesInterface> props;
|
boost::scoped_ptr<BlackoilPropertiesInterface> props;
|
||||||
boost::scoped_ptr<RockCompressibility> rock_comp;
|
boost::scoped_ptr<RockCompressibility> rock_comp;
|
||||||
|
EclipseStateConstPtr eclipseState;
|
||||||
BlackoilState state;
|
BlackoilState state;
|
||||||
// bool check_well_controls = false;
|
// bool check_well_controls = false;
|
||||||
// int max_well_control_iterations = 0;
|
// int max_well_control_iterations = 0;
|
||||||
@ -103,6 +106,8 @@ try
|
|||||||
deck.reset(new EclipseGridParser(deck_filename));
|
deck.reset(new EclipseGridParser(deck_filename));
|
||||||
Opm::ParserPtr newParser(new Opm::Parser() );
|
Opm::ParserPtr newParser(new Opm::Parser() );
|
||||||
Opm::DeckConstPtr newParserDeck = newParser->parseFile( deck_filename );
|
Opm::DeckConstPtr newParserDeck = newParser->parseFile( deck_filename );
|
||||||
|
eclipseState.reset( new EclipseState(newParserDeck ));
|
||||||
|
|
||||||
|
|
||||||
// Grid init
|
// Grid init
|
||||||
grid.reset(new GridManager(newParserDeck));
|
grid.reset(new GridManager(newParserDeck));
|
||||||
@ -255,7 +260,7 @@ try
|
|||||||
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
||||||
|
|
||||||
// Create new wells, well_state
|
// Create new wells, well_state
|
||||||
WellsManager wells(*deck, *grid->c_grid(), props->permeability());
|
WellsManager wells(eclipseState , epoch , *grid->c_grid(), props->permeability());
|
||||||
// @@@ HACK: we should really make a new well state and
|
// @@@ HACK: we should really make a new well state and
|
||||||
// properly transfer old well state to it every epoch,
|
// properly transfer old well state to it every epoch,
|
||||||
// since number of wells may change etc.
|
// since number of wells may change etc.
|
||||||
|
@ -46,6 +46,9 @@
|
|||||||
#include <opm/core/simulator/WellState.hpp>
|
#include <opm/core/simulator/WellState.hpp>
|
||||||
#include <opm/autodiff/SimulatorIncompTwophaseAd.hpp>
|
#include <opm/autodiff/SimulatorIncompTwophaseAd.hpp>
|
||||||
|
|
||||||
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
@ -100,12 +103,16 @@ try
|
|||||||
boost::scoped_ptr<GridManager> grid;
|
boost::scoped_ptr<GridManager> grid;
|
||||||
boost::scoped_ptr<IncompPropertiesInterface> props;
|
boost::scoped_ptr<IncompPropertiesInterface> props;
|
||||||
boost::scoped_ptr<RockCompressibility> rock_comp;
|
boost::scoped_ptr<RockCompressibility> rock_comp;
|
||||||
|
EclipseStateConstPtr eclipseState;
|
||||||
TwophaseState state;
|
TwophaseState state;
|
||||||
// bool check_well_controls = false;
|
// bool check_well_controls = false;
|
||||||
// int max_well_control_iterations = 0;
|
// int max_well_control_iterations = 0;
|
||||||
double gravity[3] = { 0.0 };
|
double gravity[3] = { 0.0 };
|
||||||
if (use_deck) {
|
if (use_deck) {
|
||||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||||
|
ParserPtr parser(new Opm::Parser());
|
||||||
|
eclipseState.reset( new EclipseState(parser->parseFile(deck_filename)));
|
||||||
|
|
||||||
deck.reset(new EclipseGridParser(deck_filename));
|
deck.reset(new EclipseGridParser(deck_filename));
|
||||||
// Grid init
|
// Grid init
|
||||||
grid.reset(new GridManager(*deck));
|
grid.reset(new GridManager(*deck));
|
||||||
@ -262,7 +269,7 @@ try
|
|||||||
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
||||||
|
|
||||||
// Create new wells, well_state
|
// Create new wells, well_state
|
||||||
WellsManager wells(*deck, *grid->c_grid(), props->permeability());
|
WellsManager wells(eclipseState , epoch , *grid->c_grid(), props->permeability());
|
||||||
// @@@ HACK: we should really make a new well state and
|
// @@@ HACK: we should really make a new well state and
|
||||||
// properly transfer old well state to it every epoch,
|
// properly transfer old well state to it every epoch,
|
||||||
// since number of wells may change etc.
|
// since number of wells may change etc.
|
||||||
|
@ -242,16 +242,11 @@ try
|
|||||||
rock_comp->isActive() ? rock_comp.get() : 0,
|
rock_comp->isActive() ? rock_comp.get() : 0,
|
||||||
wells,
|
wells,
|
||||||
linsolver,
|
linsolver,
|
||||||
grav,
|
grav);
|
||||||
outputWriter);
|
|
||||||
SimulatorReport episodeReport = simulator.run(simtimer, state, well_state);
|
SimulatorReport episodeReport = simulator.run(simtimer, state, well_state);
|
||||||
|
|
||||||
outputWriter.writeTimeStep(simtimer, state, well_state.basicWellState());
|
outputWriter.writeTimeStep(simtimer, state, well_state.basicWellState());
|
||||||
fullReport += episodeReport;
|
fullReport += episodeReport;
|
||||||
|
|
||||||
if (output) {
|
|
||||||
episodeReport.reportParam(outStream);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "\n\n================ End of simulation ===============\n\n";
|
std::cout << "\n\n================ End of simulation ===============\n\n";
|
||||||
@ -318,8 +313,7 @@ try
|
|||||||
rock_comp->isActive() ? rock_comp.get() : 0,
|
rock_comp->isActive() ? rock_comp.get() : 0,
|
||||||
wells,
|
wells,
|
||||||
linsolver,
|
linsolver,
|
||||||
grav,
|
grav);
|
||||||
outputWriter);
|
|
||||||
outputWriter.writeTimeStep(simtimer, state, well_state.basicWellState());
|
outputWriter.writeTimeStep(simtimer, state, well_state.basicWellState());
|
||||||
|
|
||||||
if (epoch == 0) {
|
if (epoch == 0) {
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include <opm/core/simulator/SimulatorReport.hpp>
|
#include <opm/core/simulator/SimulatorReport.hpp>
|
||||||
#include <opm/core/simulator/SimulatorTimer.hpp>
|
#include <opm/core/simulator/SimulatorTimer.hpp>
|
||||||
#include <opm/core/utility/StopWatch.hpp>
|
#include <opm/core/utility/StopWatch.hpp>
|
||||||
#include <opm/core/io/eclipse/EclipseWriter.hpp>
|
|
||||||
#include <opm/core/io/vtk/writeVtkData.hpp>
|
#include <opm/core/io/vtk/writeVtkData.hpp>
|
||||||
#include <opm/core/utility/miscUtilities.hpp>
|
#include <opm/core/utility/miscUtilities.hpp>
|
||||||
#include <opm/core/utility/miscUtilitiesBlackoil.hpp>
|
#include <opm/core/utility/miscUtilitiesBlackoil.hpp>
|
||||||
@ -72,8 +71,7 @@ namespace Opm
|
|||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
WellsManager& wells_manager,
|
WellsManager& wells_manager,
|
||||||
LinearSolverInterface& linsolver,
|
LinearSolverInterface& linsolver,
|
||||||
const double* gravity,
|
const double* gravity);
|
||||||
EclipseWriter &writer);
|
|
||||||
|
|
||||||
SimulatorReport run(SimulatorTimer& timer,
|
SimulatorReport run(SimulatorTimer& timer,
|
||||||
BlackoilState& state,
|
BlackoilState& state,
|
||||||
@ -102,7 +100,6 @@ namespace Opm
|
|||||||
FullyImplicitBlackoilSolver solver_;
|
FullyImplicitBlackoilSolver solver_;
|
||||||
// Misc. data
|
// Misc. data
|
||||||
std::vector<int> allcells_;
|
std::vector<int> allcells_;
|
||||||
EclipseWriter &eclipseWriter_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -114,11 +111,10 @@ namespace Opm
|
|||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
WellsManager& wells_manager,
|
WellsManager& wells_manager,
|
||||||
LinearSolverInterface& linsolver,
|
LinearSolverInterface& linsolver,
|
||||||
const double* gravity,
|
const double* gravity)
|
||||||
EclipseWriter &eclipseWriter)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
pimpl_.reset(new Impl(param, grid, props, rock_comp_props, wells_manager, linsolver, gravity, eclipseWriter));
|
pimpl_.reset(new Impl(param, grid, props, rock_comp_props, wells_manager, linsolver, gravity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -262,8 +258,7 @@ namespace Opm
|
|||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
WellsManager& wells_manager,
|
WellsManager& wells_manager,
|
||||||
LinearSolverInterface& linsolver,
|
LinearSolverInterface& linsolver,
|
||||||
const double* gravity,
|
const double* gravity)
|
||||||
EclipseWriter &eclipseWriter)
|
|
||||||
: grid_(grid),
|
: grid_(grid),
|
||||||
props_(props),
|
props_(props),
|
||||||
rock_comp_props_(rock_comp_props),
|
rock_comp_props_(rock_comp_props),
|
||||||
@ -271,9 +266,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_(grid_, props_, geo_, rock_comp_props, *wells_manager.c_wells(), linsolver),
|
solver_(grid_, props_, geo_, rock_comp_props, *wells_manager.c_wells(), linsolver)
|
||||||
eclipseWriter_(eclipseWriter)
|
|
||||||
|
|
||||||
/* 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),
|
||||||
@ -419,11 +412,6 @@ namespace Opm
|
|||||||
|
|
||||||
// advance to next timestep before reporting at this location
|
// advance to next timestep before reporting at this location
|
||||||
++timer;
|
++timer;
|
||||||
|
|
||||||
// write an output file for later inspection
|
|
||||||
if (output_) {
|
|
||||||
eclipseWriter_.writeTimeStep(timer, state, well_state.basicWellState());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
total_timer.stop();
|
total_timer.stop();
|
||||||
|
@ -31,7 +31,6 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
namespace parameter { class ParameterGroup; }
|
namespace parameter { class ParameterGroup; }
|
||||||
class BlackoilPropsAdInterface;
|
class BlackoilPropsAdInterface;
|
||||||
class EclipseWriter;
|
|
||||||
class RockCompressibility;
|
class RockCompressibility;
|
||||||
class WellsManager;
|
class WellsManager;
|
||||||
class LinearSolverInterface;
|
class LinearSolverInterface;
|
||||||
@ -72,8 +71,7 @@ namespace Opm
|
|||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
WellsManager& wells_manager,
|
WellsManager& wells_manager,
|
||||||
LinearSolverInterface& linsolver,
|
LinearSolverInterface& linsolver,
|
||||||
const double* gravity,
|
const double* gravity);
|
||||||
EclipseWriter &writer);
|
|
||||||
|
|
||||||
/// 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
|
||||||
|
Loading…
Reference in New Issue
Block a user