There is a newer version of the record available.

Published April 6, 2023 | Version v 1.1
Software Open

GDIFF: a Finite Difference code for the calculation of multicomponent diffusion in garnet

  • 1. Johannes Gutenberg Universität Mainz


Contact person:

  • 1. Johannes Gutenberg Universität Mainz


GDIFF is set of MATLAB routines that can be used to calculate the concentration profiles of garnet. GDIFF utilizes the conservative, finite-difference method for the solution of the diffusion problem in 1 dimension (also for spherical or cylindrical coordinates). The code has been written in general form using functions that would allow the more transparent presentation of the results. More technical details are included in the documentation. The software and the present documentation are provided free of charge. At this point, all the provided routines have been tested for compatibility with OCTAVE.


The software is functional in MATLAB/OCTAVE



Files (884.5 kB)

Name Size Download all
878.4 kB Preview Download
6.2 kB Preview Download

Additional details


  • Burg, J.-P., & Moulas, E. (2022). Cooling-rate constraints from metapelites across two inverted metamorphic sequences of the Alpine-Himalayan belt; evidence for viscous heating. Journal of Structural Geology, 156, 104536.
  • Chakraborty, S., & Ganguly, J. (1991). Compositional Zoning and Cation Diffusion in Garnets. In J. Ganguly (Ed.), Diffusion, Atomic Ordering, and Mass Transport: Selected Topics in Geochemistry (pp. 120–175). Springer US.
  • Chakraborty, S., & Ganguly, J. (1992). Cation diffusion in aluminosilicate garnets: Experimental determination in spessartine-almandine diffusion couples, evaluation of effective binary diffusion coefficients, and applications. Contributions to Mineralogy and Petrology, 111(1), 74–86.
  • Cheng, H., Bloch, E. M., Moulas, E., & Vervoort, J. D. (2020). Reconciliation of discrepant U–Pb, Lu–Hf, Sm–Nd, Ar–Ar and U–Th/He dates in an amphibolite from the Cathaysia Block in Southern China. Contributions to Mineralogy and Petrology, 175(1), 4.
  • Dabrowski, M., Krotkiewski, M., & Schmid, D. W. (2008). MILAMIN: MATLAB-based finite element method solver for large problems. Geochemistry, Geophysics, Geosystems, 9(4).
  • Lasaga, A. C. (1979). Multicomponent exchange and diffusion in silicates. Geochimica et Cosmochimica Acta, 43(4), 455–469.