Skip to content

Reconstruct grain boundary energy from triple junction geometries

License

Notifications You must be signed in to change notification settings

Yufeng-shen/TJ2GBE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

  • C++ code that finds the "similar grain boundaries" of every grain boundary in the data set
  • Python script that solves the optimization problem described in paper [1] to reconstruct the energy of every grain boundary in the data set
  • Fortran code that generates the simulated triple junction file. This code is mostly written by Adam Morawiec.

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

  • numpy
pip install numpy
  • scipy
pip install scipy

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:

  • In this implementation, cell index starts with 0 instead of 1.

  • In function "find_symeq_num", the second and fourth parameters are defined as "1-cos(af)" instead of "cos(af)".

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

About

Reconstruct grain boundary energy from triple junction geometries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published