Skip to content

Commit 5f1d192

Browse files
committed
Fixed the strain with voigt notation to compute the elastic constants
1 parent 9a5f4af commit 5f1d192

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎cellconstructor/Structure.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -574,18 +574,18 @@ def strain(self, strain_tensor, voigt = False, fix_volume = False):
574574
Note, it will not affect the current structure,
575575
but it returns a new strained strcture.
576576
577-
Note: in the voigt representation, the off-diagonal terms of the strain tensor are intended as the sum
578-
of the two symmetric components of the tensor.
577+
Note: in the voigt representation, the off-diagonal terms of the strain tensor are provided
578+
so that the euclidean modulus of the resulting strain matrix is uniform across all components:
579579
580580
.. math ::
581581
582582
\begin{pmatrix} \epsilon_1 \\ \epsilon_2 \\ \epsilon_3 \\
583-
2\epsilon_4 \\ 2\epsilon_5 \\ 2\epsilon_6 \end{pmatrix} =
584-
\begin{pmatrix} \epsilon_1 & \epsilon_6 & \epsilon_5 \\
585-
\epsilon_6 & \epsilon_2 & \epsilon_4 \\
586-
\epsilon_5 & \epsilon_4 & \epsilon_3 \end{pmatrix}
587-
583+
\epsilon_4 \\ \epsilon_5 \\ \epsilon_6 \end{pmatrix} =
584+
\begin{pmatrix} \epsilon_1 & \frac{1}{\sqrt 2}\epsilon_6 & \frac{1}{\sqrt 2}\epsilon_5 \\
585+
\frac{1}{\sqrt 2}\epsilon_6 & \epsilon_2 & \frac{1}{\sqrt 2}\epsilon_4 \\
586+
\frac{1}{\sqrt 2}\epsilon_5 & \frac{1}{\sqrt 2}\epsilon_4 & \epsilon_3 \end{pmatrix}
588587
588+
This is the correct convention to compute the elastic constant from finite difference without any rescaling
589589
590590
Parameters
591591
----------
@@ -606,7 +606,7 @@ def strain(self, strain_tensor, voigt = False, fix_volume = False):
606606
"""
607607

608608
if voigt:
609-
strain_tensor[3:] /= 2
609+
strain_tensor[3:] /= np.sqrt(2)
610610
strain_tensor = Methods.transform_voigt(strain_tensor, voigt_to_mat = True)
611611

612612

0 commit comments

Comments
 (0)