Reactive transport in aquatic ecosystems: Rapid model prototyping in the open source software R

View Researcher's Other Codes

Disclaimer: The provided code links for this paper are external links. Science Nest has no responsibility for the accuracy, legality or content of these links. Also, by downloading this code(s), you agree to comply with the terms of use as set out by the author(s) of the code(s).

Authors Karline Soetaert, Filip J R Meysman
Journal/Conference Name Environmental Modelling and Software
Paper Category
Paper Abstract The concentrations of many natural compounds are altered by chemical and biological transformations, and physical processes such as adsorption and transport. Their fate can be predicted using reactive transport models that describe reaction and advective and dispersive movement of these components in their natural environment. Recently a number of software packages have been implemented in the open source software R that allow one to implement reactive transport models. Central to this is the ReacTran R-package, a comprehensive collection of functions for modeling reactive components that may be distributed over multiple phases, whose dynamics are coupled through biological and geochemical reactions, and that are transported in one-, two- or three-dimensional domains with simple geometries. Dedicated solution methods are in R-packages deSolve and rootSolve. The modeling packages facilitate the simulation of reaction and transport of components for spatial scales ranging from micrometers to kilometers and spanning multiple time-scales. As they are influenced in similar ways, the same functions can solve biogeochemical models of the sediment, groundwater, rivers, estuaries, lakes or water columns, experimental setups, or even describe reaction and transport within flat, cylindrical or spherical bodies, such as organisms, aggregates, or the dispersion of individuals on flat surfaces and so on. We illustrate the use of R for reactive transport modeling by three applications spanning several orders of magnitude with respect to spatial and temporal scales. They comprise (1) a model of an experimental flow-through sediment reactor, where fitting so-called breakthrough curves are used to derive sulfate reduction rates in an estuarine sediment, (2) a conservative and reactive tracer addition experiment in a small stream, which implements the concept of river spiraling, and (3) a 2-D and 3-D model that describes oxygen dynamics in the upper layers of the sediment, interspersed with several hotspots of increased reaction intensities. The packages ReacTran, deSolve and rootSolve are implemented in the software R and thus available for all popular platforms (Linux, Windows, Mac). Models implemented using this software are short and easily readable, yet they are efficiently solved. This makes R extremely well suited for rapid model prototyping.
Date of publication 2012
Code Programming Language R

Copyright Researcher 2022