|
| 1 | +--- |
| 2 | +title: "sectionproperties: A Python package for the analysis of arbitrary cross-sections using the finite element method" |
| 3 | +tags: |
| 4 | + - python |
| 5 | + - computational mechanics |
| 6 | + - finite element method |
| 7 | + - cross-section |
| 8 | + - stress analysis |
| 9 | + - engineering |
| 10 | +authors: |
| 11 | + - given-names: Robbie |
| 12 | + non-dropping-particle: van |
| 13 | + surname: Leeuwen |
| 14 | + orcid: 0009-0004-8056-3977 |
| 15 | + affiliation: 1 |
| 16 | + - name: Connor Ferster |
| 17 | + orcid: 0009-0005-0861-2428 |
| 18 | + affiliation: 2 |
| 19 | +affiliations: |
| 20 | + - name: Independent Researcher, Australia |
| 21 | + index: 1 |
| 22 | + - name: Independent Researcher, Canada # update |
| 23 | + index: 2 |
| 24 | +date: 13 October 2023 |
| 25 | +bibliography: paper.bib |
| 26 | +--- |
| 27 | + |
| 28 | +# Summary |
| 29 | + |
| 30 | +Properties of plane cross-sections are often required in engineering research, analysis, |
| 31 | +and design. For example, cross-sectional properties are used to determine the |
| 32 | +displacements, natural frequencies, and stresses within beams under complex loading. |
| 33 | +`sectionproperties` is a Python package for the analysis of _arbitrary_ cross-sections |
| 34 | +using the finite element method. `sectionproperties` can be used to determine |
| 35 | +geometric and warping properties, as well as visualising cross-sectional stresses |
| 36 | +resulting from combinations of applied loads. `sectionproperties` aims to provide a |
| 37 | +pre-processor, analysis engine, and post-processor, in a single open source and |
| 38 | +accessible package, that can be used by researchers, practising engineers, and students. |
| 39 | + |
| 40 | +# Statement of Need |
| 41 | + |
| 42 | +Obtaining the geometric properties of simple shapes is a classical engineering problem |
| 43 | +with well-defined analytical solutions. However, obtaining warping properties, e.g. for |
| 44 | +torsion and shear analyses, involves solving partial differential equations [@pilkey]. |
| 45 | +While some analytical solutions exist for a small subset of geometries, the method for |
| 46 | +obtaining these results is not able to be generalised to shapes commonly used in |
| 47 | +engineering pratice. Further, the analysis of arbitrary composite geometries, in which a |
| 48 | +cross-section could consist of any shape with any number of internal holes, and be made |
| 49 | +from any number of materials, complicates both geometric and warping computations. |
| 50 | + |
| 51 | +To the best of our knowledge, there is no open source software available for the |
| 52 | +computation of both geometric and warping propreties for composite, arbitary |
| 53 | +cross-sections. While there are several commercial solutions available, e.g. |
| 54 | +[`RSECTION 1`](https://www.dlubal.com/en/products/cross-section-properties-software/rsection), |
| 55 | +[`ShapeDesigner SaaS`](http://mechatools.com/en/shapedesigner.html), or |
| 56 | +[`CADRE Profiler`](https://www.cadreanalytic.com/profiler.htm), none of these are |
| 57 | +open source or provide an application programming interface (API) that would enable |
| 58 | +these programs to be used for research. As a result, `sectionproperties` supports both |
| 59 | +engineering practice and research, by implementing an open source solution to the |
| 60 | +complex modelling problem that is arbitrary composite geometric and warping analyses. |
| 61 | + |
| 62 | +# Implementation |
| 63 | + |
| 64 | +`sectionproperties` harnesses the power of Shapely [@shapely] to streamline geometry |
| 65 | +generation, and triangle [@triangle] (a python port of Triangle [@shewchuck]) to produce |
| 66 | +a triangular mesh of six-noded quadratic elements. The finite element method is used to |
| 67 | +solve for the geometric and warping properties, the latter involving the solution of |
| 68 | +partial differential equations and boundary value problems [@pilkey]. For example, the |
| 69 | +Saint-Venant torsion constant ($J$) is obtained by solving for the warping function, |
| 70 | +$\omega$ [@pilkey]: |
| 71 | + |
| 72 | +$$ |
| 73 | +\nabla^2 \omega = 0 |
| 74 | +$$ |
| 75 | + |
| 76 | +subject to the boundary condition: |
| 77 | + |
| 78 | +$$ |
| 79 | +\frac{\partial \omega}{\partial x} n_x + \frac{\partial \omega}{\partial y} n_y = y n_x - x n_y |
| 80 | +$$ |
| 81 | + |
| 82 | +Using the finite element method, this problem is reduced to a set of linear equations of |
| 83 | +the form: |
| 84 | + |
| 85 | +$$ |
| 86 | +\textbf{K} \boldsymbol{\omega} = \textbf{F} |
| 87 | +$$ |
| 88 | + |
| 89 | +where the stiffness matrix and load vector at the element level are defined as: |
| 90 | + |
| 91 | +$$ |
| 92 | +\textbf{k}^e = \sum_{i=1}^6 w_i \textbf{B}_i^{\rm T} \textbf{B}_i J_i |
| 93 | +$$ |
| 94 | + |
| 95 | +$$ |
| 96 | +\textbf{f}^e = \sum_{i=1}^6 w_i \textbf{B}_i^{\rm T} |
| 97 | +\begin{bmatrix} |
| 98 | + \textbf{N}_i \textbf{y}_e \\ |
| 99 | + -\textbf{N}_i \textbf{x}_e \\ |
| 100 | +\end{bmatrix} J_i |
| 101 | +$$ |
| 102 | + |
| 103 | +In the above, $\textbf{N}$ and $\textbf{B}$ are the shape functions and their |
| 104 | +derivatives, and $w_i$ and $J_i$ are the weights and Jacobians of the current |
| 105 | +integration point. The boundary conditions neccesitate the inversion of a nearly |
| 106 | +singular global stiffness matrix. As such, the Lagrangian multiplier method is used to |
| 107 | +solve the set of linear equations of the form $\textbf{K} \textbf{u} = \textbf{F}$ by |
| 108 | +introducing an extra constraint on the solution vector, whereby the mean value is equal |
| 109 | +to zero [@larson]. |
| 110 | + |
| 111 | +$$ |
| 112 | +\begin{bmatrix} |
| 113 | + \textbf{K} & \textbf{C}^{\rm{T}} \\ |
| 114 | + \textbf{C} & 0 \\ |
| 115 | +\end{bmatrix} |
| 116 | +\begin{bmatrix} |
| 117 | + \textbf{u} \\ |
| 118 | + \lambda \\ |
| 119 | +\end{bmatrix} = |
| 120 | +\begin{bmatrix} |
| 121 | + \textbf{F} \\ |
| 122 | + 0 \\ |
| 123 | +\end{bmatrix} |
| 124 | +$$ |
| 125 | + |
| 126 | +where $\textbf{C}$ is the assembly of $\sum_{i} w_i \textbf{N}_i J_i$, and $\lambda$ |
| 127 | +may be though of as a relatively small force acting to enforce the constraints. Once the |
| 128 | +warping function has been evaluated, the Saint-Venant torsion constant can be calculated |
| 129 | +as follows: |
| 130 | + |
| 131 | +$$ |
| 132 | +J = I_{xx} + I_{yy} - \boldsymbol{\omega}^{\rm T} \textbf{K} \boldsymbol{\omega} |
| 133 | +$$ |
| 134 | + |
| 135 | +The calculation of plastic properties is meshless, and is conducted using an iterative |
| 136 | +method to enforce plastic equilibrium, yielding the plastic centroids. A full |
| 137 | +description of the theoretical background underpinning `sectionproperties` can |
| 138 | +be found in the |
| 139 | +[documentation](https://sectionproperties.readthedocs.io/en/stable/user_guide/theory.html). |
| 140 | + |
| 141 | +An example of some of the visualisation generated by `sectionproperties` can be seen in |
| 142 | +\autoref{fig:example} below. |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | +# Software Development |
| 147 | + |
| 148 | +The `sectionproperties` package is available on [GitHub](https://github.com/robbievanleeuwen/section-properties), |
| 149 | +where the source code, issue tracker, CI workflow, and discussion board can be found. |
| 150 | +Pre-commit hooks are used to ensure code quality and style is consistent across all |
| 151 | +contributions. There is an extensive testing and validation suite used to ensure that |
| 152 | +the output produced by `sectionproperties` is verified and repeatable, including a set |
| 153 | +of benchmarking tests. `sectionproperties` has an actively maintained and complete |
| 154 | +[documentation](https://sectionproperties.readthedocs.io), including |
| 155 | +[installation instructions](https://sectionproperties.readthedocs.io/en/stable/installation.html), |
| 156 | +a detailed [user guide](https://sectionproperties.readthedocs.io/en/stable/user_guide.html), |
| 157 | +a list of [examples](https://sectionproperties.readthedocs.io/en/stable/examples.html), |
| 158 | +and an [API reference](https://sectionproperties.readthedocs.io/en/stable/api.html). |
| 159 | + |
| 160 | +# Conclusion |
| 161 | + |
| 162 | +In this paper we have described `sectionproperties`, a Python package that calculates |
| 163 | +the section properties of arbitrary sections. It is our hope that this project is used |
| 164 | +by researchers and practising engineers to improve their experimental and analysis |
| 165 | +workflows. |
| 166 | + |
| 167 | +# Acknowledgements |
| 168 | + |
| 169 | +We acknowledge the contributions from all the |
| 170 | +[contributors](https://github.com/robbievanleeuwen/section-properties/graphs/contributors) |
| 171 | +to `sectionproperties`. |
| 172 | + |
| 173 | +# References |
0 commit comments