Learn R Programming

ReacTran (version 1.4.3.1)

ReacTran-package: Reactive transport modelling in 1D, 2D and 3D

Description

R-package ReacTran contains routines that enable the development of reactive transport models in aquatic systems (rivers, lakes, oceans), porous media (floc aggregates, sediments,...) and even idealized organisms (spherical cells, cylindrical worms,...).

The geometry of the model domain is either one-dimensional, two-dimensional or three-dimensional.

The package contains:

  • Functions to setup a finite-difference grid (1D or 2D)

  • Functions to attach parameters and properties to this grid (1D or 2D)

  • Functions to calculate the advective-diffusive transport term over the grid (1D, 2D, 3D)

  • Utility functions

Arguments

Details

Package: ReacTran
Type: Package
Version: 1.4.3
Date: 2017-08-14
License: GNU Public License 2 or above

See Also

Functions ode.1D, ode.2D, ode.3D from package deSolve to integrate the reactive-transport model

Functions steady.1D, steady.2D, steady.3D from package rootSolve to find the steady-state solution of the reactive-transport model

tran.1D, tran.2D, tran.3D for a discretisation of the general transport equations

tran.volume.1D for discretisation of the 1-D transport equations using finite volumes

tran.cylindrical, tran.spherical for a discretisation of 3-D transport equations in cylindrical and spherical coordinates

tran.polar, for a discretisation of 2-D transport equations in polar coordinates

setup.grid.1D, setup.grid.2D for the creation of grids in 1-D and in 2-D

setup.prop.1D, setup.prop.2D for defining properties on these grids.

Examples

Run this code
# NOT RUN {
## show examples (see respective help pages for details)
## 1-dimensional transport
example(tran.1D)
example(tran.volume.1D)

## 2-dimensional transport
example(tran.2D)
example(tran.polar)

## 3-dimensional transport
example(tran.3D)
example(tran.cylindrical)
example(tran.spherical)

## open the directory with documents
browseURL(paste(system.file(package="ReacTran"), "/doc", sep=""))

## open the directory with fortran codes of the transport functions
browseURL(paste(system.file(package="ReacTran"), "/doc/fortran", sep=""))

## show package vignette with how to use ReacTran and how to solve PDEs
## + source code of the vignettes
vignette("ReacTran")
vignette("PDE")
edit(vignette("ReacTran"))

## a directory with fortran implementations of the transport
browseURL(paste(system.file(package="ReacTran"), "/doc/fortran", sep=""))
# }

Run the code above in your browser using DataLab