0% found this document useful (0 votes)
4 views46 pages

Programming for Engineering Mechanicsand Structural Engineering

The document discusses the properties and calculations related to I-beams, emphasizing their efficiency in resisting bending due to the distribution of material away from the neutral axis. It details the calculation of section properties such as the area moment of inertia and how flanges contribute significantly to bending resistance while the web primarily carries shear. Additionally, it introduces the use of MATLAB for calculating these properties with parameterized dimensions for I-sections.

Uploaded by

VICTOR HUAMAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views46 pages

Programming for Engineering Mechanicsand Structural Engineering

The document discusses the properties and calculations related to I-beams, emphasizing their efficiency in resisting bending due to the distribution of material away from the neutral axis. It details the calculation of section properties such as the area moment of inertia and how flanges contribute significantly to bending resistance while the web primarily carries shear. Additionally, it introduces the use of MATLAB for calculating these properties with parameterized dimensions for I-sections.

Uploaded by

VICTOR HUAMAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Programming for

Engineering Mechanics and


Structural Engineering

Coding Section Properties for


I-Sections (Wide-Flange Beams)
with parameterized dimensions

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 1 of 46


Why are I-beams so commonly
used in construction?
• The further the material is spread from the bend-
ing axis, the stiffer a cross-section tends to be.
• Cross-sections that have more material located
far from the bending axis are better at resist-
ing bending, compared to sections that have
more material located close to the bending axis,
even though both cross-sections might have
the same area.
• This concept of resistance to bending can be
quantified by calculating the area moment of
inertia, which is also sometimes called the sec-
ond moment of area.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 2 of 46


• The area moment of inertia reflects how the
area of a cross-section is distributed relative
to a particular axis, and so is a measure of
how much resistance the cross-section has to
bending.
• The I-beam locates the majority of the mate-
rial as far as possible from the bending axis,
making it a very efficient cross-section. This
is why it is so commonly used in construction.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 3 of 46


Section Properties
Let’s review how to calculate beam section prop-
erties and how these impact normal stress due
to bending and shear stress due to transverse
shear forces.

Centroids of Areas
n
X Z
A= Ai = dA
i=1 A

n
X Z
A z̄ = z̄iAi = z dA
i=1 A

n
X Z
A ȳ = ȳiAi = y dA
i=1 A

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 4 of 46


Second Area Moment of Inertia
Z
Iz = kz2A = y 2 dA
A
Z
Iy = ky2A = z 2 dA
A

• For a rectangle section of base b and height h,


1 3
Irect = bh
12

• From the parallel axis theorem, given I¯ and


area A, we find the moment of inertia about
a parallel axis from the lever arm between the
centroid and another axis,

I = I¯ + A d2⊥

where I¯ is the moment of inertia about the axis


passing through the centroid in the section plane
and d⊥ is the perpendicular distance between
parallel axes in the plane.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 5 of 46


• For an I-Section (Wide Flanged Beam), the top
and bottom flanges dominate the Second Mo-
ment of Inertia.
• The second moment of area (moment of iner-
tia) is defined as:
Z
I= y 2 dA
A

where y is the perpendicular distance from the


centroid (neutral axis).

The Contribution to I increases with the square


of the distance from the neutral axis (y 2).
The flanges in an I-beam are located at the
extreme top and bottom of the section, so
their y values are large in magnitude, and
thus, their contribution to I is much greater
(proportional to y 2).
The web is generally thin and located near
the neutral axis (y ≈ 0), so its y 2 is much
smaller, making its contribution to I compar-
atively minor.
LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 6 of 46
• For maximum bending resistance, material should
be distributed as far from the neutral axis as
possible.
• This is why I-section beams are designed with
large flanges and a thin web:
the flanges resist most of the bending, while
the web mostly carries shear.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 7 of 46


Example showing how much the flanges
contribute to the second moment of
inertia compared to the web in a typ-
ical I-beam
Top Flange Centroid
H = 300 mm t1 = 20 mm

tw = 10 mm

Web Centroid
hw = 260 mm
Section Centroid

Bottom Flange Centroid


t2 = 20 mm

b1 = b2 = 200 mm

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 8 of 46


Chart-bar Flange vs. Web Contribution to Iz in a
doubly-symmetric I-Beam (Numeric Ex-
ample)
Section Geometry:

