Contains tools for calculating structural member cross sectional properties and databases of standard cross sectional properties.
Project description
XSect
About
This package contains tools for calculating structural member cross sectional
properties in Python. In addition, it contains a SQLite database of standard
cross sectional properties for which data can be acquired via query functions
or instantiated directly into a new CrossSection
object.
Calculable cross sectional properties include:
- Cross sectional area
- Centroid
- Second moment of the area (moment of inertia)
- Radius of gyration
- Section modulus
- Principal angles
- Values about the principal axes for the above properties
Composite sections that consist of multiple shapes are also supported, such as those shown below. Here, the shapes shown in blue are added to the cross section, while those shown in red are subtracted cutouts.
Installation
The package may be installed via pip
by running the below command:
pip install xsect
Examples Usages
The following sections outline some possible uses for this package.
Quick Access to Properties
Whether you are performing quick calculations, perhaps through the use of
a Jupyter notebook, or a more complex calculation, you can use XSect
to
reduce the amount of input required for calculations. Rather than turning
to references to lookup and manually input properties for members, you
can create cross sections simply by passing the name of the member into
the appropriate initializer. For example:
>>> xsect.CrossSection.from_aisc('L8x8x1-1/8')
CrossSection(name='L8X8X1-1/8', area=16.8, ...)
If a property is not contained in the database, you can rapidly calculate the properties given a series of (x, y) boundary points or use one of the built-in cross section summary functions to calculate the properties for a specific shape. For example:
>>> odict = xsect.cruciform_summary(8, 8, 1.125)
>>> odict
{'area': 66.9375,
'x': 0.0,
'y': 0.0,
'width': 16.0,
'height': 16.0,
'inertia_x': 781.0517578125,
'inertia_y': 781.0517578125,
'inertia_j': 1562.103515625,
'inertia_xy': 0.0,
'inertia_z': 781.0517578125,
'gyradius_x': 3.415900115553699,
'gyradius_y': 3.415900115553699,
'gyradius_z': 3.415900115553699,
'elast_sect_mod_x': 97.6314697265625,
'elast_sect_mod_y': 97.6314697265625,
'elast_sect_mod_z': 97.6314697265625}
This can be used to quickly generate a cross section by unwrapping the
dictionary within the CrossSection
initializer:
>>> xsect.CrossSection('4L8x8x1.125', **odict)
CrossSection(name='4L8x8x1.125', area=66.9375, ...)
Design Optimization
If you are creating a Python application for analyzing and optimizing
structures, you could use XSect
to pull various cross sections from the
standard sections database to perform analysis via an iterative scheme.
You could also calculate some required properties for the member and use
a database filter to acquire the lightest cross section of a particular shape
given that criteria. For example, if you were designing a member for a known
maximum tensile force, you could calculate its required cross sectional area
and perform a filter similar to the below to get the lightest member:
>>> xsect.filter_aisc(["type='L'", 'area>28'], order=['unit_weight'])
type name T_F unit_weight area d
0 L L12X12X1-1/4 F 96.4 28.4 12.0
1 L L12X12X1-3/8 F 105.0 31.1 12.0
This returns a data frame of all "L" shape sections with areas greater than 28 in ascending order of unit weight. The first row is, naturally, the lightest member available meeting those conditions.
Likewise, if you are designing a brand new cross section, you could use one of the provided shape functions or create your own custom function to generate its boundary points, then calculate the requisite properties for your design.
Database Sources
The properties contained in the SQLite database are acquired from the following sources:
AISC Shapes
The database includes steel shapes from the American Institute of Steel Construction (AISC), which were taken from the below publicly available locations. For variable descriptions, please consult the README included with their data.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xsect-1.1.2.tar.gz
.
File metadata
- Download URL: xsect-1.1.2.tar.gz
- Upload date:
- Size: 300.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81bf5aafbd4485d758dbccb286be470476dc1919da9339c3fac433462a04e2d2 |
|
MD5 | c4a1e9ef7a05b1670f1b1dfa099c3550 |
|
BLAKE2b-256 | c3ff381f145ded6710a78ec04da411893afc3a22b212ff55af16d2718ecd4484 |
File details
Details for the file xsect-1.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: xsect-1.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 309.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4da8df9c43dbf08cb0254d7b47e8a120f84735d2fbf7bf9f934138a404cd506 |
|
MD5 | c15e9f7985336d0b968c29699d11a66c |
|
BLAKE2b-256 | 3bb527e4860db3ed29506764342c43fc8652554b7cf42a415f471b2b8a9e98f3 |