Skip to main content
Log in

TOPress: a MATLAB implementation for topology optimization of structures subjected to design-dependent pressure loads

  • Educational Paper
  • Published:
Structural and Multidisciplinary Optimization Aims and scope Submit manuscript

Abstract

In a topology optimization (TO) setting, design-dependent fluidic pressure loads pose several challenges as their direction, magnitude, and location alter with topology evolution. This paper offers a compact 100-line MATLAB code, TOPress, for TO  of structures subjected to fluidic pressure loads using the method of moving asymptotes. The code is intended for pedagogical purposes and aims to ease the beginners’ and students’ learning toward the TO with design-dependent fluidic pressure loads. TOPress is developed per the approach first reported in Kumar et al. (Struct Multidisc Optim 61(4):1637–1655, 2020). The Darcy law, in conjunction with the drainage term, is used to model the applied pressure load. The consistent nodal loads are determined from the obtained pressure field. The employed approach facilitates inexpensive computation of the load sensitivities using the adjoint-variable method. Compliance minimization subject to volume constraint optimization problems is solved. The success and efficacy of the code are demonstrated by solving benchmark numerical examples involving pressure loads, wherein the importance of load sensitivities is also demonstrated. TOPress contains six main parts, is described in detail, and is extended to solve different problems. Steps to include a projection filter are provided to achieve loadbearing designs close to 0-1. The code is provided in Appendix 2 and can also be downloaded along with its extensions from https://github.com/PrabhatIn/TOPress.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18

Notes

  1. We use \(\texttt {nelx}\times \texttt {nely} = 3 \times 3\) in Fig. 9a for the sake of visibility.

