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 89a11dcf0d
commit e0c0e8de00

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()