From 8e65b791b6722951758c84c757c832958d0ef5a0 Mon Sep 17 00:00:00 2001 From: Johannes Boog <johannesboog@yahoo.de> Date: Mon, 18 Oct 2021 17:03:12 +0200 Subject: [PATCH] [docs] examples polished unused examples removed examples that are described in vignettes removed --- inst/examples/Theis_problem/theis_problem.R | 33 ------------- .../Theis_well_pumping/theis_well_pumping.R | 34 -------------- inst/examples/workflow_demos/ensemble.R | 46 ------------------- .../workflow_demos/read_from_benchmark.R | 8 ++-- .../benchmarks/theis_well_pumping/theis.prj | 2 +- 5 files changed, 4 insertions(+), 119 deletions(-) delete mode 100644 inst/examples/Theis_problem/theis_problem.R delete mode 100644 inst/examples/Theis_well_pumping/theis_well_pumping.R delete mode 100644 inst/examples/workflow_demos/ensemble.R diff --git a/inst/examples/Theis_problem/theis_problem.R b/inst/examples/Theis_problem/theis_problem.R deleted file mode 100644 index a27e287..0000000 --- a/inst/examples/Theis_problem/theis_problem.R +++ /dev/null @@ -1,33 +0,0 @@ - -library(r2ogs6) - - -#===== Set up simulation object ===== - - -# First make sure you're ready to go by setting r2ogs6.default_ogs_bin_path. -# You can do this by commenting out the line below and modifying the path to -# fit your system. - -# options("r2ogs6.default_ogs_bin_path" = "your_path_here") - - -# Then we can create a simulation object. - -ogs6_obj <- OGS6$new(sim_name = "axisym_theis", - sim_path = "D:/OGS_Sim/") - - -#===== Read in benchmark file ===== - -# Modify the prj_path depending on where you saved the benchmark file. -prj_path <- "inst/extdata/benchmarks/AxiSymTheis/axisym_theis.prj" - -# Read in the benchmark into our simulation object -read_in_prj(ogs6_obj, prj_path, T) - - -#===== Run simulation ===== - - -e <- run_simulation(ogs6_obj) diff --git a/inst/examples/Theis_well_pumping/theis_well_pumping.R b/inst/examples/Theis_well_pumping/theis_well_pumping.R deleted file mode 100644 index d40df19..0000000 --- a/inst/examples/Theis_well_pumping/theis_well_pumping.R +++ /dev/null @@ -1,34 +0,0 @@ - -library(r2ogs6) - - -#===== Set up simulation object ===== - - -# First make sure you're ready to go by setting r2ogs6.default_ogs_bin_path. -# You can do this by commenting out the line below and modifying the path to -# fit your system. - -# options("r2ogs6.default_ogs_bin_path" = "your_path_here") - - -# Then we can create a simulation object. - -ogs6_obj <- OGS6$new(sim_name = "theis", - sim_id = 1, - sim_path = "D:/OGS_Sim/") - - -#===== Read in benchmark file ===== - -# Modify the prj_path depending on where you saved the benchmark file. -prj_path <- "inst/extdata/benchmarks/theis_well_pumping/theis.prj" - -# Read in the benchmark into our simulation object -read_in_prj(ogs6_obj, prj_path) - - -#===== Run simulation ===== - - -e <- run_simulation(ogs6_obj) diff --git a/inst/examples/workflow_demos/ensemble.R b/inst/examples/workflow_demos/ensemble.R deleted file mode 100644 index c306bc5..0000000 --- a/inst/examples/workflow_demos/ensemble.R +++ /dev/null @@ -1,46 +0,0 @@ - -library(r2ogs6) - - -#===== Set up simulation object ===== - - -# First make sure you're ready to go by setting r2ogs6.default_ogs_bin_path. -# You can do this by commenting out the line below and modifying the path to -# fit your system. - -# options("r2ogs6.default_ogs_bin_path" = "your_path_here") - - -# Then we can create a simulation object. - -ogs6_obj <- OGS6$new(sim_name = "my_sim", - sim_id = 1, - sim_path = "D:/OGS_Sim/") - - -#===== Read in benchmark file ===== - - -# Modify the prj_path depending on where you saved the benchmark file. -prj_path <- "inst/extdata/flow_free_expansion/flow_free_expansion.prj" - -# Read in the benchmark into our simulation object -read_in_prj(ogs6_obj, prj_path) - - -#===== Create ensemble from simulation object ===== - - -ogs6_ens <- OGS6_Ensemble$new( - ogs6_obj = ogs6_obj, - parameters = list(list(ogs6_obj$parameters[[2]]$value, c(0.2, 0.3, 0.4))) -) - - -#===== Run simulation ===== - - -# Should work on machines with more RAM -ogs6_ens$run_simulation(parallel = TRUE) - diff --git a/inst/examples/workflow_demos/read_from_benchmark.R b/inst/examples/workflow_demos/read_from_benchmark.R index b067d2a..c2259e1 100644 --- a/inst/examples/workflow_demos/read_from_benchmark.R +++ b/inst/examples/workflow_demos/read_from_benchmark.R @@ -13,9 +13,9 @@ library(r2ogs6) # Then we can create a simulation object. - +tmpdir <- tempdir() ogs6_obj <- OGS6$new(sim_name = "flow_free_expansion", - sim_path = "D:/OGS_Sim/") + sim_path = tmpdir) #===== Read in benchmark file ===== @@ -24,10 +24,8 @@ ogs6_obj <- OGS6$new(sim_name = "flow_free_expansion", prj_path <- "inst/extdata/benchmarks/flow_free_expansion/flow_free_expansion.prj" # Read in the benchmark into our simulation object -read_in_prj(ogs6_obj, prj_path) +read_in_prj(ogs6_obj, prj_path, read_in_gml = T) #===== Run simulation ===== - - e <- ogs6_run_simulation(ogs6_obj, write_logfile = FALSE) diff --git a/inst/extdata/benchmarks/theis_well_pumping/theis.prj b/inst/extdata/benchmarks/theis_well_pumping/theis.prj index d4653df..b7877db 100644 --- a/inst/extdata/benchmarks/theis_well_pumping/theis.prj +++ b/inst/extdata/benchmarks/theis_well_pumping/theis.prj @@ -34,7 +34,7 @@ <name>concentration</name> <properties> <property> - <name>molecular_diffusion</name> + <name>pore_diffusion</name> <type>Constant</type> <value>2e-9</value> </property> -- GitLab