The program, elastic_tensor.c
, transforms a stiffness tensor for a given coordinate system to a stiffness tensor and a compliance tensor for another coordinate system. It requires an input file, elas.in
, in the same directory.
The first line of elas.in
is an integer, which can be 0, 1, 2, or 3. When it is 0, elastic anisotropy is assumed. When it is 1, elastic isotropy in Voigt form is assumed. When it is 2, elastic isotropy in Reuss form. When it is 3, elastic isotropy in Hill form is assumed.
Each of the next three lines of elas.in contains three real numbers. The first, second, and third line, respectively, corresponds to the crystallographic orientations of the x, y, and z axis of the coordinate system based on which the input stiffness tensor is calculated, e.g.,
1. 1. -2.
-1. 1. 0.
1. 1. 1.
The next six lines of elas.in
contain 21 real numbers which are components of the input stiffness tensor, i.e,
C11 C12 C22 C13 C23 C33 C14 C24 C34 C44 C15 C25 C35 C45 C55 C16 C26 C36 C46 C56 C66
Each of the next three lines of elas.in
contains three real numbers. The first, second, and third line, respectively, corresponds to the crystallographic orientations of the x, y, and z axis of the coordinate system based on which the output stiffness and compliance tensors are calculated, e.g.,
1. 0. 0.
0. 1. 0.
0. 0. 1.
To compile the program:
gcc elastic_tensor.c -o elastic_tensor -lm
Then to run the program:
./elastic_tensor
which creates an output file, elas.out
. The file elas.out
contains a stiffness tensor, which is Equation 9 of a paper in Intermetallics, and a compliance tensor.
If you use this program in your published work, please cite:
Shuozhi Xu, Yanqing Su, Irene J. Beyerlein, Modeling dislocations with arbitrary character angle in face-centered cubic transition metals using the phase-field dislocation dynamics method with full anisotropic elasticity, Mech. Mater. 139 (2019) 103200