Pass dummy threshold pressures through simulator to solver.

This commit is contained in:
Atgeirr Flø Rasmussen
2014-08-27 14:23:48 +02:00
parent 4af03dcdb8
commit 3fdfeec10c
4 changed files with 28 additions and 8 deletions

View File

@@ -74,6 +74,7 @@ namespace Opm
/// \param[in] vapoil true for vaporized oil option
/// \param[in] eclipse_state
/// \param[in] output_writer
/// \param[in] threshold_pressures_by_face if nonempty, threshold pressures that inhibit flow
SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
const Grid& grid,
const DerivedGeology& geo,
@@ -84,7 +85,8 @@ namespace Opm
const bool disgas,
const bool vapoil,
std::shared_ptr<EclipseState> eclipse_state,
EclipseWriter& output_writer);
EclipseWriter& output_writer,
const std::vector<double>& threshold_pressures_by_face);
/// Run the simulation.
/// This will run succesive timesteps until timer.done() is true. It will

View File

@@ -83,7 +83,8 @@ namespace Opm
bool has_disgas,
bool has_vapoil,
std::shared_ptr<EclipseState> eclipse_state,
EclipseWriter& output_writer);
EclipseWriter& output_writer,
const std::vector<double>& threshold_pressures_by_face);
SimulatorReport run(SimulatorTimer& timer,
BlackoilState& state);
@@ -118,6 +119,8 @@ namespace Opm
// output_writer
EclipseWriter& output_writer_;
RateConverterType rateConverter_;
// Threshold pressures.
std::vector<double> threshold_pressures_by_face_;
void
computeRESV(const std::size_t step,
@@ -140,11 +143,12 @@ namespace Opm
const bool has_disgas,
const bool has_vapoil,
std::shared_ptr<EclipseState> eclipse_state,
EclipseWriter& output_writer)
EclipseWriter& output_writer,
const std::vector<double>& threshold_pressures_by_face)
{
pimpl_.reset(new Impl(param, grid, geo, props, rock_comp_props, linsolver, gravity, has_disgas, has_vapoil,
eclipse_state, output_writer));
eclipse_state, output_writer, threshold_pressures_by_face));
}
@@ -229,7 +233,8 @@ namespace Opm
const bool has_disgas,
const bool has_vapoil,
std::shared_ptr<EclipseState> eclipse_state,
EclipseWriter& output_writer)
EclipseWriter& output_writer,
const std::vector<double>& threshold_pressures_by_face)
: param_(param),
grid_(grid),
props_(props),
@@ -241,7 +246,8 @@ namespace Opm
has_vapoil_(has_vapoil),
eclipse_state_(eclipse_state),
output_writer_(output_writer),
rateConverter_(props_, std::vector<int>(AutoDiffGrid::numCells(grid_), 0))
rateConverter_(props_, std::vector<int>(AutoDiffGrid::numCells(grid_), 0)),
threshold_pressures_by_face_(threshold_pressures_by_face)
{
// For output.
output_ = param.getDefault("output", true);
@@ -267,6 +273,9 @@ namespace Opm
}
}
template<class T>
SimulatorReport SimulatorFullyImplicitBlackoil<T>::Impl::run(SimulatorTimer& timer,
BlackoilState& state)
@@ -332,6 +341,9 @@ namespace Opm
// Run a single step of the solver.
solver_timer.start();
FullyImplicitBlackoilSolver<T> solver(param_, grid_, props_, geo_, rock_comp_props_, *wells, solver_, has_disgas_, has_vapoil_);
if (!threshold_pressures_by_face_.empty()) {
solver.setThresholdPressures(threshold_pressures_by_face_);
}
solver.step(timer.currentStepLength(), state, well_state);
solver_timer.stop();