References

  • Ali MA, Shimoda M (2022) Toward multiphysics multiscale concurrent topology optimization for lightweight structures with high heat conductivity and high stiffness using MATLAB. Struct Multidisc Optim 65(7):1–26

    Article  MathSciNet  Google Scholar 

  • Andreassen E, Andreasen CS (2014) How to determine composite material properties using numerical homogenization. Comput Mater Sci 83:488–495

    Article  Google Scholar 

  • Andreassen E, Clausen A, Schevenels M, Lazarov BS, Sigmund O (2011) Efficient topology optimization in MATLAB using 88 lines of code. Struct Multidisc Optim 43(1):1–16

    Article  MATH  Google Scholar 

  • Bourdin B, Chambolle A (2003) Design-dependent loads in topology optimization. ESAIM Control Optim Calc Var 9:19–48

    MathSciNet  MATH  Google Scholar 

  • Bruns TE, Tortorelli DA (2001) Topology optimization of non-linear elastic structures and compliant mechanisms. Comput Method Appl Mech Eng 190(26–27):3443–3459

    Article  MATH  Google Scholar 

  • Bruyneel M, Duysinx P (2005) Note on topology optimization of continuum structures including self-weight. Struct Multidisc Optim 29(4):245–256

    Article  Google Scholar 

  • Chen BC, Kikuchi N (2001) Topology optimization with design-dependent loads. Finite Elem Anal Des 37(1):57–70

    Article  MATH  Google Scholar 

  • Christiansen RE, Sigmund O (2021) Compact 200 line MATLAB code for inverse design in photonics by topology optimization: tutorial. JOSA B 38(2):510–520

    Article  Google Scholar 

  • Du J, Olhoff N (2004) Topological optimization of continuum structures with design-dependent surface loading-part i: new computational approach for 2D problems. Struct Multidisc Optim 27(3):151–165

    Article  MATH  Google Scholar 

  • Emmendoerfer H Jr, Fancello EA, Silva ECN (2018) Level set topology optimization for design-dependent pressure load problems. Int J Numer Methods Eng 115(7):825–848

    Article  MathSciNet  MATH  Google Scholar 

  • Ferrari F, Sigmund O, Guest JK (2021) Topology optimization with linearized buckling criteria in 250 lines of Matlab. Struct Multidisc Optim 63(6):3045–3066

    Article  MathSciNet  Google Scholar 

  • Gao J, Luo Z, Xia L, Gao L (2019) Concurrent topology optimization of multiscale composite structures in Matlab. Struct Multidisc Optim 60(6):2621–2651

    Article  MathSciNet  Google Scholar 

  • Hammer VB, Olhoff N (2000) Topology optimization of continuum structures subjected to pressure loading. Struct Multidisc Optim 19(2):85–92

    Article  Google Scholar 

  • Han Y, Xu B, Liu Y (2021) An efficient 137-line MATLAB code for geometrically nonlinear topology optimization using bi-directional evolutionary structural optimization method. Struct Multidisc Optim 63(5):2571–2588

    Article  MathSciNet  Google Scholar 

  • Huang H, Hu J, Liu S, Liu Y (2022) A thermal-solid–fluid method for topology optimization of structures with design-dependent pressure load. Acta Mech Solid Sin 35:901–912

  • Ibhadode O, Zhang Z, Rahnama P, Bonakdar A, Toyserkani E (2020) Topology optimization of structures under design-dependent pressure loads by a boundary identification-load evolution (BILE) model. Struct Multidisc Optim 62(4):1865–1883

    Article  Google Scholar 

  • Kumar P (2022a) HoneyTop90: A 90-line MATLAB code for topology optimization using honeycomb tessellation. Optim Eng. https://doi.org/10.1007/s11081-022-09715-6

  • Kumar P (2022b) Topology optimization of stiff structures under self-weight for given volume using a smooth Heaviside function. Struct Multidisc Optim 65(4):1–17

    Article  MathSciNet  Google Scholar 

  • Kumar P (2023) Towards topology optimization of pressure-driven soft robots. In: Conference on microactuators and micromechanisms. Springer, Cham, pp 19–30

  • Kumar P, Langelaar M (2021) On topology optimization of design-dependent pressure-loaded three-dimensional structures and compliant mechanisms. Int J Numer Methods Eng 122(9):2205–2220

    Article  MathSciNet  Google Scholar 

  • Kumar P, Frouws JS, Langelaar M (2020) Topology optimization of fluidic pressure-loaded structures and compliant mechanisms using the Darcy method. Struct Multidisc Optim 61(4):1637–1655

    Article  MathSciNet  Google Scholar 

  • Neofytou A, Picelli R, Huang TH, Chen JS, Kim HA (2020) Level set topology optimization for design-dependent pressure loads using the reproducing kernel particle method. Struct Multidisc Optim 61(5):1805–1820

    Article  MathSciNet  Google Scholar 

  • Picelli R, Vicente W, Pavanello R (2015) Bi-directional evolutionary structural optimization for design-dependent fluid pressure loading problems. Eng Optim 47(10):1324–1342

    Article  MathSciNet  Google Scholar 

  • Picelli R, Neofytou A, Kim HA (2019) Topology optimization for design-dependent hydrostatic pressure loading via the level-set method. Struct Multidisc Optim 60(4):1313–1326

    Article  MathSciNet  Google Scholar 

  • Saxena A (2011) Topology design with negative masks using gradient search. Struct Multidisc Optim 44(5):629–649

    Article  Google Scholar 

  • Sigmund O (2001) A 99 line topology optimization code written in Matlab. Struct Multidisc Optim 21(2):120–127

    Article  Google Scholar 

  • Sigmund O (2007) Morphology-based black and white filters for topology optimization. Struct Multidisc Optim 33(4–5):401–424

    Article  Google Scholar 

  • Sigmund O, Clausen PM (2007) Topology optimization using a mixed formulation: an alternative way to solve pressure load problems. Comput Methods Appl Mech Eng 196(13–16):1874–1889

    Article  MathSciNet  MATH  Google Scholar 

  • Sigmund O, Maute K (2013) Topology optimization approaches. Struct Multidisc Optim 48(6):1031–1055

    Article  MathSciNet  Google Scholar 

  • Svanberg K (1987) The method of moving asymptotes-a new method for structural optimization. Int J Numer Methods Eng 24(2):359–373

    Article  MathSciNet  MATH  Google Scholar 

  • Talischi C, Paulino GH, Pereira A, Menezes IF (2012) PolyTop: a matlab implementation of a general topology optimization framework using unstructured polygonal finite element meshes. Struct Multidisc Optim 45(3):329–357

    Article  MathSciNet  MATH  Google Scholar 

  • Wang C, Zhao Z, Zhou M, Sigmund O, Zhang XS (2021) A comprehensive review of educational articles on structural and multidisciplinary optimization. Struct Multidisc Optim 64(5):2827–2880

    Article  Google Scholar 

  • Xavier MS, Tawk CD, Zolfagharian A, Pinskier J, Howard D, Young T, Lai J, Harrison SM, Yong YK, Bodaghi M et al (2022) Soft pneumatic actuators: a review of design, fabrication, modeling, sensing, control and applications. IEEE Access 10:59442–59485

  • Xia L, Breitkopf P (2015) Design of materials using topology optimization and energy-based homogenization approach in Matlab. Struct Multidisc Optim 52(6):1229–1241

    Article  MathSciNet  Google Scholar 

  • Xia Q, Wang MY, Shi T (2015) Topology optimization with pressure load through a level set method. Comput Methods Appl Mech Eng 283:177–195

    Article  MathSciNet  MATH  Google Scholar 

  • Zhang H, Zhang X, Liu S (2008) A new boundary search scheme for topology optimization of continuum structures with design-dependent loads. Struct Multidisc Optim 37(2):121–129

    Article  Google Scholar 

  • Zhao J, Zhang M, Zhu Y, Cheng R, Wang L, Li X (2021) Topology optimization of planar heat sinks considering out-of-plane design-dependent deformation problems. Meccanica 56(7):1693–1706

    Article  MathSciNet  Google Scholar 

  • Zienkiewicz OC, Taylor RL, Zhu JZ (2005) The finite element method: its basis and fundamentals. Elsevier, Amsterdam

    MATH  Google Scholar 

