Analysis#
Section Object#
The first step in running a cross-section analysis in sectionproperties
involves the
creation of a Section
object. This object
stores the cross-section geometry and finite element mesh, providing methods to perform
various types of cross-sectional analyses.
- Section.__init__(geometry: Geometry | CompoundGeometry, time_info: bool = False) None [source]
Inits the Section class.
The constructor extracts information from the provided mesh object and creates and stores the corresponding finite element objects.
- Parameters:
geometry (Geometry | CompoundGeometry) – Cross-section geometry object used to generate the mesh
time_info (bool) – If set to True, a detailed description of the computation and the time cost is printed to the terminal for every computation performed
- Raises:
ValueError – If geometry does not contain a mesh
AssertionError – If the number of materials does not equal the number of regions
Checking Mesh Quality#
Before carrying out a section analysis it is a good idea to check the quality of the finite element mesh. Some useful methods are provided to display mesh statistics and to plot the finite element mesh:
- Section.plot_mesh(alpha: float = 0.5, materials: bool = True, mask: list[bool] | None = None, title: str = 'Finite Element Mesh', **kwargs) Axes [source]
Plots the finite element mesh.
- Parameters:
alpha (float) – Transparency of the mesh outlines: \(0 \leq \alpha \leq 1\)
materials (bool) – If set to True shades the elements with the specified material colors
mask (list[bool] | None) – Mask array, of length
num_nodes
, to mask out trianglestitle (str) – Plot title
kwargs – Passed to
plotting_context()
- Returns:
Matplotlib axes object
- Return type:
Example
The following example plots the mesh for a rectanglular steel-timber composite section:
from sectionproperties.pre import Material from sectionproperties.pre.library import rectangular_section from sectionproperties.analysis import Section steel = Material( name="Steel", elastic_modulus=200e3, poissons_ratio=0.3, density=7.85e-6, yield_strength=250, color="grey", ) timber = Material( name="Timber", elastic_modulus=8e3, poissons_ratio=0.35, density=6.5e-7, yield_strength=20, color="burlywood", ) geom_steel = rectangular_section(d=50, b=50, material=steel) geom_timber = rectangular_section(d=50, b=50, material=timber) geom = geom_timber.align_to(geom_steel, on="right") + geom_steel geom.create_mesh(mesh_sizes=[10, 5]) Section(geometry=geom).plot_mesh()
(
Source code
,png
,hires.png
,pdf
)
Geometric Analysis#
A geometric analysis calculates the area properties of the section.
- Section.calculate_geometric_properties() None [source]
Calculates geometric (area) properties.
Calculates the geometric properties of the cross-section and stores them in the
SectionProperties
object contained in thesection_props
variable.Note
If materials are specified for the cross-section, the moments of area and section moduli are elastic modulus weighted.
Geometric Properties
Below is a list of the section properties calculated by the
calculate_geometric_properties()
method:Cross-sectional area
Cross-sectional perimeter
Cross-sectional mass
Area weighted material properties (composite only) \(E_{eff}\), \(G_{eff}\), \({\nu}_{eff}\)
Modulus weighted area (axial rigidity)
First moments of area
Second moments of area about the global axis
Second moments of area about the centroidal axis
Elastic centroid
Centroidal section moduli
Radii of gyration
Principal axis properties
Plastic Analysis#
A plastic analysis calculates the plastic properties of the section.
Warning
The plastic analysis in sectionproperties assumes all materials are able to reach their yield stress defined in the material properties. Care should be taken if analysing materials or cross-sections exhibiting non-linear behaviour, e.g. reinforced concrete or non-compact steel sections.
- Section.calculate_plastic_properties(verbose: bool = False) None [source]
Calculates plastic properties.
Calculates the plastic properties of the cross-section and stores them in the
SectionProperties
object contained in thesection_props
variable.- Parameters:
verbose (bool) – If set to True, the number of iterations required for each plastic axis is printed to the terminal.
- Raises:
RuntimeError – If the geometric properties have not been calculated prior to calling this method
Note
If materials are specified, the values calculated for the plastic section moduli are displayed as plastic moments (i.e \(M_p = f_y S\)) and the shape factors are not calculated.
Warning
The geometric properties must be calculated prior to the calculation of the plastic properties.
Plastic Properties
Below is a list of the section properties calculated by the
calculate_plastic_properties()
method:Plastic centroids (centroidal and principal axes)
Plastic section moduli (centroidal and principal axes)
Shape factors, non-composite only (centroidal and principal axe)
Warping Analysis#
A warping analysis calculates the torsion and shear properties of the section.
Warning
There must be connectivity between all elements of the mesh to perform a valid warping analysis. This is a limitation of the elastic theory that this implementation is based on, as there is no way to quantify the transfer of shear and warping between two unconnected regions.
- Section.calculate_warping_properties(solver_type: str = 'direct') None [source]
Calculates warping properties.
Calculates all the warping properties of the cross-section and stores them in the
SectionProperties
object contained in thesection_props
variable.- Parameters:
solver_type (str) – Solver used for solving systems of linear equations, either using the
"direct"
method or"cgs"
iterative method- Raises:
RuntimeError – If the geometric properties have not been calculated prior to calling this method
Note
If materials are specified, the values calculated for the torsion constant, warping constant and shear areas are elastic modulus weighted.
Warning
The geometric properties must be calculated prior to the calculation of the warping properties.
Warping Properties
Below is a list of the section properties calculated by the
calculate_warping_properties()
method:Torsion constant
Shear centre
Shear area
Warping constant
Monosymmetry constant
Frame Analysis#
Calculates the section properties required for a 2D or 3D frame analysis.
Note
This method is significantly faster than performing a geometric and a warping analysis and has no prerequisites.
- Section.calculate_frame_properties(solver_type: str = 'direct') tuple[float, float, float, float, float, float] [source]
Calculates section properties to be used for frame analysis.
Calculates and returns the properties required for a frame analysis. The properties are also stored in the
SectionProperties
object contained in thesection_props
variable.This method is more efficient than running a geometric and warping analysis as unnecessary values are not calculated.
- Parameters:
solver_type (str) – Solver used for solving systems of linear equations, either using the
"direct"
method or"cgs"
iterative method- Returns:
Cross-section properties to be used for a frame analysis (
area
,ixx
,iyy
,ixy
,j
,phi
)- Return type:
Note
If materials are specified, the values calculated for the moments of area and the torsion constant are elastic modulus weighted.
Warping Properties
Below is a list of the section properties calculated by the
calculate_frame_properties()
method:Cross-sectional area
Second moments of area about the centroidal axis
Torsion constant
Principal axis angle
Stress Analysis#
A stress analysis calculates the section stresses arising from a set of forces
and moments. Executing this method returns a
StressPost
object, which stores the
section stresses and provides stress plotting methods.
Warning
The stress analysis in sectionproperties is linear-elastic and does not account for the yielding of materials or any non-linearities.
- Section.calculate_stress(n: float = 0.0, vx: float = 0.0, vy: float = 0.0, mxx: float = 0.0, myy: float = 0.0, m11: float = 0.0, m22: float = 0.0, mzz: float = 0.0) StressPost [source]
Calculates cross-section stresses.
Calculates the cross-section stress resulting from design actions and returns a
StressPost
object allowing the post-processing of the stress results.- Parameters:
n (float) – Axial force
vx (float) – Shear force acting in the x-direction
vy (float) – Shear force acting in the y-direction
mxx (float) – Bending moment about the centroidal xx-axis
myy (float) – Bending moment about the centroidal yy-axis
m11 (float) – Bending moment about the centroidal 11-axis
m22 (float) – Bending moment about the centroidal 22-axis
mzz (float) – Torsion moment about the centroidal zz-axis
- Returns:
Object for post-processing cross-section stresses
- Raises:
RuntimeError – If a geometric and warping analysis (if required) have not been performed prior to calling this method
- Return type:
Note
A geometric analysis must be performed prior to performing a stress analysis. Further, if the shear force or torsion is non-zero a warping analysis must also be performed.