Gareth Kennedy

data scientist and mathematical modeller


MECSim Download

Download MECSim

To run MECSim requires the executable MECSim file and a text input file called "Master.inp".

Pre-compiled versions of the MECSim code are available below for the latest version of MECSim (dated 7/08/2016). All of these executable files were made using gfortran libraries in each operating system/environment. Previous versions of the code are available here.

Templates for the input text file can be downloaded below and the associated paper for MECSim will be available soon. Alternatively you can download the package for each operating system, which includes the MECSim program, a sample of input files and two documentation PDF files.

Windows 10 Download Package
ubuntu 16.04 Download Package

(1) Windows 7 and 8 users should also use the Windows 10 versions.
(2) You may need to disable your firewall to download the executable files directly.
(3) Also you may need to to set windows to allow MECSim.exe to run (will ask when you double-click).

Input files

A list of "Master.inp" templates for the MECSim package are given in the zip file here. In addition to the templates themselves there is also a PDF file which explains the mechanism for each template. Both of these files come with the package downloads below. You will need to copy/rename one of these files to "Master.inp"; for MECsim to use it - MECSim always takes it's input from this file.

The input files found in the templates zip file differ from pre-2015 versions in that the units have changed for surface confined reactions; so old input files will need to be checked or unphysical/unexpected results will occur.


All installations can now be run directly in each operating system. So all the installation required is to copy the executable file (MECSim or MECSim.exe) and the Master.inp text file into a directory.

Running MECSim

To run MECSim in windows: double-click on the MECSim.exe file in your file manager/windows explorer.

For Linux users: open a terminal and run the code using "./MECSim". This is also the command to use for Windows Linux subsystem (used for bash scripts).

All versions will output the results to "MECSimOutput_Pot.txt" which is a text file in the DigiPot format (as default) which can be used in the same way as experimental data output from many machines. An additial log file ("log.txt") is contains summary information from the run, including the MECSim version used and the mechanism details as interpreted by MECSim (useful for error checking).

The "MECSimOutput_Pot.txt" consists of a long header followed by data in order of applied voltage (V), current (A) and time (s). If additional details are specified in the "Master.inp" file then there will also be "EC_Model.tvc" which consists of the time, voltage, current, concentrations (all species at electrode surface) and "EC_Model.fin" which gives the final concentration profile of each chemical species as a function of distance from the electrode (first column).

For some analysis and basic plotting programs see the MECSim tools section here.

Back to top