We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23b9e26 commit fc7ee87Copy full SHA for fc7ee87
src/physics/stress.jl
@@ -4,7 +4,9 @@ function von_mises_stress(σ)
4
a = σx * σx + σy * σy + σz * σz
5
b = - σx * σy - σx * σz - σy * σz
6
c = 3 * (τxy * τxy + τxz * τxz + τyz * τyz)
7
- σvm = √(a + b + c)
+ d = a + b + c
8
+ d < 0 && return zero(eltype(σ))
9
+ σvm = √d
10
return σvm
11
end
12
0 commit comments