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.
Similar content being viewed by others
References
Abadi M, Agarwal A, Barham P et al. (2015) TensorFlow. Large-scale machine learning on heterogeneous systems. https://doi.org/10.5281/zenodo.4724125
Adriaenssens S, Block P, Veenendaal D et al. (2014) Shell structures for architecture: form finding and optimization. Routledge. https://doi.org/10.4324/9781315849270
Barnes MR (1999) Form finding and analysis of tension structures by dynamic relaxation. Int J Space Struct 14(2):89–104. https://doi.org/10.1260/0266351991494722
Baydin AG, Pearlmutter BA, Radul AA et al. (2018) Automatic differentiation in machine learning: a survey. J Mach Learn Res 18:1–43
Bezgin DA, Buhendwa AB, Adams NA (2023) JAX-fluids: a fully-differentiable high-order computational fluid dynamics solver for compressible two-phase flows. Comput Phys Commun 282(108):527. https://doi.org/10.1016/j.cpc.2022.108527
Bletzinger KU, Ramm E (1993) Form finding of shells by structural optimization. Eng Comput 9(1):27–35. https://doi.org/10.1007/BF01198251
Bletzinger KU, Ramm E (2001) Structural optimization and form finding of light weight structures. Comput Struct 79(22–25):2053–2062. https://doi.org/10.1016/S0045-7949(01)00052-9
Bletzinger KU, Wüchner R, Daoud F et al. (2005) Computational methods for form finding and optimization of shells and membranes. Comput Methods Appl Mech Eng 194(30–33):3438–3452. https://doi.org/10.1016/j.cma.2004.12.026
Boggs PT, Tolle JW (1995) Sequential quadratic programming. Acta Numerica 4:1–51
Bradbury J, Frostig R, Hawkins P, et al. (2018) JAX: composable transformations of Python+NumPy programs. http://github.com/google/jax
Chandrasekhar A, Sridhara S, Suresh K (2021) Auto: a framework for automatic differentiation in topology optimization. Struct Multidiscip Optim 64(6):4355–4365. https://doi.org/10.1007/s00158-021-03025-8
Cuvilliers PPE (2020) The constrained geometry of structures: optimization methods for inverse form-finding design. PhD thesis, Massachusetts Institute of Technology
Ding Y (1986) Shape optimization of structures: a literature survey. Comput Struct 24(6):985–1004
Espath L, Linn RV, Awruch A (2011) Shape optimization of shell structures based on nurbs description using automatic differentiation. Int J Numer Meth Eng 88(7):613–636. https://doi.org/10.1002/nme.3183
Farin G (2014) Curves and surfaces for computer-aided geometric design: a practical guide. Elsevier
Gill PE, Wong E (2012) Sequential quadratic programming methods. Mixed integer nonlinear programming. Springer, pp 147–224
Griewank A, Walther A (2008) Evaluating derivatives: principles and techniques of algorithmic differentiation. SIAM
Griewank A et al. (1989) On automatic differentiation. Math Program 6(6):83–107
Harris CR, Millman KJ, Van Der Walt SJ et al. (2020) Array programming with numpy. Nature 585(7825):357–362. https://doi.org/10.1038/s41586-020-2649-2
Hascoet L, Pascual V (2013) The tapenade automatic differentiation tool: principles, model, and specification. ACM Trans Math Softw 39(3):1–43. https://doi.org/10.1145/0000000.0000000
Helbig T, Giampellegrini L, Oppe M (2014) "Carioca wave’’—a free-form steel-and-glass canopy in rio de janeiro, brazil. Steel Construct 7(4):252–257. https://doi.org/10.1002/stco.201420033
Johnson SG (2014) The nlopt nonlinear-optimization package. https://github.com/stevengj/nlopt
Kilian A, Ochsendorf J (2005) Particle-spring systems for structural form finding. J Int Assoc Shell Spatial Struct 46(2):77–84
Kraft D (1988) A software package for sequential quadratic programming. Forschungsbericht- Deutsche Forschungs- und Versuchsanstalt fur Luft- und Raumfahrt
Lam SK, Pitrou A, Seibert S (2015) Numba: A llvm-based python JIT compiler. In: Proceedings of the second workshop on the LLVM compiler infrastructure in HPC, pp 1–6
Nørgaard SA, Sagebaum M, Gauger NR et al. (2017) Applications of automatic differentiation in topology optimization. Struct Multidiscip Optim 56(5):1135–1146. https://doi.org/10.1007/s00158-017-1708-2
Ozaki I, Kimura F, Berz M (1995) Higher-order sensitivity analysis of finite element method by automatic differentiation. Comput Mech 16(4):223–234. https://doi.org/10.1007/BF00369867
Paganini A, Wechsung F (2021) Fireshape: a shape optimization toolbox for firedrake. Struct Multidiscip Optim 63(5):2553–2569. https://doi.org/10.1007/s00158-020-02813-y
Pastrana R, Ohlbrock PO, Oberbichler T et al. (2022) Constrained form-finding of tension-compression structures using automatic differentiation. Comput Aid Design. https://doi.org/10.1016/j.cad.2022.103435
Robles SI, Ortega NF (2001) Study of volumetric displacements of shells. J Int Assoc Shell Spatial Struct 42(3):139–147
Rombouts J, Lombaert G, De Laet L et al. (2019) A novel shape optimization approach for strained gridshells: design and construction of a simply supported gridshell. Eng Struct 192:166–180. https://doi.org/10.1016/j.engstruct.2019.04.101
San B, Feng D, Qiu Y (2021) Shape optimization of concrete free-form shells considering material damage. Eng Optim. https://doi.org/10.1080/0305215X.2021.1968854
Schek HJ (1974) The force density method for form finding and computation of general networks. Comput Methods Appl Mech Eng 3(1):115–134. https://doi.org/10.1016/0045-7825(74)90045-0
Schoenholz S, Cubuk ED (2020) JAX MD: a framework for differentiable physics. Adv Neural Inf Process Syst 33:11428–11441
Tortorelli DA, Michaleris P (1994) Design sensitivity analysis: overview and review. Inverse Prob Eng 1(1):71–105. https://doi.org/10.1080/174159794088027573
Uysal H, Gul R, Uzman U (2007) Optimum shape design of shell structures. Eng Struct 29(1):80–87. https://doi.org/10.1016/j.engstruct.2006.04.007
Van Keulen F, Haftka R, Kim NH (2005) Review of options for structural design sensitivity analysis: part 1—linear systems. Comput Methods Appl Mech Eng 194(30–33):3213–3243. https://doi.org/10.1016/j.cma.2005.02.002
Xia Y, Langelaar M, Hendriks MA (2021) Optimization-based three-dimensional strut-and-tie model generation for reinforced concrete. Comput Aid Civ Infrastruct Eng 36(5):526–543. https://doi.org/10.1111/mice.12614
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
Contributions
GW: Conceptualization, Methodology, Software, Validation, Formal analysis, Writing—original draft, Writing - review & editing.
Corresponding author
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.
Appendix B example codes in JAX-SSO
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.
About this article
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
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00158-023-03601-0