Table of Contents
Fetching ...

A 140 line MATLAB code for topology optimization problems with probabilistic parameters

Andrian Uihlein, Ole Sigmund, Michael Stingl

TL;DR

This work delivers an accessible, 140-line MATLAB code for topology optimization under probabilistic parameters, extending the top99neo lineage with a stochastic sample-based gradient approach and adaptive recombination to achieve vanishing approximation error. It combines the Optimality Criteria Method with a nearest-neighbor surrogate for integrating gradients of the expected compliance, enabling efficient handling of uncertainty in both material damage and loading. The authors provide extensive numerical demonstrations across reference, deterministic, symmetry, and uncertainty-Driven scenarios, and present variations such as damage-case reduction, data-driven force uncertainty, and mini-batching for dynamic loads. The tool emphasizes educational value and ease of modification, offering replication code and illustrating how stochastic modeling interacts with geometry, loading, and symmetry in topology optimization. Overall, the paper demonstrates that probabilistic topology optimization can be solved efficiently with a simple, well-documented implementation suitable for teaching and rapid experimentation.

Abstract

We present an efficient 140 line MATLAB code for topology optimization problems that include probabilistic parameters. It is built from the top99neo code by Ferrari and Sigmund and incorporates a stochastic sample-based approach. Old gradient samples are adaptively recombined during the optimization process to obtain a gradient approximation with vanishing approximation error. The method's performance is thoroughly analyzed for several numerical examples. While we focus on applications in which stochastic parameters describe local material failure, we also present extensions of the code to other settings, such as uncertain load positions or dynamic forces of unknown frequency. The complete code is included in the Appendix and can be downloaded from www.topopt.dtu.dk.

A 140 line MATLAB code for topology optimization problems with probabilistic parameters

TL;DR

This work delivers an accessible, 140-line MATLAB code for topology optimization under probabilistic parameters, extending the top99neo lineage with a stochastic sample-based gradient approach and adaptive recombination to achieve vanishing approximation error. It combines the Optimality Criteria Method with a nearest-neighbor surrogate for integrating gradients of the expected compliance, enabling efficient handling of uncertainty in both material damage and loading. The authors provide extensive numerical demonstrations across reference, deterministic, symmetry, and uncertainty-Driven scenarios, and present variations such as damage-case reduction, data-driven force uncertainty, and mini-batching for dynamic loads. The tool emphasizes educational value and ease of modification, offering replication code and illustrating how stochastic modeling interacts with geometry, loading, and symmetry in topology optimization. Overall, the paper demonstrates that probabilistic topology optimization can be solved efficiently with a simple, well-documented implementation suitable for teaching and rapid experimentation.

Abstract

We present an efficient 140 line MATLAB code for topology optimization problems that include probabilistic parameters. It is built from the top99neo code by Ferrari and Sigmund and incorporates a stochastic sample-based approach. Old gradient samples are adaptively recombined during the optimization process to obtain a gradient approximation with vanishing approximation error. The method's performance is thoroughly analyzed for several numerical examples. While we focus on applications in which stochastic parameters describe local material failure, we also present extensions of the code to other settings, such as uncertain load positions or dynamic forces of unknown frequency. The complete code is included in the Appendix and can be downloaded from www.topopt.dtu.dk.
Paper Structure (24 sections, 44 equations, 18 figures, 3 tables)

This paper contains 24 sections, 44 equations, 18 figures, 3 tables.

Figures (18)

  • Figure 1: For $\Xi\subset\mathbb{R}$ ($x$-axis) and $k=4$, the true gradient values at the current design $\nabla_\mathbf{x} c(\hat{\mathbf{x}}_4,\xi)$ (blue) are approximated by the constant nearest neighbor model (colored horizontal lines). Integrating the model yields a weighted sum of the gradient samples $g_i$, where each sample is weighted by the measure of the set $\mathcal{V}_{i,4}$.
  • Figure 2: For fixed $\hat{\mathbf{x}}_k$, the integrand ${\nabla_\mathbf{x} c(\hat{\mathbf{x}}_k,\cdot,\cdot)}$ needs to be integrated over the space ${\Xi\times\Psi}$ (whole square). We do so by partitioning ${\Xi\times\Psi}$ into the sets $\mathcal{V}_{i,k}$ (colored polygons), on which ${\nabla_\mathbf{x} c(\hat{\mathbf{x}}_k,\cdot,\cdot)}$ is approximated by the piecewise constant values $g_i$. Then, the quadrature rule (dashed lines) evaluates this model on all quadrature points ${(\xi_t,\psi_t)_{t=1,\ldots,T}}$ (colored dots), to obtain the integral approximation $G_k$.
  • Figure 3: Design domain with support at left and right boundary. A uniform downward facing force (red) is applied at the top. A possible damage region is indicated by the blue square.
  • Figure 4: Final design for the reference problem (obj.: 9.34).
  • Figure 5: True objective function values (orange dots) and stochastic approximations of the nearest neighbor model (blue) for the reference problem over the course of iterations.
  • ...and 13 more figures

Theorems & Definitions (1)

  • Remark 1