@@ -92,7 +92,7 @@ def close_points(points):
9292 return numpy .append (p , [p [0 ]], axis = 0 )
9393
9494
95- def hollow_circle (innerradius , outerradius ):
95+ def circular_tube (innerradius , outerradius ):
9696 """
9797 Returns the area, moments of inertia and torsion constant for a hollow circle (tube).
9898 """
@@ -109,6 +109,8 @@ def hollow_circle(innerradius, outerradius):
109109def i_beam (H , B , tf , tw ):
110110 """
111111 Returns the area, moments of inertia and torsion constant for an I-beam.
112+
113+ The axis parallel to the flanges is y, the axis parallel to the web is z.
112114 """
113115 A = B * H - (B - tw ) * (H - 2 * tf )
114116 Iy = (B / 12 ) * H ** 3 - ((B - tw ) / 12 ) * (H - 2 * tf ) ** 3
@@ -120,3 +122,19 @@ def i_beam(H, B, tf, tw):
120122 Ix = Iy + Iz
121123 J = (2 * B * tf ** 3 + (H - 2 * tf ) * tw ** 3 ) / 3
122124 return A , Ix , Iy , Iz , J
125+
126+
127+ def square_tube (H , B , th , tb ):
128+ """
129+ Returns the area, moments of inertia and torsion constant for a square tube.
130+
131+ The axis parallel to the B dimension is y, the axis parallel to the H
132+ dimension is z.
133+ """
134+ Bi , Hi = (B - 2 * tb ), (H - 2 * th )
135+ A = B * H - Bi * Hi
136+ Iy = (B / 12 ) * H ** 3 - (Bi / 12 ) * Hi ** 3
137+ Iz = (B ** 3 / 12 ) * H - (Bi ** 3 / 12 ) * Hi
138+ Ix = Iy + Iz
139+ J = 2 * tb * th * Hi ** 2 * Bi ** 2 / (H * tb + B * th - tb ** 2 - th ** 2 )
140+ return A , Ix , Iy , Iz , J
0 commit comments