Skip to content
Snippets Groups Projects
Commit 8e65b791 authored by Johannes Boog's avatar Johannes Boog
Browse files

[docs] examples polished

    unused examples removed
    examples that are described in vignettes removed
parent ccf5e97e
No related branches found
No related tags found
1 merge request!31[docs] examples polished
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)
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)
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)
...@@ -13,9 +13,9 @@ library(r2ogs6) ...@@ -13,9 +13,9 @@ library(r2ogs6)
# Then we can create a simulation object. # Then we can create a simulation object.
tmpdir <- tempdir()
ogs6_obj <- OGS6$new(sim_name = "flow_free_expansion", ogs6_obj <- OGS6$new(sim_name = "flow_free_expansion",
sim_path = "D:/OGS_Sim/") sim_path = tmpdir)
#===== Read in benchmark file ===== #===== Read in benchmark file =====
...@@ -24,10 +24,8 @@ ogs6_obj <- OGS6$new(sim_name = "flow_free_expansion", ...@@ -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" prj_path <- "inst/extdata/benchmarks/flow_free_expansion/flow_free_expansion.prj"
# Read in the benchmark into our simulation object # 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 ===== #===== Run simulation =====
e <- ogs6_run_simulation(ogs6_obj, write_logfile = FALSE) e <- ogs6_run_simulation(ogs6_obj, write_logfile = FALSE)
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
<name>concentration</name> <name>concentration</name>
<properties> <properties>
<property> <property>
<name>molecular_diffusion</name> <name>pore_diffusion</name>
<type>Constant</type> <type>Constant</type>
<value>2e-9</value> <value>2e-9</value>
</property> </property>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment