Software

The CTRW MATLAB Toolbox

Version 4.0 (May 2017)

The CTRW MATLAB TOOLBOX contains software to model non-Fickian (as well as Fickian) transport. The software enables both "forward" modeling and "inverse" (best-fit) modeling of experimental data. A variety of inlet and outlet boundary conditions, and types of transport, are implemented.
Version 4.0 (May 2017) contains a User's Guide and accompanying files with easy-to-use format. Several examples clearly demonstrate how to work with the Toolbox in many typical analyses. This version includes improvements to the input files and explanations in the User's Guide, as well as some small improvements to the numerics.

The CTRW Toolbox can be run in Matlab (tested on versions 6.1 and higher) on any platform.

The Toolbox (called "CTRW_v4.0.zip") can be downloaded here (436 KB).

To install the Toolbox:
Unzip all the files contained in the CTRW_v4.0.zip. The directory named CTRW_v4.0 has now been created on your disk. Run MATLAB and change the working directory to CTRW_v4.0.

A detailed, step-by-step "Practical User's Guide" appears in the CTRW_v4.0 directory, as the file "CTRW_v4.0_UserGuide.pdf".

Happy computing!

We are continuing to work on extending the scope of the CTRW toolbox. New features will include explicit treatment of heterogeneous domains, other ways of handling sorption, and transport in multidimensional systems.

Permission to use the CTRW software is hereby granted to non-profit educational and research institutions, for educational and research purposes only, provided and as long as this Notice appears:

THE CTRW SOFTWARE HAS BEEN DEVELOPED AS A TOOL FOR SCIENTIFIC RESEARCH. HENCE IT IS NOT PRESENTED AS ERROR FREE, ACCURATE, COMPLETE, OR USEFUL FOR ANY SPECIFIC APPLICATION, AND THE WEIZMANN INSTITUTE MAKES NO WARRANTY OR REPRESENTATION THERETO.

THE WEIZMANN INSTITUTE SHALL NOT BE LIABLE FOR ANY CLAIMS, DEMANDS, LIABILITIES, COSTS, LOSSES, DAMAGES OR EXPENSE OF WHATSOEVER KIND OR NATURE CAUSED TO OR SUFFERED BY ANY PERSON OR ENTITY THAT DIRECTLY OR INDIRECTLY ARISE OUT OR RESULT FROM THE USE OF THE CTRW SOFTWARE OR IN CONNECTION THEREOF.

For usage by and for commercial entities please contact Brian Berkowitz.

For a detailed overview of CTRW theory and applications see:

  • Berkowitz, B., A. Cortis, M. Dentz and H. Scher. (2006) Modeling non-Fickian transport in geological formations as a continuous time random walk. Reviews of Geophysics, 44, RG2003, doi:10.1029/2005RG000178, 2006.

Published papers that discuss in detail the specific CTRW theory and applications implemented in this Toolbox are cited in the "Practical User's Guide" (in the downloadable CTRW_v4.0.zip file).

A full list of our papers discussing various aspects of CTRW -- theoretical, numerical, and applications to laboratory and field data -- appears in our list of Publications, in the link above.

Older software

Below, older versions of CTRW software remain available. This material is more limited in its application, and we strongly recommend that new users work with the CTRW MATLAB TOOLBOX given above.

The software given below is intended for "specialty" analysis, and corresponds to asymptotic solutions for spatial and temporal profiles as discussed elsewhere (G. Margolin and B. Berkowitz. (2004) Continuous time random walks revisited: First passage time and spatial distributions. Physica A, 334, 46-66, 2004).

The CTRW software can be compiled on either of two platforms:

  1. C source codes can be used with GRACE (read usage instructions).
  2. m files can be used with Matlab.

C source code downloads

Linux /Unix: The file of source codes can be downloaded here (read installation instructions).

Windows: The file of source codes can be downloaded here.

CTRW Functions

Link to definitions of functions, parameters and constants.

  • FPTD (T, β, r; t) - First Passage Time Distribution. T specifies time scale, 0 < β ≤ 2 and -1 < r < 1 (for β > 1, r > 0). t is the time variable.
    Brief explanation ;   Relevant literature (pdf files): 1 (1.15MB) 2 (529KB) 3 (83KB) 
  • CFPTD (T, β, r; t) - Cumulative First Passage Time Distribution. T specifies time scale, 0 < β ≤ 2 and -1 < r < 1 (for β > 1, r > 0). t is the time variable. This distribution is equivalent to the FPTD for the step flux input at the origin.
    Brief explanation ;   Relevant literature (pdf files):  1 (1.15MB)  2 (529KB)  3 (83KB)
  • SCD (R, β, κ; L) - Spatial Concentration Distribution. R specifies length scale, 0 < β ≤ 2 and -1 < κ < 1 (for β > 1, κ > 0). L is the distance from the origin.
    Brief explanation ;   Relevant literature (pdf file): 1 (152KB)
  • CSCD (R, β, κ; L) - Cumulative Spatial Concentration Distribution. R specifies length scale, 0 < β ≤ 2 and -1 < κ < 1 (for β > 1, κ > 0). L is the distance from the origin. This distribution is equivalent to the SCD for the step residence concentration input at the origin.
    Brief explanation ;   Relevant literature (pdf file):  1 (152KB)
  • MEAN (β, C, C1; t) - the spatial mean of the SCD as a function of time t. β, C and C1 are constants of motion.
    Brief explanation ;   Relevant literature (pdf file): 1 (753KB) 
  • ST_D (β, C, C1; t) - the spatial mean of the SCD as a function of time t. β, C and C1 are constants of motion.
    Brief explanation ;   Relevant literature (pdf file):  1 (753KB)
  • conv_beta (T, β, r; t) - convolution of the FPTD function with the injection curve.
    Brief explanation

Other functions

  • ade1d (x, D, u, t) - Calculates 1D solution for the advection-dispersion equation. x specifies transport length, D is dispersion, u is velocity, t is time.
  • epm1d (x, P, u, t) - Calculates 1D solution for the advection-dispersion equation. x specifies transport length, P is Peclet number, u is velocity, t is time.

Matlab "m fies" download

Linux /Unix: The file of source codes can be downloaded here.

Windows: The file of source codes can be downloaded here

Note: The files include more functions than the four functions listed below.
A short explanation appears inside the package.

CTRW Functions

Link to definitions of functions, parameters and constants.

  • FPTD (T, β, r; t) - First Passage Time Distribution. T specifies time scale, 0 < β ≤ 2 and -1 < r < 1 (for β > 1, r > 0). t is the time variable.
    Brief explanation ;   Relevant literature (pdf files): 1 (1.15MB)  2 (529KB)  3 (83KB)
  • CFPTD (T, β, r; t) - Cumulative First Passage Time Distribution. T specifies time scale, 0 < β ≤ 2 and -1 < r < 1 (for β > 1, r > 0). t is the time variable. This distribution is equivalent to the FPTD for the step flux input at the origin.
    Brief explanation ;   Relevant literature (pdf files):  1 (1.15MB)  2 (529KB)  3 (83KB)
  • SCD (R, β, κ; L) - Spatial Concentration Distribution. R specifies length scale, 0 < β ≤ 2 and -1 < κ < 1 (for β > 1, κ > 0). L is the distance from the origin.
    Brief explanation ;   Relevant literature (pdf file): 1 (152KB) 
  • CSCD (R, β, κ; L) - Cumulative Spatial Concentration Distribution. R specifies length scale, 0 < β ≤ 2 and -1 < κ < 1 (for β > 1, κ > 0). L is the distance from the origin. This distribution is equivalent to the SCD for the step residence concentration input at the origin.
    Brief explanation ;   Relevant literature (pdf file): 1 (152KB)