Untitled
unknown
plain_text
6 months ago
5.4 kB
2
Indexable
Never
Imports System Module TBeamMomentOfInertia Sub Main() ' T-beam dimensions Dim h As Double = 300 ' Overall height (mm) Dim b As Double = 200 ' Overall width (mm) Dim tf As Double = 20 ' Flange thickness (mm) Dim tw As Double = 10 ' Stem thickness (mm) ' Calculate moment of inertia Dim I1 As Double ' Moment of inertia of rectangular part (stem) Dim A1 As Double ' Area of rectangular part (stem) Dim d1 As Double ' Distance from centroid of rectangular part to centroidal axis Dim I2 As Double ' Moment of inertia of top flange Dim A2 As Double ' Area of top flange Dim d2 As Double ' Distance from centroid of top flange to centroidal axis Dim I As Double ' Moment of inertia of T-beam ' Moment of inertia of rectangular part (stem) I1 = (1 / 12) * b * tw ^ 3 ' Area of rectangular part (stem) A1 = b * tw ' Distance from centroid of rectangular part to centroidal axis d1 = tw / 2 ' Moment of inertia of top flange I2 = (1 / 12) * (b * tf ^ 3) ' Area of top flange A2 = b * tf ' Distance from centroid of top flange to centroidal axis d2 = h - tf / 2 ' Calculate moment of inertia I = I1 + A1 * d1 ^ 2 + I2 + A2 * d2 ^ 2 ' Display the result Console.WriteLine("Moment of Inertia (I) = " & I & " mm^4") End Sub End Module Imports System Module UBeamMomentOfInertia Sub Main() ' U-beam dimensions Dim h As Double = 300 ' Overall height (mm) Dim b As Double = 200 ' Overall width (mm) Dim tf As Double = 20 ' Flange thickness (mm) Dim tw As Double = 10 ' Web thickness (mm) ' Calculate moment of inertia Dim I1 As Double ' Moment of inertia of top flange Dim A1 As Double ' Area of top flange Dim d1 As Double ' Distance from centroid of top flange to centroidal axis Dim I2 As Double ' Moment of inertia of bottom flange Dim A2 As Double ' Area of bottom flange Dim d2 As Double ' Distance from centroid of bottom flange to centroidal axis Dim I3 As Double ' Moment of inertia of web Dim A3 As Double ' Area of web Dim d3 As Double ' Distance from centroid of web to centroidal axis Dim I As Double ' Moment of inertia of U-beam ' Moment of inertia of top flange I1 = (1 / 12) * (b * tf ^ 3) ' Area of top flange A1 = b * tf ' Distance from centroid of top flange to centroidal axis d1 = h - tf / 2 ' Moment of inertia of bottom flange I2 = (1 / 12) * (b * tf ^ 3) ' Area of bottom flange A2 = b * tf ' Distance from centroid of bottom flange to centroidal axis d2 = tf / 2 ' Moment of inertia of web I3 = (1 / 12) * (tw * (h - 2 * tf) ^ 3) ' Area of web A3 = tw * (h - 2 * tf) ' Distance from centroid of web to centroidal axis d3 = (h - 2 * tf) / 2 + tf ' Calculate moment of inertia I = I1 + A1 * d1 ^ 2 + I2 + A2 * d2 ^ 2 + I3 + A3 * d3 ^ 2 ' Display the result Console.WriteLine("Moment of Inertia (I) = " & I & " mm^4") End Sub End Module Imports System Module LBeamMomentOfInertia Sub Main() ' L-beam dimensions Dim h As Double = 300 ' Overall height (mm) Dim b As Double = 200 ' Overall width (mm) Dim t As Double = 20 ' Thickness of the flanges and web (mm) ' Calculate moment of inertia Dim I1 As Double ' Moment of inertia of the flanges Dim A1 As Double ' Area of the flanges Dim d1 As Double ' Distance from centroid of the flanges to centroidal axis Dim I2 As Double ' Moment of inertia of the web Dim A2 As Double ' Area of the web Dim d2 As Double ' Distance from centroid of the web to centroidal axis Dim I As Double ' Moment of inertia of L-beam ' Moment of inertia of the flanges I1 = (1 / 12) * (t * b ^ 3) ' Area of the flanges A1 = 2 * t * b ' Distance from centroid of the flanges to centroidal axis d1 = h - t / 2 ' Moment of inertia of the web I2 = (1 / 12) * (b * t ^ 3) ' Area of the web A2 = b * t ' Distance from centroid of the web to centroidal axis d2 = t / 2 ' Calculate moment of inertia I = I1 + A1 * d1 ^ 2 + I2 + A2 * d2 ^ 2 ' Display the result Console.WriteLine("Moment of Inertia (I) = " & I & " mm^4") End Sub End Module ' I-beam dimensions Dim h As Double = 300 ' Overall height (mm) Dim b As Double = 200 ' Overall width (mm) Dim tf As Double = 20 ' Flange thickness (mm) Dim tw As Double = 10 ' Web thickness (mm) ' Calculate area of the I-beam cross-section Dim A As Double ' Cross-sectional area of the I-beam ' Area of the top and bottom flanges Dim A1 As Double = 2 * b * tf ' Area of the web Dim A2 As Double = tw * (h - 2 * tf) ' Total cross-sectional area of the I-beam A = A1 + A2 ' Calculate moment of inertia (I) for the I-beam using a suitable formula ' ... ' Calculate radius of gyration (k) Dim k As Double ' Radius of gyration k = Math.Sqrt(I / A) ' Display the result Console.WriteLine("Radius of Gyration (k) = " & k & " mm")