Here is an exaggerated example of a beam being twisted. The following code is based on Stephen Timoshenko’s analytical solution. The color represents the equivalent (Von Mises) stress where red is high stress and blue is low stress.
(* runtime: 12 seconds *)
a = b = 2.0; L = 10; T = G = 1; J = 16/3a^3b(1 - 196a/(b Pi^5)Sum[n^-5Tanh[n Pi b/(2a)], {n, 1, 200, 2}]); k = T/(G J);
phi = 32G k a/Pi^3Sum[1/n^3(-1)^((n - 1)/2)(1 - Cosh[n Pi y/(2a)]/Cosh[n Pi b/(2a)])Cos[n Pi x/(2a)], {n, 1, 10, 2}];
tauyz = -D[phi, x]; tauxz = D[phi, y]; tauxy = sx = sy = sz = 0;
f[x_, y_, z_] := Module[{}, {s1, s2, s3} = Eigenvalues[{{sx, tauxy, tauxz}, {tauxy, sy, tauyz}, {tauxz, tauyz, sz}}]; sv = Sqrt[((s1 - s2)^2 + (s2 - s3)^2 + (s3 - s1)^2)/2]; {x - k z y, y + k z x, z, {EdgeForm[], SurfaceColor[Hue[2(1 - sv/0.029)/3]]}}];
<< Graphics`Master`;
DisplayTogether[Map[{ParametricPlot3D[f[#a/2, y, z], {y, -b/2, b/2}, {z, 0,L}, Compiled -> False], ParametricPlot3D[f[x, #b/2, z], {x, -a/2, a/2}, {z, 0, L}, Compiled -> False]} &, {-1, 1}], ParametricPlot3D[f[x, y, L], {x, -a/2, a/2}, {y, -b/2, b/2}, Compiled -> False]];
Links
- Computer Modeling - class notes by Nasser Abbasi
- Torsional Analysis - part of the Structural Mechanics Mathematica package


0 Responses to “Torsion Beam”
Leave a Reply