Solve the ordinary differential equation of km

km_ode(D_vector, k2_vector, flux, depth, layer, t_max, t_bin, c0)

Arguments

D_vector

Diffusion coefficient. It is a single-element vector..

k2_vector

Chemical reaction coefficient. It is a single-element vector.

flux

flux from the bottom layer

depth

the differential height

layer

number of layers

t_max

simulation time in sec.

t_bin

time bins

c0

initial ambient concentration

Value

a list with a dataframe for the ode solution and a datafrme for the ratio of the concentration for each layer to the bottom layer.

Examples

calckm <- km_ode(1, 0, 10, 10, 50, 24, 10, 0)
#> 2019-01-16 13:43:43 1 0 ......
#> 2019-01-16 13:43:43 done!