English

PyHexTop: a compact Python code for topology optimization using hexagonal elements

Computational Engineering, Finance, and Science 2025-09-10 v4

Abstract

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: https://github.com/PrabhatIn/PyHexTop

Keywords

Cite

@article{arxiv.2310.01968,
  title  = {PyHexTop: a compact Python code for topology optimization using hexagonal elements},
  author = {Aditi Agarwal and Anupam Saxena and Prabhat Kumar},
  journal= {arXiv preprint arXiv:2310.01968},
  year   = {2025}
}

Comments

3 Figures

R2 v1 2026-06-28T12:39:19.571Z