A
dditive M
anufacturing Map
ping of Compositional Spaces with Thermodynamic, Analytical, and Artificial Intelligence Models
AMMap
tool utilizes novel nimplex
high-performance Nim library for generation of simplex graphs, developed in our recent paper (10.48550/arXiv.2402.03528), to describe the complex space that represents the design space possible for alloys made with additive manufacturing.
AMMap
implements callables for several different CALPHAD based methods out-of-the-box and is set to grow rapidly in the near future. These include thermodynamic equlibrium calculations with pycalphad
, Scheil-Gulliver solidification with scheil
, and 5 different models for predicting cracking susceptibility. These methods are discussed in this publication on Design methodology for functionally graded materials: Framework for considering cracking.
Results coming from these methods are used to establish feasible subspace, which is then used to find optimal paths in the space using any path planning tool with Python or CLI interface.
For user convenience, cloud-based GitHub Codespaces can be used for all Jupyter
notebook exercises. However, one should note Codespaces lack the computational strength to perform Scheil-Gulliver sufficiently fast; thus we recommend running them on an HPC node, submitting for external evaluation with a tool like papermill
, or persisting the result (see scheilmap.json
) to then be analysed in Codespaces.
It is recommended to use new environements for all python projects, this can be done as follows:
conda create -n AMMAP python=3.11 liblapack jupyter numpy pandas plotly scikit-learn
conda activate AMMAP
Or, if your environment already exists, simply:
conda install -y python=3.11 liblapack jupyter numpy pandas plotly scikit-learn
Clone the github repository in order to have the jupyter notebook and callables
git clone https://github.com/PhasesResearchLab/AMMap.git
The primary installation requirement is nimplex
, which requires the small and easy-to-install Nim
(Installation Instructions) compiler (assuming you already have a C
compiler), which can be done with a single command on most Unix (Linux/MacOS) systems:
- using conda cross-platform package manager:
conda install -c conda-forge nim
- on MacOS, assuming you have Homebrew installed:
brew install nim
- with your Linux distribution's package manager (note that it may be an outdated
nim
version, impacting performance), for instance on Ubuntu/Debian Linux:apt-get install nim
Then, you can use the boundeled Nimble tool (pip
-like package manager for Nim) to install two top-level dependencies:
arraymancer
, which is a powerful N-dimensional array library, and nimpy
which
helps with the Python bindings. You can do it with a single command:
nimble install -y arraymancer nimpy
Now, you can update the nimplex
submodule repository and compile it for AMMap
. You want to do so in a way that creates its Python bindings. You will need slightly different flags depending on your system configuration, but for Unix (Linux/MacOS) you can do so with commands below, after making sure you are in the root AMMap
directory:
git submodule update --init --recursive
nim c --d:release --threads:on --app:lib --out:nimplex.so nimplex/src/nimplex.nim
nim c --d:release --threads:on --app:lib --out:utils/plotting.so nimplex/src/nimplex/utils/plotting.nim
For Windows and other platforms, you should consult nimpy
instructions.
When you are done, you should also install pycalphad and a forked version of a python package for scheil
found here
pip install git+https://github.com/HUISUN24/scheil.git
pip install pycalphad
pip install pqam-rmsadtandoc2023 pathfinding
To run Jupyter
notebooks from the command line, especially useful on an HPC, you should install papermill
:
pip install papermill