Skip to main content
Log in

A framework for structural shape optimization based on automatic differentiation, the adjoint method and accelerated linear algebra

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

Abstract

Shape optimization is of great significance in structural engineering, as an efficient geometry leads to better performance of structures. However, the application of gradient-based shape optimization for form finding is limited, which is partly due to the difficulty and the complexity in gradient evaluation. In this work, an efficient framework based on automatic differentiation (AD), the adjoint method and accelerated linear algebra (XLA) is proposed to promote the implementation of gradient-based shape optimization for form finding. The framework is realized by the implementation of the high-performance computing (HPC) library JAX. We leverage AD and the adjoint method in the sensitivity analysis stage. The XLA feature is exploited by an efficient programming architecture that we proposed, which can boost gradient evaluation via just-in-time compilation of computer programs. The proposed framework also supports hardware acceleration such as GPUs. The framework is applied to the form finding of arches and different free-form gridshells: gridshell inspired by Mannheim Multihalle, four-point supported gridshell, and canopy-like structures. Two geometric descriptive methods are used: non-parametric and parametric description via Bézier surface. Unconstrained and constrained shape optimization problems are considered, where the former is solved by gradient descent and the latter is solved by sequential quadratic programming (SQP). Through these examples, the proposed framework is shown to be able to provide structural engineers with an efficient tool for form finding, enabling better design for the built environment.

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

Similar content being viewed by others

References

Download references

Acknowledgements

The author would like to thank his advisor Professor Maria Garlock and friends at Princeton University for the insightful discussions.

Author information

Authors and Affiliations

Authors

Contributions

GW: Conceptualization, Methodology, Software, Validation, Formal analysis, Writing—original draft, Writing - review & editing.

Corresponding author

Correspondence to Gaoyuan Wu.

Ethics declarations

Competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Replication of results

The code for this paper is available online: https://github.com/GaoyuanWu/JaxSSO

Additional information

Responsible Editor: Seonho Cho

Publisher's Note

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

Appendices

Appendix A: code example—derivative calculation using JAX for customized python objects

The code snippet (Code 3) illustrates how the JAX methods work by presenting a simple problem: calculating how the length of a 2D line changes with the nodal coordinates, i.e., the gradient of the length with respect to the nodal coordinates of the line. Firstly, a new class that represents a line in 2D world is defined and its attributes are the nodal coordinates. The line() class is registered to JAX by @register_pytree_node_class, tree_flatten and tree_unflatten. A function called L() is firstly defined, outputting the distance between two 2D points. Note that jax.numpy is used in the function L() for calculating distance instead of numpy, which is of great significance because we need to trace the operations so that the derivatives can be obtained through automatic differentiation. An external function called line_sens() is then defined for line() objects to calculate the derivatives of its length with respect to nodal coordinates. This original line_sens() works for a single line() object that represents one line. 100 lines with random coordinates are then created. We then implement jit to compile the line_sens() function into optimized machine codes. Lastly, we use vmap to vectorize the line_sens() function so that it can be applied to a single line() object that represents multiple lines.

figure c

Appendix B example codes in JAX-SSO

figure d

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wu, G. A framework for structural shape optimization based on automatic differentiation, the adjoint method and accelerated linear algebra. Struct Multidisc Optim 66, 151 (2023). https://doi.org/10.1007/s00158-023-03601-0

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s00158-023-03601-0

Keywords

Navigation