From ac764bd8a80300c2d56e6ee699f613234ada985c Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Wed, 29 Oct 2014 13:23:50 +0800 Subject: [PATCH] let sim_poly_fi2p_comp_ad works as the same way as sim_poly_fibo_ad. - move time iteration to simulator class - add EclipseWriter and output Eclipse binaries. - add DeckConstPtr for polymer inflow. --- examples/sim_poly_fi2p_comp_ad.cpp | 120 +++---- ...ulatorFullyImplicitCompressiblePolymer.cpp | 300 +++++++++--------- ...ulatorFullyImplicitCompressiblePolymer.hpp | 29 +- 3 files changed, 211 insertions(+), 238 deletions(-) diff --git a/examples/sim_poly_fi2p_comp_ad.cpp b/examples/sim_poly_fi2p_comp_ad.cpp index c41850a63..53220be7f 100644 --- a/examples/sim_poly_fi2p_comp_ad.cpp +++ b/examples/sim_poly_fi2p_comp_ad.cpp @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -58,7 +59,7 @@ #include #include -#include +#include #include #include @@ -105,45 +106,34 @@ try std::shared_ptr props; std::shared_ptr new_props; std::shared_ptr rock_comp; - Opm::DeckConstPtr deck; - EclipseStateConstPtr eclipseState; PolymerBlackoilState state; // bool check_well_controls = false; // int max_well_control_iterations = 0; double gravity[3] = { 0.0 }; std::string deck_filename = param.get("deck_filename"); - ParserPtr parser(new Opm::Parser()); - deck = parser->parseFile(deck_filename); - eclipseState.reset(new Opm::EclipseState(deck)); + + Opm::ParserPtr newParser(new Opm::Parser()); + bool strict_parsing = param.getDefault("strict_parsing", true); + Opm::DeckConstPtr deck = newParser->parseFile(deck_filename, strict_parsing); + std::shared_ptr eclipseState(new EclipseState(deck)); // Grid init std::vector porv; if (eclipseState->hasDoubleGridProperty("PORV")) { porv = eclipseState->getDoubleGridProperty("PORV")->getData(); } grid.reset(new GridManager(eclipseState->getEclipseGrid(), porv)); -// grid.reset(new GridManager(deck)); - - // use the capitalized part of the deck's filename between the - // last '/' and the last '.' character as base name. -/* - std::string baseName = deck_filename; - auto charPos = baseName.rfind('/'); - if (charPos != std::string::npos) - baseName = baseName.substr(charPos + 1); - charPos = baseName.rfind('.'); - if (charPos != std::string::npos) - baseName = baseName.substr(0, charPos); - baseName = boost::to_upper_copy(baseName); - - Opm::EclipseWriter outputWriter(param, share_obj(*deck), share_obj(*grid->c_grid())); -*/ + auto &cGrid = *grid->c_grid(); + const PhaseUsage pu = Opm::phaseUsageFromDeck(deck); + Opm::EclipseWriter outputWriter(param, + eclipseState, + pu, + cGrid.number_of_cells, + cGrid.global_cell); // Rock and fluid init - props.reset(new BlackoilPropertiesFromDeck(deck, eclipseState, *grid->c_grid())); + props.reset(new BlackoilPropertiesFromDeck(deck, eclipseState, *grid->c_grid(), param)); new_props.reset(new BlackoilPropsAdFromDeck(deck, eclipseState, *grid->c_grid())); PolymerProperties polymer_props(deck, eclipseState); PolymerPropsAd polymer_props_ad(polymer_props); - // check_well_controls = param.getDefault("check_well_controls", false); - // max_well_control_iterations = param.getDefault("max_well_control_iterations", 10); // Rock compressibility. rock_comp.reset(new RockCompressibility(deck, eclipseState)); // Gravity. @@ -182,18 +172,14 @@ try param.writeParam(output_dir + "/simulation.param"); } + Opm::TimeMapConstPtr timeMap(eclipseState->getSchedule()->getTimeMap()); + SimulatorTimer simtimer; + simtimer.init(timeMap); - std::cout << "\n\n================ Starting main simulation loop ===============\n" - << std::flush; SimulatorReport rep; // With a deck, we may have more epochs etc. WellState well_state; - int step = 0; - Opm::TimeMapPtr timeMap(new Opm::TimeMap(deck)); - SimulatorTimer simtimer; - simtimer.init(timeMap); - const double total_time = simtimer.totalTime(); // Check for WPOLYMER presence in last epoch to decide // polymer injection control type. const bool use_wpolymer = deck->hasKeyword("WPOLYMER"); @@ -203,62 +189,32 @@ try "You seem to be trying to control it via parameter poly_start_days (etc.) as well."); } } - for (size_t reportStepIdx = 0; reportStepIdx < timeMap->numTimesteps(); ++reportStepIdx) { - simtimer.setCurrentStepNum(reportStepIdx); - - // Report on start of step. - std::cout << "\n\n-------------- Starting report step " << reportStepIdx << " --------------" - << "\n (number of remaining steps: " - << simtimer.numSteps() - step << ")\n\n" << std::flush; - - // Create new wells, polymer inflow controls. - WellsManager wells(eclipseState, reportStepIdx, *grid->c_grid(), props->permeability()); - std::unique_ptr polymer_inflow; - if (use_wpolymer) { - if (wells.c_wells() == 0) { - OPM_THROW(std::runtime_error, "Cannot control polymer injection via WPOLYMER without wells."); - } - polymer_inflow.reset(new PolymerInflowFromDeck(deck, *wells.c_wells(), props->numCells())); - } else { - polymer_inflow.reset(new PolymerInflowBasic(param.getDefault("poly_start_days", 300.0)*Opm::unit::day, - param.getDefault("poly_end_days", 800.0)*Opm::unit::day, - param.getDefault("poly_amount", polymer_props.cMax()))); - } - // @@@ HACK: we should really make a new well state and - // properly transfer old well state to it every epoch, - // since number of wells may change etc. - if (reportStepIdx == 0) { - well_state.init(wells.c_wells(), state); - } - - // Create and run simulator. - Opm::DerivedGeology geology(*grid->c_grid(), *new_props, eclipseState, grav); - SimulatorFullyImplicitCompressiblePolymer simulator(param, - *grid->c_grid(), - geology, - *new_props, - polymer_props_ad, - rock_comp->isActive() ? rock_comp.get() : 0, - wells, - *polymer_inflow, - *fis_solver, - grav); - if (reportStepIdx == 0) { - warnIfUnusedParams(param); - } - SimulatorReport epoch_rep = simulator.run(simtimer, state, well_state); - // Update total timing report and remember step number. - rep += epoch_rep; - step = simtimer.currentStepNum(); - } + std::cout << "\n\n================ Starting main simulation loop ===============\n" + << std::flush; + SimulatorReport fullReport; + // Create and run simulator. + Opm::DerivedGeology geology(*grid->c_grid(), *new_props, eclipseState, grav); + SimulatorFullyImplicitCompressiblePolymer simulator(param, + *grid->c_grid(), + geology, + *new_props, + polymer_props_ad, + rock_comp->isActive() ? rock_comp.get() : 0, + eclipseState, + outputWriter, + deck, + *fis_solver, + grav); + fullReport= simulator.run(simtimer, state); std::cout << "\n\n================ End of simulation ===============\n\n"; - rep.report(std::cout); + fullReport.report(std::cout); if (output) { std::string filename = output_dir + "/walltime.param"; std::fstream tot_os(filename.c_str(),std::fstream::trunc | std::fstream::out); - rep.reportParam(tot_os); + fullReport.reportParam(tot_os); + warnIfUnusedParams(param); } } diff --git a/opm/polymer/fullyimplicit/SimulatorFullyImplicitCompressiblePolymer.cpp b/opm/polymer/fullyimplicit/SimulatorFullyImplicitCompressiblePolymer.cpp index 6cdd93e53..0d1de549e 100644 --- a/opm/polymer/fullyimplicit/SimulatorFullyImplicitCompressiblePolymer.cpp +++ b/opm/polymer/fullyimplicit/SimulatorFullyImplicitCompressiblePolymer.cpp @@ -29,6 +29,8 @@ #include #include +#include + #include #include #include @@ -53,6 +55,11 @@ #include #include +#include +#include +#include +#include +#include #include #include #include @@ -90,14 +97,14 @@ namespace Opm const BlackoilPropsAdInterface& props, const PolymerPropsAd& polymer_props, const RockCompressibility* rock_comp_props, - WellsManager& wells_manager, - PolymerInflowInterface& polymer_inflow, + std::shared_ptr eclipse_state, + EclipseWriter& output_writer, + Opm::DeckConstPtr& deck, NewtonIterationBlackoilInterface& linsolver, const double* gravity); SimulatorReport run(SimulatorTimer& timer, - PolymerBlackoilState& state, - WellState& well_state); + PolymerBlackoilState& state); private: // Data. @@ -115,13 +122,13 @@ namespace Opm const BlackoilPropsAdInterface& props_; const PolymerPropsAd& polymer_props_; const RockCompressibility* rock_comp_props_; - WellsManager& wells_manager_; - const Wells* wells_; - PolymerInflowInterface& polymer_inflow_; + std::shared_ptr eclipse_state_; + EclipseWriter& output_writer_; + Opm::DeckConstPtr& deck_; + NewtonIterationBlackoilInterface& linsolver_; const double* gravity_; // Solvers DerivedGeology geo_; - FullyImplicitCompressiblePolymerSolver solver_; // Misc. data std::vector allcells_; }; @@ -131,18 +138,19 @@ namespace Opm SimulatorFullyImplicitCompressiblePolymer:: SimulatorFullyImplicitCompressiblePolymer(const parameter::ParameterGroup& param, - const UnstructuredGrid& grid, - const DerivedGeology& geo, - const BlackoilPropsAdInterface& props, - const PolymerPropsAd& polymer_props, - const RockCompressibility* rock_comp_props, - WellsManager& wells_manager, - PolymerInflowInterface& polymer_inflow, - NewtonIterationBlackoilInterface& linsolver, - const double* gravity) + const UnstructuredGrid& grid, + const DerivedGeology& geo, + const BlackoilPropsAdInterface& props, + const PolymerPropsAd& polymer_props, + const RockCompressibility* rock_comp_props, + std::shared_ptr eclipse_state, + EclipseWriter& output_writer, + Opm::DeckConstPtr& deck, + NewtonIterationBlackoilInterface& linsolver, + const double* gravity) { - pimpl_.reset(new Impl(param, grid, geo, props, polymer_props, rock_comp_props, wells_manager, polymer_inflow, linsolver, gravity)); + pimpl_.reset(new Impl(param, grid, geo, props, polymer_props, rock_comp_props, eclipse_state, output_writer, deck, linsolver, gravity)); } @@ -150,10 +158,9 @@ namespace Opm SimulatorReport SimulatorFullyImplicitCompressiblePolymer::run(SimulatorTimer& timer, - PolymerBlackoilState& state, - WellState& well_state) + PolymerBlackoilState& state) { - return pimpl_->run(timer, state, well_state); + return pimpl_->run(timer, state); } @@ -165,27 +172,23 @@ namespace Opm const UnstructuredGrid& grid, const DerivedGeology& geo, const BlackoilPropsAdInterface& props, - const PolymerPropsAd& polymer_props, + const PolymerPropsAd& polymer_props, const RockCompressibility* rock_comp_props, - WellsManager& wells_manager, - PolymerInflowInterface& polymer_inflow, + std::shared_ptr eclipse_state, + EclipseWriter& output_writer, + Opm::DeckConstPtr& deck, NewtonIterationBlackoilInterface& linsolver, const double* gravity) : grid_(grid), props_(props), polymer_props_(polymer_props), rock_comp_props_(rock_comp_props), - wells_manager_(wells_manager), - wells_(wells_manager.c_wells()), - polymer_inflow_(polymer_inflow), + eclipse_state_(eclipse_state), + output_writer_(output_writer), + deck_(deck), + linsolver_(linsolver), gravity_(gravity), - geo_(geo), - solver_(grid_, props_, geo_, rock_comp_props, polymer_props, *wells_manager.c_wells(), linsolver) - - /* param.getDefault("nl_pressure_residual_tolerance", 0.0), - param.getDefault("nl_pressure_change_tolerance", 1.0), - param.getDefault("nl_pressure_maxiter", 10), - gravity, */ + geo_(geo) { // For output. output_ = param.getDefault("output", true); @@ -219,10 +222,9 @@ namespace Opm SimulatorReport SimulatorFullyImplicitCompressiblePolymer::Impl::run(SimulatorTimer& timer, - PolymerBlackoilState& state, - WellState& well_state) + PolymerBlackoilState& state) { - + WellStateFullyImplicitBlackoil prev_well_state; // Initialisation. std::vector porevol; if (rock_comp_props_ && rock_comp_props_->isActive()) { @@ -241,134 +243,146 @@ namespace Opm Opm::time::StopWatch step_timer; Opm::time::StopWatch total_timer; total_timer.start(); - double tot_injected[2] = { 0.0 }; - double tot_produced[2] = { 0.0 }; - Opm::Watercut watercut; - watercut.push(0.0, 0.0, 0.0); + std::string tstep_filename = output_dir_ + "/step_timing.txt"; + std::ofstream tstep_os(tstep_filename.c_str()); + + //Main simulation loop. + while (!timer.done()) { + double tot_injected[2] = { 0.0 }; + double tot_produced[2] = { 0.0 }; + Opm::Watercut watercut; + watercut.push(0.0, 0.0, 0.0); #if 0 - // These must be changed for three-phase. - double init_surfvol[2] = { 0.0 }; - double inplace_surfvol[2] = { 0.0 }; - Opm::computeSaturatedVol(porevol, state.surfacevol(), init_surfvol); - Opm::WellReport wellreport; -#endif - std::vector fractional_flows; - std::vector well_resflows_phase; - if (wells_) { - well_resflows_phase.resize((wells_->number_of_phases)*(wells_->number_of_wells), 0.0); -#if 0 - wellreport.push(props_, *wells_, - state.pressure(), state.surfacevol(), state.saturation(), - 0.0, well_state.bhp(), well_state.perfRates()); -#endif - } - std::fstream tstep_os; - if (output_) { - std::string filename = output_dir_ + "/step_timing.param"; - tstep_os.open(filename.c_str(), std::fstream::out | std::fstream::app); - } - // Report timestep and (optionally) write state to disk. - step_timer.start(); - timer.report(std::cout); - if (output_ && (timer.currentStepNum() % output_interval_ == 0)) { - if (output_vtk_) { - outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_); + std::vector fractional_flows; + std::vector well_resflows_phase; + if (wells_) { + well_resflows_phase.resize((wells_->number_of_phases)*(wells_->number_of_wells), 0.0); } - outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_); - } + std::fstream tstep_os; + if (output_) { + std::string filename = output_dir_ + "/step_timing.param"; + tstep_os.open(filename.c_str(), std::fstream::out | std::fstream::app); + } +#endif + // Report timestep and (optionally) write state to disk. - SimulatorReport sreport; + step_timer.start(); + timer.report(std::cout); - bool well_control_passed = !check_well_controls_; - int well_control_iteration = 0; - do { + WellsManager wells_manager(eclipse_state_, + timer.currentStepNum(), + Opm::UgGridHelpers::numCells(grid_), + Opm::UgGridHelpers::globalCell(grid_), + Opm::UgGridHelpers::cartDims(grid_), + Opm::UgGridHelpers::dimensions(grid_), + Opm::UgGridHelpers::beginCellCentroids(grid_), + Opm::UgGridHelpers::cell2Faces(grid_), + Opm::UgGridHelpers::beginFaceCentroids(grid_), + props_.permeability()); + const Wells* wells = wells_manager.c_wells(); + WellStateFullyImplicitBlackoil well_state; + well_state.init(wells, state.blackoilState()); + if (timer.currentStepNum() != 0) { + // Transfer previous well state to current. + well_state.partialCopy(prev_well_state, *wells, prev_well_state.numWells()); + } + //Compute polymer inflow. + std::unique_ptr polymer_inflow_ptr; + if (deck_->hasKeyword("WPOLYMER")) { + if (wells_manager.c_wells() == 0) { + OPM_THROW(std::runtime_error, "Cannot control polymer injection via WPOLYMER without wells."); + } + polymer_inflow_ptr.reset(new PolymerInflowFromDeck(deck_, *wells, Opm::UgGridHelpers::numCells(grid_))); + } else { + polymer_inflow_ptr.reset(new PolymerInflowBasic(0.0*Opm::unit::day, + 1.0*Opm::unit::day, + 0.0)); + } + std::vector polymer_inflow_c(Opm::UgGridHelpers::numCells(grid_)); + polymer_inflow_ptr->getInflowValues(timer.simulationTimeElapsed(), + timer.simulationTimeElapsed() + timer.currentStepLength(), + polymer_inflow_c); + + if (output_ && (timer.currentStepNum() % output_interval_ == 0)) { + if (output_vtk_) { + outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_); + } + outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_); + } + if (output_) { + if (timer.currentStepNum() == 0) { + output_writer_.writeInit(timer); + } + output_writer_.writeTimeStep(timer, state.blackoilState(), well_state.basicWellState()); + } // Run solver. - const double current_time = timer.simulationTimeElapsed(); - double stepsize = timer.currentStepLength(); - polymer_inflow_.getInflowValues(current_time, current_time + stepsize, polymer_inflow_c); solver_timer.start(); - std::vector initial_pressure = state.pressure(); - solver_.step(timer.currentStepLength(), state, well_state, polymer_inflow_c, transport_src); + FullyImplicitCompressiblePolymerSolver solver(grid_, props_, geo_, rock_comp_props_, polymer_props_, *wells_manager.c_wells(), linsolver_); + solver.step(timer.currentStepLength(), state, well_state, polymer_inflow_c, transport_src); // Stop timer and report. solver_timer.stop(); const double st = solver_timer.secsSinceStart(); std::cout << "Fully implicit solver took: " << st << " seconds." << std::endl; stime += st; - sreport.pressure_time = st; - - // Optionally, check if well controls are satisfied. - if (check_well_controls_) { - Opm::computePhaseFlowRatesPerWell(*wells_, - well_state.perfRates(), - fractional_flows, - well_resflows_phase); - std::cout << "Checking well conditions." << std::endl; - // For testing we set surface := reservoir - well_control_passed = wells_manager_.conditionsMet(well_state.bhp(), well_resflows_phase, well_resflows_phase); - ++well_control_iteration; - if (!well_control_passed && well_control_iteration > max_well_control_iterations_) { - OPM_THROW(std::runtime_error, "Could not satisfy well conditions in " << max_well_control_iterations_ << " tries."); - } - if (!well_control_passed) { - std::cout << "Well controls not passed, solving again." << std::endl; - } else { - std::cout << "Well conditions met." << std::endl; - } + // Update pore volumes if rock is compressible. + if (rock_comp_props_ && rock_comp_props_->isActive()) { + initial_porevol = porevol; + computePorevolume(grid_, props_.porosity(), *rock_comp_props_, state.pressure(), porevol); } - } while (!well_control_passed); - // Update pore volumes if rock is compressible. - if (rock_comp_props_ && rock_comp_props_->isActive()) { - initial_porevol = porevol; - computePorevolume(grid_, props_.porosity(), *rock_comp_props_, state.pressure(), porevol); + + double injected[2] = { 0.0 }; + double produced[2] = { 0.0 }; + double polyinj = 0; + double polyprod = 0; + + Opm::computeInjectedProduced(props_, polymer_props_, + state, + transport_src, polymer_inflow_c, timer.currentStepLength(), + injected, produced, + polyinj, polyprod); + tot_injected[0] += injected[0]; + tot_injected[1] += injected[1]; + tot_produced[0] += produced[0]; + tot_produced[1] += produced[1]; + watercut.push(timer.simulationTimeElapsed() + timer.currentStepLength(), + produced[0]/(produced[0] + produced[1]), + tot_produced[0]/tot_porevol_init); + std::cout.precision(5); + const int width = 18; + std::cout << "\nMass balance report.\n"; + std::cout << " Injected reservoir volumes: " + << std::setw(width) << injected[0] + << std::setw(width) << injected[1] << std::endl; + std::cout << " Produced reservoir volumes: " + << std::setw(width) << produced[0] + << std::setw(width) << produced[1] << std::endl; + std::cout << " Total inj reservoir volumes: " + << std::setw(width) << tot_injected[0] + << std::setw(width) << tot_injected[1] << std::endl; + std::cout << " Total prod reservoir volumes: " + << std::setw(width) << tot_produced[0] + << std::setw(width) << tot_produced[1] << std::endl; + if (output_) { + SimulatorReport step_report; + step_report.pressure_time = st; + step_report.total_time = step_timer.secsSinceStart(); + step_report.reportParam(tstep_os); + outputWaterCut(watercut, output_dir_); + } + ++timer; + prev_well_state = well_state; } - - double injected[2] = { 0.0 }; - double produced[2] = { 0.0 }; - double polyinj = 0; - double polyprod = 0; - - Opm::computeInjectedProduced(props_, polymer_props_, - state, - transport_src, polymer_inflow_c, timer.currentStepLength(), - injected, produced, - polyinj, polyprod); - tot_injected[0] += injected[0]; - tot_injected[1] += injected[1]; - tot_produced[0] += produced[0]; - tot_produced[1] += produced[1]; - watercut.push(timer.simulationTimeElapsed() + timer.currentStepLength(), - produced[0]/(produced[0] + produced[1]), - tot_produced[0]/tot_porevol_init); - std::cout.precision(5); - const int width = 18; - std::cout << "\nMass balance report.\n"; - std::cout << " Injected reservoir volumes: " - << std::setw(width) << injected[0] - << std::setw(width) << injected[1] << std::endl; - std::cout << " Produced reservoir volumes: " - << std::setw(width) << produced[0] - << std::setw(width) << produced[1] << std::endl; - std::cout << " Total inj reservoir volumes: " - << std::setw(width) << tot_injected[0] - << std::setw(width) << tot_injected[1] << std::endl; - std::cout << " Total prod reservoir volumes: " - << std::setw(width) << tot_produced[0] - << std::setw(width) << tot_produced[1] << std::endl; - sreport.total_time = step_timer.secsSinceStart(); + // Write final simulation state. if (output_) { - sreport.reportParam(tstep_os); - if (output_vtk_) { outputStateVtk(grid_, state, timer.currentStepNum(), output_dir_); } outputStateMatlab(grid_, state, timer.currentStepNum(), output_dir_); - outputWaterCut(watercut, output_dir_); - tstep_os.close(); + output_writer_.writeTimeStep(timer, state.blackoilState(), prev_well_state.basicWellState()); } total_timer.stop(); - SimulatorReport report; report.pressure_time = stime; report.transport_time = 0.0; diff --git a/opm/polymer/fullyimplicit/SimulatorFullyImplicitCompressiblePolymer.hpp b/opm/polymer/fullyimplicit/SimulatorFullyImplicitCompressiblePolymer.hpp index 11016a262..df868c8af 100644 --- a/opm/polymer/fullyimplicit/SimulatorFullyImplicitCompressiblePolymer.hpp +++ b/opm/polymer/fullyimplicit/SimulatorFullyImplicitCompressiblePolymer.hpp @@ -18,11 +18,12 @@ along with OPM. If not, see . */ -#ifndef OPM_SIMULATORFULLYIMPLICITBLACKOIL_HEADER_INCLUDED -#define OPM_SIMULATORFULLYIMPLICITBLACKOIL_HEADER_INCLUDED +#ifndef OPM_SIMULATORFULLYIMPLICITCOMPRESSIBLEPOLYMER_HEADER_INCLUDED +#define OPM_SIMULATORFULLYIMPLICITCOMPRESSIBLEPOLYMER_HEADER_INCLUDED -#include +#include #include +#include struct UnstructuredGrid; struct Wells; @@ -33,11 +34,13 @@ namespace Opm class BlackoilPropsAdInterface; class RockCompressibility; class DerivedGeology; + class WellStateFullyImplicitBlackoil; class WellsManager; + class EclipseWriter; + class EclipseState; class NewtonIterationBlackoilInterface; class SimulatorTimer; class PolymerBlackoilState; - class WellState; class PolymerPropsAd; class PolymerInflowInterface; struct SimulatorReport; @@ -66,8 +69,9 @@ namespace Opm /// \param[in] props fluid and rock properties /// \param[in] polymer_props polymer properties /// \param[in] rock_comp_props if non-null, rock compressibility properties - /// \param[in] well_manager well manager, may manage no (null) wells - /// \param[in] polymer_inflow polymer influx. + /// \param[in] eclipse_state + /// \param[in] eclipse_writer + /// \param[in] deck /// \param[in] linsolver linear solver /// \param[in] gravity if non-null, gravity vector SimulatorFullyImplicitCompressiblePolymer(const parameter::ParameterGroup& param, @@ -76,8 +80,9 @@ namespace Opm const BlackoilPropsAdInterface& props, const PolymerPropsAd& polymer_props, const RockCompressibility* rock_comp_props, - WellsManager& wells_manager, - PolymerInflowInterface& polymer_inflow, + std::shared_ptr eclipse_state, + EclipseWriter& eclipse_writer, + Opm::DeckConstPtr& deck, NewtonIterationBlackoilInterface& linsolver, const double* gravity); @@ -86,18 +91,16 @@ namespace Opm /// modify the reservoir and well states. /// \param[in,out] timer governs the requested reporting timesteps /// \param[in,out] state state of reservoir: pressure, fluxes - /// \param[in,out] well_state state of wells: bhp, perforation rates /// \return simulation report, with timing data SimulatorReport run(SimulatorTimer& timer, - PolymerBlackoilState& state, - WellState& well_state); + PolymerBlackoilState& state); private: class Impl; // Using shared_ptr instead of scoped_ptr since scoped_ptr requires complete type for Impl. - boost::shared_ptr pimpl_; + std::shared_ptr pimpl_; }; } // namespace Opm -#endif // OPM_SIMULATORFULLYIMPLICITBLACKOIL_HEADER_INCLUDED +#endif // OPM_SIMULATORFULLYIMPLICITCOMPRESSIBLEPOLYMER_HEADER_INCLUDED