Import initial conditions
set_initial_conditions.Rd
Import initial conditions from a scenario/variant result calculation to a new scenario/variant.
Usage
set_initial_conditions(iniParams, cfg = loadConfig())
Arguments
- iniParams
numeric, arguments passed to Edisic for importing initial conditions. See details
- cfg
a config object. Configuration to use. See loadConfig for details
Value
Error code returned by shell.
Details
iniParams
numeric vector of length 5. Each number correspond to:
number of the scenario from which import initial conditions
number of the variant from which import initial conditions (Use "0" for no variant)
Time in seconds of the initial conditions to import (Use "0" for a single permanent simulation with no time steps)
number of the scenario where the initial conditions are exported to
number of the variant where the initial conditions are exported to (Use "0" for no variant)
Examples
if (FALSE) {
# Set up the configuration model
cfg <- cfg_tmp_project()
# Generate the mesh of the model
sic_run_mesh(cfg)
# Run steady simulation for the scenario #1
sic_run_steady(cfg, scenario = 1)
# Import initial condition from scenario 1
# to scenario 1, variant 1 for unsteady flow simulation
set_initial_conditions(c(1, 0, 0, 1, 1), cfg = cfg)
# Run unsteady flow simulation
sic_run_unsteady(cfg, scenario = 1, variant = 1)
# Or initiate and run the same unsteady flow simulation in one call
sic_run_unsteady(cfg, iniParams = c(1, 0, 0, 1, 1))
}