mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Pass dummy threshold pressures through simulator to solver.
This commit is contained in:
parent
4af03dcdb8
commit
3fdfeec10c
@ -187,6 +187,8 @@ try
|
|||||||
|
|
||||||
Opm::DerivedGeology geology(*grid->c_grid(), *new_props, eclipseState, grav);
|
Opm::DerivedGeology geology(*grid->c_grid(), *new_props, eclipseState, grav);
|
||||||
|
|
||||||
|
std::vector<double> threshold_pressures;// = getThresholdPressures();
|
||||||
|
|
||||||
SimulatorFullyImplicitBlackoil<UnstructuredGrid> simulator(param,
|
SimulatorFullyImplicitBlackoil<UnstructuredGrid> simulator(param,
|
||||||
*grid->c_grid(),
|
*grid->c_grid(),
|
||||||
geology,
|
geology,
|
||||||
@ -197,7 +199,8 @@ try
|
|||||||
deck->hasKeyword("DISGAS"),
|
deck->hasKeyword("DISGAS"),
|
||||||
deck->hasKeyword("VAPOIL"),
|
deck->hasKeyword("VAPOIL"),
|
||||||
eclipseState,
|
eclipseState,
|
||||||
outputWriter);
|
outputWriter,
|
||||||
|
threshold_pressures);
|
||||||
|
|
||||||
std::cout << "\n\n================ Starting main simulation loop ===============\n"
|
std::cout << "\n\n================ Starting main simulation loop ===============\n"
|
||||||
<< std::flush;
|
<< std::flush;
|
||||||
|
@ -225,6 +225,8 @@ try
|
|||||||
|
|
||||||
Opm::DerivedGeology geology(*grid, *new_props, eclipseState, grav);
|
Opm::DerivedGeology geology(*grid, *new_props, eclipseState, grav);
|
||||||
|
|
||||||
|
std::vector<double> threshold_pressures;// = getThresholdPressures();
|
||||||
|
|
||||||
SimulatorFullyImplicitBlackoil<Dune::CpGrid> simulator(param,
|
SimulatorFullyImplicitBlackoil<Dune::CpGrid> simulator(param,
|
||||||
*grid,
|
*grid,
|
||||||
geology,
|
geology,
|
||||||
@ -235,7 +237,8 @@ try
|
|||||||
deck->hasKeyword("DISGAS"),
|
deck->hasKeyword("DISGAS"),
|
||||||
deck->hasKeyword("VAPOIL"),
|
deck->hasKeyword("VAPOIL"),
|
||||||
eclipseState,
|
eclipseState,
|
||||||
outputWriter);
|
outputWriter,
|
||||||
|
threshold_pressures);
|
||||||
|
|
||||||
std::cout << "\n\n================ Starting main simulation loop ===============\n"
|
std::cout << "\n\n================ Starting main simulation loop ===============\n"
|
||||||
<< std::flush;
|
<< std::flush;
|
||||||
|
@ -74,6 +74,7 @@ namespace Opm
|
|||||||
/// \param[in] vapoil true for vaporized oil option
|
/// \param[in] vapoil true for vaporized oil option
|
||||||
/// \param[in] eclipse_state
|
/// \param[in] eclipse_state
|
||||||
/// \param[in] output_writer
|
/// \param[in] output_writer
|
||||||
|
/// \param[in] threshold_pressures_by_face if nonempty, threshold pressures that inhibit flow
|
||||||
SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
|
SimulatorFullyImplicitBlackoil(const parameter::ParameterGroup& param,
|
||||||
const Grid& grid,
|
const Grid& grid,
|
||||||
const DerivedGeology& geo,
|
const DerivedGeology& geo,
|
||||||
@ -84,7 +85,8 @@ namespace Opm
|
|||||||
const bool disgas,
|
const bool disgas,
|
||||||
const bool vapoil,
|
const bool vapoil,
|
||||||
std::shared_ptr<EclipseState> eclipse_state,
|
std::shared_ptr<EclipseState> eclipse_state,
|
||||||
EclipseWriter& output_writer);
|
EclipseWriter& output_writer,
|
||||||
|
const std::vector<double>& threshold_pressures_by_face);
|
||||||
|
|
||||||
/// 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
|
||||||
|
@ -83,7 +83,8 @@ namespace Opm
|
|||||||
bool has_disgas,
|
bool has_disgas,
|
||||||
bool has_vapoil,
|
bool has_vapoil,
|
||||||
std::shared_ptr<EclipseState> eclipse_state,
|
std::shared_ptr<EclipseState> eclipse_state,
|
||||||
EclipseWriter& output_writer);
|
EclipseWriter& output_writer,
|
||||||
|
const std::vector<double>& threshold_pressures_by_face);
|
||||||
|
|
||||||
SimulatorReport run(SimulatorTimer& timer,
|
SimulatorReport run(SimulatorTimer& timer,
|
||||||
BlackoilState& state);
|
BlackoilState& state);
|
||||||
@ -118,6 +119,8 @@ namespace Opm
|
|||||||
// output_writer
|
// output_writer
|
||||||
EclipseWriter& output_writer_;
|
EclipseWriter& output_writer_;
|
||||||
RateConverterType rateConverter_;
|
RateConverterType rateConverter_;
|
||||||
|
// Threshold pressures.
|
||||||
|
std::vector<double> threshold_pressures_by_face_;
|
||||||
|
|
||||||
void
|
void
|
||||||
computeRESV(const std::size_t step,
|
computeRESV(const std::size_t step,
|
||||||
@ -140,11 +143,12 @@ namespace Opm
|
|||||||
const bool has_disgas,
|
const bool has_disgas,
|
||||||
const bool has_vapoil,
|
const bool has_vapoil,
|
||||||
std::shared_ptr<EclipseState> eclipse_state,
|
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,
|
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_disgas,
|
||||||
const bool has_vapoil,
|
const bool has_vapoil,
|
||||||
std::shared_ptr<EclipseState> eclipse_state,
|
std::shared_ptr<EclipseState> eclipse_state,
|
||||||
EclipseWriter& output_writer)
|
EclipseWriter& output_writer,
|
||||||
|
const std::vector<double>& threshold_pressures_by_face)
|
||||||
: param_(param),
|
: param_(param),
|
||||||
grid_(grid),
|
grid_(grid),
|
||||||
props_(props),
|
props_(props),
|
||||||
@ -241,7 +246,8 @@ namespace Opm
|
|||||||
has_vapoil_(has_vapoil),
|
has_vapoil_(has_vapoil),
|
||||||
eclipse_state_(eclipse_state),
|
eclipse_state_(eclipse_state),
|
||||||
output_writer_(output_writer),
|
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.
|
// For output.
|
||||||
output_ = param.getDefault("output", true);
|
output_ = param.getDefault("output", true);
|
||||||
@ -267,6 +273,9 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
SimulatorReport SimulatorFullyImplicitBlackoil<T>::Impl::run(SimulatorTimer& timer,
|
SimulatorReport SimulatorFullyImplicitBlackoil<T>::Impl::run(SimulatorTimer& timer,
|
||||||
BlackoilState& state)
|
BlackoilState& state)
|
||||||
@ -332,6 +341,9 @@ namespace Opm
|
|||||||
// Run a single step of the solver.
|
// Run a single step of the solver.
|
||||||
solver_timer.start();
|
solver_timer.start();
|
||||||
FullyImplicitBlackoilSolver<T> solver(param_, grid_, props_, geo_, rock_comp_props_, *wells, solver_, has_disgas_, has_vapoil_);
|
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.step(timer.currentStepLength(), state, well_state);
|
||||||
solver_timer.stop();
|
solver_timer.stop();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user