mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Added parameters "dx", "dy", "dz" and "injection_rate_per_day".
This commit is contained in:
parent
40eb6bc889
commit
31e84a25cd
@ -195,7 +195,10 @@ main(int argc, char** argv)
|
|||||||
const int nx = param.getDefault("nx", 100);
|
const int nx = param.getDefault("nx", 100);
|
||||||
const int ny = param.getDefault("ny", 100);
|
const int ny = param.getDefault("ny", 100);
|
||||||
const int nz = param.getDefault("nz", 1);
|
const int nz = param.getDefault("nz", 1);
|
||||||
grid.reset(new Opm::Grid(nx, ny, nz));
|
const int dx = param.getDefault("dx", 1.0);
|
||||||
|
const int dy = param.getDefault("dy", 1.0);
|
||||||
|
const int dz = param.getDefault("dz", 1.0);
|
||||||
|
grid.reset(new Opm::Grid(nx, ny, nz, dx, dy, dz));
|
||||||
// Rock and fluid init.
|
// Rock and fluid init.
|
||||||
props.reset(new Opm::IncompPropertiesBasic(param, grid->c_grid()->dimensions, grid->c_grid()->number_of_cells));
|
props.reset(new Opm::IncompPropertiesBasic(param, grid->c_grid()->dimensions, grid->c_grid()->number_of_cells));
|
||||||
// Setting polydata defaults to mimic a simple example case.
|
// Setting polydata defaults to mimic a simple example case.
|
||||||
@ -236,6 +239,9 @@ main(int argc, char** argv)
|
|||||||
// code expects a scalar sw, not both sw and so.
|
// code expects a scalar sw, not both sw and so.
|
||||||
std::vector<double> reorder_sat(grid->c_grid()->number_of_cells);
|
std::vector<double> reorder_sat(grid->c_grid()->number_of_cells);
|
||||||
double flow_per_sec = 0.1*tot_porevol/Opm::unit::day;
|
double flow_per_sec = 0.1*tot_porevol/Opm::unit::day;
|
||||||
|
if (param.has("injection_rate_per_day")) {
|
||||||
|
flow_per_sec = param.get<double>("injection_rate_per_day")/Opm::unit::day;
|
||||||
|
}
|
||||||
std::vector<double> src (grid->c_grid()->number_of_cells, 0.0);
|
std::vector<double> src (grid->c_grid()->number_of_cells, 0.0);
|
||||||
src[0] = flow_per_sec;
|
src[0] = flow_per_sec;
|
||||||
src[grid->c_grid()->number_of_cells - 1] = -flow_per_sec;
|
src[grid->c_grid()->number_of_cells - 1] = -flow_per_sec;
|
||||||
|
Loading…
Reference in New Issue
Block a user