solve_numerically {isobxr} | R Documentation |
Numerically solve stable isotope box models
Description
A numerical solver of the system of ordinary differential equations (ODES),
describing the evolution of stable isotope ratios in all boxes of a system.
Not intended for manual use.
The numerical solver uses the deSolve::ode function
to integrate the stable isotopes ratios over time in each box. It allows the
calculation of the evolution of stable isotope ratio in the case of
unbalanced outward and inward fluxes of element X in a given box
resulting in the accumulation or loss of element X.
Usage
solve_numerically(IN, paths, to_DIGEST_csv = FALSE, return_results = FALSE)
Arguments
IN |
input data, edited by |
paths |
paths object edited by |
to_DIGEST_csv |
if TRUE, edits csv outputs to DIGEST directory |
return_results |
if TRUE, results returned as a list of R objects. |
Value
Numerically determined evolution of stable isotope compositions
and masses of element X in all boxes over the run duration as specified in INPUT file.
Run outputs are stored in a temporary directory and not exported by solve_numerically
.
The outputs of the run are stored in the rds output file in the SERIES directory
with the following file name structure:
SERIES_ID + RUN_n.rds
Optional csv outputs to DIGEST directory are as follows
OUT data file storing initial and final size and delta values in all boxes.
(file name structure: out_1_N_OUT + RUN name + .csv)evS data file storing the evolution with time of the sizes (masses of element X) of all boxes.
(file name structure: out_2_N_evS + RUN name + .csv)evD data file storing the evolution with time of the delta values in all boxes.
(file name structure: out_3_N_evD + RUN name + .csv)