RunFlow: RunFlow: Run an Open Porous Media reservoir simulation

Description Usage Arguments Details Value Author(s) References

View source: R/02_running.R

Description

This function deals with the details of running a reservoir simulation model. One may specify the model deck, the output location, the executable type and version, and the computing resources used to run the job.

Usage

1
2
3
RunFlow(decknames, basedir = "tmp", sim_exec = "flow", restartcase = NULL,
  sim_version = "stable", queue = "background", overwrite = NULL,
  wait = FALSE)

Arguments

decknames

A character vector with the name and full path to one or more Eclipse style simulation input decks.

basedir

The path to the base directory of a simulation project. The default is a subdirectory of the current directory called "tmp". If a project directory structure does not exist, one will be created.

sim_exec

one of ("flow", "flow_mpi", "flow_polymer", "flow_sequential", "flow_solvent")

restartcase

The base name of the deck that this is a restart from. The output will be put into the base directory. The default is NULL.

sim_version

one of c("stable", "latest")

queue

one of c("background", "PBS_queue_name", "AWS"). Currently only "background" is functional.

overwrite

is a logical with a default of NULL. TRUE will always run the case. FALSE will only run the case if the .UNSMRY does not exist. NULL will run the case if the deck (.DATA) file is newer than the .UNSMRY file.

wait

A logical indicating whether to wait for the model to finish before proceeding. The default is FALSE, i.e. to run models asynchronously.

Details

A subdirectory of the the outdir with the base name of the input deck will be created, keeping each simulation run in its own directory.

The stable executable is assumed to be in /usr/bin and the latest version in /usr/bin/local. This is consistent with "stable" being the version installed from binaries and "latest" being compiled locally on a Ubuntu machine.

Only the "background" queue currently works. Submission to a PBS queue is a short term goal and submission to an AWS batch queue is a longer term goal.

It might be desirable to look at the deckname file to determine which executable is appropriate (i.e. which keywords are in the deck).

This package is linux specific, at this point, becaue I don't havae a Windows or Mac machine to work out the kinks.

Value

The function uses system2 to execute the simulation run. Standard error and standard out are redirected to a file. A non-zero return indicates an error. The function's purpose is the side effect of submitting a job to run somewhere.

Author(s)

George Williams

References

The Open Porous Media initiative


gerwathome/runOPM documentation built on May 20, 2019, 4:05 p.m.