Getting Started
Linux
-
Step 1: Compilers and Dependent Libraries
Thermochimica requires a Fortran compiler and is regularly built using the GNU gfortran compiler. The GNU compilers can be downloaded for free (click here). Or type the following command.
sudo apt-get install gfortran
In addition, one requires the LAPACK linear algebra library, which can be downloaded here. Or type the following command.
sudo apt install libblas-dev liblapack-dev
If you are using a Mac, you can install Brew to manage and install dependencies (click here).
-
Step 2: Download Source Code from Github
Thermochimica is maintained on a Github repository (click here). One can download the package directly from Github, but it is recommended to pull directly from your terminal, which is convenient to update the source code as it is continuously being developed.
-
Step 3: Building the Code and Running Tests
Once you have a functioning Fortran compiler, LAPACK library, and pulled the source code from Github, you are ready to use Thermochimica. To build the software, you should first ensure that the Makefile is compatible with your operating system and compiler options. The default options in the Makefile are for a Linux operating system using the gfortran compiler but it will automatically switch compiler options if a Mac operating system is detected. If you are using an Intel compiler, you will need to change your compiler options in the Makefile.
After ensuring that the Makefile is suitable, simply type "make" in the thermochimica directory to build the code. To build the code in addition to tests and documentation, type "make all" or just "make test" to just build the test suite. Also, note that Thermochimica can be built with CMake.
To ensure that the software is installed and operating correctly, it is recommended to run a series of tests. After the tests have been compiled, type "./runtests" in the Thermochimica directory to run the test suite.
-
Step 4: Running the Code
Once Thermochimica has been downloaded and all tests are executing successfully, you are ready to run the code. As previously mentioned, Thermochimica was originally intended for direct integration into other multi-physics codes. A test main file is available in the "test" subdirectory with the filename "Thermo.F90". In the source file, you will see a number of input variables with corresponding units and the path to a data-file. You can perform point calculations using this as a template, which will require you to recompile the code. A user interface is being planned in a near-term development cycle.
On the Documentation page, there are links to the User Manual and Tutorial Manual.
Windows
-
Step 1: Compilers and Dependent Libraries
1. Get msys2 from here and install it, then run it.
2. Use msys2's package manager (pacman) to install the following packages (just copy each line for full command).
pacman -S mingw-w64-x86_64-make
pacman -S git
pacman -S mingw-w64-x86_64-lapack
pacman -S mingw-w64-x86_64-gcc-fortran
3. Add msys2's bin to your PATH. This can be done temporarily by using export.
export PATH=<msys2-directory>/mingw64/bin:$PATH
Where <msys2-directory> is the location of your msys2 installation from step 1, for example, if you installed in C: use the following:
export PATH=/c/msys64/mingw64/bin:$PATH
However, your installation of msys2/pacman may have placed these packages in a different directory. Check that the executable mingw32-make.exe exists in the directory you add to the PATH before running this command.
For each new terminal, you will have to complete this step again. Alternatively, you can add the export command to your .bashrc in the home directory of your msys2 terminal. -
Step 2: Download Source Code from Github
4. Thermochimica is maintained on a Github repository (click here). One can download the package directly from Github, but it is recommended to pull directly from your terminal, which is convenient to update the source code as it is continuously being developed. For this, please type:
-
Step 3: Building the Code and Running Tests
5. Navigate into Thermochimica:
cd thermochimica
6. Install Thermochimica typing:
mingw32-make.exe
7. You should executables output to the bin/ directory. Test one with:
./bin/Thermo
8. The expected output can be seen below.
-
Step 4: Running the Code
Once Thermochimica has been downloaded and all tests are executing successfully, you are ready to run the code. As previously mentioned, Thermochimica was originally intended for direct integration into other multi-physics codes. A test main file is available in the "test" subdirectory with the filename "Thermo.F90". In the source file, you will see a number of input variables with corresponding units and the path to a data-file. You can perform point calculations using this as a template, which will require you to recompile the code. A user interface is being planned in a near-term development cycle.
On the Documentation page, there are links to the User Manual and Tutorial Manual.