Python serves as an open-source and cost-effective alternative to the MATLAB programming language. This paper introduces a concise topology optimization Python code, named ``PyHexTop," primarily intended for educational purposes. Code employs hexagonal elements to parameterize design domains as such elements provide checkerboard-free optimized design naturally. PyHexTop is developed based on the ``HoneyTop90" MATLAB code~\cite{kumar2023honeytop90} and uses the NumPy and SciPy libraries. Code is straightforward and easily comprehensible, proving a helpful tool that can help people new in the topology optimization field to learn and explore. PyHexTop is specifically tailored to address compliance minimization with specified volume constraints. The paper provides a detailed explanation of the code for solving the MBB design and extensions to solve problems with varying boundary and force conditions. The code is publicly shared at: \url{https://github.com/PrabhatIn/PyHexTop.}
翻译:Python作为MATLAB编程语言的开源且经济高效的替代方案。本文介绍了一款名为“PyHexTop”的简洁拓扑优化Python代码,主要面向教学目的。该代码采用六边形单元对设计域进行参数化,因为此类单元能够天然生成无棋盘格现象的优化设计。PyHexTop基于“HoneyTop90”MATLAB代码开发,并利用NumPy和SciPy库。代码结构简单且易于理解,可为拓扑优化领域的新手提供学习与探索的实用工具。PyHexTop专为解决指定体积约束下的柔度最小化问题而设计。本文详细阐述了求解MBB设计的代码实现,以及扩展应用于不同边界与载荷条件问题的方法。代码已公开共享于:\url{https://github.com/PrabhatIn/PyHexTop.}