MAP Logo

Materials Algorithms Project
Program Library

[A logo showing the University of Cambridge Crest]


  1. Provenance of code.
  2. Purpose of code.
  3. Specification.
  4. Description of program's operation.
  5. References.
  6. Parameter descriptions.
  7. Error indicators.
  8. Accuracy estimate.
  9. Any additional information.
  10. Example of code
  11. Auxiliary routines required.
  12. Keywords.
  13. Download source code.
  14. Links.

Provenance of Source Code

Eun Ju Song
Computational Metallurgy Laboratory,
Graduate Institute of Ferrous Technology ,
Pohang University of Science and Technology,
Pohang, Republic of Korea.


The program was modified by David Bombac in May 2015, after he and Chris Hulme-Smith spotted a problem to some uninitialised array elements that caused the results to become NaN (not a number). This did not happen on Windows as gfortran treats the array elements differently there than it does on Linux. David has rewritten the program in Fortran 90 to avoid this problem and optimise the code slightly and says he has tested it on Windows and Linux and it works as it should. I have attached the new file in case you want to upload it to MAP.

David recommends compiling with the command “gfortran -O3 -static [name of source code] -o [name of binary to be created]". The -O3 (letter O, not digit 0) optimises the binary to speed up the program and the -static builds any required libraries into the binary so that it may be used on any system even if there are no external fortran libraries present.

Added to MAP: March 2013. Modified March 2014 for compatibility with gfortran compiler. Modified May 2015 to correct uninitialized arrays.

Top | Next


Simulation of the thermal desorption spectrum of hydrogen in ferrite, acconting for both diffusion and trapping phenomena. The model is capable of treating more than one trap.

Top | Next | Prev


Language: FORTRAN
Product form: Compaq visual Fortran

Complete program.

Top | Next | Prev


This program simulates the charging, aging and releasing of hydrogen by implementaing both diffusion and trapping simultaneously. It increases the temperature during the desorption with the given heating rate. Maximum three kinds of traps can be assumed with different binding energies and trap densities. Users can choose the model for trapping, local equilibrium or kinetic model.

Top | Next | Prev


  1. E. J. Song, H. K. D. H. Bhadeshia, D. W. Suh, Computational Materials Science 79 (2013) 36-44.

Top | Next | Prev


Input parameters

The input variables are described in the input file, in.txt

Output parameters

It generates three output files, charging.txt, aging.txt, desorption.txt and RESULT.txt. In charging.txt, aging.txt, desorption.txt, the specimen depth is shown in the first line, and the concentration of lattice, trap1, trap2, trap3 at that depth are shown in the second, third, and forth lines, respectively. In RESULT.txt file, the temperature and the total hydrogen concentraion in ppm are shown at each desorption time.

Top | Next | Prev

Error Indicators


Top | Next | Prev


No information supplied.

Top | Next | Prev

Further Comments


Top | Next | Prev


1. Program text

Complete program.

2. Program data

See inputfile, in.txt.

3. Program results

See outputfile,  charging.txt, aging.txt, desorp.txt, RESULT.txt.

Top | Next | Prev

Auxiliary Routines


Top | Next | Prev


hydrogen thermal desorption, trapping, ferrite

Top | Next | Prev


Download source code (2013)

Download source code (2014)

Download source code (2015)

Top | Prev