FEM: principal stress calculation, fix for direction of principal stress

This commit is contained in:
Bernd Hahnebach
2018-07-02 09:02:22 +02:00
committed by Yorik van Havre
parent 1bd2463d90
commit 0f8566ef0a

View File

@@ -426,9 +426,9 @@ def calculate_von_mises(i):
def calculate_principal_stress(i):
sigma = np.array([[i[0], i[3], i[4]],
[i[3], i[1], i[5]],
[i[4], i[5], i[2]]])
sigma = np.array([[i[0], i[3], i[5]],
[i[3], i[1], i[4]],
[i[5], i[4], i[2]]]) # https://forum.freecadweb.org/viewtopic.php?f=18&t=24637&start=10#p240408
# compute principal stresses
eigvals = list(np.linalg.eigvalsh(sigma))
eigvals.sort()