Batch solve the ode of km() for multiple parameters

km_ode2(parameter, savedata = c(NULL, "RDS", "csv"), path = ".")

Arguments

parameter

The parameters list

savedata

Format of the data files for saving. savedata = Null will not save the output data into files.

path

path of the destinated data files for saving. Valid only when savedata != NULL

Value

solution of the ode

Examples

parameter <- list( D_vector = c(1e-5, 1e-2), # m2 s-1, diffusion coefficient in Fick's law k2_vector = c(0, 10 ^ seq(log10(1.0 / (3600.0 * 24.0 * 30.0)), log10(1 / 671.1), len = 3)), # reaction coefficient depth = 10, # m, measurement height difference layer = 6, flux = 10, # flux from the bottom layer, mol m-2 s-1 c0 = 0, t_max = 3.0 * 24.0 * 3600, # simulation time, seconds t_bin = 5 ) grdnt <- km_ode2(parameter, savedata = NULL, path = 'data')
#> 2019-01-16 13:43:44 1e-05 0 ......
#> 2019-01-16 13:43:44 done!
#> 2019-01-16 13:43:44 1e-05 3.85802469135802e-07 ......
#> 2019-01-16 13:43:44 done!
#> 2019-01-16 13:43:44 1e-05 2.39766708852146e-05 ......
#> 2019-01-16 13:43:44 done!
#> 2019-01-16 13:43:44 1e-05 0.00149009089554463 ......
#> 2019-01-16 13:43:44 done!
#> 2019-01-16 13:43:44 0.01 0 ......
#> 2019-01-16 13:43:44 done!
#> 2019-01-16 13:43:44 0.01 3.85802469135802e-07 ......
#> 2019-01-16 13:43:44 done!
#> 2019-01-16 13:43:44 0.01 2.39766708852146e-05 ......
#> 2019-01-16 13:43:44 done!
#> 2019-01-16 13:43:44 0.01 0.00149009089554463 ......
#> 2019-01-16 13:43:44 done!
#> 2019-01-16 13:43:44 - 2019-01-16 13:43:44 = 0.377779006958008