Table of Contents
Fetching ...

PyTOPress: Python code for topology optimization with design-dependent pressure loads

Shivajay Saxena, Swagatam Islam Sarkar, Prabhat Kumar

TL;DR

PyTOPress translates the TOPress design-dependent pressure topology optimization problem into Python, enabling accessible teaching and rapid experimentation. It solves a compliance-minimization TO with a volume constraint by coupling a stiffness solve $K(\tilde{\bm{\rho}}) \mathbf{u}$ to a Darcy-based pressure field that yields the global load $\mathbf{F} = -\mathbf{T}\mathbf{p}$, with the pressure field obtained from $A\mathbf{p} = 0$. The method employs SIMP interpolation $E_i = E_{min} + \tilde{\rho}_i^{p}(E_0 - E_{min})$ with $p=3$ and uses adjoint sensitivity analysis including load sensitivities to update the design via MMA, demonstrated on 2D pressure-loaded problems such as internally pressurized arches, pistons, and chambers. The work delivers an open-source, Python-based platform built on NumPy/SciPy that preserves TOPress nomenclature while improving accessibility, readability, and extensibility for future 3D extensions and broader TO teaching. Overall, PyTOPress lowers barriers to entry for topology optimization with design-dependent fluid-structure interactions and provides a practical, extensible tool for education and research, with code available at GitHub.

Abstract

Python is a low-cost and open-source substitute for the MATLAB programming language. This paper presents ``\texttt{PyTOPress}", a compact Python code meant for pedagogical purposes for topology optimization for structures subjected to design-dependent fluidic pressure loads. \texttt{PyTOPress}, based on the ``\texttt{TOPress}" MATLAB code \cite{kumar2023topress}, is built using the \texttt{NumPy} and \texttt{SciPy} libraries. The applied pressure load is modeled using the Darcy law with the conceptualized drainage term. From the obtained pressure field, the constant nodal loads are found. The employed method makes it easier to compute the load sensitivity using the adjoint-variable method at a low cost. The topology optimization problems are solved herein by minimizing the compliance of the structure with a constraint on material volume. The method of moving asymptotes is employed to update the design variables. The effectiveness and success of \texttt{PyTOPress} code are demonstrated by optimizing a few design-dependent pressure loadbearing problems. The code is freely available at https://github.com/PrabhatIn/PyTOPress.

PyTOPress: Python code for topology optimization with design-dependent pressure loads

TL;DR

PyTOPress translates the TOPress design-dependent pressure topology optimization problem into Python, enabling accessible teaching and rapid experimentation. It solves a compliance-minimization TO with a volume constraint by coupling a stiffness solve to a Darcy-based pressure field that yields the global load , with the pressure field obtained from . The method employs SIMP interpolation with and uses adjoint sensitivity analysis including load sensitivities to update the design via MMA, demonstrated on 2D pressure-loaded problems such as internally pressurized arches, pistons, and chambers. The work delivers an open-source, Python-based platform built on NumPy/SciPy that preserves TOPress nomenclature while improving accessibility, readability, and extensibility for future 3D extensions and broader TO teaching. Overall, PyTOPress lowers barriers to entry for topology optimization with design-dependent fluid-structure interactions and provides a practical, extensible tool for education and research, with code available at GitHub.

Abstract

Python is a low-cost and open-source substitute for the MATLAB programming language. This paper presents ``\texttt{PyTOPress}", a compact Python code meant for pedagogical purposes for topology optimization for structures subjected to design-dependent fluidic pressure loads. \texttt{PyTOPress}, based on the ``\texttt{TOPress}" MATLAB code \cite{kumar2023topress}, is built using the \texttt{NumPy} and \texttt{SciPy} libraries. The applied pressure load is modeled using the Darcy law with the conceptualized drainage term. From the obtained pressure field, the constant nodal loads are found. The employed method makes it easier to compute the load sensitivity using the adjoint-variable method at a low cost. The topology optimization problems are solved herein by minimizing the compliance of the structure with a constraint on material volume. The method of moving asymptotes is employed to update the design variables. The effectiveness and success of \texttt{PyTOPress} code are demonstrated by optimizing a few design-dependent pressure loadbearing problems. The code is freely available at https://github.com/PrabhatIn/PyTOPress.

Paper Structure

This paper contains 21 sections, 3 equations, 2 figures.

Figures (2)

  • Figure 1: Design domain of the (\ref{['fig:Inter_press_arch_Design']}) internally pressurized beam, (\ref{['fig:press_piston']}) pressurized piston and (\ref{['fig:press_chamber']}) pressurized chamber.
  • Figure 2: The optmized designs of (\ref{['fig:TOPress_arch']}) Pressurized arch, (\ref{['fig:TOPress_piston']}) Pressurized piston, and (\ref{['fig:TOPress_chamber']}) Pressurized chamber.