Top flange width: b1 = 200 mm


Bottom flange width: b2 = 200 mm
Top flange thickness: t1 = 20 mm
Bottom flange thickness: t2 = 20 mm
Web height: hw = 260 mm
Web thickness: tw = 10 mm
Total height: h = t1 + hw + t2 = 300 mm

Centroid: yG = h/2 = 150 mm

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 9 of 46


Second Moment of Inertia (Iz ) about Neutral Axis:
t1
y1 = h − − yG = 140 mm
2
t2
y2 = yG − = 140 mm
2
A1 = A2 = 200 × 20 = 4, 000 mm2
Aw = 10 × 260 = 2, 600 mm2
200 × 203
Iz,1 = + 4, 000 × (140)2
12
¯ × 103 mm4
= 78, 533
Iz,2 ¯ × 103 mm4
= 78, 533
10 × 2603 ¯ × 103 mm4
Iz,w = = 14, 64666
12
Iz ¯ + 78, 533
= (78, 533 ¯ + 14, 64666)
¯ × 103
= 171, 7133 ¯ × 103 mm4

Percent Contribution:
• Top flange: 46%
• Bottom flange: 46%
• Web: 8.5%

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 10 of 46


Part Second Moment % of Total Iz
Iz,i (mm4)

Top flange 78,533,333 46%


Bottom flange 78,533,333 46%
Web 14,646,667 8.5%

Total 171,713,333 100%

Takeaway: Over 90% of the bending stiffness (I )


comes from the flanges, even though the web car-
ries most of the shear and may have significant area.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 11 of 46


Flexural (Bending) and
Shear Stress Formulas
Normal (Axial) Stress due to Bending
The flexural formula (Navier-Bernoulli equation)
relates normal stress to bending moment:
Mz y
σx = −
Iz
where

• σx = normal stress at distance y from the neu-


tral axis,
• Mz = bending moment about the z -axis,
• Iz = second moment of area about the z -axis,
• y = vertical distance from the centroidal (neu-
tral) axis (positive upward).

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 12 of 46


Maximum (Extreme Fiber) Bending Stress
Mc M
σmax = =
I S
where

• c = distance from neutral axis to the extreme


fiber,
• S = section modulus, S = Ic ,
• M = bending moment.

Moment resistance MY for a given yield stress


σY
c M
Y
σY = MY = , ⇒ MY = S σY
I S

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 13 of 46


Other Applications of the Area
Moment of Inertia
The area moment of inertia is an important sec-
tion stiffness property for any application involv-
ing the bending of a structural member; it ap-
pears everywhere in the analysis of beams and
columns.
Here are a few examples.

Beam Deflection
I appears in the moment-curvature differential
equation that is used to determine the deflection
of a beam for an internal bending moment M
due to transverse loads and applied couples.

d2v M
2
=
dx EI

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 14 of 46


Column Critical Buckling Load
I appears in the equation that gives the critical
load at which a column will buckle.
π 2EI
Pcr ∼
L2
Interestingly, I appears as the product with Young’s
modulus for a homogeneous material in both these
equations, reflecting flexural stiffness due to com-
bined section I and elastic material E proper-
ties.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 15 of 46


Shear Stress in a Beam
(Shear Formula)
The transverse shear force in a beam Vy is dis-
tributed according to the shear formula:
  
Vy Qy Vy Qy
τ= =
Iz t Iz t
where

• τ = shear stress at the point of interest,


• Vy = shear force,
R
• Qy = A y dA = first moment of area above
(or below) the point where τ is evaluated, also
called the static moment when evaluated at
the neutral axis.
• t = width of the section at the point of interest,
• Iz = second moment of area about the z -axis.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 16 of 46


Q
• The ratio ty for shear can be interpreted as the
shear area moment per width and plays a simi-
lar role to ”section modulus” S = I/c for bend-
ing.
• The ratio Qy /t essentially gives the ”shear lever
arm per unit width” at the location, and dic-
tates where shear is largest in the cross-section.
• In the context of shear flow for thin-walled sec-
tions, q = τ t = Vy Qy /Iz , the shear flow per
unit thickness is q/t = Vy Qy /(Iz t).
• For an asymmetric I-Section (Wide-Flange Beam)
Web thickness: tw
Section height: h
Top Flange thickness: (tf )top
Bottom Flange thickness: (tf )bottom
Top Flange width: (bf )top
Top Flange width: (bf )bottom
Web height: hw = h − (tf )top − (tf )bottom

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 17 of 46


• The web mostly carries the shear stress.
• At the centroid (neutral axis):
Qy is the area above (or below) the axis times
the distance from the centroid, which is largest
at the centroid height.
t is minimized where it equals the web thick-
ness.
• Thus, Qy /t is maximized at the neutral axis in
the web.

In summary,

• Maximum Qy /t (and shear stress) occurs at


the neutral axis in the web.
• Web thickness (t = tw ) is smallest; Qy is largest
here.

The maximum shear stress occurs at the neutral


axis, where Qy /t is maximized. In I-sections, the
web carries nearly all the shear.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 18 of 46


The Flanges of an I-Beam Contribute
Little to the Maximum Shear Stress
• The web thickness tw (the width) is small, so
the denominator in the shear formula is small,
making the shear stress τ relatively large in the
web.
• At the neutral axis (center of the web), Q is
maximized, so maximum shear stress occurs
in the web at the centroid.

1. In the flanges:

• The flange width bf is large, so the denom-


inator t = bf in the flange is large, making
the shear stress τ small in the flanges.

• Moreover, at the very top and bottom (the


flange tips), Q = 0, so shear stress is zero
at the extreme fibers.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 19 of 46


2. Shear Flow Path (Physical Interpretation):
• Most of the vertical shear force is carried by
the web.
• The flanges mainly resist bending (moment)
by being far from the neutral axis, but con-
tribute little to shear.
• The shear stress quickly drops off as you
move from the web into the flanges.
• For a typical I-beam, the web often carries
over 90% of the total shear force. The flanges
may only carry a few percent of the total
shear.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 20 of 46


Given the Section properties for
an Asymmetric I-Beam
Can we use MATLAB to calculate the
formulas and provide a fast way to up-
date with new dimension and thick-
ness variables?

Yes. We’re On It!

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 21 of 46


b1 = 250 mm
Top Flange Centroid
t1 = 18 mm

t3 = 12 mm

Web Centroid
h = 400 mm b3 = hweb = 367 mm
Section Centroid yG

Bottom Flange Centroid


t2 = 15 mm
b2 = 300 mm

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 22 of 46


Section Properties for
Asymmetric I-beam
Section dimensions (mm):

(bf )top = b1 = 250 Top flange width (mm)


(bf )bottom = b2 = 300 Bottom flange width (mm)
h = 400 Overall section height (mm)
(tf )top = t1 = 18 Top flange thickness (mm)
(tf )bottom = t2 = 15 Bottom flange thickness (mm)
(tf )web = t3 = 12 Web thickness (mm)

b3 = h − t1 − t2 Web height (mm)


Areas of each part:

A 1 = b1 t 1 Area of top flange


A 2 = b2 t 2 Area of bottom flange
A3 = t3b3 Area of web
A = A1 + A 2 + A3 Total area

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 23 of 46


Centroid (from bottom):
t1
y1 = h − Centroid of top flange
2
t2
y2 = Centroid of bottom flange
2
b3
y 3 = t2 + Centroid of web
2
Composite centroid (from bottom):
A1 y 1 + A2 y 2 + A3 y 3
yG =
A
Composite centroid (from top):

yG, top = h − yG

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 24 of 46


First moment of area about the cen-
troid (static moment):
• 1st moment of area about y-axis:

Using the area above the centroid


t1
Qz, above = (yG, top − )(t1b1)
2
(yG, top − t1)
+ (yG, top − t1) t3
2
Verify the same result from using the area be-
low the centroid
t2 (yG − t2)
Qz, below = (yG − )(t2b2)+ (yG −t2) t3
2 2
• 1st moment of area about y-axis:
b 1 b1 b2 b2 t3 t3
Qy = t1 + t2 + b3
2 4 2 4 2 4

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 25 of 46


Moment of Area Inertia
• 2nd moment of inertia about z-axis (neutral
axis, using parallel axis theorem):

b1t31
Iz,1 = + A1(y1 − yG)2
12
b2t32
Iz,2 = + A2(y2 − yG)2
12
t3b33
Iz,3 = + A3(y3 − yG)2
12
Iz = Iz,1 + Iz,2 + Iz,3

• 2nd moment of inertia about y-axis (vertical


axis through centroid):

t1b31
Iy,1 =
12
t2b32
Iy,2 =
12
b3t33
Iy,3 =
12
Iy = Iy,1 + Iy,2 + Iy,3

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 26 of 46


Section Properties for Asymmetric I-beam
(MATLAB Code)
% Section dimensions (mm)
b1 = 250; % Top flange width
b2 = 300; % Bottom flange width
h = 400; % Overall height
t1 = 18; % Top flange thickness
t2 = 15; % Bottom flange thickness
t3 = 12; % Web thickness
b3 = h - t1 - t2; % Web height

% Areas of each part


A1 = b1 * t1; % Top flange
A2 = b2 * t2; % Bottom flange
A3 = t3 * b3; % Web
A = A1 + A2 + A3; % Total area

% Centroid (from bottom)


y1 = h - t1/2; % Top flange centroid
y2 = t2/2; % Bottom flange centroid
y3 = t2 + b3/2; % Web centroid

% Composite centroid
yG = (A1 * y1 + A2 * y2 + A3 * y3) / A
yG_top = h - yG;

% First moments of area about the centroid (Static Moments)

% Using section above the Centroid


Qz = (yG_top - t1/2) * ( t1 * b1) + ( (yG_top - t1)/2) * (yG_top - t1) * t3;

% Using section below the Centroid


Qz = (yG - t2/2) * ( t2 * b2) + ( (yG - t2)/2 ) * (yG - t2) * t3;

Qy = t1 * (b1/2) * (b1/4) + t2 * (b2/2) * (b2/4) + b3 * (t3/2) * (t3/4);

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 27 of 46


% Second moment of inertia about z-axis (parallel axis theorem)
Iz_1 = (b1 * t1^3) / 12 + A1 * (y1 - yG)^2;
Iz_2 = (b2 * t2^3) / 12 + A2 * (y2 - yG)^2;
Iz_3 = (t3 * b3^3) / 12 + A3 * (y3 - yG)^2;
Iz = Iz_1 + Iz_2 + Iz_3;

% Second moment of inertia about y-axis (vertical axis through centroid)


Iy_1 = (t1 * b1^3) / 12;
Iy_2 = (t2 * b2^3) / 12;
Iy_3 = (b3 * t3^3) / 12;
Iy = Iy_1 + Iy_2 + Iy_3;

% Radius of Gyration about z- and y-axis


rz = sqrt(Iz/A); ry = sqrt(Iy/A);

% Elastic section modulus (top/bottom surfaces)


S_top = Iz / yG_top;
S_bot = Iz / yG;
S = min(S_top, S_bot);
%or
S = Iz/ max(yG_top,yG);

% Maximum Moment at Yield (Moment of resistance)


sigma_Y = 235; % N/mm^2 (235 MPa mild steel yield stress)
Mz_Y = (sigma_Y * S); % N-m

fprintf('Centroid yG: %.2f mm (from bottom)\n', yG);


fprintf('Centroid yG_top: %.2f mm (from top)\n', yG_top);
fprintf('A: %.2f mm^2\n', A);
fprintf('Qz (about centroid): %.3f x 10^3 mm^3\n', Qz/1e3);
fprintf('Qy (about centroid): %.3f x 10^3 mm^3\n', Qy/1e3);
fprintf('Iz (about centroid): %.3f x 10^6 mm^4\n', Iz/1e6);
fprintf('Iy (about centroid): %.3f x 10^6 mm^4\n', Iy/1e6);
fprintf('rz (about centroid): %.2f mm\n', rz);
fprintf('ry (about centroid): %.2f mm\n', ry);
fprintf('Section modulus S = I / c: %.3f x 10^3 mm^3\n', S/1e3);
fprintf('Moment Mz at Yield: %.3e kN-m\n', Mz_Y*1e-3);

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 28 of 46


Centroid yG: 199.00 mm (from bottom)
Centroid yG_top: 201.00 mm (from top)
A: 13404.00 mm^2
Qz (about centroid): 1064.910 x 10^3 mm^3
Qy (about centroid): 315.981 x 10^3 mm^3
Iz (about centroid): 380.551 x 10^6 mm^4
Iy (about centroid): 57.240 x 10^6 mm^4
rz (about centroid): 168.50 mm
ry (about centroid): 65.35 mm
Section modulus S = I / c: 1893.322 x 10^3 mm^3
Moment Mz at Yield: 4.449e+05 kN-m

Asymmetric I-section showing


top/bottom flanges, web, and centroid
location

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 29 of 46


Section Properties for Asymmetric I-beam
(Python Code)
import numpy as np

# Section dimensions (mm)


b1 = 250 # Top flange width
b2 = 300 # Bottom flange width
h = 400 # Overall height
t1 = 18 # Top flange thickness
t2 = 15 # Bottom flange thickness
t3 = 12 # Web thickness
b3 = h - t1 - t2 # Web height

# Areas of each part


A1 = b1 * t1 # Top flange
A2 = b2 * t2 # Bottom flange
A3 = t3 * b3 # Web
A = A1 + A2 + A3 # Total area

# Centroid (from bottom)


y1 = h - t1 / 2 # Top flange centroid
y2 = t2 / 2 # Bottom flange centroid
y3 = t2 + b3 / 2 # Web centroid

# Composite centroid
yG = (A1 * y1 + A2 * y2 + A3 * y3) / A
yG_top = h - yG

# First moments of area about the centroid (Static Moments)


# Using the section above the Centroid
Qz_above = (yG_top - t1/2) * (t1 * b1) + ((yG_top - t1)/2) * (yG_top - t1) *
,→ t3
# Using section below the Centroid
Qz_below = (yG - t2/2) * (t2 * b2) + ((yG - t2)/2) * (yG - t2) * t3

Qy = t1 * (b1/2) * (b1/4) + t2 * (b2/2) * (b2/4) + b3 * (t3/2) * (t3/4)

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 30 of 46


# Second moment of inertia about z-axis (parallel axis theorem)
Iz_1 = (b1 * t1**3) / 12 + A1 * (y1 - yG)**2
Iz_2 = (b2 * t2**3) / 12 + A2 * (y2 - yG)**2
Iz_3 = (t3 * b3**3) / 12 + A3 * (y3 - yG)**2
Iz = Iz_1 + Iz_2 + Iz_3

# Second moment of inertia about y-axis (vertical axis through centroid)


Iy_1 = (t1 * b1**3) / 12
Iy_2 = (t2 * b2**3) / 12
Iy_3 = (b3 * t3**3) / 12
Iy = Iy_1 + Iy_2 + Iy_3

# Radius of Gyration about z- and y-axis


rz = np.sqrt(Iz/A)
ry = np.sqrt(Iy/A)

# Elastic section modulus (top/bottom surfaces)


S_top = Iz / yG_top
S_bot = Iz / yG
S = min(S_top, S_bot)
# or
S_alt = Iz / max(yG_top, yG)

# Maximum Moment at Yield (Moment of resistance)


sigma_Y = 235 # N/mm^2 (235 MPa mild steel yield stress)
Mz_Y = sigma_Y * S # N-mm

print(f'Centroid yG: {yG:.2f} mm (from bottom)')


print(f'Centroid yG_top: {yG_top:.2f} mm (from top)')
print(f'A: {A:.2f} mm^2')
print(f'Qz (about centroid): {Qz_above/1e3:.3f} x 10^3 mm^3')
print(f'Qy (about centroid): {Qy/1e3:.3f} x 10^3 mm^3')
print(f'Iz (about centroid): {Iz/1e6:.3f} x 10^6 mm^4')
print(f'Iy (about centroid): {Iy/1e6:.3f} x 10^6 mm^4')
print(f'rz (about centroid): {rz:.2f} mm')
print(f'ry (about centroid): {ry:.2f} mm')
print(f'Section modulus S = I / c: {S/1e3:.3f} x 10^3 mm^3')
print(f'Moment Mz at Yield: {Mz_Y*1e-3:.3e} kN-m')

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 31 of 46


Addition of Fillets to reduce local stress
concentrations

Asymmetric I-section with 12 mm


radius fillets

• Adding fillets of 12 mm radius between the


web and flanges increases the moment of in-
ertia to Iz = 384.963×106 mm4 from Iz = 380.551×
106 mm4, for about a 1% increase (not much).

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 32 of 46


Automated Loops for multiple
Section Properties
• Nobody likes doing long and tedious hand cal-
culations, especially when they have to be re-
peated with changing variables – This is where
coding can help us.
• Equations and formulas can be programmed
with variables so that calculations can be com-
pleted with changes in values by simply re-
running the program with new inputs.
• Similarly, when a set of values for a variable
is needed, We can automate the code to loop
over these values and solve for them all in one
program run.
• Better yet, we can replace explicit “for loops”
with implicit vectorized loops for incredible speed
and solve everything at once.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 33 of 46


Vectorized Section Properties for I-beams
% Each variable is a row vector (for N sections)
b1 = [250 200 300 300]; % Top flange width
b2 = [300 250 350 300]; % Bottom flange width
h = [400 350 500 400]; % Overall height
t1 = [18 16 20 16]; % Top flange thickness
t2 = [15 14 18 16]; % Bottom flange thickness
t3 = [12 10 14 12]; % Web thickness
b3 = h - t1 - t2; % Web heights

N = length(b1);

A1 = b1 .* t1; % Top flange area


A2 = b2 .* t2; % Bottom flange area
A3 = t3 .* b3; % Web area
A = A1 + A2 + A3; % Total area

% Centroid (from bottom)


y1 = h - t1/2; % Top flange centroid
y2 = t2/2; % Bottom flange centroid
y3 = t2 + b3/2; % Web centroid

yG = (A1.*y1 + A2.*y2 + A3.*y3) ./ A; % Composite centroid from bottom


yG_top = h - yG; % From top

% First moments of area about the centroid (Static Moment)


% Using section above the centroid (from top down)
Qz_above = (yG_top - t1/2) .* (t1 .* b1) + ...
((yG_top - t1)/2) .* (yG_top - t1) .* t3;
% Using section below the centroid (from bottom up)
Qz_below = (yG - t2/2) .* (t2 .* b2) + ((yG - t2)/2) .* (yG - t2) .* t3;

Qy = t1 .* (b1/2) .* (b1/4) + t2 .* (b2/2) .* (b2/4) + b3 .* (t3/2) .* (t3/4);

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 34 of 46


% Second moment of inertia about z-axis (parallel axis theorem)
Iz_1 = (b1 .* t1.^3) / 12 + A1 .* (y1 - yG).^2;
Iz_2 = (b2 .* t2.^3) / 12 + A2 .* (y2 - yG).^2;
Iz_3 = (t3 .* b3.^3) / 12 + A3 .* (y3 - yG).^2;
Iz = Iz_1 + Iz_2 + Iz_3;

% Second moment of inertia about the y-axis


Iy_1 = (t1 .* b1.^3) / 12;
Iy_2 = (t2 .* b2.^3) / 12;
Iy_3 = (b3 .* t3.^3) / 12;
Iy = Iy_1 + Iy_2 + Iy_3;

% Elastic section modulus (top/bottom)


S_top = Iz ./ yG_top;
S_bot = Iz ./ yG;
S = min(S_top, S_bot);

% Maximum Moment at Yield (Moment of resistance)


sigma_Y_E = 235; % MPa = N/mm^2 (Mild Structural Steel EN S235, 235 MPa)
sigma_Y_A = 250; % MPa = N/mm^2 (Mild Structural Steel ASTM A36, 36 ksi)
Mz_Y_E = sigma_Y_E .* S; % N-mm
Mz_Y_A = sigma_Y_A .* S; % N-mm

% Display table of results


Results = table(b1', b2', h', t1', t2', t3', round(A'), ...
round(yG',2), round(yG_top',2), ...
round(Qz_above',2), round(Qz_below',2), round(Qy',2), ...
round(Iz'), round(Iy'), round(S'), ...
round(Mz_Y_E'*1e-3,2), round(Mz_Y_A'*1e-3,2), ...
'VariableNames',{'b1','b2','h','t1','t2','t3','A_mm2','yG_mm','yG_top_mm',...
'Qz_above_mm3','Qz_below_mm3','Qy_mm3','Iz_mm4','Iy_mm4','S_mm3',...
'Mz_Y_E_kNm','Mz_Y_A_kNm'});

disp(Results);

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 35 of 46


% Print a summary for each section
for i = 1:N
fprintf('\nSection %d:\n', i);
fprintf(' Centroid yG (from bottom): %.3e mm\n', yG(i));
fprintf(' Centroid yG_top (from top): %.3e mm\n', yG_top(i));
fprintf(' Area: %.3e mm^2\n', A(i));
fprintf(' Qz (above centroid): %.3e mm^3\n', Qz_above(i));
fprintf(' Qz (below centroid): %.3e mm^3\n', Qz_below(i));
fprintf(' Qy (about centroid): %.3e mm^3\n', Qy(i));
fprintf(' Iz (about centroid): %.3e mm^4\n', Iz(i));
fprintf(' Iy (about centroid): %.3e mm^4\n', Iy(i));
fprintf(' Section modulus S: %.3e mm^3\n', S(i));
fprintf(' Moment at Yield EN S235, Mz_Y: %.3e kN-m\n', Mz_Y_E(i)*1e-3);
fprintf(' Moment at Yield A36, Mz_Y: %.3e kN-m\n', Mz_Y_A(i)*1e-3);
end

Section Properties for I-beams


%Output
Section 1:
Centroid yG (from bottom): 1.990e+02 mm
Centroid yG_top (from top): 2.010e+02 mm
Area: 1.340e+04 mm^2
Qz (above centroid): 1.065e+06 mm^3
Qz (below centroid): 1.065e+06 mm^3
Qy (about centroid): 3.160e+05 mm^3
Iz (about centroid): 3.806e+08 mm^4
Iy (about centroid): 5.724e+07 mm^4
Section modulus S: 1.893e+06 mm^3
Moment at Yield EN S235, Mz_Y: 4.449e+05 kN-m
Moment at Yield A36, Mz_Y: 4.733e+05 kN-m

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 36 of 46


Section 2:
Centroid yG (from bottom): 1.693e+02 mm
Centroid yG_top (from top): 1.807e+02 mm
Area: 9.900e+03 mm^2
Qz (above centroid): 6.885e+05 mm^3
Qz (below centroid): 6.885e+05 mm^3
Qy (about centroid): 1.934e+05 mm^3
Iz (about centroid): 2.151e+08 mm^4
Iy (about centroid): 2.892e+07 mm^4
Section modulus S: 1.190e+06 mm^3
Moment at Yield EN S235, Mz_Y: 2.797e+05 kN-m
Moment at Yield A36, Mz_Y: 2.976e+05 kN-m

Section 3:
Centroid yG (from bottom): 2.455e+02 mm
Centroid yG_top (from top): 2.545e+02 mm
Area: 1.877e+04 mm^2
Qz (above centroid): 1.852e+06 mm^3
Qz (below centroid): 1.852e+06 mm^3
Qy (about centroid): 5.119e+05 mm^3
Iz (about centroid): 8.266e+08 mm^4
Iy (about centroid): 1.094e+08 mm^4
Section modulus S: 3.248e+06 mm^3
Moment at Yield EN S235, Mz_Y: 7.632e+05 kN-m
Moment at Yield A36, Mz_Y: 8.119e+05 kN-m

Section 4:
Centroid yG (from bottom): 2.000e+02 mm
Centroid yG_top (from top): 2.000e+02 mm
Area: 1.402e+04 mm^2
Qz (above centroid): 1.125e+06 mm^3
Qz (below centroid): 1.125e+06 mm^3
Qy (about centroid): 3.666e+05 mm^3
Iz (about centroid): 4.039e+08 mm^4
Iy (about centroid): 7.205e+07 mm^4
Section modulus S: 2.020e+06 mm^3
Moment at Yield EN S235, Mz_Y: 4.746e+05 kN-m
Moment at Yield A36, Mz_Y: 5.049e+05 kN-m

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 37 of 46


700

600

b1=300.0
500 Top Flange

b1=250.0 b1=300.0
400 Top Flange Top Flange
b1=200.0
Top Flange
300

h=500.0
y =245.5
mm

Web G
h=400.0

h=400.0
y =199.0 y =200.0
G G
h=350.0
200 Web y =169.3 Web
Web G

100

0 Bottom Flange Bottom Flange Bottom Flange Bottom Flange


b2=300.0 b2=250.0 b2=350.0 b2=300.0

-100

-200

0 200 400 600 800 1000 1200 1400 1600


mm

I-sections with different dimensions; the last one is


doubly-symmetric.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 38 of 46


Vectorized Section Properties for I-beams
with Excel Input/Output
% Read data from Excel file
filename = 'sections.xlsx'; % Change to your actual file
T = readtable(filename);

% Columns must be in the order: b1, b2, h, t1, t2, t3


% Top flange width
% Bottom flange width
% Overall height
% Top flange thickness
% Bottom flange thickness
% Web thickness

% Extract data vectors using the mappings above


b1 = T{:,1};
b2 = T{:,2};
h = T{:,3};
t1 = T{:,4};
t2 = T{:,5};
t3 = T{:,6};

N = length(b1);

% -------- Section property calculations --------


b3 = h - t1 - t2;
A1 = b1 .* t1;
A2 = b2 .* t2;
A3 = t3 .* b3;
A = A1 + A2 + A3;

y1 = h - t1/2;
y2 = t2/2;
y3 = t2 + b3/2;

yG = (A1.*y1 + A2.*y2 + A3.*y3) ./ A;


yG_top = h - yG;

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 39 of 46


Qz_above = (yG_top - t1/2) .* (t1 .* b1) + ...
((yG_top - t1)/2) .* (yG_top - t1) .* t3;
Qz_below = (yG - t2/2) .* (t2 .* b2) + ((yG - t2)/2) .* (yG - t2) .* t3;
Qy = t1 .* (b1/2) .* (b1/4) + t2 .* (b2/2) .* (b2/4) + b3 .* (t3/2) .* (t3/4);

Iz_1 = (b1 .* t1.^3) / 12 + A1 .* (y1 - yG).^2;


Iz_2 = (b2 .* t2.^3) / 12 + A2 .* (y2 - yG).^2;
Iz_3 = (t3 .* b3.^3) / 12 + A3 .* (y3 - yG).^2;
Iz = Iz_1 + Iz_2 + Iz_3;

Iy_1 = (t1 .* b1.^3) / 12;


Iy_2 = (t2 .* b2.^3) / 12;
Iy_3 = (b3 .* t3.^3) / 12;
Iy = Iy_1 + Iy_2 + Iy_3;

S_top = Iz ./ yG_top;
S_bot = Iz ./ yG;
S = min(S_top, S_bot);

sigma_Y_E = 235; % MPa


sigma_Y_A = 250; % MPa
Mz_Y_E = sigma_Y_E .* S; % N-mm
Mz_Y_A = sigma_Y_A .* S; % N-mm

writetable(Results, 'sections_results.xlsx');

Excel input file: sections.xlsx

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 40 of 46


Excel output file: sections_results.xlsx

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 41 of 46


Conclusions
• This simple example of an Asymmetric I-beam
cross-section calculating section properties gives
a glimpse into how coding can simplify, speed
up, and leave a record and template for mod-
ification and reuse for related calculations.
• This example does not fully illustrate or exploit
the power of learning to program and code our
structural engineering. Still, it does give some
insights into how programming can automate
our calculations, especially lengthy calculations
or ones that need to be repeated again and
again with different or updated variables.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 42 of 46


• Exercise: Verify the Section Properties with
your favorite software, calculations, or program.
• Extra Credit: Write code that plots the shape
and dimensions of the beam sections drawn
using MATLAB, as was done here.
• What other useful section properties can we
calculate for these I-beam sections, such as
the product moment of inertia Izy ?

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 43 of 46


Quote-left Inspirational Thought
"Great engineers never stop
learning - because the world
never stops changing."
– Dr. L. Thompson

If you are new to programming with code or


just rusty, there is nothing like the present to
get started.

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 44 of 46


🤝 Let’s Connect and Collaborate!
• 💬 How has programming impacted your
engineering work?

• 🔁 Tag a friend who’s still doing calculations


by hand!

• 🧑‍💻 Share your favorite coding tip or tool for


structural analysis.

My LinkedIn Profile

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 45 of 46


References
• Any book on Statics and Dynamics.
• The image on the first page of an I-beam in
frame construction is from the Efficient Engi-
neer: https://efficientengineer.com/area-moment-
of-inertia/

LinkedIn � Dr. Lonny Thompson, Clemson University, April 25, 2025. 46 of 46

You might also like