Yufeng-shen / TJ2GBE

Reconstruct grain boundary energy from triple junction geometries
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

TJ2GBE

Reconstruct grain boundary energy from triple junction geometries [1,2].

This package is an implementation of the regularization based reconstruction method, which is described in paper [1]. Many functions are borrowed from Adam Morawiec's Fortran implementation of his paper [2]. Moreover, the file "Src/myLOBPCG_new.py" is scipy's implementation with minor modification.

This package consists of three parts:

Financial Support

The development of this package was supported by the National Science Foundation of the United States of America under grant DMR-1628994.

Dependencies

Usage

Step 0: Download the code.

git clone --depth=1 https://github.com/Yufeng-shen/TJ2GBE.git

Step 1: Compile the C++ code. (Thanks to @sgbaird, we find that C++11 is required)

cd Src/Cpp/
g++ -std=c++11 -o ../../bin/TJ2GBE.out main.cpp tj.cpp subdomain.cpp config.cpp -fopenmp

Step 2: Run the executable file with configure file.

cd ../../bin/
./TJ2GBE.out ../CfgFile/Cubic.config

The output files "rowA.binary", "colA.binary" and "valA.binary" are going to be used by Pythoon reconstruction script, the "NN.txt" is used for tunning the "threshold" value in the configure file.

Step 3: Change the parameters (at the top of the script) and run the reconstruction script.

cd ../Src/Python/
python Reconstruction.py

It will output the reconstructed energy for every grain boundary in the data set and a .gbdat file for plotting.

For the example data of "TJdata/triples_30000.dat", the reconstructed grain boundary energy function with Σ7 misorientation is shown as following: Sigma7 Figures are plotted by a modified version of Krzysztof Glowinski's GBToolbox.

Generate the triples.dat file

Compile the fortran code

cd Src/Fortran/minuit-master
make
cd ..
gfortran -o Torq_gen.out -l minuit -Lminuit-master

Run the simulation

./Torq_gen.out filename 10

where "filename" is the filename of the output, it must be 8 letters, "10" is the number of triple junctions, can be any number. This program will generate the ground truth file along with the triple junctions file.

Notes

There are two differences between the cell indexing in Morawiec's Fortran implementation of the paper [2] and this implementation:

License

BSD 3 Cluase License

References

[1] "Determining grain boundary energies from triple junction geometries without discretizing the five-parameter space" Acta Materialia 166, 126-134 (2019).

[2] "Method to calculate the grain boundary energy distribution over the space of macroscopic boundary parameters from the geometry of triple junctions" Acta Materialia, 48 (2000) 3525-3532