Matlab Demos: Torsion

Warping of a square bar under torsion:

When one takes a prismatic bar with a circular cross-sectional area and applies a torque (or twisting moment) to it, then the cross-sections of the bar remain flat throughout the bar when the end tractions are appropriately applied. If the end tractions are not applied in this special manner then there is some warping of the cross-sectional areas however this warping is only seen near the points of application of the load. The warping dies out exponentially as one moves away from the loading points. In contrast to this situation, in a prismatic bar with a square cross-sectional area the cross-sections warp no-matter how the torques are applied to the ends of the bar. Shown below is the deformed shape of a single cross-section of a square bar after the application of an axial torque. Note how the center portion of the bar remains essentially flat and that the warping seems to be concentrated near the perimeter of the bar (where the material can "sense" that the bar is square).

Warping function.

%
% MATLAB program for the warping of the cross-section of a 1 in^2 bar
%  The method used involves using the first three terms in
%  an expansion of the linear theory of elasticity solution
%
% Inputs:
%  T = torque in in-lbs
%  G = shear modulus in psi
% 
% Outputs:
%  a = twist rate in rad/in
%  Plot of warped cross-section
%
T = 12000;
G = 12.0e6;
J = (1/3) - (64/pi^5)*(tanh(pi/2) + tanh(3*pi/2)/3^5 + tanh(5*pi/2)/5^5);
a = T/(G*J)
y = -0.5:0.05:0.5;
z = -0.5:0.05:0.5;
for i = 1:21
  for j = 1:21
    b = 0;
    for n = 4:-1:0
     l = (2*n+1)*pi;
     b = b + ((-1)^n/(2*n+1)^3)*(sinh(l*z(i))/cosh(l/2.0))*sin(l*y(j));
    end
    u(i,j) = a*y(j)*z(i) - (8.0*a/pi^3)*b;
  end
end
surfc(y,z,u)

Click here to see animated version.