From 8c395b30416875b65ed71a7d8d18c420ebd2a7ac Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Thu, 4 Feb 2021 03:39:24 +0000 Subject: [PATCH] Update aeStructures.jl --- src/aeStructures.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/aeStructures.jl b/src/aeStructures.jl index 79e7e89..78c72a3 100644 --- a/src/aeStructures.jl +++ b/src/aeStructures.jl @@ -29,13 +29,13 @@ end function bending_moment(s::Section, Mx, My) - s.data.σz = (My / s.Iyy) .* s.data.x + (Mx / s.Ixx) .* s.data.y + s.data.σz = (My / s.Iyy) .* (s.data.x .- s.xc) + (Mx / s.Ixx) .* (s.data.y .- s.yc) s.data.σz end function shear_stress(s::Section, Vx, Vy) - s.data.Δq = -(Vx / s.Iyy) * s.data.A .* s.data.x - (Vy / s.Ixx) * s.data.A .* s.data.y + s.data.Δq = -(Vx / s.Iyy) * s.data.A .* (s.data.x .- s.xc) - (Vy / s.Ixx) * s.data.A .* (s.data.y .- s.yc) s.data.Δq end @@ -48,7 +48,10 @@ function shear_flow(s::Section) q = s.data.Δq - s.data.q = [q[1], q[1] + q[2], q[1] + q[2] + q[3], sum(q)] + s.data.q = zeros(length(a)) + for (i, v) in enumerate(a) + s.data.q[i] = sum(s.data.q) + v + end s.data.q end @@ -58,4 +61,4 @@ function total_shear(s::Section, qo, thickness) s.data.τ end -export Section \ No newline at end of file +export Section