Download references

Acknowledgements

The author thanks Prof. Matthijs Langelaar and Prof. Ole Sigmund for discussions on the method in the past and Prof. Krister Svanberg (krille@math.kth.se) for providing MATLAB codes of the MMA optimizer.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Prabhat Kumar.

Ethics declarations

Conflict of interest

The author declares no conflicts of interest.

Ethical approval

This article does not contain any studies with human participants or animals performed by the author.

Replication of results

The 100-line code is explained in detail and provided in Appendix 2. In addition, TOPress and its extensions are supplied as supplemental material to reproduce the solutions. If anything is missing can be obtained directly from the author.

Additional information

Responsible Editor: Helder C. Rodrigues

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary Material 1 (zip 28 kb)

Appendices

Appendix 1: Expressions for flow and transformation matrices: \({\textbf{K}}_\text{p}^i\), \(\textbf{K}^i_\text{Dp}\) and \(\textbf{T}_i\)

The expressions for the flow matrices \({\textbf{K}}_\text{p}^i\) and \(\textbf{K}^i_\text{Dp}\), and transformation matrix \(\textbf{T}_i\) are provided for element i herein.

Figure 19 displays the local node numbers with nodal coordinates \((x_i,\,y_i)\), \((x_i +\text {D}x,\,y_i)\), \((x_i +\text {D}x,\,y_i+\text {D}y)\), and \((x_i,\,y_i+\text {D}y)\) for element i.

Fig. 19
figure 19

Nodal coordinates of element i

As mentioned earlier, we employ the bi-linear shape functions for the finite element analysis. To determine, \({\textbf{K}}_\text{p}^i\) and \(\textbf{K}^i_\text{Dp}\) as written in (5) and \(\textbf{T}_i\) as provided in (9), numerical integration approach using the Gauss points is employed (Zienkiewicz et al. 2005). Mathematically,

$$\begin{aligned} {\textbf{K}}_\text{p}^i&= \int _{\Omega _{\rm e}} K\; \textbf{B}^\top _\text{p} \textbf{B}_\text{p} \text {d} V \\ &= t_i\int _{-1}^{1}\int _{-1}^{1} \left( K\; \textbf{B}^\top _\text{p} \textbf{B}_\text{p}\right) \det \textbf{J} \text{d}\xi \text{d}\zeta \\ \textbf{K}^i_\text{Dp}&= \int _{\Omega _{\rm e}}D \;\textbf{N}^\top _\text{p} \textbf{N}_\text{p} \text{d} V \\ &= t_i\int _{-1}^{1}\int _{-1}^{1} \left( D \;\textbf{N}^\top _\text{p} \textbf{N}_\text{p}\right) \det \textbf{J} \text{d}\xi \text{d}\zeta \\ \textbf{T}_i&=-\int _{{\Upomega}_{\rm e}} {\textbf{N}}^{\!\top }_\textbf{u} \textbf{B}_\text{p} \text {d} V =t_i\int _{-1}^{1}\int _{-1}^{1} {\textbf{N}}^{\!\top }_\textbf{u} \textbf{B}_\text{p} \det \textbf{J} \text{d}\xi \text{d}\zeta \end{aligned}$$
(22)

where \(\textbf{J}\) is the Jacobian matrix given as

$$\textbf{J}= \frac{1}{4} \left[\begin{array}{ll} J11 &\quad J12\\ J21 & \quad J22, \end{array}\right]$$
(23)

where \(J11 = -(1-\zeta )x_1 + (1-\zeta ) x_2 + (1+\zeta )x_3 - (1+\zeta )x_4\), \(J12 = \quad -(1-\zeta )y_1 + (1-\zeta ) y_2 + (1+\zeta )y_3 - (1+\zeta )y_4\), \(J21 = -(1-\xi )x_1 + (1-\xi ) x_2 + (1+\xi )x_3 - (1+\xi )x_4,\) and \(J22 = -(1-\xi )y_1 + (1-\xi ) y_2 + (1+\xi )y_3 - (1+\xi )y_4\), with \(N_k = \frac{1}{4}(1+\xi \xi _k)(1+ \zeta \zeta _k)\), where \((\xi _k,\,\zeta _k)\) are natural coordinates with (− 1, − 1), (1, − 1), (1, 1) and (− 1, 1) for node k. (22) yields the following with \(2\times 2\) Gauss-quadrature rule:

