Skip to content

Commit 1d1988a

Browse files
theScriptingEngineertheScriptingEngineer
authored andcommitted
girder_buckling: bug fix for negative sqrt
1 parent c698cf4 commit 1d1988a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

anystruct/calc_structure_classes/dnv_buckling.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,10 @@ def girder_buckling(self, optmizing = False) -> dict:
637637
sysd = derived_stress_values.sysd
638638
sxsd = derived_stress_values.sxsd
639639

640-
Cys = 0.5 * (math.sqrt(4 - 3 * math.pow(sysd / fy, 2)) + sysd / fy)
640+
if 4 - 3 * math.pow(sysd / fy, 2) > 0:
641+
Cys = 0.5 * (math.sqrt(4 - 3 * math.pow(sysd / fy, 2)) + sysd / fy)
642+
else:
643+
Cys = 0.0
641644

642645
lambda_p = 0 if thickness*E == 0 else 0.525 * (spacing / thickness) * math.sqrt(fy / E) # reduced plate slenderness, checked not calculated with ex
643646
Cxs = (lambda_p - 0.22) / math.pow(lambda_p, 2) if lambda_p > 0.673 else 1

0 commit comments

Comments
 (0)