{"title":"TrussMe-Fem: A toolbox for symbolic-numerical analysis and solution of structures","authors":"Davide Stocco , Matteo Larcher , Matteo Tomasi, Enrico Bertolazzi","doi":"10.1016/j.cpc.2024.109476","DOIUrl":null,"url":null,"abstract":"<div><div>Structural mechanics is pivotal in comprehending how structures respond to external forces and imposed displacements. Typically, the analysis of structures is performed numerically using the direct stiffness method, which is an implementation of the finite element method. This method is commonly associated with the numerical solution of large systems of equations. However, the underlying theory can also be conveniently used to perform the analysis of structures either symbolically or in a hybrid symbolic-numerical fashion. This approach is useful to mitigate the computational burden as the obtained partial or full symbolic solution can be simplified and used to generate lean code for efficient simulations. Nonetheless, the symbolic direct stiffness method is also useful for model reduction purposes, as it allows the derivation of small-scale models that can be used for diminishing simulation time. Despite the mentioned advantages, symbolic computation carries intrinsically complex operations. In particular, the symbolic solution of large linear systems of equations is hard to compute, and it may not always be available due to software capabilities. This paper introduces a toolbox named <span>TrussMe-Fem</span>, whose implementation is based on the direct stiffness method. <span>TrussMe-Fem</span> leverages <span>Maple</span>®'s symbolic computation and <span>Matlab</span>®'s numerical capabilities for symbolic and hybrid symbolic-numerical analyses and solutions of structures. Efficient code generation is also possible by exploiting the simplification of the problem's expressions. The challenges posed by symbolic computation on the solution of large linear systems are addressed by introducing novel routines for the symbolic matrix factorization with the hierarchical representation of large expressions. For this purpose, the <span>TrussMe-Fem</span> toolbox optionally uses the <span>Lem</span> and <span>Last Maple</span>® packages, which are also available as open-source software.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> <span>TrussMe-Fem</span></div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/m59fyw5hs4.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/StoccoDavide/TrussMe-FEM</span><svg><path></path></svg></span> – Optional dependencies: <span>Lem</span> <span><span>https://github.com/StoccoDavide/LEM</span><svg><path></path></svg></span>, <span>Last</span> <span><span>https://github.com/StoccoDavide/LAST</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> BSD 3-clause.</div><div><em>Programming language:</em> <span>Maple</span>®, <span>Matlab</span>®.</div><div><em>Supplementary material:</em> Usage examples for the <span>TrussMe-Fem</span> toolbox, <span>Lem</span> and <span>Last Maple</span>® packages.</div><div><em>Nature of problem:</em> Structural mechanics is a branch of mechanics that studies the behavior of structures subjected to loads and displacements. Typically, the analysis of the deformations and internal reactions is performed numerically using the finite element method. The plain numerical solution, however, is not always suitable for optimization problems. With the recent advances in symbolic computation, it is possible to perform the analysis of structures either symbolically or in a hybrid symbolic-numerical fashion. This approach is useful for enhancing the optimization process, as the derivatives of the solution with respect to the optimization parameters can be easily calculated. Nonetheless, lean code for efficient simulations can be generated by exploiting the simplification of the problem's symbolic expressions.</div><div><em>Solution method:</em> We combine the symbolic computation capabilities of <span>Maple</span>® with the numerical performance of <span>Matlab</span>® to develop a toolbox for the symbolic or hybrid symbolic-numerical analysis and solution of structures. The toolbox is based on the direct stiffness method and allows for modeling, analyzing, and solving structures. Depending on the symbolic kernel capability, available computation time, and problem complexity, the symbolic solution can be obtained in closed or numerical form. In both cases, a <span>Matlab</span>® class can be generated to efficiently evaluate the symbolic solution or to numerically solve the problem. During the code generation, model inputs and class internal data are appropriately mapped to the generated code.</div><div><em>Additional comments including restrictions and unusual features:</em> The symbolic inversion of large matrices is an intrinsically complex task that may not always be carried out due to the expression swell phenomenon. Such a phenomenon causes the size of the expressions to significantly increase during the computation [1] and large CPU times are required to complete the matrix inversion tasks. As a consequence, the symbolic solution of large linear systems is not always available. For this reason, the toolbox resorts to symbolic matrix factorization techniques [2]. However, the symbolic decomposition may also be slowed down by the expression swell phenomenon [3]. In this case, the only viable option is to resort to the numerical solution of the linear system.</div></div><div><h3>References</h3><div><ul><li><span>[1]</span><span><div>W. Zhou, Symbolic computation techniques for solving large expression problems from mathematics and engineering, Ph.D. thesis, University of Western Ontario, 2007.</div></span></li><li><span>[2]</span><span><div>J. Carette, W. Zhou, D. J. Jeffrey, M.B. Monagan, Linear algebra using Maple's LargeExpressions package, in: Proceedings of Maple Conference, 2006, pp. 14–25.</div></span></li><li><span>[3]</span><span><div>W. Zhou, J. Carette, D.J. Jeffrey, M.B. Monagan, Hierarchical representations with signatures for large expression management, in: Artificial Intelligence and Symbolic Computation: 8th International Conference, AISC 2006 Beijing, China, September 20-22, 2006 Proceedings 8, 2006, pp. 254–268. Springer.</div></span></li></ul></div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"309 ","pages":"Article 109476"},"PeriodicalIF":7.2000,"publicationDate":"2024-12-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Physics Communications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010465524003990","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0
Abstract
Structural mechanics is pivotal in comprehending how structures respond to external forces and imposed displacements. Typically, the analysis of structures is performed numerically using the direct stiffness method, which is an implementation of the finite element method. This method is commonly associated with the numerical solution of large systems of equations. However, the underlying theory can also be conveniently used to perform the analysis of structures either symbolically or in a hybrid symbolic-numerical fashion. This approach is useful to mitigate the computational burden as the obtained partial or full symbolic solution can be simplified and used to generate lean code for efficient simulations. Nonetheless, the symbolic direct stiffness method is also useful for model reduction purposes, as it allows the derivation of small-scale models that can be used for diminishing simulation time. Despite the mentioned advantages, symbolic computation carries intrinsically complex operations. In particular, the symbolic solution of large linear systems of equations is hard to compute, and it may not always be available due to software capabilities. This paper introduces a toolbox named TrussMe-Fem, whose implementation is based on the direct stiffness method. TrussMe-Fem leverages Maple®'s symbolic computation and Matlab®'s numerical capabilities for symbolic and hybrid symbolic-numerical analyses and solutions of structures. Efficient code generation is also possible by exploiting the simplification of the problem's expressions. The challenges posed by symbolic computation on the solution of large linear systems are addressed by introducing novel routines for the symbolic matrix factorization with the hierarchical representation of large expressions. For this purpose, the TrussMe-Fem toolbox optionally uses the Lem and Last Maple® packages, which are also available as open-source software.
Program summary
Program Title:TrussMe-Fem
CPC Library link to program files:https://doi.org/10.17632/m59fyw5hs4.1
Supplementary material: Usage examples for the TrussMe-Fem toolbox, Lem and Last Maple® packages.
Nature of problem: Structural mechanics is a branch of mechanics that studies the behavior of structures subjected to loads and displacements. Typically, the analysis of the deformations and internal reactions is performed numerically using the finite element method. The plain numerical solution, however, is not always suitable for optimization problems. With the recent advances in symbolic computation, it is possible to perform the analysis of structures either symbolically or in a hybrid symbolic-numerical fashion. This approach is useful for enhancing the optimization process, as the derivatives of the solution with respect to the optimization parameters can be easily calculated. Nonetheless, lean code for efficient simulations can be generated by exploiting the simplification of the problem's symbolic expressions.
Solution method: We combine the symbolic computation capabilities of Maple® with the numerical performance of Matlab® to develop a toolbox for the symbolic or hybrid symbolic-numerical analysis and solution of structures. The toolbox is based on the direct stiffness method and allows for modeling, analyzing, and solving structures. Depending on the symbolic kernel capability, available computation time, and problem complexity, the symbolic solution can be obtained in closed or numerical form. In both cases, a Matlab® class can be generated to efficiently evaluate the symbolic solution or to numerically solve the problem. During the code generation, model inputs and class internal data are appropriately mapped to the generated code.
Additional comments including restrictions and unusual features: The symbolic inversion of large matrices is an intrinsically complex task that may not always be carried out due to the expression swell phenomenon. Such a phenomenon causes the size of the expressions to significantly increase during the computation [1] and large CPU times are required to complete the matrix inversion tasks. As a consequence, the symbolic solution of large linear systems is not always available. For this reason, the toolbox resorts to symbolic matrix factorization techniques [2]. However, the symbolic decomposition may also be slowed down by the expression swell phenomenon [3]. In this case, the only viable option is to resort to the numerical solution of the linear system.
References
[1]
W. Zhou, Symbolic computation techniques for solving large expression problems from mathematics and engineering, Ph.D. thesis, University of Western Ontario, 2007.
[2]
J. Carette, W. Zhou, D. J. Jeffrey, M.B. Monagan, Linear algebra using Maple's LargeExpressions package, in: Proceedings of Maple Conference, 2006, pp. 14–25.
[3]
W. Zhou, J. Carette, D.J. Jeffrey, M.B. Monagan, Hierarchical representations with signatures for large expression management, in: Artificial Intelligence and Symbolic Computation: 8th International Conference, AISC 2006 Beijing, China, September 20-22, 2006 Proceedings 8, 2006, pp. 254–268. Springer.
期刊介绍:
The focus of CPC is on contemporary computational methods and techniques and their implementation, the effectiveness of which will normally be evidenced by the author(s) within the context of a substantive problem in physics. Within this setting CPC publishes two types of paper.
Computer Programs in Physics (CPiP)
These papers describe significant computer programs to be archived in the CPC Program Library which is held in the Mendeley Data repository. The submitted software must be covered by an approved open source licence. Papers and associated computer programs that address a problem of contemporary interest in physics that cannot be solved by current software are particularly encouraged.
Computational Physics Papers (CP)
These are research papers in, but are not limited to, the following themes across computational physics and related disciplines.
mathematical and numerical methods and algorithms;
computational models including those associated with the design, control and analysis of experiments; and
algebraic computation.
Each will normally include software implementation and performance details. The software implementation should, ideally, be available via GitHub, Zenodo or an institutional repository.In addition, research papers on the impact of advanced computer architecture and special purpose computers on computing in the physical sciences and software topics related to, and of importance in, the physical sciences may be considered.