$$\begin{aligned} {\textbf{K}}_\text{p}^i=\frac{t_i}{6 Dx Dy} \begin{bmatrix} K_{p1} &{}\quad K_{p2} &{}\quad -0.5K_{p1}&{}\quad K_{p3} \\ &{}\quad K_{p1} &{}\quad K_{p3}&{}\quad -0.5K_{p1}\\ &{}\text {Sym.} &{}K_{p1} &{}\quad K_{p2}\\ {} &{} &{} &{}\quad K_{p1} \end{bmatrix} \end{aligned}$$
(24)

where \(K_{p1} = 2(Dx^2+ Dy^2)\)\(K_{p2} = Dx^2 -2Dy^2\)\(K_{p3} = Dy^2 - 2Dx^2\).

$$\begin{aligned} {\textbf{K}}_\text{Dp}^i=\frac{t_i Dx Dy}{36} \begin{bmatrix} 4 &{}\quad 2 &{}\quad 1 &{}\quad 2 \\ &{}\quad 4 &{}\quad 2 &{}\quad 1\\ &{} \text {Sym.} &{}\quad 4 &{}\quad 2\\ &{} &{} &{}\quad 4 \end{bmatrix} \end{aligned}$$
(25)

and

$$\begin{aligned} \textbf{T}_i=\frac{t_i}{12} \begin{bmatrix} -2Dy &{}\quad 2Dy &{}\quad Dy &{}\quad -Dy \\ -2Dx &{}\quad -Dx &{}\quad Dx &{}\quad 2Dx\\ -2Dy &{}\quad 2Dy &{}\quad Dy &{}\quad -Dy\\ -Dx&{}\quad -2Dx &{}\quad 2Dx &{}\quad Dx\\ -Dy &{}\quad Dy &{}\quad 2Dy &{}\quad -2Dy\\ -Dx&{}\quad -2Dx &{}\quad 2Dx &{}\quad Dx\\ -Dy &{}\quad Dy &{}\quad 2Dy &{}\quad -2Dy\\ -2Dx &{}\quad -Dx &{}\quad Dx &{}\quad 2Dx \end{bmatrix} \end{aligned}$$
(26)

For the square elements which we consider to parameterize the design domain with \(t_i =1\) (plane-stress cases). The expressions for \({\textbf{K}}_\text{p}^i\), \({\textbf{K}}_\text{Dp}^i\) and \(\textbf{T}_i\) transpire to

$$\begin{aligned}{} & {} {\textbf{K}}_\text{p}^i=\frac{1}{6} \begin{bmatrix} 4 &{}\quad -1 &{}\quad -2&{}\quad -1 \\ &{}4 &{}\quad -1&{}\quad -2\\ &{}\text {Sym.} &{}4 &{}\quad -1\\ {} &{} &{} &{}4 \end{bmatrix} \end{aligned}$$
(27)
$$\begin{aligned}{} & {} {\textbf{K}}_\text{Dp}^i=\frac{1}{36} \begin{bmatrix} 4 &{}\quad 2 &{}\quad 1 &{}\quad 2 \\ &{}\quad 4 &{}\quad 2 &{}\quad 1\\ &{} \text {Sym.} &{}\quad 4 &{}\quad 2\\ &{} &{} &{}\quad 4 \end{bmatrix} \end{aligned}$$
(28)

and

$$\begin{aligned} \textbf{T}_i=\frac{1}{12} \begin{bmatrix} -2 &{}\quad 2 &{}\quad 1 &{}\quad -1 \\ -2 &{}\quad -1 &{}\quad 1 &{}\quad 2\\ -2 &{}\quad 2 &{}\quad 1 &{}\quad -1\\ -1&{}\quad -2 &{}\quad 2 &{}\quad 1\\ -1 &{}\quad 1 &{}\quad 2 &{}\quad -2\\ -1&{}\quad -2 &{}\quad 2 &{}\quad 1\\ -1 &{}\quad 1 &{}\quad 2 &{}\quad -2\\ -2 &{}\quad -1 &{}\quad 1 &{}\quad 2 \end{bmatrix} \end{aligned}$$
(29)

Appendix 2: The MATLAB code: TOPress

figure ya
figure yb

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Kumar, P. TOPress: a MATLAB implementation for topology optimization of structures subjected to design-dependent pressure loads. Struct Multidisc Optim 66, 97 (2023). https://doi.org/10.1007/s00158-023-03533-9

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s00158-023-03533-9

Keywords

Navigation