This paper presents a 55-line code written in python for 2D and 3D topology optimization (TO) based on the open-source finite element computing software (FEniCS), equipped with various finite element tools and solvers. PETSc is used as the linear algebra back-end, which results in significantly less computational time than standard python libraries. The code is designed based on the popular solid isotropic material with penalization (SIMP) methodology. Extensions to multiple load cases, different boundary conditions, and incorporation of passive elements are also presented. Thus, this implementation is the most compact implementation of SIMP based topology optimization for 3D as well as 2D problems. Utilizing the concept of Euclidean distance matrix to vectorize the computation of the weight matrix for the filter, we have achieved a substantial reduction in the computational time and have also made it possible for the code to work with complex ground structure configurations. We have also presented the code's extension to large-scale topology optimization problems with support for parallel computations on complex structural configuration, which could help students and researchers explore novel insights into the TO problem with dense meshes. Appendix-A contains the complete code, and the website: \url{https://github.com/iitrabhi/topo-fenics} also contains the complete code.
翻译:本文展示了以开源有限元素计算软件(FENICS)为基础的2D 和 3D 地形优化(TO) Python 中55行代码,该软件以开放源源有限元素计算软件(FENICS)为基础,配备了各种限定元素工具和解答器。 PETsc 用作线形代数后端,其计算时间大大少于标准 python 库。该代码的设计基于常用固态异地材料,并采用惩罚性(SIMP) 方法。还介绍了对多个负载案例、不同边界条件和吸收被动元素的扩展。因此,这一实施是基于 SIMP 的3D 和 2D 问题的表层优化最紧凑的实施。利用 Euclidean 远程矩阵概念来将过滤器的重量矩阵计算进行矢量化,我们大大缩短了计算时间,并使代码能够与复杂的地面结构配置(SIMP) 一同工作。我们还介绍了该代码扩展到大规模表层优化问题的扩展范围,支持复杂的结构配置的平行计算,这有助于学生和研究人员们探索关于Imasimal-abusal colm/to colm网站。