Created
May 4, 2015 08:45
-
-
Save pmav99/b8e00064c1ae1c1456c4 to your computer and use it in GitHub Desktop.
Modified von Mises
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def von_mises(S11, S22, S12, fc, ft): | |
""" | |
Returns the type of failure according to the modified Von Mises | |
failure criterion. | |
Input | |
----- | |
S11 : float | |
Normal stresses (σx) | |
S22 : float | |
Normal stresses (σy) | |
S12 : float | |
Shear stresses (τ) | |
fc : float | |
The compressive strength of the wall | |
ft : float | |
The tensile strength of the wall | |
failure = 0 ----> No failure | |
failure = 1 ----> Compression - Compression failure | |
failure = 2 ----> Compression - Tension failure | |
failure = 3 ----> Tension - Tension failure | |
""" | |
failure = 0 | |
if S11 <= 0: | |
if S22 <= 0: # S1 | |
if S11**2 + S22**2 - S11 * S22 + 3 * S12**2 - fc**2 >= 0: | |
failure = 1 | |
else: # S4 | |
if S22 - S11 * ft / fc - ft >= 0: | |
failure = 2 | |
else: | |
if S22 <= 0: # S2 | |
if S22 - S11 * fc / ft + fc <= 0: | |
failure = 2 | |
else: # S3 | |
if S11 + S22 - ft >= 0: | |
failure = 3 | |
return failure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment