Retrieving Section Properties¶
This example demonstrates how to retrieve cross-section properties in sectionproperties. It is suggested that you are familiar with How Material Properties Affect Results before reading this example.
Geometric-only Properties¶
This section retrieves the frame properties for a 150 x 100 x 8 UA stiffened by a 125 x 12 plate at its base.
[1]:
from sectionproperties.analysis import Section
from sectionproperties.pre.library import angle_section, rectangular_section
angle = angle_section(d=150, b=100, t=8, r_r=12, r_t=5, n_r=8)
plate = rectangular_section(d=12, b=125)
geom = angle + plate.shift_section(x_offset=-12.5, y_offset=-12)
geom.create_mesh(mesh_sizes=[10, 25])
sec = Section(geometry=geom)
sec.plot_mesh(materials=False)
[1]:
<Axes: title={'center': 'Finite Element Mesh'}>
We can perform a frame analysis and use the various get methods to retrieve the cross-section properties required for a frame analysis.
[2]:
sec.calculate_frame_properties()
area = sec.get_area()
ixx_c, iyy_c, ixy_c = sec.get_ic()
phi = sec.get_phi()
j = sec.get_j()
[3]:
print(f"Area = {area:.1f} mm2")
print(f"Ixx = {ixx_c:.3e} mm4")
print(f"Iyy = {iyy_c:.3e} mm4")
print(f"Ixy = {ixy_c:.3e} mm4")
print(f"Principal axis angle = {phi:.1f} deg")
print(f"Torsion constant = {j:.3e} mm4")
Area = 3456.8 mm2
Ixx = 6.955e+06 mm4
Iyy = 4.226e+06 mm4
Ixy = -2.816e+06 mm4
Principal axis angle = -147.9 deg
Torsion constant = 2.926e+05 mm4
Composite Properties¶
To demonstrate how to retrieve cross-section properties from a composite analysis, a reinforced concrete beam will be modelled.
First we create our concrete and steel material properties.
[4]:
from sectionproperties.pre import Material
concrete = Material(
name="Concrete",
elastic_modulus=30.1e3,
poissons_ratio=0.2,
yield_strength=32,
density=2.4e-6,
color="lightgrey",
)
steel = Material(
name="Steel",
elastic_modulus=200e3,
poissons_ratio=0.3,
yield_strength=500,
density=7.85e-6,
color="grey",
)
Next we define our reinforced concrete geometry, generate a mesh and a Section object.
[5]:
from sectionproperties.pre.library import concrete_rectangular_section
geom = concrete_rectangular_section(
d=600,
b=300,
dia_top=16,
area_top=200,
n_top=3,
c_top=20,
dia_bot=20,
area_bot=310,
n_bot=3,
c_bot=30,
n_circle=8,
conc_mat=concrete,
steel_mat=steel,
)
geom.create_mesh(mesh_sizes=2500)
sec = Section(geometry=geom)
sec.plot_mesh()
[5]:
<Axes: title={'center': 'Finite Element Mesh'}>
In this case, we are interested in obtaining the uncracked axial rigidity, flexural rigidity and torsional rigidity. We will therefore conduct a frame analysis.
[6]:
props = sec.calculate_frame_properties()
Note that we cannot retrieve the geometric second moments of area as in the previous example because we have conducted a composite analysis (i.e. provided material properties).
[7]:
sec.get_ic()
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[7], line 1
----> 1 sec.get_ic()
File ~/checkouts/readthedocs.org/user_builds/sectionproperties/checkouts/latest/src/sectionproperties/analysis/section.py:2203, in Section.get_ic(self)
2201 msg = "Attempting to get a geometric only property for a composite analysis"
2202 msg += " (material properties have been applied). Consider using get_eic()."
-> 2203 raise RuntimeError(msg)
2205 if (
2206 self.section_props.ixx_c is None
2207 or self.section_props.ixy_c is None
2208 or self.section_props.iyy_c is None
2209 ):
2210 msg = "Conduct a geometric analysis."
RuntimeError: Attempting to get a geometric only property for a composite analysis (material properties have been applied). Consider using get_eic().
The above error message is helpful, informing us that we should instead use get_eic().
[8]:
# get relevant modulus weighted properties
eixx, _, _ = sec.get_eic()
ea = sec.get_ea()
ej = sec.get_ej()
# print results
print(f"Axial rigidity (E.A): {ea:.3e} N")
print(f"Flexural rigidity (E.I): {eixx:.3e} N.mm2")
# note we are usually interested in G.J not E.J
# geometric analysis required for effective material properties
sec.calculate_geometric_properties()
gj = sec.get_g_eff() / sec.get_e_eff() * ej
print(f"Torsional rigidity (G.J): {gj:.3e} N.mm2")
Axial rigidity (E.A): 5.678e+09 N
Flexural rigidity (E.I): 1.807e+14 N.mm2
Torsional rigidity (G.J): 4.671e+13 N.mm2
Note that transformed cross-section properties are often required for design purposes. We can use the e_ref argument to provide either a material of elastic modulus to obtain transformed properties in sectionproperties.
[9]:
print(f"E.I = {eixx:.3e} N.mm2")
print(f"I = {sec.get_eic(e_ref=concrete)[0]:.3e} mm4")
print(f"I = {sec.get_eic(e_ref=30.1e3)[0]:.3e} mm4")
E.I = 1.807e+14 N.mm2
I = 6.005e+09 mm4
I = 6.005e+09 mm4
Note that the transformed second moment of area includes the contribution of the steel and is therefore larger than that of a 600D x 300W rectangle.
[10]:
print(f"I_rect = {300 * 600**3 / 12:.3e} mm4")
I_rect = 5.400e+09 mm4
Finally, we can print the transformed section properties using the display_transformed_results() method.
[11]:
sec.display_transformed_results(e_ref=concrete, fmt=".3e")
Transformed Section Properties ┏━━━━━━━━━━━┳━━━━━━━━━━━┓ ┃ Property ┃ Value ┃ ┡━━━━━━━━━━━╇━━━━━━━━━━━┩ │ geom area │ 1.800e+05 │ │ perimeter │ 1.800e+03 │ │ mass │ 4.403e-01 │ │ e_ref │ 3.010e+04 │ │ a │ 1.886e+05 │ │ qx │ 5.615e+07 │ │ qy │ 2.830e+07 │ │ ixx_g │ 2.272e+10 │ │ iyy_g │ 5.670e+09 │ │ ixy_g │ 8.422e+09 │ │ cx │ 1.500e+02 │ │ cy │ 2.976e+02 │ │ ixx_c │ 6.005e+09 │ │ iyy_c │ 1.426e+09 │ │ ixy_c │ 7.267e-06 │ │ zxx+ │ 1.986e+07 │ │ zxx- │ 2.017e+07 │ │ zyy+ │ 9.508e+06 │ │ zyy- │ 9.508e+06 │ │ my_xx │ 6.355e+08 │ │ my_yy │ 3.042e+08 │ │ rx │ 1.784e+02 │ │ ry │ 8.695e+01 │ │ i11_c │ 6.005e+09 │ │ i22_c │ 1.426e+09 │ │ phi │ 0.000e+00 │ │ z11+ │ 1.986e+07 │ │ z11- │ 2.017e+07 │ │ z22+ │ 9.508e+06 │ │ z22- │ 9.508e+06 │ │ my_11 │ 6.355e+08 │ │ my_22 │ 3.042e+08 │ │ r11 │ 1.784e+02 │ │ r22 │ 8.695e+01 │ │ e_eff │ 3.154e+04 │ │ g_eff │ 1.309e+04 │ │ nu_eff │ 2.050e-01 │ │ j │ 3.740e+09 │ └───────────┴───────────┘