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 ``\texttt{PyHexTop}," primarily intended for educational purposes. Code employs hexagonal elements to parameterize design domains as such elements provide checkerboard-free optimized design naturally. \texttt{PyHexTop} is developed based on the ``\texttt{HoneyTop90}" MATLAB code~\cite{kumar2023honeytop90} and uses the \texttt{NumPy} and \texttt{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. \texttt{PyHexTop} is specifically tailored to address compliance minimization with specified volume constraints. The paper provides a detailed explanation of the code for solving the Messerschmitt-Bolkow-Blohm beam and extensions to solve problems different problems. The code is publicly shared at: \url{https://github.com/PrabhatIn/PyHexTop.}
翻译:Python作为MATLAB编程语言的开源且经济高效的替代方案,本文介绍了一款名为"PyHexTop"的简洁拓扑优化Python代码,主要面向教学目的。代码采用六边形单元参数化设计域,因为此类单元能够自然地生成无棋盘格模式的优化设计。PyHexTop基于"HoneyTop90" MATLAB代码~\cite{kumar2023honeytop90}开发,并利用NumPy和SciPy库实现。该代码结构简单、易于理解,可作为拓扑优化领域新手的实用学习与探索工具。PyHexTop专门针对指定体积约束下的柔度最小化问题设计。本文详细阐述了解决Messerschmitt-Bolkow-Blohm梁问题的代码实现,并扩展至多个不同问题的求解。代码已在以下链接公开共享:\url{https://github.com/PrabhatIn/PyHexTop.}