This repository contains all of the code necessary for reproducing the calculations done for the authors' senior design project for NRE 4351 at Georgia Tech.
Most of the scripts in this repository depend on having access to specific databases/scripts. The requirments are as follows:
- The Molten Salt Thermal Properties Database (MSTDB): A database for calculating thermophysical/thermochemical properties of molten salts which is maintained by Oak Ridge National Laboratory (instructions for getting access are here)
- All scripts that use the MSTDB for thermophsyical properties calculations reference a symbolic link in the root of the repository, which will have to be replaced with a valid symlink to your clone of the MSTDB-TP repo.
- Thermochimica: A equilibrium thermodynamics solver which is used throughout for solubility calculations and worst-case corrosion calculations. The official repository is hosted here. A fork of the repository containing updated python functions which are necessary for the code in this repository to run is here. When cloning this repository, run
as this repository is not updated with the official repository, it may be better to clone the official thermochimica repo, and then copy the
git checkout extra-optionspythondirectory from my personal fork.
After obtaining access to the required codes/data, some setup is still required before being able to run the code in this repository.
First, install all of the required python packages, which are listed in the requirements.txt file. If pip is your python package manager, this can be done by running
pip install -r requirements.txt
in the root of the repository. If you're using mamba or conda as your package manager, run
<package-manager> install --file requirements.txt
For the relative paths in this repository to work, symbolic linlks (aka symlinks, more information here) must be created in the root of this repository for both the thermochimica and mstdb-tp directories. The current symlinks must be deleted first, which can be done (in Linux) by running
rm thermochimica mstdb-tp
To create new symlinks (in Linux) run the following commands in the root of this repoisitory
ln -s <path-to-thermochimica-directory> ./thermochimica
ln -s <path-to-mstdb-tp-directory> ./mstdb-tp
NOTE: The thermochimica directory should be named thermochimica, and the thermophysical properties directory should be named mstdb-tp.
To run thermochimica calculations using the MSTDB thermochimical database, the relevant chem sage .dat files must be copied to the thermochimica data directory. To do this, you can run the following command (in Linux):
cp <path-to-mstdb>/Models\ and\ Documentation/*.dat <path-to-thermochimica-directory>/data
Finally, it is necessary to add the python scripts in the modules directory, as well as the python utility script for running thermochimica calculations to your PYTHONPATH, otherwise the various import statements will fail. To do this, you may add the following lines to your .bashrc (in Linux)
export PYTHONPATH=<path-to-thermochimica>/python:$PYTHONPATH
export PYTHONPATH=<path-to-this-repo>/modules:$PYTHONPATH