Department of Precision and Microsystems Engineering FAST TOPOLOGY OPTIMIZATION FOR TRANSIENT MECHANICAL PROBLEMS T.M. van der Linde Report no Coach Professor Specialisation Type of report Date : : : : : : EM 2016.001 dr. ir. M. Langelaar prof. dr. ir. F. van Keulen Engineering Mechanics MSc. Thesis 7 January 2016 . FAST T OPOLOGY O PTIMIZATION FOR T RANSIENT M ECHANICAL P ROBLEMS C OMBINING M ODEL O RDER R EDUCTION AND O PTIMIZATION by Thomas van der Linde in partial fulfillment of the requirements for the degree of Master of Science in Mechanical Engineering at the Delft University of Technology, to be defended publicly on Thursday January 7, 2015 at 12:45 AM. Supervisor: Thesis committee: dr. ir. M. Langelaar dr. ir. J.F.L Goosen dr. ir. R.A.J. van Ostayen dr. ir. H. Vallery TU Delft TU Delft TU Delft TU Delft An electronic version of this thesis is available at http://repository.tudelft.nl/. A BSTRACT Topology optimization is the process of finding the optimal shape of a structure while making no assumptions on its final shape. It is characterized by the large number of associated design variables, and therefore relatively high computational costs. Within the field of structural mechanics, most applications of topology optimization focus on linear statics. An extension to time-domain dynamics will have many useful applications, since dynamics often play an important role in structural mechanics. In the past 15 years considerable effort has been spent on research of this topic, but industrial applications are hindered by the high costs of analysis of time-domain problems. These costs are generally several orders of magnitude larger than those associated with statics or frequencydomain dynamics. The main goal of this research is to investigate the possibility of reducing these costs by applying model order reduction. Model order reduction consists of projecting the response of a system onto a subspace with a lower dimension, spanned by a set of basis vectors. The classical choice for these basis vectors is the eigenvectors of the system, leading to the so-called modal superposition method. This method can result in large errors in the model, making it unsuitable for topology optimization. A possible improvement on this method, the modal acceleration method, augments the response with the quasi-static displacement due to the external load. While the resulting accuracy is often sufficient for optimization, further improvements can be found by using a basis of Ritz vectors. These are cheaper to compute than eigenvectors, and can approximate the results of the full model with a very high accuracy. This thesis describes how to implement model order reduction as part of the topology optimization process for time-domain dynamics. The most expensive part of the optimization is the solution of two systems of differential equations: the equations of motion and the adjoint equation. Model order reduction is applied to solve these cheaply. In this document several important implementation issues are discussed, after which the accuracy of the different reduction methods is tested on a set of representative numerical examples. The results indicate that the response of the full model can be approximated with a very high accuracy by using a small set of Ritz vectors. The number of basis vectors is an important parameter, a method is proposed to automatically determine the right value. Although the response can be approximated with very high accuracy, topology optimization also requires design sensitivities, the derivative of the response with respect to the design variables. The error in these sensitivities is generally several orders of magnitude larger. It is demonstrated that this is partly determined by the choice of the objective function, the function to be minimized in the optimization. The design sensitivities found using Ritz vectors are shown to be more accurate than those found using the modal acceleration method. Finally, some optimization examples are investigated to study the effect of the errors in the sensitivities. Optimization using the full model is compared to optimization using the various model reduction methods. Although comparing optimization results is difficult, the results show that a model using Ritz vectors converges similar to a full model, even for a very small number of basis vectors. This leads to significant improvements in performance: the simulation is shown to be 20 times faster, the total optimization up to 8 times. The memory requirements, which can be critical for this type of optimization, are also shown to be reduced by up to two orders of magnitude. Concluding, model order reduction can significantly increase the performance of topology optimization for time-domain dynamics. Ritz vectors are in most cases the most efficient reduction basis. Some recommendations for future research are given, including possible ways of making the described method more efficient. iii A CKNOWLEDGEMENTS This thesis is the conclusion of my research of the past 15 months, as well as of my studies here in Delft. I would like to thank a few people for their support. First of all, my supervisor, Matthijs Langelaar. Thank you for your eternal enthusiasm, in-depth reviewing, and general support during the past year. Secondly I want to thank Paolo Tiso, for helping me find this subject, and some very useful discussions in the early stages of this research. In general, I have been very lucky to end up at the department of PME. I experienced this as a great environment, with excellent staff and committed students, which provided me with the best possible motivation. Special thanks goes out to Sarah, Anton, Stefan and Rolf, my fellow board members of study association Taylor. Working together with you guys for the past year was a lot of fun, especially the trip to Japan, which was definitely a great ending to all the hours we invested. Furthermore, I want to single out Anoop, Caspar, Daan, Marius and Panagiotis, for all the endless coffee breaks and discussions about our research. Anoop deserves a special mention, for our frequent conversations about the details of model order reduction. I also want to thank everyone who reviewed parts of this document, especially Wouter, Simon and Jurgen. During my time as a student I have met many new friends. To all my climbing and skiing buddies: I hope we can keep on spending as much time as possible together in the mountains. To my room-mates Marjolijn, Jurgen, Simon and Elena, thank you guys for always being around and generally trying to make life as much fun as possible. Final thanks goes out to my family. During the past few years I have been very busy, so I have not been around often. Thank you for your understanding and support during these years and before. Thomas van der Linde Delft, December 2015 v N OMENCLATURE S YMBOLS Symbol Units Description β − Newmark integration scheme parameter C N/m/s 2 Damping matrix E N/m Young modulus e − Error estimate for Model Order Reduction f N Load vector g Constraint function γ − Newmark integration scheme parameter h h Step size for time integration I K Identity matrix N/m Stiffness matrix L Spatial load vector λ Adjoint variable used in sensitivity analysis M kg Mass matrix N − Size of full system (number of degrees of freedom) n − Size of reduced system (number of basis vectors) n el − Number of elements nt − Number of time steps Ω rad/s Load frequency ωi rad/s i-th eigenfrequency p − Penalization parameter Φ General function used in sensitivity analysis ϕ General function used in sensitivity analysis ψ Objective function q m Nodal coordinates, 2 per node. Sorted as [x 1 , y 1 , x 2 , y 2 ,...] R Term resulting from adjoint sensitivity formulation, see Section 2.4.3 r m r̂ N Residual displacement Residual force 3 ρ kg/m Density T s Final time of simution t s Time τ s Alternative time variable, equal to T − t θ Reduced set of of coordinates for adjoint variable V − Set of reduced basis vectors x − Densities of elements (design variables) x max − Maximal volume fraction z m Reduced set of coordinates vii viii A CRONYMS A CRONYMS Acronym Explanation AVM Adjoint Variable Method DoF Degree of Freedom FEM Finite Element Method MAM Mode Acceleration Method MMA Method of Moving Asymptotes MOR Model Order Reduction MSM Modal Superposition Method MTA Modal Truncation Augmentation PCG Preconditioned Conjugate Gradient method PI Polynomial Interpolation penalization POD Proper Orthogonal Decomposition QSRV Quasi-Static Ritz Vectors RAMP Rational Approximation of Material Properties SIMP Solid Isotropic Material with Penalization SQP Sequential Quadratic Programming TO Topology Optimization C ONTENTS Nomenclature vii Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii List of Figures xi 1 Introduction 1.1 Outline of thesis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 2 2 Theoretical Fundamentals & Literature Review 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Topology optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Penalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Optimization algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Transient analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Analytical solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Numerical integration (Newmark method). . . . . . . . . . . . . . . . . . . 2.4 Transient analysis & sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 Global finite differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.2 Direct differentiation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.3 Adjoint variable method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.4 Comparison between statics, frequency-domain and time-domain dynamics . 2.5 Model order reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 Methods for linear systems. . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.2 Combined methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.3 Comparison & estimated computational gain . . . . . . . . . . . . . . . . . 2.5.4 Other methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.5 Error estimates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.6 Updating of basis vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.7 Non-linear systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.6 Combining optimization and model order reduction . . . . . . . . . . . . . . . . . 2.6.1 Topology optimization for structural dynamics . . . . . . . . . . . . . . . . 2.6.2 Model order reduction and optimization. . . . . . . . . . . . . . . . . . . . 2.7 Summary & Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 3 4 6 6 7 7 7 8 8 8 9 10 12 12 16 17 17 18 20 20 21 21 22 24 3 Implementation: Model & Optimization 3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . 3.1.1 Process and error overview. . . . . . . . . . . . 3.1.2 Effect of MOR on other errors . . . . . . . . . . 3.2 Implementation of model . . . . . . . . . . . . . . . . 3.2.1 Finite element analysis. . . . . . . . . . . . . . 3.2.2 Damping. . . . . . . . . . . . . . . . . . . . . 3.2.3 Direct time integration versus analytical methods 3.2.4 Time integration . . . . . . . . . . . . . . . . . 3.2.5 Sensitivity analysis . . . . . . . . . . . . . . . . 3.3 Optimization . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Objective functions . . . . . . . . . . . . . . . 3.3.2 Constraints . . . . . . . . . . . . . . . . . . . 3.3.3 Filtering . . . . . . . . . . . . . . . . . . . . . 3.4 Notes on software implementation . . . . . . . . . . . 3.4.1 Measuring performance . . . . . . . . . . . . . 3.4.2 Optimizing performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 25 25 27 27 27 27 28 28 28 29 29 31 31 31 32 32 ix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x C ONTENTS 3.5 Summary & Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4 Implementation: Model Order Reduction 4.1 Model order reduction . . . . . . . . 4.1.1 MOR and sensitivity analysis. . 4.1.2 Limited reduction . . . . . . . 4.1.3 Detailed analysis . . . . . . . . 4.1.4 Summary . . . . . . . . . . . 4.2 Basis vector sensitivities . . . . . . . 4.3 Adaptive Model Order Reduction . . . 4.4 Summary & Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 35 35 35 36 39 39 40 41 5 Numerical Examples: Model Order Reduction 5.1 Test problems . . . . . . . . . . . . . . . . 5.2 Local modes & Penalization . . . . . . . . . 5.3 Example 1: step response . . . . . . . . . . 5.3.1 Model order reduction error . . . . . 5.3.2 Computational effort . . . . . . . . 5.4 Example 2: harmonic response . . . . . . . 5.5 Objective function & sensitivity analysis . . 5.5.1 Model order reduction error . . . . . 5.5.2 Influence of basis vector sensitivities. 5.6 Updating of basis vectors . . . . . . . . . . 5.7 Summary & Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 43 44 47 47 48 50 53 53 55 57 58 6 Numerical Examples: Optimization 6.1 Test cases . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Comparing optimization performance. . . . . . . 6.2 Optimization & Model Order Reduction. . . . . . . . . . 6.2.1 The modal acceleration method and Ritz vectors . 6.2.2 The modal superposition method . . . . . . . . . 6.3 Other aspects of optimization and model order reduction 6.3.1 Objective functions . . . . . . . . . . . . . . . . 6.3.2 Optimization & Adaptive Model Order Reduction . 6.3.3 Penalization and transient problems. . . . . . . . 6.4 Summary & Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 59 60 60 60 62 64 64 64 66 66 . . . . . . . . . . . . . . . . 7 Conclusions & Recommendations 67 7.1 Conclusions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 7.2 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 A Bibliography 69 B Basis vector sensitivities 73 B.1 Eigenvector sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 B.2 Ritz vector sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 C Approaches to Topology Optimization 77 C.1 Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 C.2 Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 D Details of implementation D.1 Overview of parameters . . . . . . . D.2 Details of MATLAB implementation. D.3 Alternative Sensitivity Analysis . . . D.4 Details of error estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 79 79 80 81 L IST OF F IGURES 1.1 Overview of chapters in this thesis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 2.2 2.3 2.4 2.5 Density based topology optimization . . . . . . . . . . . . . . Penalization functions . . . . . . . . . . . . . . . . . . . . . . . Illustration of local optima . . . . . . . . . . . . . . . . . . . . Physical interpretation of Ritz vectors . . . . . . . . . . . . . . Topology optimization and the modal superposition method . . . . . 4 5 6 14 23 3.1 Flowchart of optimization of transient problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Accurate and consistent sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Illustration of a density filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 26 32 4.1 Flowchart of Adaptive Model Order Reduction & Optimization . . . . . . . . . . . . . . . . . . . . 41 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 5.13 Test structures used for analysis of Model Order Reduction . . . . . . . . . . . . . . . . . . . Comparison of RAMP and PI penalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Numerical example 1: dynamic response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Numerical example 1: MOR error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Numerical example 1: CPU-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MOR error of Ritz vectors and condition number . . . . . . . . . . . . . . . . . . . . . . . . . Numerical example 2: dynamic response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Numerical example 2: MOR error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Numerical example 2: dynamic response for various DoFs . . . . . . . . . . . . . . . . . . . . Numerical example 2: pure modal response . . . . . . . . . . . . . . . . . . . . . . . . . . . . Numerical examples: MOR error in objective function, adjoint variable and sensitivity . . . Numerical examples: MOR error in sensitivity analysis, for different number of time steps. Numerical examples: influence of basis vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 45 47 48 49 49 50 51 52 52 54 55 56 6.1 6.2 6.3 6.4 6.5 Description of optimization test cases . . . . . . . . . . . . . . Various optimized designs for numerical example 2 . . . . . . Optimization using modal superposition method . . . . . . . Numerical examples: test of adaptive model order reduction Example of non-effective penalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 61 63 65 66 B.1 Comparison of different methods of computing Ritz vector sensitivities. . . . . . . . . . . . . . . 75 C.1 Ground structures for topology optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 D.1 Alternative sensitivity analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D.2 Results of error estimatation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 82 xi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1 I NTRODUCTION During the past fifty years, there have been dramatic changes in engineering. In the 1960s engineers at NASA still used slide rules to design and build the rockets that brought men to the moon. Today, computers have become an integral part of precision engineering, enabling designs with nanometre accuracy such as wafer steppers or particle accelerators. With increasing computer power new design tools are gaining popularity, such as topology optimization. But computer power is not unlimited. Topology optimization is increasingly applied to many problems, but for time-domain dynamics it is still relatively expensive. The associated computational costs can be several orders of magnitude larger than for similar statics problems. Therefore this sees very little application. An optimization method for time-domain dynamics could be a valuable tool in design, since these dynamics often play an important part in structural mechanics. A well-known method of reducing the cost of timedomain simulation is model order reduction. In this research, this will be applied to topology optimization. The separate fields of topology optimization and model order reduction have seen a lot of research, but little is known on combining these fields. Therefore, in this thesis an answer is sought to the following research questions: 1. Can model order reduction be applied to increase the efficiency of topology optimization for transient, linear structural problems? (a) What are the differences between optimizing a transient problem and a static problem? (b) How can model order reduction and topology optimization be combined? (c) What method of model order reduction is most suitable? (d) What is the effect of errors in the model order reduction on the optimization process? 2. Can this be used in engineering practice? (a) What are the limitations? (b) Which parameters are important, and how can they be chosen? (c) How can the quality of the reduced model be evaluated during the optimization? 1 2 1. I NTRODUCTION 1.1. O UTLINE OF THESIS This document is divided into seven chapters, Fig. 1.1 shows an overview of these chapters and their connection. After this introduction, the second chapter describes all relevant theory and recent research. Its aim is to provide the reader with the necessary knowledge to understand the rest of the work. This includes the relation between this work and all relevant literature. Chapters three and four discuss how the described theory and methods can be combined and implemented. Chapter three treats the implementation of optimization for time-domain dynamics, chapter four discusses model order reduction and its effect on the optimization. In chapter five the various model order reduction methods are tested on some numerical examples. The focus is on accuracy and the effect of various parameters. In chapter six the total proposed method is tested on various topology optimization problems, to study the overall efficiency. Finally chapter seven compiles the conclusions and recommendations found in this thesis. Figure 1.1: Overview of chapters in this thesis. 1.2. N OTATIONS This thesis treats topics from three different disciplines: structural dynamics, topology optimization and model order reduction. The most commonly used nomenclature and notations of each of these fields are used. A full list of symbols and abbreviations can be found at the beginning of this document, page vii. The mathematics in this document will contain many derivatives. Time derivatives will be abbreviated using ∂q a dot, for example q̇,q̈. Derivatives with respect to the design parameters will be shown as ∂x or for compactness as q ′ . Other notations follow common engineering conventions: bold lower-case indicates vectors (q), bold capitals indicate matrices (V), where lower-case bold symbols are used to refer to a column of this matrix (vi ). 2 T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW 2.1. I NTRODUCTION In this research three fields are investigated: topology optimization, time-domain structural dynamics, and model order reduction. The aim of this chapter is to give an overview of relevant theory and research in all these fields. We will start by reviewing each separate field, after which we investigate combining them, and end with a short summary. 2.2. T OPOLOGY OPTIMIZATION Topology optimization is the optimization of a structure within a design domain, without making any assumptions beforehand on its shape. It has been a very active research field for the last decades, and has been applied to many different types of problems. To keep this section compact only the chosen method of topology optimization will be explained. For alternative approaches, see Appendix C. In this research a density based topology optimization is studied, which is by far the most common method. Density based topology optimization consists of the following steps: 1. Define design domain, external forces and boundary conditions (Fig. 2.1a). 2. Divide design domain into separate elements (Fig. 2.1b). Assign density variable x i to each element, normalized such that 0 ≤ x i ≤ 11 , where 0 corresponds to a void element and 1 to a filled element. These densities will be used as design variables in the optimization. 3. Define optimization problem. This consists of an objective function to be minimized/maximized, with possibly a number of constraints. 4. Find the values of x i that result in an optimal value of the objective function within the constraints. Optimization will iteratively find better designs (Fig. 2.1c) and converge towards an optimal design (Fig. 2.1d). The most important characteristic of this method is that the number of design variables is very high. This has a few consequences. First of all, this means gradient-based optimization algorithms are much more effective than gradient-free algorithms. But the calculation of gradient information (sensitivities) is complicated because of the large number of design variables. This means that so-called adjoint sensitivities are the only efficient method. This will be discussed in Section 2.4.3. Furthermore, the high number of variables complicates analytical solutions of the optimization problem. Therefore the vast majority of research relies on several numerical examples to prove their proposed methods. 1 Care should be taken to avoid singular matrices caused by a completely void element. The easiest way to solve this is by using a non-zero minimum density, in this research 1 × 10−3 is used. 3 4 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW f f (a) Design domain with boundary conditions and external forces (b) Parametrized design: domain divided into elements, each of them with a density variable. (c) Intermediate design. Color of elements corresponds to element density: white is 0, black 1, grey intermediate. (d) Optimized design. There are no grey elements, but there is some checkerboarding: some elements are only connected at their corners. Figure 2.1: Density based topology optimization can be summarized in these steps. A design domain is defined (a) and parametrized(b). Each element has a variable determining its density, the optimization process finds the optimal values of these variables, illustrated by (c) and (d) 2.2.1. P ENALIZATION In the density based methods it is necessary to avoid intermediate densities. For easy manufacturability structures should only have elements with either zero (white) or maximum (black) densities. Elements with intermediate (grey) densities could physically be interpreted as having a different sheet thickness for twodimensional problems, or as having a micro-structure with voids for three-dimensional structures. Although not physically impossible, manufacturing a design with grey elements is clearly more difficult than blackand-white designs. Black & white designs are most commonly achieved through penalization. This involves modifying the model in such a way that intermediate densities result in a higher value of the objective function, which causes the optimizer to avoid them. For structural models, this can be described by: E p (x i ) = f E (x i , p)E (2.1) ρ p (x i ) = f ρ (x i , p)ρ , (2.2) where f is a function dependent on the design variable and penalization parameters p. The density is usually not penalized ( f ρ = 1). A few notable options for the penalization of the stiffness are[1]: p SIMP: f E (x i , p) = x i RAMP: f ρ (x i , p) = p ≥ 1, xi 1 + p(1 − x i ) (2.3) (2.4) 0 ≤ xi ≤ 1 . These are used in almost all compliance minimization problems. Both methods results in a lower Young modulus for intermediate densities. In contrast to SIMP, RAMP results in a non-zero sensitivity at zero density, which is for example beneficial when gravity loading is studied. In the work of Zhu et al. [2] a slightly modified version is used, which prevents so called local modes. These are 2.2. T OPOLOGY OPTIMIZATION 5 vibration modes that appear in low-density parts of the structure, and do not contain any information about the response of the parts of the structure that do contain material. This will be treated briefly in Section 5.2, for more details the reader is referred to the work of Pedersen [3]. SIMP penalization results in the appearance of local modes, RAMP does not. Zhu et al. [2] propose a third method, named Polynomial Interpolation (PI): p f E (x i , p) = p 2 x i 1 + (1 − p 2 )x i f ρ (x i , p) = 1 p 1 = 3, (2.5) p 2 = 15/16, 0 ≤ xi ≤ 1 . This method is very similar to SIMP and RAMP, see Fig. 2.2. It is also based on the assumption that compliant 1 SIMP RAMP PI 0.9 0.8 0.7 f 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.2 0.4 0.6 0.8 1 x Figure 2.2: Plot of penalization functions for p = 3, p 2 = 15/16. Some differences are visible between the three penalization methods, but they all result in a lower stiffness for intermediate densities. This causes the optimizer to avoid these, leading to the desired black-white designs. material is adverse to the objective function. While this might be true for many transient problems, in general it is not. A more sophisticated approach was proposed by van de Ven et al. [4], which resulted in black & white design for a transient thermo-mechanical problem. For a transient mechanical problem, this so called material penalization method consists of optimizing the following problem: min max Ψ(q, t ) xi pi , j subject to: M(x i , p i , j )q̈ + C(x i , p i , j )q̇ + K(x i , p i , j )q = f i ∈ [1, Nel ], (2.6) j ∈ [1, 2] . Every element has its own set of penalization parameters (one for stiffness, one for density), which are chosen to maximize the problem. This in turn results in a higher objective function for intermediate densities, which causes the optimizer to avoid these, producing black and white designs. This method can be used with many different penalization functions. The material penalization approach is expected to work for every transient topology optimization problem, although it does triple the number of design variables. Penalization has an important disadvantage. It makes the design space less convex, increasing the possibility of finding local minima. In topology optimization, local minima often correspond to a missing structural element, illustrated by Fig. 2.3. Creating the missing component would involve removing material somewhere, and initially creating elements with an intermediate density at the locating of the wanted component. The latter step is unattractive due to the penalization, therefore the optimization problem contains a local constrained optimum. 6 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW (a) Global optimum. The value of the objective function is 2.92. (b) Local optimum, note the significantly higher objective function (4.72). Figure 2.3: Illustration of local optima in topology optimization. Three supports and a line load are defined, for which the static compliance is minimized. To ensure a black-white design, SIMP penalization is applied. This clearly leads to local optima. The second design is not the global optimum, but formation of a column in the middle of the structure would initially increase the compliance, this means the optimization algorithm is stuck in this local optimum. The images were generated using the highly recommended mobile application Topopt[5]. 2.2.2. F ILTERING A problem often encountered in topology optimization is checkerboarding. This can clearly be seen in Fig. 2.1d: we see that in a few places the elements are only connected in the corners, forming a checkerboard pattern. If this design would be constructed, there would be very high stress concentrations. But the finite element model does not capture this. Another issue is mesh dependence. This means that the solution changes when the mesh is refined, which is undesirable. Both problems can be solved in various ways [6], of which the most commonly used is filtering. In this method a blurring filter is applied to either the density or sensitivities, effectively restricting the minimum feature size to the filter radius. This removes both checkerboarding and mesh dependence, with minimal extra computational effort. 2.2.3. O PTIMIZATION ALGORITHMS In gradient based topology optimization, roughly two types of algorithms are used. The first of these are the optimality criteria methods. These combine sensitivity information with some heuristics, and can be very efficient. However, the algorithm must be tailored to the specific problem [7]. A more general approach is using a local approximation. The optimization problem is approximated using an another function based on the response and sensitivity information. These approximation functions are chosen to be easily optimizable, popular choices are linear functions (linear programming), or the Method of Moving Asymptotes (MMA)[8]. This last method is the most commonly used one in topology optimization, and approximates the problem using a convex function. Finally another popular algorithm is Sequential Quadratic Programming (SQP), which consists of using a quasi-Newton method on the (Karush-KuhnTucker) optimality conditions. The Optimization Toolbox of MATLAB has an implementation of linear programming, SQP and a few other methods. There is also a MATLAB implementation of MMA, which is used by a great number of researchers in Topology Optimization. This was provided by prof. Svanberg, the author of MMA. 2.3. T RANSIENT ANALYSIS 7 2.3. T RANSIENT ANALYSIS The finite element method results in a system of second order differential equations. In this section, it will be discussed how the dynamic response can be calculated from these equations. Again, this work is restricted to linear systems. These can be described by the following equations of motion: Mq̈(t ) + Cq̇(t ) + Kq(t ) = f(t ) q(t = 0) = q0 (2.7) q̇(t = 0) = q̇0 , where q0 and q̇0 are the initial conditions. Later on model order reduction will be applied to these equations, so to avoid confusion Eq. (2.7) will be referred to as the full equations of motion, and its solution as the full solution. Furthermore, this research is restricted to loads of the following type: f(t ) = nL ∑ i =1 Li f i (t ) . (2.8) This load are described by number of spatial terms Li and a temporal component f i (t ). In many cases n L is equal to 1 or a small number. This will turn out to be necessary for efficient model order reduction. 2.3.1. A NALYTICAL SOLUTIONS For some loads (for example harmonic), the equations of motion can be solved analytically, using classical vibrations theory. This does require a full analysis of the eigenmodes of the system, and results in an analytical expression of the motion of the system. For arbitrary loads, the undamped equations of motion can be decoupled, and solved individually using Duhamel’s integral [9]. This is computationally cheaper than full numerical integration of the equations, but also requires a full eigenanalysis. 2.3.2. N UMERICAL INTEGRATION (N EWMARK METHOD ) While analytical solutions are only possible in certain cases, direct numerical integration of the equations of motion will always work. Various methods exist for this, for example Euler, Runge-Kutta, etc, which can be classified in many different ways: implicit/explicit, single/multistep, etc. For structural dynamics, the most commonly used method is the Newmark scheme. Compared to other methods, the Newmark method will generally allow larger time steps for similar accuracy. A detailed analysis of this can be found in the textbook by Hughes [10]. The core of the Newmark process is given by the following algorithm: q̇(t n+1 ) = q̇(t n ) + (1 − γ)h q̈(t n ) + γh q̈(t n+1 ) 1 q(t n+1 ) = q(t n ) + h q̇(t n ) + h 2 ( − β)q̈(t n ) + h 2 βq̈(t n+1 ) , 2 (2.9) (2.10) where h is the time step, and β and γ are the Newmark parameters. Using these, the properties of the scheme can be chosen. This algorithm is in general implicit, which means that it contains a term dependent on the new time step, q̈(t n+1 ). To find this term a linear equation has to be solved. This is easier to describe when the algorithm is written in a slightly different form: Prediction: q̇∗ (t n+1 ) = q̇(t n ) + (1 − γ)h q̈(t n ) 1 q∗ (t n+1 ) = q(t n ) + h q̇(t n ) + h 2 ( − β)q̈(t n ) 2 ( ) 2 Calculate accelerations: M + hγC + h βK q̈(t n+1 ) = f(t n+1 ) − Cq̇∗ (t n+1 ) − Kq∗ (t n+1 ) Correction: q̇(t n+1 ) = q̇∗ (t n+1 ) + hγq̈(t n+1 ) ∗ 2 q(t n+1 ) = q (t n+1 ) + h βq̈(t n+1 ) . (2.11) (2.12) (2.13) (2.14) (2.15) The step shown in Eq. (2.13) is the most expensive of the Newmark algorithm. When using a fixed step size the linear equation does have a constant left hand side, which allows reuse of the factorized matrix for each time step. There are a few possibilities for the Newmark parameters. Some choices will result in an explicit algorithm, 8 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW which avoids solving the linear system, but at the cost of a very small step size. Others add some numerical damping. The scope of this thesis does not require a thorough investigation of this, so we will use a very common selection for the parameters: β = 1/4, γ = 1/2. This yields an unconditionally stable algorithm known as trapezoidal or average constant acceleration. For an overview of the selection of Newmark parameters, and the resulting accuracy and stability, the reader is referred to the textbook by Hughes [10]. The Newmark scheme has another crucial parameter, the step size h. This controls the trade-off between accuracy and numerical speed. The resulting error will be discussed in Chapter 3. 2.4. T RANSIENT ANALYSIS & SENSITIVITIES For efficient optimization, we are not just interested in the response of the system, but also in the derivatives (sensitivities) with respect to the design variables. In this section, we discuss sensitivity analysis for transient problems. The literature used for this section includes the textbook by Choi and Kim [11] and review papers by Kang et al. [12] and by van Keulen et al. [13]. Furthermore, the MSc. thesis of Emiel van de Ven [14] was very useful, which describes the sensitivity analysis for a thermal transient problem in great detail. In optimization problems, one is interested in the sensitivity of the objective function and the constraints, both with respect to the design variables x. These will be investigated using a very general function: ∫ Ψ = ϕ(q(T ), x) + T 0 Φ(q(t), x) dt , (2.16) where T is the final time of the simulation. This formulation allows optimization of quantities at the end of the simulation (ϕ, for example final deformation) as well as during the simulation (Φ, for example deviation from a pre-described displacement curve). For completeness, a slightly different formulation should be used, incorporating: • ϕ and Φ as a function of not only q and x, but also of q̇ and q̈. • A non constant final time T , that is determined by a condition on q and its derivatives. These changes do not modify the overall process significantly, both for the direct and adjoint method. They do however add many terms to the equations, making them less insightful. For sensitivity analysis incorporating these two extra possibilities, the reader is referred to respectively the paper by Kang et al. [12] and the textbook by Choi and Kim [11]. 2.4.1. G LOBAL FINITE DIFFERENCES The derivative of Eq. (2.16) with respect to x can be found with minimal implementation effort by a finite difference approximation. This does require one additional simulation per design variable. For the large number of design variables associated with topology optimization, this is not a feasible approach. 2.4.2. D IRECT DIFFERENTIATION A more sophisticated approach starts by taking the derivative of the objective function with respect to design variables x: ∫ T ∂Φ ∂Φ ∂q dΨ ∂ϕ ∂ϕ ∂q(T ) = + + + dt . (2.17) dx ∂x ∂q(T ) ∂x ∂q ∂x 0 ∂x These terms can be evaluated separately: • ∂ϕ ∂Φ ∂x , ∂x : • ∂ϕ ∂Φ ∂q(T ) , ∂q : • ∂q ∂q(T) ∂x , ∂x : direct dependency of objective function on design variables, usually zero. easy to evaluate by analytical differentiation of the function considered. difficult to evaluate. These terms could be replaced by using an adjoint formulation, which will be described in on the next page. First it will be demonstrated how to find them using the direct method. 2.4. T RANSIENT ANALYSIS & SENSITIVITIES 9 ∂q To find ∂x , we start from the equations of motion, and differentiate these once with respect to the design variables. Regrouping yields: Mq̈′ + Cq̇′ + Kq′ = f′ − M′ q̈ − C′ q̇ − K′ q , (2.18) usually with initial conditions q̇′ (t = 0) = q′ (t = 0) = 0, unless the initial conditions of the equations of motion depend on the design parameters. The right hand side of this equation is called pseudo-load and represents the change in load (both external and internal) when the design parameters change. The matrices M′ ,C′ and K′ can be derived analytically, and q and its time derivatives are known. So Eq. (2.18) can be solved to find q′ . It makes sense to do this using the Newmark algorithm with the same parameters as used in the normal time integration. This enables us to reuse the factorized matrices. Compared to finite differences, the same number of time integrations is performed, but with the same left hand side for each. So it is more efficient, but still requires many expensive integration steps. Model order reduction can be applied to reduce this [13]. 2.4.3. A DJOINT VARIABLE METHOD A more efficient approach called the Adjoint Variable Method (AVM) will be discussed in this section. This is ∂q based on adding a term to the objective function2 , which will allow us to cancel out the expensive term ∂x . For this problem, the additional term is the equations of motion, multiplied by Lagrange multiplier λT (t ), and integrated over the time span. ∫ T ( ) ΨA = Ψ + λT (t ) Mq̈ + Cq̇ + Kq − f dt . (2.19) {z } | 0 =0 For now we focus on the added term. This should contain the terms that we want to cancel out in the sensitivity. Differentiating once with respect to x yields after some reordering: ∫ T ) ( λT Mq̈′ + Cq̇′ + Kq′ − R dt = 0 (2.20) 0 ) ( ′ ′ ′ T ′ R = λ f − M q̈ − C q̇ − K q . Next integration by parts is applied to reduce the order of the time derivatives of q′ : ∫ T ∫ T ]T [ T T λT Mq̈′ dt = λ̈ Mq′ dt − λ̇ Mq′ + λT Mq̇′ 0 ∫ T 0 ∫ T 0 0 λT Cq̇′ dt = − ( ) λT Mq̈′ + Cq̇′ + Kq′ − R dt = ∫ ∫ 0 T 0 T (( 0 [ ]T T λ̇ Cq′ dt + λT Cq′ (2.21) (2.22) 0 ) ) T T λ̈ M − λ̇ C + λT K q′ − R dt [ ]T T − λ̇ Mq′ + λT Mq̇′ + λT Cq′ = 0 . 0 (2.23) For simplicity it is assumed that the initial conditions do not depend on the design variables, so q̇′ (0) = q′ (0) = 0; and that all matrices are symmetric. Adding Eq. (2.23) to Eq. (2.17) and regrouping yields: dΨA ∂ϕ = + dx ∂x ∫ T 0 ( )T ∂Φ ∂Φ T ∂q − R + Mλ̈ − Cλ̇ + Kλ + dt ∂x ∂q ∂x | {z } Adjoint equation ( )T ∂ϕ T ∂q(T ) ∂q̇(T ) − Mλ̇(T ) + Cλ(T ) − + λT (T )M . | {z } ∂q(T ) ∂x ∂x Term. cond. 2 | {z } (2.24) Terminal condition 1 2 This can also be interpreted as switching the order of the calculations[15]. In the direct differentiation method, the pseudo-load is calculated first, and time integration is used to calculate the resulting sensitivity. In the adjoint method, the adjoint variable is calculated first. This term (λ) can be interpreted as the compliance of the objective with respect to changes of the internal and external loads[16]. Multiplying this with the pseudo-load and integrating over time yields the design sensitivity. 10 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW Thus when the following equations hold, all term in the sensitivity containing q′ are zero: Mλ̈ − Cλ̇ + Kλ = − ∂Φ T ∂q Mλ(T ) = 0 Mλ̇(T ) = −Cλ(T ) + ∂ϕ ∂q(T ) T (coefficients of q′ in integral) (2.25) (coefficients of q̇′ (T )) (2.26) (coefficients of q′ (T )) . (2.27) This results in the adjoint variable sensitivity analysis, which is not dependent on q′ . It does require the computation of λ, subject to the terminal value problem of equation 2.25 to 2.27. Equation (2.25) will be called the adjoint equation. If we had used a more general function ψ, the right hand side of all three equations would contain additional terms. These can all be easily evaluated analytically and do not change the overall complexity. Finally, combining everything yields the following equation for the sensitivity: ∫ T dΨA ∂ϕ ∂Φ = + − R dt dx ∂x 0 ∂x ( ) R = λT f′ − M′ q̈ − C′ q̇ − K′ q . (2.28) Because the equations of motion will have been solved before starting the sensitivity analysis, the dynamic response q and its derivatives are available. The adjoint variable can be found by solving the adjoint equation. The other terms can easily be evaluated analytically. The required computational effort is low compared to the other methods, only one time integration is required. This step is very similar to the normal time integration, so we can even reuse the factorized matrices. However, the full time history of q and its derivatives has to be stored, which requires a large amount of memory. 2.4.4. C OMPARISON BETWEEN STATICS , FREQUENCY- DOMAIN AND TIME - DOMAIN DYNAMICS Up to this point the simulation and sensitivity analysis for time-domain dynamics have been studied. To put this into context, this can be compared to problems concerning statics and frequency-domain dynamics. Most topology optimization problems use linear statics. A typical problem studies the static displacement q, which can be found by solving: Kq = f . (2.29) The sensitivity analysis (adjoint variable method) can be summarized by[7]: Ψ = ϕ(q) ( ) dΨ ∂Ψ = + λT f′ − K′ q dx ∂x ∂ϕ T λ K− = 0. ∂q (2.30) In general this means that for the simulation and sensitivity analysis two solutions are needed of a system with matrix K. In the common case of minimum compliance optimization (Ψ = fT q), λ will be equal to q, which reduces the entire analysis to just one solution of a linear system and a number of matrix multiplications. Frequency domain dynamics studies the behaviour of the structure under a harmonic load with frequency ω. It is assumed that the force and displacement are given by[9]: f = f̄e i ωt , q = q̄e i ωt . Substituting this into the equations of motion yields: ( 2 ) −ω M + i ωC + K q̄ = Sq̄ = f̄ . (2.31) (2.32) 2.4. T RANSIENT ANALYSIS & SENSITIVITIES 11 To find the amplitude of the system at a certain frequency, one solution of a linear system with matrix S is needed. For the sensitivity analysis we again use an adjoint formulation, with a general function of the displacement response as objective[17]: Ψ = ϕ(q̄) ( ) dΨ ∂Ψ = + λT f̄′ − S′ q̄ dx ∂x ∂ϕ λT S − = 0. ∂q (2.33) The similarity to the static problem is obvious, the solution will take a similar amount of computational effort, although this is increased by the fact that matrix S is complex. Furthermore, using the dynamic compliance (Ψ = f̄T q̄) as objective function will reduce the costs of the sensitivity analysis [17], analogous to the minimum compliance case for a static problem. This would require only one solution of a linear system for simulation plus sensitivity analysis. Summarizing, the statics and frequency domain problems described here require a similar amount of computational effort to solve, in general two solutions of linear systems per objective function. In contrast, for time-domain problems with full Newmark integration two solutions of similar systems are required for every timestep. A typical simulation uses several hundred timesteps, which results in a computational effort that is two orders of magnitude larger. For both statics and frequency domain dynamics the sensitivity analysis is simplified when using the compliance of the system as objective function. In some cases this is also applicable to time-domain dynamics, this will briefly be discussed in Section 3.3. To conclude this discussion, we can state that simulation and sensitivity analysis for time-domain dynamics is significantly more expensive than for statics or frequency-domain dynamics. 12 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW 2.5. M ODEL ORDER REDUCTION Because the finite element method typically results in a very large system of equations, it is attractive to reduce these to a smaller system. This process is called model order reduction, and is applied in many different fields, including structural mechanics, numerical mathematics and control engineering, for a comparison see [18]. In this thesis the methods and nomenclature as used in structural mechanics are chosen. 2.5.1. M ETHODS FOR LINEAR SYSTEMS For linear systems, model order reduction means we represent N coordinates q by a set of basis vectors V and reduced coordinates z. Mathematically this can be seen as projecting the displacement onto the space spanned by V, which has a lower dimension. This results in a residual displacement r: q(t ) = V z(t ) + r(t ) ≃ Vz(t ) . N ×1 N ×n n×1 (2.34) N ×1 This equation is possibly clearer when the size of matrices is illustrated: q 1 (t ) ≈ v1 .. . z (t ) 1 . vn .. z n (t ) ··· (2.35) q N (t ) This method be applied to many types of problems, not just limited to structural mechanics. Focussing on topology optimization for structural mechanics, there are example of statics[19] and frequency-domain dynamics[17]. The scope of this research and thus this section will be limited to time-domain dynamics. Analogous to Eq. (2.34) the velocity and acceleration are also projected onto V. Substituting this into the equations of motion, and pre-multiplying by VT yields a set of n equations, which we call the reduced equations of motion: Mr z̈ + Cr ż + Kr z = VT f + VT r̂ Mr = VT MV Cr = VT CV (2.36) T Kr = V KV r̂ = −(Mr̈ + Cṙ + Kr) = MVz̈ + CVż + KVz − f . The magnitude of the basis vectors can be chosen freely, convention is to orthonormalize every basis vector such that VT MV = I. The solution of the reduced equations of motion shall be reffered to as reduced solution. The residual displacement r can be studied in some more detail by describing it by: r = N ×1 Vr · zr , (2.37) N ×(N −n) (N −n)×1 where Vr and V together span the entire solution space. Using Vr , the error can be rewritten as: VT r̂ = −VT (MVr z̈r + CVr żr + KVr zr ) . (2.38) This shows that the force residual Vr̂ will only be zero if the used basis vectors are mass-, damping- and stiffness-orthogonal. Any coupling between the basis vectors will result in inaccuracy in z. It is always possible to choose Vr such that is mass- and stiffness-orthogonal with respect to V3 . In the case of modal damping, orthogonality with respect to damping is also ensured. This means VT r̂ will be zero. In mathematics this is known as a Galerkin projection. 3 For any type of basis vectors diagonal system matrices can be found by calculating the eigenvectors of the reduced system. This allows uncoupling of the basis vectors. The exception here is the damping matrix, which will only be diagonal in the case of modal damping. 2.5. M ODEL ORDER REDUCTION 13 The choice of basis vectors is very important. A good set should retain most of the characteristics of the full system using only a few vectors, which means that the goal is to minimize r. On the other hand, the basis vectors should be cheap to compute, otherwise part of the computational gain is lost. The most important choices are named below. These can be grouped as follows: • Model based reduction – Modal based reduction4 ⋄ Modal Superposition Method (MSM) – Load based reduction ⋄ Mode Acceleration Method (MAM) ⋄ Ritz vectors ⋄ Quasi-Static Ritz Vectors (QSRV) – Condensation methods – Combined methods • Data based reduction – Proper Orthogonal Decomposition (POD) M ODAL S UPERPOSITION M ETHOD The basis vectors in this method are the eigenvectors of the system[20]. This is also commonly called Modal Displacement Method or Modal Truncation, which implies that we truncate the full basis to find the reduced basis. In this research the full basis is never used, MSM is always used to refer to the reduced set of eigenvectors,. These are the solutions of: (2.39) (K − ω2i M)vi = 0 . Each eigenvector has an associated eigenfrequency ωi . For MOR, eigenvectors associated to the lowest n eigenfrequencies are commonly used. There are various algorithms for finding eigenvectors. The most frequently used is the Lanczos algorithm5 , which requires the solution of 2-4 linear systems per vector [21]. Eigenvectors are orthogonal with respect to both the mass and stiffness matrix. If they are not coupled through the damping matrix, all system matrices will be diagonal, which reduces the cost of solving them. The convergence of the MSM can be studied by examining the undamped response to a harmonic excitation: f(t ) = L sin(ωt ). This response can be expressed as a function of the eigenvectors: q(t ) = sin(ωt ) n ∑ Vi VTi L i =1 (ω2i − ω2 ) . (2.40) One can distinguish between spatial and spectral convergence. Spatial convergence depends on VT L, which 1 is difficult to predict without computing the eigenvector. Spectral convergence depends on ω2 −ω 2 . So vectors i with eigenfrequencies close to the excitation will have a larger amplitude, those with distant eigenfrequencies a smaller amplitude. This leads to the common method of including all eigenfrequencies up to a multiple of the load frequency. Eigenvectors are not dependent on the load, this is both an advantage and a disadvantage. When the load on a structure is changed, the eigenvectors do not have to be recomputed. But the lack of load information in the basis can lead to large errors in the calculated response. 4 Note the distinction between model and modal, modal refers to eigenmodes of the model. 5 The Lanczos algorithm is based on reducing the equations of motion, and finding the eigenvectors of the reduced system. The reduced basis consists of one random vector plus additional vectors generated using the Arnoldi algorithm, which will be discussed in the next subsection. The main cost is calculating the reduced basis, which is typically 2-4 times larger than the requested number of eigenvectors. For details, see [9, 21]. 14 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW R ITZ VECTORS Also known Load Dependent Ritz Vector method [22, 23]. This method is based on creating a (Krylov) subspace from the static displacement and subsequent multiplications by K−1 M: v1 = K−1 f (2.41) V = span{v1 , K−1 Mv1 , (K−1 M)2 v1 , . . . , (K−1 M)n−1 v1 } . This has a clear physical interpretation, illustrated in Fig. 2.4. The first vector is the static displacement v1 . If we would have an acceleration in this direction, we would find inertia forces Mv1 , resulting in an approximate displacement K−1 Mv1 . Each Ritz vector can be seen as a dynamic correction to the previous one. For better numerical results, these vectors should be orthonormalized. This leads to Algorithm 2.1, where steps 3-9 are known as the Arnoldi algorithm. → Static displacement v1 Inertial force Mv1 ↓ ← New vector v2 (orthogonalized) Dynamic correction K−1 Mv1 Figure 2.4: Illustration of physical interpretation of Ritz vectors. The first vector is the static displacement of the structure. To approximate the dynamic response of the structure, the first vector is multiplied by the mass matrix, yielding the associated inertia forces. The displacement caused by these forces is approximated by multiplying with K−1 . This results in the new Ritz vector, but there is still a large overlap between the vectors. To remove this the new vector is orthogonalized. These steps illustrate the fact that each vector is a dynamic correction to the previous one. Algorithm 2.1 Algorithm for calculating Ritz vectors 1: 2: 3: 4: 5: 6: 7: 8: 9: v1 ← K−1√ f {Create first vector} v1 ← v1 / vT1 Mv1 {Mass-normalize} for i = 2 to n do vi ← K−1 Mv j −1 {Create new vector} for j = 1 to i − 1 do vi ← vi − vTj Mvi v j {Mass-orthogonalize} end for √ vi ← vi / vTi Mvi {Mass-normalize} end for Steps 5-7 form a variant on the modified Gramm-Schmidt process[24]. Normally this produces vectors that are orthogonal to each other, in this version the vectors will be mass-orthogonal. Although other orthogonalization algorithms are also possible and might offer better numerical stability, the used algorithm is cheap 2.5. M ODEL ORDER REDUCTION 15 and in most cases sufficient. Orthogonalization errors will lead to poorly conditioned reduced system matrices, which can easily be detected. Compared to eigenvectors, Ritz vectors are cheap to compute, requiring only one solution of a linear system per vector. The reduced mass matrix will be diagonal, and all its entries are 1. The reduced stiffness matrix however will generally be full, which increases solution effort, and complicates analytical solutions. Two possible methods[25] to improve this are either diagonalizing the reduced matrices by computing the eigenvectors of the reduced system or switching to so called Lanczos coordinates, which result in tri-diagonal matrices. If the time integration of the reduced system is a major cost in the total optimization, either of these methods can be used to lower this. A disadvantage of Ritz vectors is the fact that a clearly defined load vector is required. If there is no load vector, there is no static displacement. This means the load should be of the form f(t ) = L · f (t ) (Eq. (2.8)), a constant spatial vector times a scalar term. If the load can be described using a summation of a few of these terms (for example one load vector for the gravity load, one for an external load, etc.), separate Ritz vectors can be calculated for each part of the load. This will become inefficient for complicated loads. On the convergence of Ritz vectors we can make an important note. Because of the repeated multiplication with K−1 M (power iteration procedure) the subspace will converge towards the first eigenvector. Once the first eigenvector is included in the subspace, the second eigenvector will start appearing, etc. Based on this, we can expect a good representation of low frequency content. For problems featuring rigid body modes, applying MSM is straight-forward. The rigid body modes will appear as basis vectors with zero stiffness. For Ritz vectors, they do cause some issues, since matrix K will be singular. This can be solved by including the rigid body modes (nullspace of K) in the basis, and using a generalized inverse for the rest of the computations. QUASI -S TATIC R ITZ V ECTORS This is a variation on Ritz vectors [26]. The difference is in the power iteration procedure of step 1 (and the generation of the first vector). We replace K−1 by (K − ω2c M)−1 , where ωc is the so called centre frequency. This results in a spectral shift, so the subspace will converge towards the eigenvector closest to the centre frequency. Based on this, we can expect a higher accuracy for problems where the frequencies close to ωc are relevant. Possible variations include multiple values for ωc , or ways to treat multiple load cases, both using the block Lanczos method, see [26, 27]. A difficulty with this method is the fact that when ωc approaches an eigenvalue, we have to invert/factorize a (nearly) singular matrix. Because eigenvalues are likely to change during optimization, this should at least be monitored. Rigid body modes however will not be a problem, these do not cause singularities in the iteration matrix. C ONDENSATION METHODS Another type of reduction are condensation methods. These consist of ’condensing’ a subset of the degrees of freedom onto the remaining ones. In the most common method, Guyan Reduction [28], a part of the degrees of freedom is quasi-statically condensed. If this part has a low inertia, this assumption will not lead to a large error. There could be some useful applications of this in topology optimization, for example condensing the void domain onto the solid domain to reduce the size of the system without affecting the accuracy significantly. The order reduction however depends on the size of the structure that we do want to model fully, and this limits the overall reduction. So compared to the other model based methods, static condensation will require a larger basis. M ODAL ACCELERATION METHOD By reducing the system inevitably some of the information in the response will be lost. In the modal superposition approach, the residual can be approximated. In the so called MAM [21], a quasi-static term is added. This means we ignore the inertia and damping of the system, and just look at the stiffness. Using spectral 16 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW expansion of the stiffness matrix, this quasi-static correction can be written as either: qqs = N ∑ vi vTi f i =n+1 (2.42) µi ω2i qqs = K−1 f − n v vT f ∑ i i i =1 µi ω2i . (2.43) The first form requires a full eigenbasis, so the second form is usually more convenient. This addition represents the quasi-static response of the part of the system that is left out by the MOR. The higher modes have a high stiffness/mass ratio, so a quasi-static approximation can be very accurate. The computational effort is dependent on the calculation of K−1 f. This term has to be calculated for every timestep. Note how this compares to the (full) Newmark method, the solution of a similar system is required. This of course nullifies the performance gained by MOR. Fortunately, there are two factors that speed up the calculation. First of all, the factorized K matrix is often already available from an earlier calculation. Secondly if the load can be described as f(t ) = L · f (t ), the quasi-static correction can be rewritten as: ( −1 qqs = K L− n v vT L ∑ i i i =1 µi ω2i ) f (t ) , (2.44) which is very cheap to calculate, since the term within brackets only has to be evaluated once. This condition on the load is essential for both efficient MAM and load-dependent MOR. The Modal Acceleration Method in this form is only applicable to MSM, because it relies on an eigendecomposition of the system matrices. One final remark can be made on the relation between MAM and Ritz vectors. The MAM is identical to adding a single orthogonalized Ritz vector to the MSM basis, and calculating its associated quasi-static response. Based on this MAM will always have inferior accuracy compared to modal truncation augmentation, which will be discussed later. P ROPER O RTHOGONAL D ECOMPOSITION In this technique the basis vectors are calculated from a set of samples, most commonly using a singular value decomposition [29]. This method is easy to apply to non-linear systems, and it is often used in computational fluid dynamics. However generating the samples is expensive, since it requires many solutions of the full equations. Thus for this research it does not make sense to use POD. 2.5.2. C OMBINED METHODS A reduction basis can be built out of various types of vectors, including a combination of the methods discusses earlier. The one exception here is the MAM, which is not a reduction method, but a correction to one. Combining basis vectors allows us to use the strength of each method. It is recommended to always mass-orthogonalize all vectors with respect to one other for higher numerical accuracy and speed. M ODAL T RUNCATION AUGMENTATION The most frequently used combined method is called modal truncation augmentation (MTA) [30], which uses a basis of eigenvectors augmented with Ritz vectors. This is closely connected to the modal acceleration method, and usually outperforms it[31]. A further advantage of this method is that the Ritz vectors are usually calculated as an intermediate step in the Lanczos algorithm used to find the eigenvectors. POD & LOAD Furthermore there is some merit in the combination of dependent vectors and POD. As stated before, we need a spatial representation of the load to calculate load dependent vectors. If this is not available, this can be approximated by applying proper orthogonal decomposition to the load data. The vectors produced by this method can be used as load vectors for the model reduction. 2.5. M ODEL ORDER REDUCTION 17 D IAGONALIZATION Finally for every type of reduction we can diagonalize the reduced system matrices by calculating their eigenbasis, according to: ( ) Kr − ωr,i Mr wi = 0 . (2.45) where W is the eigenbasis of the reduced system. Ignoring damping, this yields the following uncoupled set of basis vectors: Vdiag = VW . (2.46) This uncouples the equations of motion6 , making analytical solutions possible even for load based reduction methods. This also increases the numerical stability of the model by forcing the basis to be orthogonal. Thus built-up of errors from the orthogonalization is reduced. 2.5.3. C OMPARISON & ESTIMATED COMPUTATIONAL GAIN Now that the different methods have been described, the next step is comparing them. Eigenvectors are expensive to calculate compared to Ritz vectors. They are mostly suited to systems where the eigenmodes dominate the dynamics, such as resonating systems. If the load dominates the dynamics, we usually need a high number of eigenvectors for a good approximation. Load dependent vectors will be better in this case, Ritz vectors for low frequency loads and QSRV for high frequency loads. If an individual method is insufficient, a combination might work, such as Model Truncation Augmentation. The modal acceleration method can increase the accuracy of MSM at a low cost, if the load is described by a term that has a constant spatial distribution. This requirement is also applicable to the other load-based reduction methods. In contrast to all the other methods the MAM does require computing the full solution (q = Vz), which is not expensive but does require a large amount of memory. Other methods (Ritz vectors, modal truncation augmentation) are expected to result in higher accuracy with lower costs. Before we actually start using model order reduction, we can make an estimate of the improvement in computational effort. The most expensive step in both the Newmark algorithm and the most important reduction methods (MSM, Ritz, QSRV) is the repeated solving of a linear system. The computational costs associated with this can be estimated. For dense matrices factorization has a cost of N 3 /3 (Cholesky), the cost of solution of the system by substitution is 2N 2 . This results in the following total costs: Table 2.1: Estimated costs of different MOR methods in flops. c is the number of Lanczos iterations per computed eigenvector, N the size of the full system, n the number of basis vectors, n t the number of time steps. This shows that the main effect of model order reduction is reducing the number of times the full system has to be solved. Method Full MSM Ritz/QSRV Factorization (full) N 3 /3 N 3 /3 N 3 /3 Solution (full) n t · 2N 2 n · 2N 2 · c n · 2N 2 Factorization (red.) n 3 /3 Solution (red.) n t · 2n 2 n t · 2n 2 This is a very rough estimate, the exact costs will be highly dependent on the sparsity and bandwidth of the matrices. The most expensive computations are those performed on the full equations. Since all methods use the matrices found from the same finite element analysis, the costs of factorization are equal. The required number of solutions of the full system determines the possible cost reduction. This step is often one of the bottlenecks of the simulation. Based on this, it can be concluded that model order reduction is efficient if the required number of basis vectors is small compared to the number of time steps. 2.5.4. OTHER METHODS We will discuss two other research fields: dynamic substructuring and parametric model order reduction. In dynamic substructuring [32], of which the most common type is component mode synthesis, a structure is divided into parts. This by itself does not reduce the cost of the analysis. However, if we have clearly divided 6 Note that although basis V of the system. diag uncouples the system matrices, the basis vectors are not necessarily identical to the exact eigenvectors 18 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW subcomponents, these can be analysed and changed individually, which does simplify analysis . Reduction methods are also frequently applied to subcomponents. In topology optimization, we often have only one component, in which case there is no need for dynamic substructuring. In some cases it might be beneficial, for example if a part of the structure is not changed, or if the structure has clearly defined subcomponents. Parametric model order reduction is more interesting for this research. In this field, reduced models are generated as a function of certain parameters. By using various interpolation techniques, a reduced model can be cheaply obtained for different values of these parameters within a certain design space. An attractive idea would be using this to update the basis vectors when the design changes. This does require a large number of samples, to represent the design space. In topology optimization, the design space has a very high dimension. Because analysis is expensive for transient problems this excludes the use of parametric model order reduction. Other methods of updating the basis will be discussed in Section 2.5.6. 2.5.5. E RROR ESTIMATES The choice of the number of basis vectors is a difficult one. The perfect reduced model produces results identical to the full model. In reality MOR will introduce an error. If we can estimate this error, we can choose the number of vectors such that this error is within a certain range, a process called apaptive model order reduction. A number of few error estimates here will be discussed here. They are all normalized such that an estimate of 0 represents a perfect approximation, while an estimate in the order of 1 represent a very inaccurate representation. F ULL ANALYSIS First of all, we can compare the results to those obtained from the full model. This is costly, the point of MOR is to avoid computations on the full model. In optimization however it might be wise to verify the accuracy of the reduced model once or twice. If the extra costs guarantee that the hundreds of iterations that follow are accurate, they are easily justified. The error is of course given by qfull − Vz. But there are multiple ways of computing a scalar normalized error measure from this. The following one will be used in this document: e= ∥q j ,full (t i ) − q j ,red (t i )∥ ∥q j ,full (t i )∥ , 0 ≤ i ≤ nt , (2.47) where j corresponds to a certain DoF, usually the one where a force is applied. There are many other possibilities, which for example use the error information for all DoFs. In Chapter 5 we will see this one is sufficient. This will be used as the reference error. A good estimate will produce the same results at a lower cost. Some possible error estimates will be discussed next. The main distinction is whether the error is estimated before (a priori) or after the simulation (a posteriori). The following methods will be described: • A priori estimates: – Spatial load estimate – Spectral load estimate • A posteriori estimates: – Dual Weighted Residual estimate – Refinement estimate. S PATIAL LOAD ESTIMATE The first estimate is based on the load. It indicates how well the direction of the load is represented by the basis vectors [23]: fT e (2.48) e= T , f f 2.5. M ODEL ORDER REDUCTION 19 where e is given by: e = f− n ∑ i =1 vTi fMvi . (2.49) The value of e will vary between 1 when the load is fully mass-orthogonal to the vectors, to 0 when the load is fully represented. S PECTRAL LOAD ESTIMATE For the MSM we have seen that spectral convergence can easily be estimated. For the other methods this is also possible, by calculating the eigenspectrum of the reduced system. A necessary condition for accurate model order reduction is that the frequency spectrum of the load and the reduced model overlap. Two error estimates based on this are[33]: min ωred max ωload , e= , (2.50) e= max ωred min ωload where ωload and ωred represent the frequencies present in respectively the load and reduced model. The first estimate is often the most relevant, since most reduction bases start at low frequency dynamics, where additional basis vectors account account for higher frequency dynamics. If the reduction method is based on spectral shifting, the second error estimate will indicate whether the low-frequency dynamics are also captured. However, in this research, only the first one will be used. For details on the calculation of ωload , see Appendix D. D UAL W EIGHTED R ESIDUAL ESTIMATE From the reduced results we can calculate the residual dynamic force: MVz̈ + CVż + KVz − f = r̂ r̂ = −(Mr̈ + Cṙ + Kr) . (2.51) (2.52) In model reduction we normally project this on V to remove it. However r̂ physically represents residual internal forces, which will decrease with higher model accuracy. While this has a clear physical meaning, it is quite difficult to calculate a relevant error estimate. Residual forces could largely cancel each other out and do not directly indicate response errors. An example of dealing with this is the so called Dual Weighted Residual method, which was studied extensively in the MSc. thesis of Nortier [34]. For harmonically excited system this method can be summarized by: e = aT r = ((K − ω2 M)−1 )a)T r̂ , (2.53) where ω is the loading frequency and a is a vector used to select degrees of freedom. Physically this error represents the displacement at the DoFs in a due to the residual force of a harmonic load. But the fact that the full system has to be solved makes it very expensive, although this is reduced because the factorized matrix is usually available from the creation of the basis vectors. Furthermore the selection of a is non-trivial. Nortier suggests some ways to make this error estimate more efficient[34]. It can be rewritten to be a function of M−1 instead of K−1 , which is usually cheaper, but still expensive. Alternatively, we can approximate r by refining the model further. This does introduce an additional error, and does not change the fact that the described method is only valid for harmonic response. A similar method for arbitrary dynamic response has not been found. R EFINEMENT ESTIMATE A much cheaper estimate was formulated, extending the research by Han [35]). It is most suited to loadbased reduction (Ritz vectors & QSRV). The first load based vector captures the (quasi-)static displacement, the higher ones add a dynamic correction. So we can assume that the contribution and thus the kinetic energy associated with a vector will be lower for higher order vectors. This will be demonstrated in Chapter 5. Based on this the following error estimate is defined: ∫T 2 ∫T ż n (t ) dt E kin,n dt = ∑ 0 ∫T e = ∫ T0 . n 2 0 E kin,total dt j =1 0 ż j (t ) dt (2.54) 20 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW Because the reduced mass matrix is the identity matrix, 1/2żT ż is the kinetic energy of the reduced coordinate. This gives this error estimate a clear physical interpretation: the kinetic energy of the highest basis vectors normalized by the total kinetic energy. If we ignore coupling between the basis vectors (insignificant at small amplitudes), this estimate is similar to refining the model by adding an extra vector. The results for modal based reduction however have to be judged carefully, because the assumption that higher basis vectors lose significance will not hold for all cases. 2.5.6. U PDATING OF BASIS VECTORS In any type of structural optimization, the structure will change. A new structure corresponds to a new set of basis vectors. There are some techniques which allow us to compute these in a cheap way. In this section, this will be discussed this for Ritz vectors. This can also be applied to QSRV, and similar methods exist for eigenvectors [36]. The most expensive step of computing Ritz vector is the solution of vi +1 = K−1 Mvi . This is similar to finding the updated static displacement of a structure, which has been researched extensively in the field of structural optimization, see for example [37, 38]. The most commonly used method is the pre-conditioned conjugate gradient method. Another frequently used term is the combined approximations method, these methods produce identical results when we use the approach described below [39]. We start from the original stiffness equation: K0 q0 = f . (2.55) This is solved directly, by Cholesky factorization. Now we assume K0 is updated according to: K1 = K0 + ∆K K1 q1 = f . (2.56) (2.57) We want to find q1 while avoiding the expensive step of factorizing and solving the system. This can be done using the conjugate gradient algorithm [39]. This is an iterative algorithm for solving linear systems, which only requires a couple of matrix multiplications per iteration. The mathematical details will be omitted here. As an initial guess, we use q0 . To ensure proper convergence, the condition number of K1 should be as low as possible. This can be improved by using pre-conditioning. We perform a change of variables: q1 = Cq̃1 T T C K1 Cq̃1 = C f . (2.58) (2.59) The pre-conditioner C should be chosen to minimize the condition number of K1 . The ideal pre-conditioner would transform CT K1 C into the identity matrix, this would mean C is the inverse of the Cholesky factor of K1 . This is expensive, we want to avoid further factorizations. A good approximation is the factorization we already have, that of K0 . The algorithm requires two solutions per iteration of a linear system with matrix C. To summarize, we can avoid repeated factorizations of matrix K, at the cost of a larger number of solution of linear systems. The exact amount depends on the convergence. MATLAB contains an implementation of the preconditioned gradient method, the pcg function. 2.5.7. N ON - LINEAR SYSTEMS Model order reduction is more difficult for non-linear systems. It is however still possible, and can result in better performance compared to non-reduced systems. This is an ongoing topic of research with many interesting methods. However, for the sake of simplicity, this research is limited to linear systems. 2.6. C OMBINING OPTIMIZATION AND MODEL ORDER REDUCTION 21 2.6. C OMBINING OPTIMIZATION AND MODEL ORDER REDUCTION Finally in this section we will investigate the combination of the theory and methods discussed earlier. There is a lot of recent research, so this section will serve as a literature review. Later in this thesis the combination will be studied in more detail, see Sections 4.1 and 5.5. The current section is split in two parts: the combination of topology optimization and structural dynamics; and the combination of model order reduction and optimization. For both of these the most relevant research will be highlighted and discussed. A short overview of this can be found in Table 2.2. Table 2.2: Comparison of relevant research. Abbreviations: Topology Optimization (TO), Shape Optimization (SO), Sensitivity Analysis (SA), Frequency-Domain (FD), Time-Domain (TD). On the combination of TO and MOR for time-domain problems, the only known research is by Zhao and Wang [40]. On the separate subjects, there is a lot of relevant literature. Year Author 1970 1991 1999 2004 2005 2006 2010 2013 2015 Fox and Kapoor [41] Greene and Haftka [42] Min et al. [43] Pedersen [44] Han et al. [45] Kang et al. [12] Yoon [17] Han [35] Zhao and Wang [40] Optimization Dynamics MOR SO SA TO TO SO Review TO SA TO TD&FD TD TD TD TD TD FD TD TD Yes Comments Review on transient optimization Yes Yes Yes Uses MSM and MAM 2.6.1. T OPOLOGY OPTIMIZATION FOR STRUCTURAL DYNAMICS The classical problem in topology optimization is that of static compliance minimization, however, structural dynamics problems have also been studied extensively. In this section we will discuss the most relevant research. The focus here is on dynamics in the time-domain, so any research on frequency-domain problems will not be discussed. • B.S. Kang, G.J. Park, and J.S. Arora, A review of optimization of structures subjected to transient loads, Structural and Multidisciplinary Optimization 31, 81 (2006)[12]. This is the most recent known review paper on the subject of optimization and transient loads. It discusses ways of treating time-dependent constraints, approximation methods and sensitivity analysis. In this last part, the use of model order reduction is mentioned for direct sensitivity analysis. The adjoint variable method for transient problems is described in great detail. • R. L. Fox and M. P. Kapoor, Structural optimization in the dynamics response regime - a computational approach, AIAA Journal 8, 1798 (1970) [41]. In this paper, the optimization of a truss-frame is discussed, for both frequency response and transient response. This is the earliest known example of transient response shape optimization. • S.Min, N. Kikuchi, Y. C. Park, S. Kim, and S. Chang, Optimal topology design of structures under dynamic loads, Structural optimization 17, 208 (1999) [43]. First example of topology optimization (using homogenization) in transient structural dynamics. Sensitivity analysis is performed using direct differentiation, and an optimality criteria scheme is used to find the optimal design. • C. B. W. Pedersen, Crashworthiness design of transient frame structures using topology optimization, Computer Methods in Applied Mechanics and Engineering 193, 653 (2004) [44]. One of the many papers on crashworthiness, but one of the few treating topology optimization. A ground structure consisting of non-linear beam elements is optimized to achieve a desired acceleration response. This is not directly relevant for this thesis. However an extension to non-linear systems would have many practical applications. In the field of crashworthiness there is already quite some related research, the interested reader is referred to the work of Pedersen. 22 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW Concluding this part, we can say that there are many examples of structural optimization applied to transient dynamics. There is a lot of literature on this, which is very helpful in implementation. There are no examples of industrial applications known to the author. 2.6.2. M ODEL ORDER REDUCTION AND OPTIMIZATION In this section we highlight the most relevant research combining optimization and Model Order Reduction (MOR). • Zhao and C. Wang, Dynamic response topology optimization in the time domain using model reduction method, Structural and Multidisciplinary Optimization , 1 (2015). This recent paper has a very close relation to this thesis, it will be discussed in more detail later in this section. • J. S. Han, E. B. Rudnyi, and J. G. Korvink, Efficient optimization of transient dynamic problems in MEMS devices using model order reduction, Journal of Micromechanics & Microengineering 15, 822 (2005) [45]. This paper describes the shape optimization (4 design variables) of a MEMS. The finite element analysis is performed in ANSYS, and the MOR uses Ritz vectors. The authors claim that the optimization is at least an order of magnitude faster than one using a full model. Sensitivity analysis is performed using global finite differences on the reduced model. • G. H. Yoon, Structural topology optimization for frequency response problem using model reduction schemes, Computer Methods in Applied Mechanics and Engineering 199, 1744 (2010) [17]. This is the first research combining Topology Optimization and MOR. The optimization concerns minimizing dynamic compliance (frequency domain). Different model order reduction schemes are applied: Modal Superposition, Ritz Vectors and Quasi-Static Ritz Vectors. The author shows that when using the MSM method local eigenmodes appear, disturbing the accuracy of the reduced model. This causes incorrect optimized results (see Fig. 2.5), different ways to solve this are discussed. Furthermore the accuracy of the different reduction methods is compared. Sensitivity analysis is performed using an adjoint variable method. As was discussed in Section 2.4.4, this is more expensive for time-domain problems. A few minor improvements on this research can be found in the recent work of Liu et al. [46]. They extend the work of Yoon to large-scale 3D problems, with multiple load frequencies. • J. S. Han, Calculation of design sensitivity for large-size transient dynamic problems using Krylov subspacebased model order reduction, Journal of Mechanical Science and Technology 27, 2789 (2013) [35]. In this research MOR (Ritz vectors) is applied to transient sensitivity analysis using direct differentiation. The author shows that this can significantly decrease the computational effort, while maintaining a reasonable accuracy. • W. H. Greene and R. Haftka, Computational aspects of sensitivity calculations in linear transient structural analysis, Structural optimization 3, 176 (1991)[42] This paper contains a detailed description of transient simulation and sensitivity analysis, including model order reduction. Sensitivities are calculated using direct differentiation with modal superposition, where the effect of eigenvector sensitivities is studied. Neglecting eigenvector sensitivities is shown to lead to a significant error. As an alternative to this, the sensitivities are calculated using the modal acceleration method, which is also shown to result in a high accuracy. 2.6. C OMBINING OPTIMIZATION AND MODEL ORDER REDUCTION (a) First three eigenmodes of optimized structure. 23 (b) Optimized structure using MSM. Figure 2.5: Selected results from Yoon [17], showing a optimized structure and its first three eigenmodes. The structure has a suboptimal shape, caused by the poor accuracy of the MSM model. This is partially caused by local modes, the first two eigenmodes do not contain any useful information about the response of the structure. At the start of this project, to the extent of my knowledge there was no published research combining topology optimization, model order reduction and time domain structural dynamics. However, near the end of this project (August 2015), a paper was published by Zhao and Wang [40]. This describes the use of MOR to reduce the cost of topology optimization for dynamic response in the time domain. We will highlight some of the similarities and differences between this thesis and the paper describing Zhao & Wang’s research. • Both can be seen as an extension to the work of Yoon [17]. Yoon treated optimization of frequency domain problems, which is extended to time domain problems. • Both use the adjoint variable method for sensitivity analysis. • Zhao & Wang apply model order reduction, using modal superposition and modal acceleration. Modal superposition is shown to produce suboptimal designs, which they relate to its low accuracy. Modal acceleration does result in optimal designs, and in some cases results in a 50% reduction in computation time. • Other reduction methods are not used by Zhao & Wang, while Yoon showed that Ritz vectors and QuasiStatic Ritz Vectors lead to more accurate results in most cases. This thesis investigates this in more detail. • Zhao & Wang study the effect of changing the time-scale of the problem. Other parameters, most notably the number of vectors in the reduced basis, are not investigated fully. So while the work of Zhao & Wang is in some ways similar to this thesis, there are enough open questions that require further investigation. Both Yoon and Zhao & Wang show that an inaccurate reduction leads to both slow convergence and suboptimal designs. This is a critical point for a successful application, so investigating the accuracy of the model reduction will be a large part of this thesis. 24 2. T HEORETICAL F UNDAMENTALS & L ITERATURE R EVIEW 2.7. S UMMARY & D ISCUSSION This chapter has given an overview of relevant theory and research in the fields of topology optimization, transient analysis and model order reduction. Based on this the following methods will be used in the remainder of this research: • Topology optimization using element densities as design variables. • Transient analysis using Newmark integration. • Sensitivity analysis using the adjoint variable method. • Model order reduction using the following methods: – Modal superposition method – Ritz vectors – Quasi-static Ritz vectors – Modal acceleration method In general topology optimization for time-domain dynamics is much more expensive than for similar static or frequency-domain problems. Model order reduction is expected to reduce the costs significantly. The expected reduction in costs is approximately equal to the number of time steps divided by the number of basis vectors. Furthermore, methods of estimating the accuracy of the reduced model have been proposed. These can be used to estimate the correct amount of basis vectors at a low cost. There is some research combining model order reduction and topology optimization. The most relevant example is by Zhao and Wang [40], which features time-domain dynamics. There are still many open questions. This thesis will extend their work by studying the effect of different MOR methods and their accuracy. In the next two chapters the exact implementation will be discussed. 3 I MPLEMENTATION : M ODEL & O PTIMIZATION Based on the theory discussed in the previous chapter a topology optimization code using model order reduction was created. The important aspects of the implementation will be described in the following two chapters. This first chapter focuses on everything but the model order reduction, starting with a section containing an overview of the full process, and all the errors involved. The next section discusses the implementation of the model and sensitivity. The remaining section treats the optimization details. 3.1. O VERVIEW 3.1.1. P ROCESS AND ERROR OVERVIEW The implemented optimization of a time-domain problem can be summarized in a few steps, see Fig. 3.1. Starting from an initial design, a finite element model is created. Using numerical integration of the equations of motion the dynamic response is found. From this the objective function is calculated, which is combined with the response information to numerically integrate the adjoint equation. This data is passed on to the sensitivity analysis, and finally a design update is calculated by the optimizer. This is repeated until convergence. Objective function Design Spatial discr. (FEM) Sensitivity analysis Time int. EoM Optimization (MMA) Result Time int. Adjoint eq. Figure 3.1: Overview of steps in optimization of a structure for transient dynamics. Using these steps a systematic overview can be made of all the errors involved: • Spatial discretization: in modelling a physical structure with a finite element model, there is always an error. This depends on the used elements and mesh. In general, using a finer mesh and higher-order elements reduces this error[22]. In this thesis, this will not be investigated, for research into optimization and spatial discretization see [47]. • Time integration of equations of motion: this introduces three errors. – Temporal discretization: similar to spatial discretization, moving from a continuous to a discrete formulation will lead to an error. – Newmark integration: the discretized values of the response in time are found using numerical integration, which also leads to an error. The trapezoidal Newmark scheme guarantees conserva25 26 3. I MPLEMENTATION : M ODEL & O PTIMIZATION tion of energy, although there will be an error in the period of simulated oscillation. This error is determined by the frequency content of the response [10, 21]1 . – Model order reduction: discussed in Section 3.1.2. • Objective function: this is usually an integral over time, which is approximated numerically, again leading to an error. • Time integration of adjoint equation: this is subject to the same errors as the time integration of the equation of motion. Furthermore the adjoint equation is a function of the motion of the structure, which means any error in the previous time integration will influence this term. • Sensitivity analysis: In this step all the information of the previous steps is combined. This introduces a new error in the evaluation of the integral in Eq. (2.28). Furthermore all previous errors influence the sensitivity, so the result might be significantly different from the physical sensitivity. • Optimization: the algorithm (MMA) approximates the design space to find a new design. This approximation itself can contain a significant error. • Round-off error: finally, whenever dealing with floating point variables, there is numerical round-off error. This is in most cases not significant. It will be when subtracting large, nearly identical numbers, most notably in the Gramm-Schmidt orthogonalization used for computing basis vectors. For sensitivity analysis the distinction can be made between accuracy and consistency. Accuracy refers to the difference between the computed sensitivity and the exact sensitivity of the physical response. Consistency refers to the difference between the computed sensitivity and the modelled response, where errors in the model are not taken into account. This is illustrated by Fig. 3.2. Response Exact response Modelled response Design point Exact sensitivity Accurate sensitivity Consistent sensitivity Design variable Figure 3.2: Illustration of the difference between consistent and accurate sensitivities. The exact physical and modelled response are shown, there is a modelling error. At a certain design point, three sensitivities are drawn. The first is the exact sensitivity of the exact solution model, the second is an accurate sensitivity, which is identical to the first, but not representative of the model. The third is a consistent sensitivity, which is representative of the model, but there is an error with respect to the exact solution. The relevance of these two quantities is dependent on the application. The goal of this research is to speed up optimization using model order reduction. The accuracy of the used model is thus of low importance. The consistency of the sensitivities and the effect of MOR on this will affect the convergence of the optimization, so this is relevant. Therefore, two types of errors defined so far will be not be investigated. The first is the spatial discretization error. While this is important for successful application of optimization, it can be ignored in this research. The second are errors that are not affected by model order reduction, such as the approximation error in MMA. These determine the rate of convergence of the optimization, but there is no direct link to model order reduction. The other listed errors may be affected by model order reduction. This will discussed next. 1 For an undamped oscillation with exact frequency ω, time step h and period t , the trapezoidal scheme results in the period e ) ( 2 2 t e 1 + ω24h . 3.2. I MPLEMENTATION OF MODEL 27 3.1.2. E FFECT OF MOR ON OTHER ERRORS Model order reduction by itself introduces two errors. The first is a residual in the dynamic response, which is neglected, causing an error in both time integration steps. The second is in basis vector sensitivities, this will be treated in Section 4.2. Both errors can be significant, and will be examined in detail. The question is whether the errors already present in temporal discretization and Newmark integration are changed by model order reduction. An accurate reduced model will have the same frequency content, and thus the same error. Therefore the assumption is made that when accurate model order reduction is used, these two errors will not change. This will be tested in Chapter 5. The other steps all use data from the time integration, so these will be dependent on the errors resulting from the model order reduction. However, unlike the Newmark integration, none of these steps are directly affected by the model order reduction, just by the possible residual. In other words, for a reduced order model with zero residual, the objective function, optimization and sensitivity analysis (basis vector sensitivities aside) will be the same as for a full model. Therefore, in this thesis the main goal is investigating effect of the residual errors of the reduced model, and the effect of basis vector sensitivities. The consistency of the resulting design sensitivities is the main point of interest. A secondary goal is to see whether the errors made in temporal discretization and Newmark integration are affected by model order reduction. All other errors might be important for successful optimization, but they are less relevant for this thesis. 3.2. I MPLEMENTATION OF MODEL This section highlights some choices that have been made in creating the model used in the optimization, which calculates the dynamic response of a design. Some more details can be found in Appendix D, which also contains a list of physical parameters. 3.2.1. F INITE ELEMENT ANALYSIS The Finite Element Method (FEM) is a method of discretizing partial differential equations. Readers are expected to be familiar with it, for reference see for example [9, 22]. In this research two types of elements have been implemented: • Q4 elements: a two-dimensional quadrilateral element with 4 nodes. Allows displacements in both directions, with a bi-linear displacement field defined by two displacements per node, 8 in total. Simple and easy to implement, but poor accuracy, partially due to shear locking. Meshing is straightforward, by just filling the domain with identical non-overlapping elements, see for example Fig. 2.1b. As design variable, the density of the material is used, normalized to be between zero and one. • Beam elements: a two dimensional element with 2 nodes. This is an Euler-Bernoulli beam combined with a bar, which allows two displacements and one rotation per node, six degrees of freedom in total. The displacement variable is the width of the (square) cross-section. A ground structure is defined using a grid of nodes and various beams connecting them. While both elements are implemented in the code, all investigations will be done using Q4 elements. This choice was made mainly because most research on topology optimization uses Q4 elements, which allows better comparison to literature. Secondly, using Q4 elements allows easier finite element analysis (identical element matrices for every element) and volume constraints (linear, identical for every element). An argument for beam elements would be that using them avoids checkerboarding and allows better manufacturability. But one still has to deal with mesh-dependency and unwanted small elements, complicating this. Techniques like filtering and penalization could be applied to beam elements, but again this is simpler for Q4 elements. 3.2.2. D AMPING Damping is often ignored in structural dynamics. However, in transient problems, it makes sense to include it. The most commonly used model is that of Rayleigh damping, where the damping matrix is given by the following equation: C = αM + βK , (3.1) 28 3. I MPLEMENTATION : M ODEL & O PTIMIZATION where α and β are coefficients that determine the damping. The main advantage of Rayleigh damping is the fact that when using modal superposition, the damping matrix will be diagonal similar to the mass and stiffness matrices. Thus Rayleigh damping does not introduce any coupling between the modes. 3.2.3. D IRECT TIME INTEGRATION VERSUS ANALYTICAL METHODS In Section 2.3 it was determined that the full equations of motion are best solved used Newmark integration. This may not be the case for the reduced equations of motion. If these are transformed to a diagonal form, the most efficient method of time integration uses Duhamel’s integral [9]. Still, for this research, Newmark integration will be used for every time integration. There a few reasons for this: • The reduced analysis using Newmark integration will be more similar to the full analysis, enabling more relevant comparison. • Implementing Newmark integration is less complex, while the computational effort is not significant in the full process. • The fact that the reduced matrices can be dense has some benefits. Obviously, the step of diagonalization can be omitted. But dense matrices also allow the use of inaccurate basis vectors, which might be cheaper to compute than the exact ones. For these reasons, early in this research it was decided to restrict the time integration to the Newmark method. For many cases using Duhamel’s integral might result in slightly faster computations. 3.2.4. T IME INTEGRATION The finite element analysis yields the equations of motion, as well as K′ , M′ and C′ and the adjoint equation. As discussed in Section 2.3, the Newmark algorithm was chosen solve these. This is straight-forward to implement, except for the backwards time integration. This requires a change of variables which will be explained next. The sensitivity analysis requires the solution λ(t ) corresponding to the terminal value problem described by Eq. (2.25) to (2.27). This can be converted to a standard initial value problem by using a change of variables: τ=T −t (3.2) λ(τ) = λ(T − t ) 2 M d λ dλ ∂Φ (τ) + C (τ) + Kλ(τ) = − 2 dτ dτ ∂q(τ) (3.3) T λ(τ = 0) = 0 )T ( dλ(τ = 0) ∂ϕ M = . dτ ∂q(τ = 0) (3.4) (3.5) (3.6) This equation can be numerically integrated using the exact same algorithm and factorized matrices used for the equations of motion. 3.2.5. S ENSITIVITY ANALYSIS After the equations of motion and adjoint equation are solved, the design sensitivity can be evaluated using Eq. (2.28): ∫ T ∂Φ dΨA ∂ϕ = + − R dt dx ∂x . (3.7) 0 ∂x ( ) T ′ ′ ′ ′ R = λ f − M q̈ − C q̇ − K q This equation is exact. The solutions for q and λ however are not. This approach was based on first differentiating the equations, after which they are discretized in time. From literature it is know that this leads to a consistency error [48]. Both λ and the pseudo-load will generally be periodic functions, for which Newmark integration will lead to a frequency error. This has a different influence on the two terms, because q is calculated starting from t = 0, and λ is calculated starting from t = T . Thus direct time integration will cause a phase error between the two terms, leading to a consistency error in the sensitivity. 3.3. O PTIMIZATION 29 An alternative, more consistent method is based on the reverse approach: the equations are discretized first, after which they are differentiated2 . This leads to a different set of discretized equations, for details see [48]. The approach described by Jensen et al. [48] was implemented and tested. The results were similar to those found in literature, for details see Appendix D.3. Using the alternative sensitivity analysis did not result in faster convergence of the optimization, therefore in the remainder of this research the approach given by Eq. (3.7) is used. 3.3. O PTIMIZATION When the response and sensitivities are known, a design update can be applied to the system. This section will first discuss different objective functions and constraints. The final part briefly treats filtering. The optimization problems discussed in this document can all be described by: ∫ T Φ(q, x) dt min x 0 subject to: Mq̈(t ) + Cq̇(t ) + Kq(t ) = f(t ) g (x) = 1 × 10 n el ∑ i =1 −3 (3.8) x i /n el − x max ≤ 0 ≤ x i ≤ 1, i = 1, . . . , n el . A non-zero minimum value for x i is used to avoid singular matrices. 3.3.1. O BJECTIVE FUNCTIONS Throughout this thesis the following general objective function was used: ∫ T Ψ = ϕ(q(T ), x) + Φ(q, x) dt , . (3.9) 0 where ϕ and Φ are general functions evaluated at respectively the end of the simulation and during the time span. We will now define some more specific objective functions, and calculate the analytical derivatives that are needed for the sensitivity analysis. All functions discussed here use a fixed simulation time, and are only dependent on the displacement of the system, not on the velocities or accelerations. As discussed earlier, this could be changed, making the mathematics slightly more complex. Furthermore, one final requirement is imposed on every objective function. In the sensitivity analysis, the term − ∂Φ ∂q will appear as a force in the adjoint equation. For most reduction methods (MAM, Ritz vectors, QSRV) we need a constant spatial description of the load, which may be scaled by a time-dependent scalar. So − ∂Φ ∂q should be of the form Ls f (q, t ). All the described objective functions satisfy this requirement. Furthermore, if the load vector in the equations of motion is parallel to the load vector in the adjoint equation, model order reduction will result in the same basis for each. This is true for all the described objective functions, unless the force is applied to a point and the response measured in a different point. In that case, a new basis is calculated for the adjoint equation. All of the described objective functions require the numerical evaluation of integrals. These can be approximated using a Riemann sum: ∫ T nt ∑ f (t ) dt ≈ f (t i ) · h . (3.10) 0 i =1 According to [48], this yields a significant error (especially in the sensitivity analysis), which can be reduced by a few orders of magnitude by using trapezoidal integration: ∫ T 0 f (t ) dt ≈ n∑ t −1 T f (t i ) + f (t i +1 ) . 2n t − 2 i =1 (3.11) 2 Similar methods exist for spatial discretization and differentiation. In this research, the spatial domain is discretized, then differenti- ated. The resulting sensitivities are known as discrete derivatives. The reverse approach, where the spatial domain is first differentiated, then discretized, results in continuum derivatives[13]. 30 3. I MPLEMENTATION : M ODEL & O PTIMIZATION In MATLAB, both methods are easily implemented. There is a built-in function for trapezoidal integration (trapz), but this is approximately 50-100 times slower than simply summing. For this reason a new function for this was created, (fasttrapz), which has costs similar to summing, but less functionality. R EFERENCE CURVE : ABSOLUTE DIFFERENCE The first objective function defined here aims to minimize the difference between the response at DoF i and a reference curve q ref (t ). ∫ T ¯ ¯ ¯q i (t ) − q ref (t )¯ dt . Ψ= (3.12) 0 This yields the following discontinuous derivatives: ∂ϕ =0 ∂q ∂Φ =0 j ̸= i ∂q j if q i (t ) − q ref (t ) > 0 1 ∂Φ = −1 if q i (t ) − q ref (t ) < 0 ∂q i 0 if q i (t ) − q ref (t ) = 0 . (3.13) The last case is mathematically not fully correct, the derivative of an absolute function does not exist at zero. R EFERENCE CURVE : SQUARED DIFFERENCE The second objective defined here is similar to the first, instead of taken the absolute difference we now take the squared: ∫ T ( )2 Ψ= q i (t ) − q ref (t ) dt . (3.14) 0 The derivatives are continuous in this case, but they do depend on qi : ∂ϕ =0 ∂q i ∂Φ = 2(q i (t ) − q ref (t )) ∂q i ∂Φ =0 j ̸= i . ∂q j (3.15) M INIMUM DYNAMIC COMPLIANCE This is an extension of standard minimum compliance problems, minimizing the compliance over time: ∫ Ψ= The associated analytical derivatives are: T 0 fT (t )q(t ) dt · ∂ϕ =0 ∂q ∂Φ 1 = fT (t ) · . ∂q T 1 . T (3.16) (3.17) This objective function has some useful properties. When studying minimum compliance in a statics problem, the adjoint variable turns out to be the static displacement, i.e. a term that is already available. Solution of the adjoint equation is not necessary in this case. The minimum dynamic compliance problem shows a similar property. Because ∂Φ ∂q is just f with a scaling term, the solution of the adjoint equation can in some cases be found by simply multiplying q with 1/T . An example is when f(t ) = f(T − t ), with q(t = 0) = q̇(t = 0) = 0. This results in 3.4. N OTES ON SOFTWARE IMPLEMENTATION 31 λ(t ) = −q(T −t )∗1/T . This would mean time integration is not required for solving the adjoint equation. Although this could yield significant computational benefits, this property is intentionally not used in this thesis, because it is only applicable to this objective function. For the sake of generality, all objective functions are treated in the same way, with forward and backward time integration. OTHER OBJECTIVES There are many other possibilities for objective functions, none of these are implemented. One notable option is minimizing the strain energy: Φ = 1/2qT Kq. This cannot be implemented, because its derivative with respect to q is Kq, which cannot be written as a constant spatial term times a temporal term, a necessary condition for all reduction methods that use load information (MAM, Ritz vectors). 3.3.2. C ONSTRAINTS Almost every topology optimization code includes a volume constraint. This makes sure the total volume remains below a fraction x max : g (x) = n el 1 ∑ x i − x max ≤ 0 n el i =1 (3.18) dg = 1/n el . (3.19) dx Many other constraints are possible, but none are currently implemented. Of special interest are constraints that are a function of q and its derivatives in the time domain. An example would be a constraint on the maximal displacement of the structure for the entire time domain. These can be implemented in many different ways, for details see [12]. 3.3.3. F ILTERING In the created optimization code a density filter is included. For reference a sensitivity filter is implemented as well, since this is used by Zhao and Wang [40]. However the density filter is preferred, since this does not compromise the consistency of the sensitivities. Both filters are based on the code of Andreassen et al. [49]. The sensitivity filter modifies the sensitivities using the following equation: n el ∑ 1 dΨ dΨ = ∑nel Hei x i dx e dx H i (3.20) i =1 ei i =1 Hei = max(0, r min − ∆(e, i )) , where r min is the filter radius, and ∆(e, i ) is the distance (centre to centre) between elements e and i . The density filter (illustrated by Fig. 3.3) is given by: ∑nel Hei x i x e = ∑i =1 , (3.21) n el H i =1 ei which means the objective and constraint sensitivities also need to be updated according to: n el dΨ ∑ Hei dΨ = , ∑nel dx e e=1 i =1 Hei dx i n el ∑ dg Hei dg = . ∑nel dx e e=1 i =1 Hei dx i (3.22) The computational effort in both cases is minimal. Matrix H is only dependent on the mesh, and thus has to be computed just once. The rest of the steps involve some matrix-vector multiplications. 3.4. N OTES ON SOFTWARE IMPLEMENTATION For this project MATLAB was used. This was chosen mainly because of its extensive set of built-in functions and the author’s familiarity with it. It is not the fastest programming language, but with good programming practice it is sufficient. The majority of the code was written by the author, details can be found in Appendix D. 32 3. I MPLEMENTATION : M ODEL & O PTIMIZATION 1 Density Filtered density 0.9 0.8 Density 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 2 4 6 8 10 Distance Figure 3.3: Illustration of a density filter with a radius of 2 on a one-dimensional problem. Starting point is a set of design variables, with a checkerboard: at location 3 and 5, there is material present, at location 4 there is not. After applying the filter, the checkerboard is gone, while the total volume is preserved. This does lead to intermediate densities, most these will be removed in the optimization process. 3.4.1. M EASURING PERFORMANCE The performance of an algorithm is difficult to measure. Simply running two algorithms on the same machine and measuring the CPU-time is not always reliable, since it not only depends on the number of floating point operations (FLOPS) involved, but also on the way the computer architecture is used. This is dependent on the chosen programming language, and even more so on the exact implementation. Using various performance optimization techniques can decrease CPU-time dramatically, this will be discussed in Section 3.4.2. Furthermore, some MATLAB algorithms are highly optimized, such as the eigenvector algorithm, this complicates the performance measurement even further. For the best comparison between algorithms both should be implemented and optimized in a lower-level language such as Fortran. In this project this is not a feasible approach. To ensure a accurate comparison using only MATLAB, a few steps have been taken. First of all, whenever computation times are compared, the methods use as much shared code as possible. Secondly, every critical algorithm is optimized to the best ability of the author. Finally, for simulations where the CPU-time is measured, the average of 10 runs is taken, for example in Section 5.3.2. 3.4.2. O PTIMIZING PERFORMANCE V ECTORIZATION Vectorization, also known as array programming, refers to performing operations on entire arrays, instead of on an element-by-element basis. Vectorization enables the avoiding of loops, which are notoriously slow in MATLAB[50]. This is not possible when a loop requires the solution of the previous iteration, for example in the case of the Newmark algorithm and the Arnoldi iterations. In all other critical algorithms vectorization is used. FACTORIZATION & R EORDERING Direct solving of linear systems always consists of factorizing the matrix into multiple triangular or diagonal matrices, after which the solution can be found using substitution. These steps can be made more efficient by reordering, which optimizes the sparsity of the factors. The linear solver built into MATLAB internally uses factorization as well as reordering. However when a linear system is solved repeatedly for different right-hand sides, it is inefficient to factorize the matrix each time. In this case some computational effort can be saved by manually reordering and factorizing the equations once. For reordering, the implementation uses the symmetric approximate minimum degree (MATLAB: symamd)[51] algorithm. For factorization, the Cholesky algorithm is the most efficient, but this is restricted to positive definite matrices. For other symmetric matrices, the LDL algorithm is used. 3.5. S UMMARY & D ISCUSSION 33 S PARSE MATRIX IMPLEMENTATION Sparse matrices are matrices with a large number of zeros. This can be used to improve performance in two ways. First of all, using an alternative storage scheme that does not store zeros can reduce memory requirements. Secondly, the zeros in the matrices can often be ignored in calculations. MATLAB uses Compressed Sparse Column (CSC) storage[52]. This uses three vectors: one containing all entries, a second containing the corresponding row indices, and finally a third indicating the first element in each column. This is efficient for most sparse matrices. There is one notable exception in the scope of this project. Derivatives of system matrices (K′ , C′ , M′ are extremely sparse, for Q4 elements they only contain 64 elements. Using the CSC format is not efficient in this case, a 10,000x10,0000 matrix with 64 entries uses 81032 bytes, while a 64 entry full matrix requires only 512 bytes. This issue can be avoided by computing the matrix derivatives per element, and storing them as a full matrix with a list of the corresponding DoFs. 3.5. S UMMARY & D ISCUSSION There are many important aspects to the implementation of topology optimization for transient dynamics, even without model order reduction. In this chapter the most relevant points have been discussed. In the optimization process, there are many steps that result in errors. Within the scope of this research, some of these will be ignored, such as spatial discretization. Others, most notably the errors involved with model order reduction, will be investigated extensively. Multiple objective functions to be used in the optimization have been described, as well as a constraint and filtering methods. Finally some notes on the software implementation have been made, including on how to optimize and measure the performance of algorithms. Using the methods described up to this point, a topology optimization code for time-domain problems was developed in MATLAB. In the next chapter, the effect of model order reduction will be discussed. 4 I MPLEMENTATION : M ODEL O RDER R EDUCTION 4.1. M ODEL ORDER REDUCTION In Section 2.5 different methods of model order reduction were discussed. The following have been implemented: • MSM: Modal Superposition Method • Ritz: Load Dependent Ritz Vectors • MAM: Modal Superposition Method + Modal Acceleration Quasi-static Ritz vectors (QSRV) have also been implemented, but these were found to be effective only for high-frequency problems. At the same time, they are numerically less stable than Ritz vectors, this is caused by the poorer conditioning of the iteration matrix. Therefore only the latter have been used in this research. 4.1.1. MOR AND SENSITIVITY ANALYSIS In this section we will start by analytically investigating the effect of combining MOR and optimization. As stated in the previous chapter, the most computationally expensive part of the model is solving the equations of motion and the adjoint equation, which are given by: Mq̈(t ) + Cq̇(t ) + Kq(t ) = f(t ) Mλ̈ − CT λ̇ + Kλ = − ∂Φ T . ∂q (4.1) Solving both equations allows to compute the objective function and its sensitivities. This section will discuss two methods of solving these equations using model order reduction. Note that the alternative method of sensitivity analysis (Section 3.2.5 and Appendix D.3) will not be discussed here. 4.1.2. L IMITED REDUCTION This method, used in the research of Zhao and Wang[40], restricts the MOR to just Eq. (4.1). Each of these is reduced and solved, after which the nodal coordinates are calculated using q ≈ Vz and λ ≈ Vθ, where θ is the reduced coordinate for the adjoint equation1 . One can also use different bases for each equation, which is useful if the forcing terms are dissimilar. This approach is easy to implement and understand: only the time integration is changed, the rest of the optimization runs as if there is no model order reduction. This results in an error in the objective function, as well as an error in the design sensitivity, which is caused by four terms: 1. Error in q, given by r = qfull − Vz. 2. Error in λ, given by rλ = λfull − Vθ. 1 Note that the full nodal solutions q and λ are not necessarily calculated. This step would require a large amount of memory, it is more efficient to use Vz and Vθ whenever either value is required in the implementation. Exception to this is the modal acceleration method, the quasi-static correction cannot be expressed in reduced coordinates. 35 36 4. I MPLEMENTATION : M ODEL O RDER R EDUCTION 3. Error in ∂Φ T ∂q , caused by the error in q. This also results in an error in λ. 4. Error in adjoint formulation Ψ A , the equations of motion are no longer exactly solved, thus the term added to the equation of motion might not be zero. The residual is equal to r̂, the force residual. This results in: ∫ T ∫ T ( ) T ΨA = Ψ + λ (t ) Mq̈ + Cq̇ + Kq − f dt = Ψ + λT (t )r̂ dt , (4.2) 0 0 where we have used r̂ = MVz̈ + CVż + KVz − f. Note that this does not affect the objective function, because Vθ is substituted for λ, and VT r̂ = 0. However, in the derivative there will be an extra term: [∫ T ]′ ∫ T λT (t )r̂ dt = (V′ θ)T r̂ + (Vθ ′ )T r̂ +(Vθ)T r̂′ dt . (4.3) | {z } 0 0 =0 The second term is zero, the third is the usual adjoint term. However, the first term is not zero. Because r̂ will be small for accurate MOR, and V′ is expensive to calculate, this term is neglected, causing a fourth error in the sensitivity. All these errors go to zero when the reduced solution converges towards the exact one. So when the MOR is very accurate, this method will perform similar to full analysis, but possibly with lower computational costs. 4.1.3. D ETAILED ANALYSIS To gain some more insight a detailed analysis will be done next. This starts by repeating the derivation of the adjoint variable method, this time with MOR. Without MOR, the design sensitivity is given by: d ∂Ψ ∂Ψ ∂q Ψ(q, x) = + , dx ∂x ∂q ∂x (4.4) ∂q where the term ∂x is expensive to evaluate, and thus replaced using an adjoint formulation. But when model order reduction is used, this changes to: ( ) ∂Ψ ∂Ψ ∂V ∂z ∂r d Ψ(q = Vz + r, x) = + z+V + . (4.5) dx ∂x ∂q ∂x ∂x ∂x Similar to the full case, the term ∂r and ∂x ) will be treated later. ∂z ∂x can be replaced using an adjoint formulation. The other new terms ( ∂V ∂x D IRECT D IFFERENTIATION M ETHOD This is very similar to the DDM seen in Chapter 2. Although direct differentiation is expensive and thus impractical, it clearly shows the effect of model reduction, and it is a good exercise before deriving the adjoint method. Starting point are the reduced equations of motion: Mr z̈ + Cr ż + Kr z = VT f . (4.6) We differentiate these with respect to the design variables x: Mr z̈′ + Cr ż′ + Kr z′ = f′r − M′r z̈ − C′r ż − K′r z f′r M′r C′r K′r ′ T ′ T = V f +V f (4.8) ′ T ′ T = V M V + 2 · V MV T ′ T ′ ′ T ′ = V C V + 2 · V CV T (4.7) = V K V + 2 · V KV . (4.9) (4.10) (4.11) Regrouping the right hand side yields: ′ Mr z̈′ + Cr ż′ + Kr z′ = VT fps,1 + V T fps,2 ′ ′ ′ (4.12) ′ fps,1 = f − M Vz̈ − C Vż − K Vz (4.13) fps,2 = f − 2MVz̈ − 2CVż − 2KVz = −f − 2r̂ . (4.14) Note that the normal pseudo-load appears again, as well as a term dependent on V′ . This second term contains both the force and the residual force. 4.1. M ODEL ORDER REDUCTION 37 A DJOINT VARIABLE M ETHOD ∂z We start by trying to find a way to replace ∂x . The adjoint objective is formed by augmenting Ψ with a term, the reduced equations of motion multiplied by an adjoint variable: ∫ ΨA = Ψ + T 0 ( ) θ T Mr z̈ + Cr ż + Kr z − VT f dt . | {z } (4.15) =0 Again, we focus for now on the added term. When this is differentiated with respect to x, we find: ∫ T 0 ) ( θ T Mr z̈′ + Cr ż′ + Kr z′ − R dt = 0 ( ) ′ R = θ T VT f′ − M′ Vz̈ − C′ Vż − K′ Vz + θ T V T fps,2 . (4.16) (4.17) The next steps are identical to what we did in the earlier part: move derivatives using integration by parts, and regroup terms. This yields2 : ( Mr θ̈ − CTr θ̇ + Kr θ = − ) ∂Φ T V ∂q θ(T ) = 0 )T ( ∂ϕ V Mθ̇(T ) = ∂q(T ) ∫ T ) ∂Ψ ( ′ dΨA ∂Ψ V z + r′ = + −R dt + dx ∂x ∂q 0 ( ) ( )T T ′ ′ R = (Vθ) f − M Vz̈ − C′ Vż − K′ Vz + V′ θ fps,2 . (4.18) (4.19) (4.20) (4.21) (4.22) (4.23) Analogous to the full problem, using the adjoint formulation a different way of calculating the design sensitivity has been found, which involves the solution of an initial and a terminal value problem. There are more terms though, which can be investigated separately: • • ∂Ψ ∂x : direct dependency, usually zero or available analytically. ( ) − (Vθ)T f′ − M′ Vz̈ − C′ Vż − K′ Vz dt : the most important term, adjoint variable multiplied by pseudoload. If r and rλ are zero, Vz = q and Vθ = λ, which makes this term identical to the sensitivity equation for the full system. ∫T 0 These two terms were included in the limited reduction discussed earlier. All the other terms are new: )T ∫T ( • 0 V′ θ f dt : difficult to evaluate, discussed in the remainder of this section. • ∫T ( )T V′ θ 2r̂ dt : this term is very similar to the previous one, but for accurate MOR f ≫ r̂ ≈ 0. So although r̂ can be calculated cheaply, neglecting this term will not lead to large errors. • ∂Ψ ′ ∂q V z: • ∂Ψ ′ ∂q r : 0 difficult to evaluate, discussed in the remainder of this section. similar to the previous one. Because r is unknown, evaluation is difficult. But since Vz ≫ r′ ≈ 0 this term can be neglected as well. Note that the analysis so far is exact, with only one exception. Equations (4.18) and (4.20) contain the term ∂Φ ∂q which is often dependent on q. But q is not exactly known, there is a residual r. As with any term containing the residual, this is neglected. To retain compact mathematics this was not included in the derivation. In summary, the design sensitivity consists of the terms found in the sensitivity analysis without MOR, plus two terms dependent on V′ , and two terms dependent on the residual, which can be neglected for accurate 2 Note that θ turns out to be the solution of the reduced adjoint equation. In other words, the θ used as Lagrange multiplier in the detailed analysis is the same as the one found in the limited analysis. 38 4. I MPLEMENTATION : M ODEL O RDER R EDUCTION MOR. In general computing basis vector sensitivities V′ is expensive, so these are often neglected. To investigate their significance, the terms containing V′ will be examined. Ignoring the residual, these are: ΨV′ ′ = ∂Ψ ′ V z+ ∂q ∫ T 0 ( ′ )T V θ f dt . (4.24) Since this term is the main difference between sensitivity analysis with and without MOR, we will study it in some detail. First of all, Eq. (4.24) can be rewritten as: [( ] ) ∫ t n ∑ ∂Ψ T ′ ′ T ΨV ′ = (Vi ) (4.25) zi + θi f dt ∂q 0 i =1 ] [( ) ∫ ∫ T n T ∑ ∂ϕ T ∂Φ T ′ ′ T θi f dt . ΨV ′ = (Vi ) + z i dt + (4.26) ∂q(T ) 0 ∂q 0 i =1 The term within brackets can be computed without evaluating V′ , which might open possibilities for a cheap error estimate. For a special case this term can be shown to be equal to zero. If the objective function is the integral of the compliance over time, Eq. (4.24) is reduced to a much simpler form: ∫ Ψ= ∂Ψ ′ V z+ ∂q ∫ 0 T ( ′ )T V θ f dt = ∫ T fT (t )q(t ) d 0 T 0 fT V′ ( 1 T z + θ) dt . T (4.27) (4.28) The adjoint equation is also much simpler in this case: Mr z̈ + Cr ż + Kr z = VT f ( ) ∂Φ T VT f T Mr θ̈ − Cr θ̇ + Kr θ = − V =− . ∂q T (4.29) (4.30) This means the primal and adjoint equation are nearly identical, except for a scaling term and the initial/terminal conditions. Finally the assumption is made that the load is ’symmetric’ in time, which means: f(τ) = f(T − τ), 0≤τ≤T . (4.31) When z(0) = ż(0) = 0, this leads to: ∫ 0 T T ∂Φ z i dt + ∂q ∫ T 0 θ(τ) = −z(t )/T ∫ T ∫ θi f dt = fz i /T dt + 0 0 (4.32) T −fz i /T dτ = 0 . (4.33) So for the described case Eq. (4.24) will be zero, which means that the contribution of the basis vector sensitivities to the total sensitivity is negligible. In general however this will not hold, Eq. (4.24) will not be zero. To demonstrate this, analytical expressions for z and θ were found using Duhamel’s integral. The resulting mathematics span a page, and are not very insightful. The same can be shown for a simple system with only one degree of freedom, where m = k = 1, c = 0, and V = 1, so q = z and λ = θ. Eq. (4.24) is evaluated for three cases: dynamic compliance with symmetric load, different objective with symmetric load, and dynamic compliance with non-symmetric load: 4.2. B ASIS VECTOR SENSITIVITIES 39 Different objective ∫T Ψ = 0 z 2 dt Different force (ramp) ∫T Ψ = 0 f q dt z̈ + z = f = 1 z(t = 0) = ż(t = 0) = 0 z̈ + z = f = 1 z(t = 0) = ż(t = 0) = 0 z̈ + z = f = t z(t = 0) = ż(t = 0) = 0 Adjoint equation: θ̈ + θ = −1 θ(τ = 0) = θ̇(τ = 0) = 0 θ̈ + θ = −2z θ(t = T ) = θ̇(t = T ) = 0 θ̈ + θ = −t θ(t = T ) = θ̇(t = T ) = 0 Solution for T = π: z(t ) = 1 − cos(t ) θ(τ) = −1 + cos(τ) z(t ) = t − sin(t ) θ(t ) = −t + T cos(t ) + sin(t ) Eq. (4.24)= 0 z(t ) = 1 − cos(t ) θ(t ) = (t − π + 2) sin(t ) −2 cos(t ) − 2 4V′ Objective Ψ= Equations of motion: ∫T 0 f q dt −2T V′ For the single DoF system this does not lead to an error in sensitivities, since V is constant and therefore V′ is zero. But in general, this does show that the basis vector sensitivities have an effect on the design sensitivity. In Chapter 5 this will be investigated on some numerical examples. 4.1.4. S UMMARY Model order reduction can be used for solving the equations of motion and the adjoint equation efficiently. The easiest way of doing this ignores both MOR residuals and basis vector sensitivities. This leads to multiple errors, most notably in the computed sensitivity. The errors caused by ignoring the residuals will be of the same order as the residuals themselves. This means that for accurate MOR these can be neglected. The effect of basis vector sensitivities will depend on the objective function and load. The error resulting from ignoring this term can be numerically evaluated, but this does require the (expensive) calculation of V′ . 4.2. B ASIS VECTOR SENSITIVITIES There are multiple ways to treat basis vector sensitivities: • Calculate V′ in one of the following ways: – Finite difference: not attractive due to the large amount of design variables. – Direct differentiation & adjoint methods: there are various possibilities here, depending on the type of basis vector. For literature on eigenvector sensitivities, see for example [53]. For a brief investigation into Ritz vector sensitivities, see Appendix B. • Assume V′ = 0. This is very common, for example in [35]. In all known research on combining topology optimization and MOR, namely the work of Yoon [17] and Zhao & Wang [40], the issue of basis vector sensitivities is not mentioned. It is therefore assumed that they also used V′ = 0. Eigenvector sensitivities have been used to increase the accuracy of sensitivity analysis, for example in the work of Greene and Haftka [42], or in the PhD. project of Evert Hooijkamp. But in general, calculating basis vector sensitivities is expensive. There are multiple ways to proceed from here, the simplest is assuming V′ is zero. If the solution of the two differential equations can be found accurately using model order reduction, there will be no difference between the results of the full and reduced model. This leads to the hypothesis that basis vector sensitivities have a negligible influence on the design sensitivity when the model order reduction is accurate. However, as was shown before, there will be an error, given by Eq. (4.24). To verify if this really is negligible, an analysis of the errors in design sensitivities will be performed in Chapter 5. The difference between the sensitivities of the full and reduced models will be compared, and the contribution of Eq. (4.24) to the error will be evaluated. To find V′ a finite difference approximation will be used. 40 4. I MPLEMENTATION : M ODEL O RDER R EDUCTION 4.3. A DAPTIVE M ODEL O RDER R EDUCTION In Section 2.5.5 multiple ways of estimating the error caused by MOR were discussed. Based on these, two algorithms for Adaptive Model Order Reduction (AMOR) are defined, Algorithms 4.1 and 4.2. The first uses only estimates based on the model and basis vectors (a priori), specifically the spatial load estimate and the spectral load estimate, as defined in Section 2.5.5. The second algorithm uses response (a posteriori) information to calculate the refinement estimate. Both aim to select the number of basis vectors such that a certain fixed accuracy is reached. Algorithm 4.1 Algorithm for a priori adaptive Model Order Reduction. 1: n ← n min 2: Calculate V 3: Calculate e spatial and e spectral 4: while e spatial > e spatial,ref and e spectral > e spetral,ref and n < n max do 5: n ← n +1 6: Add vector to V 7: Calculate e spatial and e spectral 8: end while Algorithm 4.2 Algorithm for a posteriori adaptive Model Order Reduction. 1: e= ∫T ż n2 (t ) dt ∫T 2 ż (t ) dt j =1 0 j ∑n 0 if e > e ref and n < n max then n ← n + (∆n − 1) 4: else if n > n min then 5: n ← n − (∆n − 1) 6: end if 2: 3: In Algorithm 4.2 there are multiple possibilities for ∆n. In this research the value e/e ref will be used for positive ∆n (line 3), and e ref /e for negative (line 5). In both cases the value is rounded up, and limited to a maximum change of 10. This algorithm does not lead to an constant number of basis vectors, in the ideal case it switches every iteration between a certain n and n + 1. Although this could easily be avoided using a different algorithm where the single reference error is replace by an upper and lower bound, it is not seen as a problem, so the simple implementation is used. To avoid larger fluctuations, ∆n is reduced by 1 in line 3 and 5, this results in a damping effect on the change in n. These two algorithms are both used in the optimization process, as illustrated by Figure 4.1. Algorithm 4.1 is used before the optimization, to estimate the correct number of basis vectors. Algorithm 4.2 is used in the optimization loop, changing the number of basis vectors used by the next iteration. 4.4. S UMMARY & D ISCUSSION 41 Figure 4.1: Overview of optimization loop with adaptive model order reduction. Before starting the optimization, Algorithm 4.1 is used to estimate the correct number of basis vectors. During the optimization Algorithm 4.2 is used to maintain a constant accuracy. 4.4. S UMMARY & D ISCUSSION In this chapter the implementation of model order reduction has been discussed in the context of the total optimization loop. Two approaches have been discussed. The first uses model reduction only to solve the equations of motion and adjoint equation, neglecting all residuals. This is expected to be efficient when the model order reduction is accurate. To investigate this further, a detailed analysis was performed. This provided more information on the resulting error in the sensitivity analysis, including the contribution of basis vector sensitivities. When the latter are ignored, the approaches are identical. The resulting accuracy will be studied in the next chapter. Finally, a method has been proposed for adaptive model order reduction as part of the optimization. 5 N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION In this chapter we will examine the properties of Model Order Reduction. The aim is to investigate the accuracy and computational effort of the different methods. First the issue of local modes and penalization will be examined. Next the discussed methods of MOR will be tested on various test structures and two load cases, investigating the error in both the response and the sensitivities. Finally we will test the basis updating scheme discussed in Section 2.5.6. 5.1. T EST PROBLEMS A good set of test problems should be representative of any structure that could be found during optimization. Therefore six test structures were used, with either 250 or 2560 elements, with the following geometries: • Completely filled • Optimized grey: minimum static compliance, without penalization or filtering. • Optimized black & white, also minimum static compliance. The structure was optimized using SIMP penalization, with p = 3. A density filter with a radius of three elements was used to find the structure with 2560 elements. As explained in the previous section, the finite element analysis uses PI penalization, with p 1 = 3 and p 2 = 15/16. The structures are shown in Fig. 5.1, the corresponding number of DoFs is respectively 550 and 5280. In the previous chapter multiple definitions of accuracy were discussed. For sensitivity analysis, the differentiation is often made between accuracy and consistency, which respectively refer to the error made with respect to the physical reality and the model. In this chapter a third measure will be used, named MOR error. This refers to the error between the full and reduced model, which could be seen as part of the consistency. To distinguish between different errors, this third definition is necessary. 43 44 (a) Test structure 1: 250 elements, all elements filled. 5. N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION (b) Test structure 2: 250 elements, optimized grey. (c) Test structure 3: 250 elements, optimized black & (d) Test structure 4: 2560 elements, all elements filled. white. (e) Test structure 5: 2560 elements, optimized grey (f) Test structure 6: 2560 elements, optimized black & white. A density filter was used to calculate this structure, with a radius of 3 elements. Figure 5.1: Test structures used for analysis of Model Order Reduction. Black areas indicate maximum density (x = 1), white minimum density (x = 1 × 10−3 ). Green arrows indicate the applied force, red arrows boundary conditions (clamped on left side). The structures were optimized for minimum compliance. 5.2. L OCAL MODES & P ENALIZATION It is well known from literature that some penalization techniques lead to the existence of local modes[3]. This happens for example when SIMP penalization is applied to the stiffness. Void areas will have a very high mass/stiffness ratio, causing a very low eigenfrequency. The eigensolver will find these local modes, but they are undesired because they contain very little information about the actual behaviour of the structure. In this section it will briefly verified that we can avoid them using an different penalization method (Section 2.2.1). For all types of penalization discussed in this document, the first three eigenfrequencies are shown in Table 5.1. SIMP penalization clearly produces very low values for structures with low-density areas. For both PI and SIMP penalization, the first 3 eigenmodes (labelled as MSM) and Ritz vectors are plotted in Table 5.2. This was done for test structure 4-6, the results for structures 1-3 are similar. 5.2. L OCAL MODES & P ENALIZATION 45 Table 5.1: First 3 eigenfrequencies for both SIMP and PI penalization. All eigenfrequencies are in rad/s. Local modes are indicated by a red background. Penalization does not affect completely filled structure (structure 4). SIMP penalization result in local modes. the other two methods do not. They do lower the eigenfrequency, which was expected, since penalization results in lower stiffness. Mode nr Structure 4 Structure 5 Structure 6 None 1 2 3 1851 7850 7984 2583 8104 9568 2229 5642 7025 SIMP 1 2 3 1851 7850 7984 24.31 39.17 50.40 3.614 5.745 6.589 RAMP 1 2 3 1851 7850 7984 2065 5916 7637 2035 4423 5669 PI 1 2 3 1851 7850 7984 1712 4810 6700 1982 4005 5134 In these results local modes are present in grey/void areas when we apply SIMP penalization. The corresponding eigenfrequencies are very low. This is also seen in Ritz vectors, which is caused by their convergence towards the first eigenmode. This means the reduced basis will contain less information on the vibration of the actual structure. RAMP and PI penalization on the other hand do not produce any local modes. Therefore both were tested on optimization problems, where PI showed better results (fewer grey areas). This is illustrated by Fig. 5.2. Therefore, in the rest of this research PI penalization will be used. (a) RAMP penalization. (b) PI penalization Figure 5.2: Optimized designs for both RAMP and PI penalization. PI penalization results in fewer grey areas, so this is used for the rest of this research. 46 5. N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION Table 5.2: Basis vectors using SIMP & PI penalization. MSM is modal superposition method (eigenvectors), red background indicates local mode. SIMP penalization leads to local modes, this also affect any calculated Ritz vectors since these converge towards the first eigenvector. Vector nr MSM 1 MSM 2 MSM 3 SIMP Ritz 1 Ritz 2 Ritz 3 MSM 1 MSM 2 MSM 3 PI Ritz 1 Ritz 2 Ritz 3 Structure 4 Structure 5 Structure 6 5.3. E XAMPLE 1: STEP RESPONSE 5.3. E XAMPLE 1: 47 STEP RESPONSE For the first numerical example a step response will be studied. At this point, only the simulation is performed, the objective function and sensitivity analysis will be treated in Section 5.5. Starting from initial conditions q = q̇ = 0 all six test structures are subjected to a vertical force f = 1 N for t ≥ 0, applied at the top right corner. The simulated timespan is 0.01 s, which is discretized into 500 timesteps. For a list of other parameters see Appendix D. The resulting displacement is plotted in Fig. 5.3. All structures show a similar dynamic response. 1.8 ×10-7 1.8 Structure 1 Structure 2 Structure 3 1.6 Structure 4 Structure 5 Structure 6 1.6 1.4 Displacement (m) Displacement (m) 1.4 ×10-7 1.2 1 0.8 0.6 1.2 1 0.8 0.6 0.4 0.4 0.2 0.2 0 0 0 0.002 0.004 0.006 0.008 0 0.01 0.002 0.004 0.006 0.008 0.01 Time (s) Time (s) (a) Response of structure 1-3. (b) Response of structure 4-6. Figure 5.3: Displacement versus time of all test structures when subject to a step force. Displacement measured is vertical at top-right corner, the force is applied to the same DoF. The response consists of the static displacement and a decaying oscillating part, which is dominated by the first eigenmode. 5.3.1. M ODEL ORDER REDUCTION ERROR For this load case various methods of model order reduction will be compared. The most suitable for this problem are modal superposition and Ritz vectors. This is a low-frequency problem, so Quasi-Static Ritz Vectors are not suitable, furthermore there is no obvious center frequency. The modal acceleration method is expected to be inferior to Ritz vectors, but for reference it will be included in the test. To calculate the accuracy of the response of a reduced system, the response of the full system is calculated first. The error caused by the model reduction will be calculated by: e= ∥q j ,full (t i ) − q j ,red (t i )∥ ∥q j ,full (t i )∥ , 0 ≤ i ≤ nt , (5.1) where j corresponds to a certain DoF, in this case the same as the DoF of the load. Other error measures are possible, for example using information of all degrees of freedom. The results were found to be similar. For this research it makes sense to focus on one degree of freedom, since all used objective functions use only one degree of freedom as well. The results are shown in Fig. 5.4. From these some preliminary observations can be made: • For this combination of load and structure the MSM has a very slow convergence. • The MAM reduces the error by approximately one order of magnitude. • Ritz vectors show much faster convergence, reaching 10−13 using approximately 50 basis vectors. The remaining error is contributed to numerical round-off. • The MOR error of the Ritz vectors is dependent on the structure. The completely black structures are more accurate than the others, the grey structures are slightly more accurate than the black & white 48 5. N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION ones. This was found to be caused both by the structure and the penalization. Penalization and large differences in element densities both lead to higher condition numbers for the system matrices. These result in larger errors in the Ritz vectors, leading to larger MOR errors for the simulation. For details, see Fig. 5.6. For the modal methods the grey structures result in a slightly higher accuracy, but the effect is much smaller than for the Ritz vectors. • The convergence of all methods is dependent on the size of the problem. This is especially visible for the Ritz vectors. But while the size of the problems is one order of magnitude apart, the required basis size for a typical accuracy differs only by a small amount. 5.3.2. C OMPUTATIONAL EFFORT Next for this load case the computational effort will be examined. In Fig. 5.5 the CPU-time of the reduced simulation is shown (calculation of basis vectors + numerical integration), divided by the CPU-time of the full simulation. This is highly dependent on the simulation parameters, especially the number of time steps. Still it does provide some insight into the efficiency of the different methods. The results show that MOR can significantly decrease the computation time, especially for larger systems. The MSM is shown to be more expensive than the Ritz vector method, which is caused by the higher costs of basis generation. The extra CPU-time associated with the MAM is relatively small. In Chapter 6 the CPU time will be discussed as part of the total optimization loop, where the time will also be separated into basis generation and time integration. 100 1.Ritz 2.Ritz 3.Ritz 1.MSM 2.MSM 3.MSM 1.MAM 2.MAM 3.MAM 10-5 10-10 10-15 0 20 40 60 80 MOR error [-] error measure [-] 100 100 n (a) Accuracy of structure 1-3. The number in the legend indicates which structure is used. 4.Ritz 5.Ritz 6.Ritz 4.MSM 5.MSM 6.MSM 4.MAM 5.MAM 6.MAM 10-5 10-10 10-15 0 20 40 60 80 100 n (b) Accuracy of structure 4-6. The number in the legend indicates which structure is used. Figure 5.4: Error caused by model order reduction for all six test structures, for step response, versus number of basis vectors n. Numbers in legend correspond to test structure. Modal superposition (MSM) result in poor accuracy, modal acceleration (MAM) improves this by an order of magnitude. Ritz vectors show superior convergence. 5.3. E XAMPLE 1: STEP RESPONSE 49 0.7 2 1.Ritz 2.Ritz 3.Ritz 1.MSM 2.MSM 3.MSM 1.MAM 2.MAM 3.MAM Computation time [-] 1.6 1.4 1.2 1 4.Ritz 5.Ritz 6.Ritz 4.MSM 5.MSM 6.MSM 4.MAM 5.MAM 6.MAM 0.6 Computation time [-] 1.8 0.8 0.6 0.5 0.4 0.3 0.2 0.4 0.1 0.2 0 0 0 20 40 60 80 100 0 20 40 60 80 100 n n (a) Computation time of structure 1-3. (b) Computation time of structure 4-6. Figure 5.5: Computation time of reduced analysis, divided over computation time of full analysis. Plotted versus number of basis vectors, results averaged over 10 simulations. The data shows that the Ritz vector method is cheaper than the modal methods, furthermore the efficiency of all methods increases with the size of the system. 100 MOR error [-] Structure 4 Structure 6: no penal. Structure 6: no penal., x min = 0.1 Structure 6: PI Structure 6: PI, x min = 0.1 10-5 Struct. 4 6 6 6 6 10-10 10-15 0 20 40 60 80 100 n Penal. None None None PI PI x min 1 1 × 10−3 0.1 1 × 10−3 0.1 Cond. K 4 4.95 × 10 2.11 × 106 7.51 × 104 3.25 × 107 1.12 × 105 Cond. M 2.24 × 101 2.24 × 105 2.24 × 102 2.24 × 105 2.24 × 102 (b) Condition numbers (2-norm) associated with the system matrices of the tested structures (a) MOR error for structures with different penalization and lower limits for the design variables. Figure 5.6: MOR error of Ritz vector method for structures with different numerical conditioning. Structure 4 is completely filled, its system matrices therefore have relatively low condition numbers. Structure 6 has many void elements, leading to poorer conditioning. This is increased by penalization. The results indicate that this increases the MOR error in the Ritz vector method, this is caused by the less accurate Ritz vectors. 50 5. N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION 5.4. E XAMPLE 2: HARMONIC RESPONSE In the previous load case the Ritz vector method showed very promising results, which was expected: the load was low-frequency, and the static displacement was an important part of the response. So for the next load case a higher frequency load will be used, to see how this affects accuracy of the various MOR methods. The same six structures were simulated with a sinusoidal load, with an amplitude of 1 N and two values for the load frequency Ω: 1 × 104 rad/s and 1 × 106 rad/s. The simulation times are scaled accordingly to guarantee similar accuracy for each case, the number of time steps is 1000. For the full structure, these frequencies are close to respectively the fifth and 200th eigenfrequency. The calculated response to the highest of the two frequencies will not be accurate with respect to the real structure, for such high eigenmodes the accuracy of the finite element method will be low1 . The point of this example however is to show whether the full discretized model can be approximated using a reduced model, errors in the full model are not relevant. The resulting displacement is shown in Fig. 5.7, the accuracy in Fig. 5.8. The CPU time is similar to the other loadcase, these graphs are not shown. Compared to the results for a step response, Ritz vectors show slower convergence, even more so for the high frequency load. The MAM actually decreases the accuracy of the simulation in this case. This is because it uses a quasi-static response, which only takes the stiffness into account, neglecting the inertia. 2 ×10-8 Structure 1 Structure 2 Structure 3 1.5 Structure 4 Structure 5 Structure 6 2 1.5 Displacement (m) 1 Displacement (m) ×10-8 2.5 0.5 0 -0.5 -1 1 0.5 0 -0.5 -1 -1.5 -1.5 -2 -2 0 0.002 0.004 0.006 0.008 0.01 0 0.002 Time (s) ×10 0.01 ×10-10 Structure 4 Structure 5 Structure 6 1 0.7 Displacement (m) Displacement (m) 1.2 Structure 1 Structure 2 Structure 3 0.8 0.008 (b) Response of structure 4-6 for Ω = 1 × 104 rad/s. -10 0.9 0.006 Time (s) (a) Response of structure 1-3 for Ω = 1 × 104 rad/s. 1 0.004 0.6 0.5 0.4 0.3 0.2 0.8 0.6 0.4 0.2 0.1 0 0 0 0.2 0.4 0.6 0.8 Time (s) (c) Response of structure 1-3 for Ω = 1 × 106 rad/s. 1 ×10 0 -4 0.2 0.4 0.6 0.8 Time (s) 1 ×10-4 (d) Response of structure 4-6 for Ω = 1 × 106 rad/s. Figure 5.7: Displacement under harmonic load, for all six test structures. 1 This is clearly visible in Figs. 5.7c and 5.7d. Although structure 1 and 4 represent the same physical structure, their response is different 51 105 105 100 100 1.Ritz 2.Ritz 3.Ritz 1.MSM 2.MSM 3.MSM 1.MAM 2.MAM 3.MAM 10-5 10-10 10-15 0 20 40 60 80 MOR error [-] MOR error [-] 5.4. E XAMPLE 2: HARMONIC RESPONSE 4.Ritz 5.Ritz 6.Ritz 4.MSM 5.MSM 6.MSM 4.MAM 5.MAM 6.MAM 10-5 10-10 10-15 100 0 20 40 n (a) Accuracy of structure 1-3 for Ω = 1 × 104 rad/s. 1.Ritz 2.Ritz 3.Ritz 1.MSM 2.MSM 3.MSM 1.MAM 2.MAM 3.MAM 10-5 -10 100 MOR error [-] MOR error [-] 100 105 100 4.Ritz 5.Ritz 6.Ritz 4.MSM 5.MSM 6.MSM 4.MAM 5.MAM 6.MAM 10-5 10-10 10-15 10-20 80 (b) Accuracy of structure 4-6 for Ω = 1 × 104 rad/s. 105 10 60 n 0 20 40 60 80 n (c) Accuracy of structure 1-3 for Ω = 1 × 106 rad/s. 100 10-15 0 20 40 60 80 100 n (d) Accuracy of structure 4-6 for Ω = 1 × 106 rad/s. Figure 5.8: Accuracy versus basis vectors for all six test structures, for two sinusoidal loads. The MAM method is not effective for this case, and should be changed to take inertia effects into accounts. The convergence of Ritz vectors is slightly slower compared to the step response. A remark has to be made here. In measuring the error, only the response of a single degree of freedom has been taken into account. The MSM shows better performance when a different point is examined, illustrated by Fig. 5.9. So the results of MSM are often not as inaccurate as shown in this chapter. However, since this research focuses on point loads, with displacement measured at the same point, this chapter still clearly shows MSM is inefficient, and Ritz vectors show much better performance. There is one exception, which will be discussed next. The final example is a case where the displacement is fully described by two eigenmodes, in this example the second and fifth are chosen arbitrarily. This achieved by using an initial displacement given by a combination of these modes, and not applying an external load. For optimization, this has very limited practical use. It does correspond to the absolute best case for modal superposition, and allows us to compare this to Ritz vectors. The Ritz vectors are generated using the same load vectors as before. Since there is no external load, the Ritz vector basis is just an approximation of the eigenvectors. The results are shown in Fig. 5.10 The results clearly show that MSM converges with just 5 vectors, only the second and fifth vector are excited. As expected, Ritz vectors result in inferior performance. So for this specific case it might be best to use MSM. However this load case is not very likely to occur in reality, the dynamic response will usually be distributed over a wide range of frequencies. 52 5. N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION 8 ×10-9 10 Ritz MSM Full 6 Ritz MSM Full 8 6 Displacement (m) 4 Displacement (m) ×10-10 2 0 -2 -4 4 2 0 -2 -4 -6 -6 -8 -8 0 0.002 0.004 0.006 0.008 0.01 0 0.002 0.004 Time (s) 0.006 0.008 0.01 Time (s) (a) Response of structure 1 measured at same DoF as force. (b) Response of structure 1 measured at DoF number 100. Figure 5.9: Displacement versus time for a single degree of freedom, for various reduction methods, using 5 basis vectors. The MSM clearly has much better accuracy for the arbitrarily chosen DoF number 100 than for the DoF where the force is applied. However the focus of this research is on objective functions that use the response of a the point where the force is applied. 105 105 1.Ritz 2.Ritz 3.Ritz 1.MSM 2.MSM 3.MSM 100 error measure [-] error measure [-] 100 10-5 10-10 10-15 4.Ritz 5.Ritz 6.Ritz 4.MSM 5.MSM 6.MSM 10-5 10-10 0 5 10 15 20 25 30 10-15 0 5 10 n (a) Response of structure 1-3. 15 20 25 30 n (b) Response of structure 4-6. Figure 5.10: Accuracy versus number of basis vectors for pure modal excitation. Only mode 2 and 5 are excited, this clearly leads to fast convergence of the MSM. The Ritz vector method is just an inefficient eigenvector algorithm in this example, it therefore converges much slower. 5.5. O BJECTIVE FUNCTION & SENSITIVITY ANALYSIS 53 5.5. O BJECTIVE FUNCTION & SENSITIVITY ANALYSIS 5.5.1. M ODEL ORDER REDUCTION ERROR In the previous sections the accuracy of the simulations has been investigated. This will now be extended to the objective function and sensitivity analysis. The following error measures are used: • Objective function: ¯ ¯ ¯ Ψfull − Ψred ¯ ¯ ¯. e =¯ ¯ Ψfull • Adjoint variable: e= ∥λfull (t i ) − λred (t i )∥ , ∥λfull (t i )∥ (5.2) 0 ≤ i ≤ nt . (5.3) For the displacement, the chosen error measure used only one degree of freedom. For the adjoint the data from DoFs will be used, so the discretized variable λ(t ) is a N × n t matrix. The used norm is: √all ∑ ∑ 2 ∥λ(t)∥ = i j λi (t j ) (Frobenius norm). • Sensitivity: ° ° ° dΨfull dΨred ° ° ddi − ddi ° ° ° e= , ° dΨfull ° ° ddi ° 1 ≤ i ≤ n el . (5.4) For all combinations of the six test structures, reduction methods, both load cases, and all three objective functions these errors were investigated as a function of the number of basis vectors. To keep this section compact, only the data for the sixth structure is shown, the black-white design with 2560 elements. Using any of the other structures generally results in smaller MOR errors. Furthermore, in the previous section the modal superposition method was shown to lead to large errors in the dynamic response. The errors in the sensitivities are even larger. When using a large basis (100 eigenvectors), the sensitivity error is still 0.4, which is two orders of magnitude larger than the error found using the MAM. Therefore the modal superposition method is clearly less suitable than Ritz vectors or the MAM, so only the results of the latter two methods are shown, see Fig. 5.11. The number of basis vectors n is clearly a critical parameter for achieving a low MOR error, especially for Ritz vectors. Additionally, the influence of the number of time steps was also studied, see Fig. 5.12. From the results, the following conclusions can be drawn: • The Ritz vector method in most cases results in significantly smaller errors than the MAM. • As seen before, the MOR error of the MAM is dependent on the type of load: the results of the step response are much better than those of the frequency response. • In general, a larger number of Ritz vectors results in a smaller MOR error. The convergence for the objective function is faster than for the dynamic response. The adjoint variable converges slower, and the sensitivity even slower. • The convergence of the adjoint variable, and especially of the sensitivity, is not monotonic. In some cases a larger basis actually causes larger errors. This appears to be a numerical issue, for a structure with better conditioned matrices (for example structure 4) this does not occur. • The objective function is an important factor in the convergence of the sensitivity. The squared displacement objective leads to the largest MOR error. This is caused by the term ∂Φ ∂q . For this objective, this term is highly dependent on q, thus also on the MOR error in the response. For the dynamic compliance on the other hand, ∂Φ ∂q is not dependent on q, resulting in a smaller MOR error. • The number of time steps is an important parameter. When this is increased, the MOR error in the sensitivities becomes smaller. However the number of basis vectors is a more significant parameter. 54 5. N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION 100 105 Ritz f q Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 10-5 10-10 10-15 10-20 Ritz f Tq Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 100 MOR error in objective MOR error in objective T 10-5 10-10 10-15 0 20 40 60 80 10-20 100 0 20 Number of basis vectors 40 60 (a) Error in objective function for step response 105 Ritz f Tq Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 10 -4 Ritz f q Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 100 MOR error in λ MOR error in λ T 10 100 (b) Error in objective function for frequency response 100 -2 80 Number of basis vectors 10-6 10-8 10-5 10-10 -10 10 10-12 0 20 40 60 80 10-15 100 0 20 (c) Error in adjoint variable for step response 80 100 105 Ritz f Tq Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 10-2 MOR error in sensitivity MOR error in sensitivity 60 (d) Error in adjoint variable for frequency response 100 10-4 10-6 10-8 40 Number of basis vectors Number of basis vectors 0 20 40 60 Number of basis vectors (e) Error in sensitivity for step response 80 100 Ritz f Tq Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 100 10-5 10-10 10-15 0 20 40 60 80 100 Number of basis vectors (f) Error in sensitivity for frequency response Figure 5.11: Error in objective function versus number of basis vectors, for various objective functions. The analysis uses 500 timesteps. The results show that the while objective function converges quickly, the error in the adjoint variable and especially the design sensitivity is significantly larger. Furthermore, the choice of objective function has a large effect on the accuracy. For Ritz vectors the quadratic displacement function q 2 leads to larger errors than the dynamic compliance fT q or absolute displacement (|q|) functions. 5.5. O BJECTIVE FUNCTION & SENSITIVITY ANALYSIS 100 105 10-2 MOR error in sensitivity Ritz f Tq Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 10-1 MOR error in sensitivity 55 10-3 10-4 Ritz f Tq Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 100 10-5 10-10 -5 10 10-6 0 20 40 60 80 10-15 100 0 20 Number of basis vectors (a) Error in sensitivity, for step response, n t = 250. 80 100 105 Ritz f Tq Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 10-2 MOR error in sensitivity MOR error in sensitivity 60 (b) Error in sensitivity, for frequency response, n t = 250. 100 10-4 10-6 10-8 40 Number of basis vectors 0 20 40 60 80 100 10-5 10-10 10-15 100 Ritz f Tq Ritz q 2 Ritz |q| MAM f Tq MAM q 2 MAM |q| 0 20 Number of basis vectors 40 60 80 100 Number of basis vectors (c) Error in sensitivity, for step response, n t = 1000. (d) Error in sensitivity, for step response, n t = 1000. Figure 5.12: Numerical examples: MOR error in sensitivity analysis, for different number of timesteps. The data shows that number of time steps is a factor in the MOR error in the sensitivities. Increasing the number of time steps decreases the error, however the effect of the number of basis vectors is larger. 5.5.2. I NFLUENCE OF BASIS VECTOR SENSITIVITIES Up to this point, in the sensitivity analysis both basis vector sensitivities and all terms containing MOR residuals have been neglected. Still, the resulting MOR errors in the sensitivities have been found to be relatively small. According to literature [40] the sensitivities found using the MAM are sufficiently close to the full model for efficient optimization. The Ritz vector method has been found to result in even smaller errors. This suggests that the simple MOR implemented so far, where both residual terms and basis vectors sensitivities are neglected, is sufficient for optimization purposes. To investigate this further, Equation (4.24) will be evaluated, which was found to be the main contribution of the basis vector sensitivities to the design sensitivity: ΨV′ ′ = ∂Ψ ′ V z+ ∂q ∫ T 0 ( V′ θ )T f dt . (5.5) All terms are known, except for V′ . As discussed in Section 4.2, this is expensive to calculate. A finite difference approximation was used for this research, with a step size of ∆x = 1 × 10−6 .2 To study the contribution of ΨV′ ′ , 2 The accuracy of finite difference sensitivities can be highly dependent on the size of the disturbance used. When the exact sensitivity is not known, the accuracy can be estimated by computing the sensitivity using various step sizes. In the range 1 × 10−7 < ∆x < 1 × 10−5 , the largest relative variation in V′ is less than 2%. 56 5. N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION it was calculated for the third test structure, using both load cases and all three objective functions. Analogous to the earlier error analysis, the following error measure is used: ∥ΨV′ ′ ∥ ∥Ψ′full ∥ . (5.6) This is not evaluated for the modal acceleration method, since the analytical derivation of Eq. (5.5) did not include the quasi-static correction. The results for Ritz vectors are shown in Fig. 5.13. From these, the following conclusions can be drawn: • The contribution of ΨV′ ′ to the total sensitivity is relatively small. For the step response, it should theoretically be zero for the objective function Ψ = fT q, since this is the special case discussed in Section 4.1. In the numerical example this results in a magnitude of ΨV′ ′ that is several orders orders of magnitude smaller than for the other objective functions. • For the frequency response, the results are similar. • This is still larger than the error measured between the full and reduced model. The discrepancy is likely caused by errors in the terms of Eq. (5.5), most of these terms are not exactly known. Summarizing, the error in the sensitivities between the full and reduced model is caused by both the residual and V′ . In the shown numerical example it has not been possible to distinguish between the contribution of these terms. Furthermore, although it is expected that ΨV′ ′ converges to zero for an increasingly accurate reduced model, this cannot be shown using this data. However, the total MOR error in the sensitivities is still relatively small when using Ritz vectors. Therefore, the assumption that both the MOR residual and the basis vector sensitivities can be neglected is valid for these numerical examples. 100 10-4 10-6 -5 Relative magnitude Relative magnitude 10 10-10 10 10-8 10-10 10-12 -15 10-20 Ritz f Tq Ritz q 2 Ritz |q| 0 20 40 60 80 100 Number of basis vectors (a) Contribution of eigenvector sensitivities for step response. Figure 5.13: Magnitude of ∥Ψ′ ′ ∥ V ∥Ψ′full ∥ Ritz f Tq Ritz q 2 Ritz |q| 10-14 10-16 0 20 40 60 80 100 Number of basis vectors (b) Contribution of eigenvector sensitivities for frequency response. versus number of basis vectors. As expected, this is smaller for the minimum compliance objective. For all cases, the magnitude is small compared to the design sensitivities. A detailed study is not possible ′ . Still, combined with the data shown in Fig. 5.12, it can be using this data, there are too many errors in the term of ΨV ′ concluded that in the sensitivity analysis for a model using Ritz vectors, basis vector sensitivities can be neglected. 5.6. U PDATING OF BASIS VECTORS 57 5.6. U PDATING OF BASIS VECTORS As part of the optimization process, the structure will be changed. In Section 2.5.6 a method was proposed to calculate new basis vectors using the preconditioned conjugate gradient method. To test this method an experiment was performed, consisting of the following steps: • Create random vector x0 , 0 < x i < 1 to x0 . • Create disturbed vector x1 by adding a random vector 0 < ∆x i < 0.01. • Run finite element method for both to find K0 and K1 . Reorder using approximate minimum degree algorithm (MATLAB: symamd). Define force f, unit amplitude, acting on top right corner, vertical. • Factorize (Cholesky) K0 . • Solve K0 q0 = f to find q0 . • For reference solve K1 q1 = f using the direct method. • Using the Cholesky factor of K0 as preconditioner and q0 as starting vector, run preconditioned conjugate gradient algorithm to find q1 . As mentioned before, the PCG algorithm avoids the factorization of K at the cost of a number of solutions of linear systems. This method was tested on different 3 problems, the results are summarized in Table 5.3. Table 5.3: Computation time for updating of basis vectors. All times are in seconds and based on the average of a minimum of 10 runs. Nr. of elements Nr. of DoFs Nr. of PCG iter CPU-time (s) for: PCG Factorization Direct solution 1000 2080 10,000 20,400 100,000 200,800 4 5 4 0.0123 0.0047 0.0013 0.105 0.066 0.024 1.75 1.33 0.681 Based on these results this method is not effective. The point of the PCG is avoiding factorizations, but in this implementation even one PCG solve is more expensive than a factorization. Compared to a direct solve, it is 4-10 times slower, which makes sense, every iteration equation Eq. (2.59) has to be solved twice, making it more expensive. By lowering the tolerance of the algorithm, the costs could be reduced. But they will still be higher than the cost of a direct solution. For the same systems two other preconditioners were also tested: incomplete Cholesky factorization (with zero fill) and Jacobi (diagonal). Both result in faster iterations, the speed-up is approximately a factor two for incomplete Cholesky, a factor 10 for Jacobi. But the number of iterations required for convergence rises to respectively >100 and >200, making the total solution more expensive, even if a lower tolerance is used. This does not mean that updating basis vectors using PCG is not effective in every case. Comparing algorithms is highly dependent on programming language and implementation. Amir and Sigmund [37] report a much better performance. They also suggest finding a different preconditioner to reduce the cost even further. However, for systems of fewer then 100,000 elements, we can conclude that in MATLAB the described method of updating basis vectors is ineffective. It can currently only be recommended if the step of factorization is the dominant cost. For larger systems, this is likely. The PCG method is also more suitable for parallelization, and does not require assembly of the full system matrix. Further improvements can be found in using more advanced algorithms, such as multi-grid linear solvers [54]. 58 5. N UMERICAL E XAMPLES : M ODEL O RDER R EDUCTION 5.7. S UMMARY & D ISCUSSION In this chapter model order reduction has been studied in the context of solving the equations of motion and sensitivity analysis. Six test structures were defined, to represent possible designs found during the optimization process. The issue of local modes was treated briefly, for the chosen penalization method these are not an issue. Model order reduction was tested on the six test structures for various loads. It was found that the dynamic response of the structure can be found with high accuracy and low costs, especially for the Ritz vector method. The modal superposition method leads to large errors, the modal acceleration method reduces this for simulation with low-frequency excitation. The effect of model order reduction on the objective function, adjoint variable and sensitivity analysis was also verified. The results show that the MOR error in the sensitivities can be significantly larger than the error in the dynamic response. The Ritz vector method resulted in smaller errors than the other methods. These methods will be tested on optimization problems in the next chapter. Finally, the basis vector updating scheme discussed in Chapter 2 was found to be ineffective for the examples used in this research. This could be improved by using another preconditioner. 6 N UMERICAL E XAMPLES : O PTIMIZATION In the previous chapter, the properties of model order reduction have been studied. This will be now be applied to optimization problems. The main part of this chapter studies the application of model order reduction with a fixed number of basis vectors, using two example problems. The remaining part concerns the adaptive model order reduction algorithm, alternative objective functions, and finally a case where penalization is not effective. 6.1. T EST CASES Two numerical examples were defined, these are shown in Fig. 6.1. For a full list of parameters see Appendix D.The first numerical example consist of a structure very similar to structure 4-6 studied in the previous chapter. This has 2560 elements, with zero initial deformation and velocity. For t ≥ 0 a vertical force of 1 kN is applied to the top-right corner. The simulation time is 0.01 s, which is divided into 500 time steps. The second example was taken from the paper by Zhao and Wang [40], this allows a comparison between their results and the outcome of this research. Only the left half of this structure is modelled, this consists of 4800 elements. The simulation time is 0.1 s, divided into 500 time steps. The applied force is again vertical, given by a cosine with a period of 0.2 s and an amplitude of 1 kN. Initially, both ∫ Texamples will be optimized using the dynamic compliance objective function defined in Section 3.3, Ψ = 0 fT q dt . In Section 6.3.1 the influence of the objective function will be examined. f 0.4 1 (a) Optimization example 1: design domain. The structure is clamped on the left side; a vertical force is applied to the top-right corner. 6 (b) Optimized result for example 1, using 2560 elements. 6 2 f (c) Optimization example 2: design domain. Because the structure and load are symmetric, only the left half is modelled. (d) Optimized result for example 2 (left half), using 4800 elements. Figure 6.1: Description of optimization test cases. All distances are in meters. The external force on the first example is described by a step function, on the second structure it is a low-frequency cosine. 59 60 6. N UMERICAL E XAMPLES : O PTIMIZATION 6.1.1. C OMPARING OPTIMIZATION PERFORMANCE There are multiple criteria that determine the performance of an optimization. The most important ones are the optimality of the final design, and the CPU-time required to find it. Especially the CPU-time is highly dependent on the criteria used to determine whether the optimization is converged. To reliably compare the performance of different optimizations, two tests are performed. First, the optimization is run for a relatively small amount of iterations (25), after which the objective function and CPU-time of the different methods are compared. Secondly, the optimization runs until converged (maximum change in design variable x i < 0.01). These results allow a comparison of the calculated optimized designs. Furthermore, to compare two designs, only the value of the objective function is shown. This was chosen because most results are visually very similar (illustrated by Figs. 6.2b to 6.2d) and thus hard to compare. The value of the objective is a much more reliable 6.2. O PTIMIZATION & M ODEL O RDER R EDUCTION 6.2.1. T HE MODAL ACCELERATION METHOD AND R ITZ VECTORS In the previous chapter it was found that the modal superposition method leads to large MOR errors, the effect of this on optimization will be tested in the next section. The other two implemented reduction methods, Ritz vectors and the modal acceleration method, resulted in much small MOR errors. The main question is however what effect these errors have on the optimization. To investigate this both test cases were optimized, using model order reduction with a fixed number of basis vectors. For the second test case, comparing optimizations proved to be more difficult, because of local optima (illustrated by Fig. 6.2a). To solve this, penalization was disabled. This makes the design space more convex, as a result, all tested optimizations converged towards the same optimum (Fig. 6.2b). Furthermore, Figs. 6.2c and 6.2d show two optimal designs found using model order reduction. The aim of these figures is to illustrate the difference between the found optima: an error of 0.46 is clearly visible, while an error of 2.7 × 10−3 is not. Before examining the convergence of the various optimizations, we will first look into the computational costs in more detail. The CPU-time of the different parts of the optimization is shown in Table 6.1. In the full optimization, the Newmark integration is clearly the most expensive step. The various reduction methods decrease the cost of this step dramatically. Furthermore, some of the pitfalls of comparing CPU-time can be seen here. First of all, the costs of time-integration for the simulations with model order reduction should scale approximately quadratically with the number of basis vectors, but the measured effect is much smaller. The implementation of the Newmark algorithm contains a loop, this causes extra computation time which does not scale with the size of the system. Secondly, the CPU-time for computing eigenvectors is less then expected when compared to that of computing Ritz vectors. MATLAB uses a highly optimized Fortran library to compute eigenvectors, while the Ritz vectors are computed using a much slower MATLAB code. Even with these drawbacks, the table does illustrate the effect of model order reduction on the CPU-time. Using MOR allows reduced memory requirements. As discussed frequently in this thesis, for transient sensitivity analysis the response of the system has to be stored. For a full system this uses 3 · N · n t variables. The reduced system needs N · n variables for storing the basis vectors, and 3 · n · n t bytes for storing reduced coordinates. Furthermore, the full system matrices are only required for computing the basis vectors, and can be replaced by the much smaller reduced matrices. This is slightly different for the modal acceleration method, since this requires both the full stiffness matrix and the displacement in full coordinates. The resulting memory use is shown in Table 6.2. The modal acceleration method reduces memory requirements by a factor three, but using Ritz vector results in a factor 30 reduction in memory use, even for a relatively large number of basis vectors. 6.2. O PTIMIZATION & M ODEL O RDER R EDUCTION (a) Local optimum, found when using Ritz vectors (n = 50) and PI penalization. The objective function is 6% higher than for the global optimum (Fig. 6.1d). Thus for this numerical example penalization was disabled. (c) Optimal design found using MAM with n = 5. The error in the objective function is 0.46, the structure is clearly different from the optimal design found using the full model. 61 (b) Optimal design for problem without penalization. (d) Optimal design found using MAM with n = 25. The error in the objective is 2.7 × 10−3 , which is large compared to for example the results found using Ritz vectors. Still the structure are visually nearly identical. Figure 6.2: Various optimized designs for numerical example 2. A local optimum is shown, as well as various designs optimized without penalization. These are visually nearly identical, therefore no further designs will be shown. To compare optimizations, the value of the objective function will be given. Table 6.1: Overview of CPU-time in seconds for numerical example 1, for 25 iterations. Three different optimizations are shown: using the full model, MAM with small basis, Ritz vectors with medium basis size. The aim is to illustrate the costs of the various steps, data for the other optimizations is similar and thus omitted. The time listed for the Newmark algorithm includes the numerical integration of both the equations of motion and the adjoint equation. In the full simulation, this step is clearly the dominant cost. Model order reduction reduces this significantly. The added cost of computing basis vectors is small. Total Newmark Basis vectors MAM correction Sensitivity analysis FEM Full MAM n = 5 Ritz n = 25 143 125 10.7 6.69 29.4 5.82 3.20 1.56 11.6 6.65 29.3 5.88 4.06 11.5 6.76 Table 6.2: Memory use for optimization with model order reduction (n = 50). All data is in millions of bytes. For these examples, the MAM results in a factor 3 lower memory requirements, and Ritz vectors in a factor 30. This will be even larger when fewer basis vectors are used, the memory use scale approximately linearly with the size of the basis. Example 1 Variable System matrices Response Basis vectors Total Full 1.20 25.2 26.4 MAM 0.46 9.00 0.84 10.3 Example 2 Ritz .06 0.60 0.84 1.51 Full 5.70 117.6 123.3 MAM 1.96 39.8 3.92 45 Ritz 0.06 0.60 3.92 4.58 62 6. N UMERICAL E XAMPLES : O PTIMIZATION The next step is comparing the convergence of the various methods. The results are listed in Tables 6.3 and 6.4. From these, the following conclusions can be drawn: • The goal of the proposed method is to approximate the results of the full model at lower costs. Therefore, the difference between the objective functions of the designs found using the full and reduced model is important, this should be as small as possible. A large negative value implies that the reduced model converges to a better design than the full model, this is also undesired. • All MOR methods results in large decreases of the CPU-time. For the same number of basis vectors, the Ritz vector method is slightly more efficient than the MAM. • The MAM with 5 basis vectors in some cases does not converge to the optimal solution. This is contributed to its low accuracy. The MAM with 25 or 50 basis vectors converges similar to the full model. • Even when using just 5 basis vectors, the optimization using Ritz vectors converges similar to the full solution. Furthermore, the differences in the objective function are smaller than for the MAM. • The results are similar to those reported by Zhao and Wang [40]. A big discrepancy however was found in the reported CPU-time per iteration. Their results show a maximum factor 2 speed-up for the MAM with 40 basis vectors, while on the same problem in this research a factor 5 or higher was achieved. This is even more surprising because they use Duhamel’s integral to solve the equations of motion, which is theoretically faster than Newmark integration. The difference is most likely caused by a more efficient implementation. Therefore the MAM can be significantly more efficient than suggested in literature. Since both problems concern a low-frequency load, these results should be compared to Fig. 5.11e. This suggests the following relation between the MOR error in the sensitivities and the convergence of the optimization. When the sensitivities are very inaccurate (MSM, or MAM with 5 basis vectors), the convergence will be hindered. All other results show convergence similar to the optimization using the full Newmark method. Apparently, other errors in the optimization loop (most likely the MMA approximation error) dominate the convergence, so decreasing the MOR error does not improve it. Based on the results shown here, the conclusion can be drawn that relatively coarse model order reduction is the most efficient for topology optimization. Furthermore, Ritz vectors are shown to be more efficient than the modal acceleration method. 6.2.2. T HE MODAL SUPERPOSITION METHOD The results in the previous chapter indicated that the modal superposition method results in large errors for both the dynamic response and the sensitivities. To see how this affects the optimization, example 1 was optimized until convergence using a (relatively large) basis of 100 eigenvectors. The result is shown in Fig. 6.3. The optimized design does not have any material in the top-right corner, where the force is applied. Since this is obviously not optimal, it seems like the optimization is exploiting the errors in the model, possibly by making the eigenvectors orthogonal to the load. While this does lead to a low objective according to the reduced model, it results in a suboptimal design. Using Ritz vectors or MAM avoids this issue, since the load is directly used in both methods. 6.2. O PTIMIZATION & M ODEL O RDER R EDUCTION 63 Table 6.3: Numerical examples: comparison of optimization and the effect of MOR. The results after 25 iterations are shown, all times are divided by the CPU-time of the full optimization (respectively 143 s and 429 s). Compared to the MAM, the Ritz vector method leads to designs that are closer to the full design, at lower computational cost. MAM Ritz vectors Full n=5 n = 25. n = 50 n =5 n = 25 n = 50 Example 1: CPU time Simulation time Error in obj. 1 0.873 0 0.202 0.073 2.2 × 10−4 0.239 0.103 -1.8 × 10−5 0.295 0.150 -1.6 × 10−5 0.174 0.047 5.2 × 10−8 0.202 0.069 -5.8 × 10−8 0.238 0.100 -2.6 × 10−8 Example 2: CPU time Simulation time Error in obj. 1 0.921 0 0.120 0.058 1.9 × 10−2 0.141 0.076 2.4 × 10−4 0.238 0.133 9.2 × 10−4 0.115 0.048 1.3 × 10−6 0.138 0.070 -7.5 × 10−7 0.187 0.113 -1.3 × 10−6 Reduction Table 6.4: Numerical examples: comparison of optimization and the effect of MOR. The optimization is converged (maxi ∆x i = 0.01), all times are divided by the CPU-time per iteration of the full optimization (respectively 5.85 s and 15.8 s). Similar to the previous results, the Ritz vectors method shows nearly identical convergence to the full method. The MAM leads to significant differences, especially when using a small number of basis vectors. MAM Ritz vectors Reduction Full n=5 n = 25. n = 50 n=5 n = 25 n = 50 Example 1: Nr. of iterations CPU-time per iter. Error in obj. 152 1 0 183 0.188 -6.4 × 10−4 162 0.233 -3.6 × 10−4 182 0.278 -5.8 × 10−4 152 0.159 -3.4 × 10−7 152 0.183 -1.2 × 10−5 153 0.218 -5.9 × 10−6 Example 2: Nr. of iterations CPU-time per iter. Error in obj. 27 1 0 256 0.112 .46 27 0.162 2.7 × 10−3 50 0.186 -5.0 × 10−4 27 0.125 1.9 × 10−6 27 0.148 -2.0 × 10−6 27 0.181 2.3 × 10−7 Figure 6.3: Structure optimized using modal superposition method with 100 basis vectors. The force is applied to the topright corner, note that the optimization removes material around that area. The optimization was run for 500 iterations, but was still not converged. The resulting objective function is 3.15 times higher than the one associated with the optimal design. Total CPU-time is 1.3 times larger than the full optimization. 64 6. N UMERICAL E XAMPLES : O PTIMIZATION 6.3. OTHER ASPECTS OF OPTIMIZATION AND MODEL ORDER REDUCTION 6.3.1. O BJECTIVE FUNCTIONS In the previous chapter is was found that the objective function is an important factor in the MOR error in the sensitivity. A test was performed to see how this affects the optimization, see Table 6.5. In Section 5.5 it was found that the squared displacement objective resulted in the largest errors, while using the absolute displacement and dynamic compliance functions yielded significantly smaller errors. The effect of this is clearly visible in the results. When the number of basis vectors is increased, the optimized designs for the squared displacement converge towards the result of the full model. However, the other two objective functions converge much faster. This effectively means that using the squared displacement function necessitates a larger number of basis vectors to achieve similar convergence. Table 6.5: Numerical example 1: comparison of different objective functions and the effect of MOR. Data shown is the error in the objective function after 25 iterations. The error between the different objective functions should not be compared, only the trend for a specific objective is relevant. From this data, it is apparent that the choice of objective function affects the convergence with respect to the number of basis vectors. In Section 5.5 it was found that the squared displacement objective leads to less accurate sensitivities, this clearly results in slower convergence with respect to the number of basis vectors. MAM Full Φ = q i2 T Φ=f q Φ = |q i | 0 0 0 n = 25. −2 4.5 × 10 -1.8 × 10−5 -2.2 × 10−3 Ritz vectors n = 50 −3 4.3 × 10 -1.6 × 10−5 3.2 × 10−4 n =5 −4 3 × 10 5.2 × 10−8 -1.8 × 10−5 n = 25 −3 5.4 × 10 -5.8 × 10−8 -3.9 × 10−8 n = 50 −5 -8.1 × 10 -2.6 × 10−8 -3.6 × 10−7 n = 100 -4.5 × 10−6 -2.7 × 10−8 -3.1 × 10−8 6.3.2. O PTIMIZATION & A DAPTIVE M ODEL O RDER R EDUCTION In Section 4.3 two algorithms for adaptive model order reduction were defined. The first of these uses only model data, the second uses response data as well. The aim of both algorithms is to maintain a pre-defined accuracy for the model order reduction. To test this, three accuracy levels are defined. Reference values for the different error estimates were found experimentally (see Appendix D.4 for details). Only adaptivity in the number of Ritz vectors will be studied. The same methods could be used for the modal superposition method, but since this is not suitable for optimization this will not be investigated. Modal acceleration might be suitable for optimization, but the effect of the quasi-static correction cannot be estimated using the described methods. To test the performance of the algorithm, it was used on optimization example 1, for reference after every iteration the full model was used to calculate the accuracy. The results are shown in Fig. 6.4. The method is clearly not perfect. The initial estimate for the number of basis vectors is significantly different from the final values, leading to initial large variations in the MOR error. This is partly caused by large changes in the design in the first iterations. But it could still be improved with proper tuning of the parameters. After 10 iterations, the algorithm maintain a nearly constant number of basis vectors, which results in a constant MOR error in the response. However, as seen before in this research, this does not always translate into accurate sensitivities. Next it will be checked whether the method does result in an optimal design. Using the same three settings for the accuracy, the first numerical example was optimized. The results after 25 iterations and of the converged solution can be found in Tables 6.6 and 6.7. These are similar to the results for a fixed number of Ritz vectors: even for low accuracy, the convergence is similar to that of the full model. Summarizing, the results show that the adaptive MOR method is effective. While there is no clear performance benefit over using a fixed number of basis vectors, it is still an important step towards an automatic implementation of model order reduction, for example as part of a finite element and optimization software package. 6.3. OTHER ASPECTS OF OPTIMIZATION AND MODEL ORDER REDUCTION 10-3 10-2 MOR error in sensitivity MOR error in response 10-4 10-6 MAM Ritz low acc. Ritz medium acc. Ritz high acc. -8 10 10-10 10-12 65 0 10 20 30 40 50 MAM Ritz low acc. Ritz medium acc. Ritz high acc. 10-4 10-5 10-6 10-7 0 10 20 30 40 50 Iteration number Iteration number (a) MOR error in response during optimization. (b) MOR error in sensitivities during optimization. 45 Number of basis vectors 40 35 MAM Ritz low acc. Ritz medium acc. Ritz high acc. 30 25 20 15 10 5 0 0 10 20 30 40 50 Iteration number (c) Number of basis vectors during optimization. Figure 6.4: Test of AMOR algorithms in optimization loop. The tested problem is optimization example 1. The initial estimate for the number of basis vector is different than the final value, leading to a non-constant accuracy in the first iterations. But Algorithm 4.2 is effective: the final accuracy of the response is constant. However, this does not guarantee accurate sensitivities. Table 6.6: Results for topology optimization with adaptive model order reduction. Accuracy: Full Low Medium High Average nr. of basis vectors CPU-time Error in obj. 1 0 5 0.179 5 × 10−8 7.9 0.180 -3.7 × 10−7 46.4 0.231 -1.34 × 10−5 Table 6.7: Results for topology optimization with adaptive model order reduction. Accuracy: Full Low Medium High Average nr. of basis vectors Nr. of iterations Error in obj. 152 0 5 152 -3.4 × 10−7 8 152 3.6 × 10−9 58.8 150 -3.6 × 10−5 66 6. N UMERICAL E XAMPLES : O PTIMIZATION 6.3.3. P ENALIZATION AND TRANSIENT PROBLEMS Up to this point using PI penalization has led to black-white designs. However, as discussed in Section 2.2.1, this might not be true for all transient problems. An example of this can be found by studying a problem similar to example 1. But instead of minimizing the displacement, the displacement with respect to a predecribed curve will be minimized. As reference curve a constant value is used. This is chosen to be approximately twice the value of the static displacement of the previously found optimized structure (Fig. 6.1b). Thus the goal of the optimization is no longer to minimize displacement. A lower stiffness does not necessarily result in a higher objective function, which is the assumption behind the SIMP/RAMP/PI methods. (a) Optimal design. Note the grey area in the top-right corner, penalization fails to remove all grey areas in this case. (b) Response of optimal design versus time. The reference curve is also drawn, the optimization attempts to minimize the difference (red area) between the response and the reference. Figure 6.5: Result for optimization problem with non-zero reference curve. The used penalization method is shown to be ineffective for this example. Therefore for some optimization problems alternative penalizations methods will have to be used, for example the material penalization method proposed by van de Ven et al. [4]. But in most cases the PI penalization method will be sufficient. 6.4. S UMMARY & D ISCUSSION In the previous chapter it was found that using model order reduction can significantly reduce the costs of simulation and sensitivity analysis for topology optimization. This does lead to errors in the sensitivities. The aim of this chapter was to see the effect of these errors on the complete optimization process. The results show that very inaccurate sensitivities, such as those found by the MSM or the MAM with a small basis, will lead to suboptimal designs. When the sensitivities are more accurate the convergence of the reduced model is nearly identical to that of the full model. The most efficient method was found to be model order reduction using a small basis of Ritz vectors. Two important conclusions can be drawn when these results are compared to literature. The first is that the MAM is more efficient than reported in previous research. The second is that the Ritz vector method can be used to lower computational costs even farther. 7 C ONCLUSIONS & R ECOMMENDATIONS 7.1. C ONCLUSIONS At the start of this project, two research questions were defined. These were: can model order reduction be applied to increase the efficiency of topology optimization for transient, linear structural problems; and can this be used in engineering practice. The answer to both questions is yes, in most cases applying model reduction is possible, and this can increase the efficiency of the optimization. In more detail, the following conclusions are drawn: • By applying model order reduction, the costs of topology optimization for time domain structural dynamics can be significantly decreased. – The increase in computational speed is dependent on parameters, most notably the number of time steps and the required number of basis vectors. – For the numerical examples included in this research, a speed-up of a factor 20 was shown for the time integration. This results in a factor 8 speed-up for the total optimization. The computational efficiency increases with the size of the system, as well as with the number of time steps in the time integration. – Applying model order reduction reduces the memory requirements. In the numerical examples a factor 30 decrease in memory use was shown. The relative decrease in memory is approximately equal to the number of DoFs in the full system divided by the number of basis vectors, thus it will also be even more beneficial for larger systems. – Using a reduced basis consisting of Ritz vectors is in most cases more efficient than the modal superposition or modal acceleration method. • The performance of the optimization is dependent on the error caused by the model order reduction. – A large MOR error results in poor convergence. This was shown for the modal superposition method, and in some cases for the modal acceleration method when the number of basis vectors is small. – Decreasing the error below a certain level does not increase the convergence rate of the optimization. For the shown examples this corresponds to using as little as five Ritz vectors. – When compared to the modal acceleration method, the Ritz vector method is cheaper, and results in smaller errors with respect to the full model. – For MOR using Ritz vectors, neglecting basis vector sensitivities does not lead to a significant error. – An algorithm is proposed for determining the optimal number of basis vectors. This does not improve the performance of the optimization, but it is helpful in automating the process. • Model order reduction can be applied to most optimization problems involving linear transient dynamics. For this to be efficient, the requirements are: – The number of time steps must be significantly larger than the required number of basis vectors. – The applied load should consist of a constant spatial term, possibly multiplied by a non-constant temporal term. So the force should be of the form f = L f t (t ). This is a necessary condition for both Ritz vectors and the modal acceleration method. A combination of a small number of these forces is also possible. 67 68 7. C ONCLUSIONS & R ECOMMENDATIONS – The same requirement applies to the derivative possibly multiplied by a non-constant scalar. ∂Φ ∂q , this should also be a constant spatial term – The choice of objective function influences the error in the sensitivities. The error will be larger when the derivative ∂Φ ∂q is highly dependent on q. Concluding, model order reduction is a promising tool in topology optimization for transient structural dynamics, it can be used to significantly reduce the computational costs. This will bring successful industrial applications one step closer. 7.2. R ECOMMENDATIONS The proposed method can be improved in many ways, further research on the following topics is recommended: • Using results from previous iterations to make the model order reduction more efficient. Possibilities are: – Updating or reusing of basis vectors instead of recomputing them. The method described in Section 2.5.6 can be improved. – Calculating a set of basis vectors from the dynamic response of the previous iteration, for example using Proper Orthogonal Decomposition. • Detailed research into the link between penalization, conditioning of the system matrices, and accuracy of the Ritz vector method. • Investigate whether the adjoint variable can be computed cheaply when using the dynamic compliance objective function. • Combination of model order reduction and additional constraints, such as on maximum displacement or stress. • Investigate adaptive model order reduction with varying accuracy, for example with higher accuracy in the final iterations to ensure optimality. • Extension to non-linear structural mechanics. This will have many useful applications, for example in designing structures for impact response. A B IBLIOGRAPHY [1] J. D. Deaton and R. V. Grandhi, A survey of structural and multidisciplinary continuum topology optimization: post 2000, Structural and Multidisciplinary Optimization 49, 1 (2013). [2] J. Zhu, W. Zhang, and P. Beckers, Integrated layout design of multi-component system, International Journal for Numerical Methods in Engineering 78, 631 (2009). [3] N. L. Pedersen, Maximization of eigenvalues using topology optimization, Structural and multidisciplinary optimization 20, 2 (2000). [4] E. van de Ven, E. Hooijkamp, M. Langelaar, and F. van Keulen, Topology optimization of a transient thermo-mechanical problem using material penalization, 11th World Congress on Structural and Multidisciplinary Optimization . [5] N. Aage, M. Nobel-Jørgensen, C. Andreasen, and O. Sigmund, Interactive topology optimization on handheld devices, Structural and Multidisciplinary Optimization 47, 1 (2013). [6] O. Sigmund and J. Petersson, Numerical instabilities in topology optimization: A survey on procedures dealing with checkerboards, mesh-dependencies and local minima, Structural Optimization 16, 68 (1998). [7] M. P. Bendsoe and O. Sigmund, Topology optimization: theory, methods and applications (Spinger, 2003). [8] K. Svanberg, The method of moving asymptotes- a new method for structural optimization, International journal for numerical methods in engineering 24, 359 (1987). [9] K.-J. Bathe, Finite element procedures (Prentice Hall, 1996). [10] T. J. Hughes, The finite element method: linear static and dynamic finite element analysis (Courier Corporation, 2000). [11] K. K. Choi and N.-H. Kim, Structural sensitivity analysis and optimization 1: linear systems (Springer, 2006). [12] B.-S. Kang, G.-J. Park, and J. S. Arora, A review of optimization of structures subjected to transient loads, Structural and Multidisciplinary Optimization 31, 81 (2006). [13] F. van Keulen, R. T. Haftka, and N. H. Kim, Review of options for structural design sensitivity analysis. part 1: Linear systems, Computer Methods in Applied Mechanics and Engineering 194, 3213 (2005). [14] E. v. d. Ven, Topology optimization for transient-thermal-mechanical systems (msc. thesis), (2014). [15] G. N. Vanderplaats, Comment on" methods of design sensitivity analysis in structural optimization", AIAA Journal 18, 1406 (1980). [16] A. D. Belegundu and J. S. Arora, A sensitivity interpretation of adjoint variables in optimal design, Computer methods in applied mechanics and engineering 48, 81 (1985). [17] G. H. Yoon, Structural topology optimization for frequency response problem using model reduction schemes, Computer Methods in Applied Mechanics and Engineering 199, 1744 (2010). 69 70 A. B IBLIOGRAPHY [18] B. Besselink, U. Tabak, A. Lutowska, N. van de Wouw, H. Nijmeijer, D. J. Rixen, M. E. Hochstenbach, and W. H. A. Schilders, A comparison of model reduction techniques from structural dynamics, numerical mathematics and systems and control, Journal of Sound and Vibration 332, 4403 (2013). [19] C. Gogu, Improving the efficiency of large scale topology optimization through on-the-fly reduced order model construction, International Journal for Numerical Methods in Engineering 101, 281 (2015). [20] D. J. Rixen, Engineering Dynamics - WB1418 Lecture notes (2008). [21] D. J. Rixen, Numerical methods in Engineering Dynamics - WB1416 Lecture notes (2011). [22] R. D. Cook, D. S. Malkus, and M. E. Plesha, Concepts and Applications of Finite Element Analysis (John Wiley & Sons, 2002). [23] E. L. Wilson, M.-W. Yuan, and J. M. Dickens, Dynamic analysis by direct superposition of Ritz vectors, Earthquake Engineering & Structural Dynamics 10, 813 (1982). [24] D. C. Lay, Linear algebra and its applications, Addison-Wesley Publishing Company 3, 124 (2003). [25] P. Léger and E. L. Wilson, Generation of load dependent ritz transformation vectors in structural dynamics, Engineering Computations 4, 309 (1987). [26] J. Gu, Z.-D. Ma, and G. M. Hulbert, A new load-dependent Ritz vector method for structural dynamics analyses: quasi-static Ritz vectors, Finite Elements in Analysis and Design 36, 261 (2000). [27] G. H. Yoon, Toward a multifrequency quasi-static Ritz vector method for frequency-dependent acoustic system application, International Journal for Numerical Methods in Engineering 89, 1451 (2012). [28] R. J. Guyan, Reduction of stiffness and mass matrices, AIAA journal 3, 380 (1965). [29] Y. C. Liang, H. P. Lee, S. P. Lim, W. Z. Lin, K. H. Lee, and C. G. Wu, Proper orthogonal decomposition and its applicationspart i: Theory, Journal of Sound and Vibration 252, 527 (2002). [30] J. Dickens, J. Nakagawa, and M. Wittbrodt, A critique of mode acceleration and modal truncation augmentation methods for modal response analysis, Computers & Structures 62, 985 (1997). [31] D. Rixen, Generalized mode acceleration methods and modal truncation augmentation, in Structures, Structural Dynamics and Material Conference and Exhibit, 42st AIAA/ASME/ASCE/AHS/ASC. AIAA, Vol. 1300. [32] D. d. Klerk, D. J. Rixen, and S. Voormeeren, General framework for dynamic substructuring: history, review and classification of techniques, AIAA journal 46, 1169 (2008). [33] A. Ibrahimbegovic and E. L. Wilson, Automated truncation of ritz vector basis in modal transformation, Journal of engineering mechanics 116, 2506 (1990). [34] B. Nortier, Residual Vectors & Error Estimation in Substructure based Model Reduction (MSc. thesis) (TU Delft, 2011). [35] J. S. Han, Calculation of design sensitivity for large-size transient dynamic problems using Krylov subspace-based model order reduction, Journal of Mechanical Science and Technology 27, 2789 (2013). [36] S. Voormeeren, Dynamic substructuring methodologies for integrated dynamic analysis of wind turbines (PhD. dissertation), (2012), http://dx.doi.org/10.4233/uuid:f45f0548-d5ec-46aa-be7e-7f1c2b57590d. [37] O. Amir and O. Sigmund, On reducing computational effort in topology optimization: how far can we go? Structural and Multidisciplinary Optimization 44, 25 (2010). [38] U. Kirsch, M. Bogomolni, and I. Sheinman, Efficient structural optimization using reanalysis and sensitivity reanalysis, Engineering with Computers 23, 229 (2007). [39] U. Kirsch, M. Kocvara, and J. Zowe, Accurate reanalysis of structures by a preconditioned conjugate gradient method, International Journal for Numerical Methods in Engineering 55, 233 (2002). 71 [40] J. Zhao and C. Wang, Dynamic response topology optimization in the time domain using model reduction method, Structural and Multidisciplinary Optimization , 1 (2015). [41] R. L. Fox and M. P. Kapoor, Structural optimization in the dynamics response regime - a computational approach, AIAA Journal 8, 1798 (1970). [42] W. H. Greene and R. Haftka, Computational aspects of sensitivity calculations in linear transient structural analysis, Structural optimization 3, 176 (1991). [43] S. Min, N. Kikuchi, Y. C. Park, S. Kim, and S. Chang, Optimal topology design of structures under dynamic loads, Structural optimization 17, 208 (1999). [44] C. B. W. Pedersen, Crashworthiness design of transient frame structures using topology optimization, Computer Methods in Applied Mechanics and Engineering 193, 653 (2004). [45] J. S. Han, E. B. Rudnyi, and J. G. Korvink, Efficient optimization of transient dynamic problems in MEMS devices using model order reduction, Journal of Micromechanics and Microengineering 15, 822 (2005). [46] H. Liu, W. Zhang, and T. Gao, A comparative study of dynamic analysis methods for structural topology optimization under harmonic force excitations, Structural and Multidisciplinary Optimization 51, 1321 (2015). [47] A. C. Paul, A. Dutta, and C. V. Ramakrishnan, Accurate computation of design sensitivities for dynamically loaded structures with displacement constraints, AIAA Journal 34, 1670 (1996). [48] J. S. Jensen, P. B. Nakshatrala, and D. A. Tortorelli, On the consistency of adjoint sensitivity analysis for structural optimization of linear dynamic problems, Structural and Multidisciplinary Optimization 49, 831 (2013). [49] E. Andreassen, A. Clausen, M. Schevenels, B. S. Lazarov, and O. Sigmund, Efficient topology optimization in MATLAB using 88 lines of code, Structural and Multidisciplinary Optimization 43, 1 (2010). [50] MathWorks, MATLAB Documentation: Techniques to Improve Performance (Access Date 04-12-15). [51] MathWorks, MATLAB Documentation: symamd, (Access Date 04-12-2015). [52] J. R. Gilbert, C. Moler, and R. Schreiber, SPARSE MATRICES IN MATLAB: DESIGN AND IMPLEMENTATION (Mathworks, 1991). [53] T. Lee, An adjoint variable method for structural design sensitivity analysis of a distinct eigenvalue problem, KSME International Journal 13, 470 (1999). [54] O. Amir, N. Aage, and B. S. Lazarov, On multigrid-CG for efficient topology optimization, Structural and Multidisciplinary Optimization 49, 815 (2013). [55] O. Sigmund and K. Maute, Topology optimization approaches, Structural and Multidisciplinary Optimization (2013), 10.1007/s00158-013-0978-6. [56] O. Sigmund, A 99 line topology optimization code written in MATLAB, Structural and Multidisciplinary Optimization 21, 120 (2001). [57] N. P. van Dijk, K. Maute, M. Langelaar, and F. van Keulen, Level-set methods for structural topology optimization: a review, Structural and Multidisciplinary Optimization 48, 437 (2013). [58] N. M. Patel, D. Tillotson, J. E. Renaud, A. Tovar, and K. Izui, Comparative study of topology optimization techniques, AIAA Journal 46, 1963 (2008). [59] N. M. Patel, B.-S. Kang, J. E. Renaud, and A. Tovar, Crashworthiness design using topology optimization, Journal of Mechanical Design 131, 061013 (2009). [60] M. P. Bendsøe and N. Kikuchi, Generating optimal topologies in structural design using a homogenization method, Computer methods in applied mechanics and engineering 71, 197 (1988). [61] S. Eddins, MATLAB Documenation: plotting the DTFT using the output of fft, access date 2015-09-15, (2010). B B ASIS VECTOR SENSITIVITIES In topology optimization adjoint methods are generally preferred over direct methods of sensitivity calculation. This section describes an adjoint method for eigenvector sensitivity and discusses the derivation of a similar method for Ritz vectors. B.1. E IGENVECTOR SENSITIVITIES For eigenvectors, there are multiple ways of calculating sensitivities. One way is by using the following adjoint formulation [53]: ΨA = Ψ(vi ) + γT (K − ω2i M)vi + µ(vTi Mvi − 1) . (B.1) This leads to the following sensitivity and adjoint equation: dΨA = γT (K′ − ω2i M)vi dx ][ ] [ ∂Ψ T − ∂v K − ω2i M′ −2Mvi γ i = ∂Ψ . µ 0 −2vTi M − 2 (B.2) (B.3) ∂ωi This approach does require the solution of Eq. (B.3) for every eigenvector sensitivity. Thus for transient sensitivity analysis one has to solve n additional equations. To put this into context, the calculation of the eigenvectors requires 2-4 solutions of a similar linear system per vector. B.2. R ITZ VECTOR SENSITIVITIES Calculating sensitivities of Ritz vectors is much more complex. There was no information found in literature on this subject. This section will explore the possibilities for direct differentiation and adjoint formulations for Ritz vectors. Direct differentiation is based on differentiation of the constitutive equation, while adjoint formulation are based on adding the constitutive equation multiplied by an adjoint variable to the objective function. The constitutive equations for Ritz vectors are: v1 = √ ṽ1 (B.4) ṽT1 Mṽ1 ṽ1 = K−1 f . (B.5) 1 For i > 1 : vi = √ v̂i (B.6) v̂Ti Mv̂i v̂i = ṽi − i∑ −1 j =1 ṽTi Mv j v j ṽi = K−1 Mvi − 1 . (B.7) (B.8) 1 Note that for simplicity instead of the modified Gramm-Schidt process the original Gramm-Schmidt process is used. The orginal process uses vT Mv j for j = 1, . . . , i − 1. The modified process is given in Algorithm 2.1, this replaces v j by the iterate of the previous step. i This is numerically less stable, but much simpler[24]. 73 74 B. B ASIS VECTOR SENSITIVITIES One might think that the procedure is similar to the sensitivity analysis for Kq = f, since the first Ritz vector is calculated using this. But there is also a scaling step, which complicates the procedure. Direct differentiation of the equation for v1 yields: ′ ṽ1 v′1 = √ = T ṽ1 Mṽ1 ṽ′1 √ ṽT1 Mṽ1 − ṽ1 (2ṽT1 Mṽ′1 +ṽT1 M′ ṽ1 ) √ 2 ṽT1 Mṽ1 ṽT1 Mṽ1 Kṽ′1 = f′ − K′ ṽ1 . (B.9) (B.10) It is possible to calculate the sensitivity of the first vector in this way, but this is clearly more expensive than a finite difference approximation. A cheap adjoint formulation also seems unlikely. This requires first of all that all terms containing v′i can be combined in an adjoint equations, preferably explicit. The remaining terms should also be cheap to evaluate. Both seem unlikely, the orthonormalization steps severely complicate the mathematics. To find a possible alternative, it is assumed that the scaling and orthogonalization terms are independent of x: [ T ]′ [ ]′ ṽi Mṽi = ṽTi Mv j ≈ 0 . (B.11) This is an unproven, possibly very inaccurate approximation, which will be tested later. But it does simplify the equations dramatically: [Kv1 − f ∗ 1/µ1 ]′ ≈ Kv′1 + K′ v1 − f′ ∗ 1/µ1 , (B.12) which is very similar to the sensitivity seen for the static problem in Section 2.4.4. An inexpensive adjoint formulation is possible in this case. This can be extended to the second Ritz vector: [ 0 = Kv2 − K ṽ2 − ṽT2 Mv1 v1 ( ≈ K v′2 − ]′ , µ2 ṽ′2 − ṽT2 Mv1 v′1 µ2 ) ṽ2 = K−1 Mv1 , µi = √ ṽTi Mṽi (B.13) ṽ2 − ṽT2 Mv1 v1 + K′ v2 − , µ2 {z } | Kṽ′2 = M′ v1 + Mv′1 − K′ ṽ2 . (B.14) =0 This leads to the following adjoint formulation: ) ( ( ) ṽ2 − ṽT2 Mv1 v1 T T ΨA = Ψ(v1 , v2 ) + γ1 Kv1 − f ∗ 1/µ1 + γ2 K v2 − (B.15) µ2 ) ( ( ′ ) M′ v1 − K′ ṽ2 − (ṽT2 Mv1 I + M)v′1 dΨA ∂Ψ ∂v1 ∂Ψ ∂v2 T ′ ′ T ′ . (B.16) ≈ + + γ1 Kv1 + K v1 − f ∗ 1/µ1 + γ2 Kv2 − K dx ∂v1 ∂x ∂v2 ∂x µ2 When the terms are regrouped, the adjoint equations can be extracted: ( ( ( ) ) ) ( ) ∂Ψ M′ v1 − K′ ṽ2 dΨA ∂Ψ ≈ + γT1 K + γT2 K(ṽT2 Mv1 I + M) v′1 + + γT2 K v′2 + γT1 K′ v1 − f′ ∗ 1/µ1 − γT2 K . dx ∂v ∂v µ2 {z } } | 1 | 2 {z Adjoint equation 1 Adjoint equation 2 (B.17) This can easily be extended to an arbitrary numbers of basis vectors, but that is not necessary at this point. The general procedure for the approximated adjoint method is clear: 1. Calculate basis vectors, storing intermediate vectors ṽi . 2. Solve highest adjoint equations to find γn . 3. Solve next adjoint equation to find γn−1 , etc., up to γ1 . B.2. R ITZ VECTOR SENSITIVITIES 75 4. Calculate adjoint sensitivity. This just consists of matrix multiplications, so it is relatively cheap. This procedure is similar to many other adjoint methods: the simulation is performed forwards, and a similar simulation is performed backwards. The main cost is the solution of the adjoint equations: this requires one solution of a linear system per basis vector. This is similar to the cost of generation the basis vectors, so it is much cheaper than finite difference or direct methods. However the entire derivation is reliant on the unproven assumption shown in Eq. (B.11). The best way of checking the validity of this assumption is by computing the sensitivity using the various methods. This was done by defining the objective function Ψ = LT v1 , and calculating the design sensitivity for the various methods. The results are shown in Figure B.1. Only the first basis vector is examined. The direct method is consistent with the finite difference method, so these are assumed to be relatively accurate. The approximate adjoint method leads to significant errors. To verify the role of assumption B.11, the direct method was changed to use the same assumption. The results are identical to the approximate adjoint method. Concluding, an efficient, accurate method has not been found. The approximate adjoint method leads to significant errors. Since it was found in Chapter 5 that Ritz vector sensitivities can be neglected, this subject was not investigated further. 2 4000 2000 0 Design sensitivity Design sensitivity 0 -2 -4 -6 -8 Finite difference Direct method Approximate adjoint Approximate direct -10 50 100 Design variable (a) Ritz vector sensitivity for L = 1. -4000 -6000 -8000 -10000 Finite difference Direct method Approximate adjoint Approximate direct -12000 -14000 -12 0 -2000 150 200 -16000 0 50 100 150 200 Design variable (b) Ritz vector sensitivity for L = 0, except for the last entry in L, which is 1. Figure B.1: Comparison of different methods of computing the sensitivity of the first basis vector. The approximated methods lead to significant errors. C A PPROACHES TO T OPOLOGY O PTIMIZATION Structural optimization is the process of finding the optimal shape of a structure. This is done by defining the geometry of the structure as a function of a number of variables, and finding the optimal value for these variables. Topology optimization is a special type of structural optimization which allows a lot of freedom for the design. In shape optimization, the design variables are usually associated with the size and position of an element. On the other hand, in topology optimization, the design variables determine the amount of material at a certain location. This generally leads to more design freedom, at the cost of an increase in the number of design variables. There are multiples approaches to topology optimization, these will be discussed in this chapter. C.1. L ITERATURE Within the vast amount of literature on topology optimization, recommended references are the standard book by Bendsoe and Sigmund [7] and review papers by Sigmund and Maute [55] and Deaton and Grandhi [1]. Also, the educational Matlab programs top99.m [56] and top88.m [49] are a great start for any research on this subject. C.2. A PPROACHES In topology optimization the first important choice is what type of design parameters to use. There are a few possibilities, the most common choices are: • Density based methods: also known as material distribution methods. In this approach the design space is divided into different elements, which are given a continuous density variable. These densities are the design variables. • Boundary evolution: the most common method here is the level-set method. In this approach instead of the elements the boundaries of the structure are controlled by the design parameters. There are many different possibilities here, see for example the recent review paper by van Dijk[57]. • Heuristic: in these methods, a model of the structure is made of the structure. From this model, we determine where to remove or add material, for example at a location with low respectively high stress. This approach is quite intuitive, and very different from the other approaches. Because of the heuristic algorithm and the discrete design variables, the optimality and convergence of the solution are difficult to prove. For highly non-linear problems they can be be efficient, for example using a biologically inspired optimization algorithm. See [58] for a comparative study, and [59] for an application. The boundary evolution methods have some advantages, most notably in that they can naturally produce black-and-white designs. In the majority of literature density based methods are used, because the procedures involved are simpler. C.2.1. D ENSITY BASED METHODS Within density based methods there are multiple ways to parametrize the system. The most notable choices all use the Finite Element Method, they are: 77 78 C. A PPROACHES TO T OPOLOGY O PTIMIZATION • Homogenization [60]: in this approach, the structure is divided into cells, each of which contains a small void. The size of this void is the design variable. Using homogenization theory, the full system can be analysed and optimized. This method has been replaced by the other methods named in this chapter. • Ground structure: in this approach, a structure is defined using a number of elements, usually Euler beams. See Fig. C.1 for an example. A size parameter of these elements is used as a design variable. This method allows relatively easy modelling of non-linear problems, by using a non-linear beam formulation. • ’Sheet thickness’: finally, in this approach, the structure is divided into elements. These are usually linear rectangular/cubical elements, but other shapes or higher order basis functions are possible. The material density of these elements is used as a design variable. In 2D, this could be interpreted as sheet thickness. (a) Different ground structures. (b) Example of optimized result. Figure C.1: Ground structures used in topology optimization, consisting of beams (lattice structure). Image source: [44]. The size of these beams is used as design variable. The final two methods are most commonly used. One could argue that they are the same, just with a different element formulation and ground structure layout. In this research, the ’sheet thickness’ density based approach is used, for an illustration see Fig. 2.1. D D ETAILS OF IMPLEMENTATION This chapter contains some additional details about the implementation of the methods discussed in this research. D.1. O VERVIEW OF PARAMETERS For the finite elements analysis a few parameters have to be selected, including material properties. These do not have a major influence on the outcome of this results, so a systematic investigation was deemed unnecessary. The material properties represent steel. The Rayleigh damping properties were chosen to reproduce the results from literature, or chosen such that the lowest frequencies are lightly damped. Table D.1: Values of physical parameters used in this research. Parameter In-plane thickness of elements Young Modulus Density Poisson ratio Rayleigh damping coefficient 1 (optimization example 2) Rayleigh damping coefficient 2 (optimization example 2) Rayleigh damping coefficient 1 (all other cases) Rayleigh damping coefficient 2 (all other cases) Symbol Value Unit E ρ ν α β α β 0.01 2 × 1011 7800 0.30 10 1 × 10−5 1 × 10−4 1 × 10−4 m N/m2 kg/m3 s−1 s s−1 s D.2. D ETAILS OF MATLAB IMPLEMENTATION The majority of the code was written by the author. There are a few notable exceptions: • When a built-in function exists, this is generally used, unless a significantly faster alternative can be found/created. • Some code from top88.m[49] is used, for example in matrix assembly. • The implementation of MMA was provided by its author, prof. Svanberg. • A few minor functions used in exporting figures were found on the MATLAB file exchange. The main code consists of a set of functions, for example for finite element analysis, Newmark integration, sensitivity analysis, etc, adding up to a combined total of approximately 2000 lines of code. Each function starts with documentation on its implementation and syntax. A user-friendly GUI is also included, which allows easy experimentation with topology optimization and MOR, as well as visualization of basis vectors and a few other features. To generate the various figures in this document a large number of scripts was created, which use the various functions to perform the described experiments. The full code is available upon request. 79 80 D. D ETAILS OF IMPLEMENTATION D.3. A LTERNATIVE S ENSITIVITY A NALYSIS In this research, the sensitivity analysis was based on first differentiating the governing equations, and performing temporal discretization second. According to literature [48], this leads to inconsistent sensitivities, as was discussed in Section 3.2.5. An alternative, more consistent method is based on the reverse approach: the equations are temporally discretized first, after which they are differentiated. This leads to a different set of discretized equations, for details see [48]. The resulting sensitivity is given by: ∫ T nt ∑ (D.1) Ψ= Φ(q) dt ≈ Φ(t i ) 0 i =1 nt ∑ ) ( dΨB = λT (t i ) f′ − M′ q̈(t i ) + C′ q̇(t i ) + K′ q(t i ) dt . dx i =1 (D.2) where ΨB is the augmented objective function. This consists of the objective Ψ with an additional adjoint term: the discretized equations of motion as found by the Newmark algorithm. The resulting sensitivity is much more accurate when using trapezoidal integration instead of summation [48], for brevity this is not shown in the equation. The summation symbols in the equations should be interpreted as trapezoidal integration. In this approach, the adjoint variable is calculated differently. This is briefly described here, using Λn t −i = λ(t i ) to simplify notations for backwards time integration. The following steps are performed sequentially: For i = 1: µ1 = ( 2 ) ∂Φ T (t = T ) ∂q ν1 = 0 (D.3) (D.4) 2 M + γhC + βh M Λi = −βh µ1 − γhν1 . (D.5) For 2 ≤ i < n t : ∂Φ T (t = T − t i ) + KΛi −1 + µi −1 ∂q ) ( νi = h KΛi −1 + µi −1 + CΛi −1 + νi −1 µi = ( ) M + γhC + βh M Λi = −βh 2 µi − γhνi − (0.5 − β)h 2 (KΛi −1 + µi − 1) − (1 − γ)h(CΛi −1 + νi −1 ) . Finally for i = n t : 2 ( ) MΛi = − (0.5 − β)h 2 ((KΛi −1 + µi − 1)) + (1 − γ)h(CΛi −1 + νi −1 ) . (D.6) (D.7) (D.8) (D.9) This looks much more complex than the other approach. But for the computation of µ and ν only a few matrix multiplications are needed. This make the total cost similar to the normal Newmark integration. Summarizing, two methods of computing λ were described. The first was directly based on the theory described in Section 2.4. This approach can be described as differentiate-then-discretize. According to the work of Jensen et al. [48], this can lead to inconsistent sensitivities. An second method named discretize-thendifferentiate is described, which is based on differentiating the discretized equations. This is slightly more expensive. Both methods have been implemented, only the computation of λ is changed. The accuracy and consistency of both methods will be investigated in Chapter 5. More important in the scope of this thesis is whether this consistency error is affected by model reduction. To test this, both methods of sensitivity analysis were used on the same problem, both with and without model reduction (using Ritz vectors). The used error measure is: ° ° ° dΨref dΨ ° ° ddi − ddi ° ° , ° 1 ≤ i ≤ n el . (D.10) e= ° dΨref ° ° ddi ° The difference between the two methods converges to zero for an increasing number of timesteps, as illustrated by Fig. D.1a. Model order reduction does not affect this error, the results are similar to those found by D.4. D ETAILS OF ERROR ESTIMATION 81 Jensen et al. [48]. Verifying whether the new method indeed leads to more consistent sensitivities is difficult, since the exact reference sensitivity is unknown. The best available approximate is the sensitivity of the full model, calculated using the new approach with the largest number of timesteps. When this is used as reference, the results shown in Fig. D.1b are found. Both methods can be implemented in the same code with minimal effort. Both were tested on a few optimization problems, where the new approach did not results in faster convergence. It is expected that other errors dominate the convergence, thus this was not investigated further. The original approach has the further benefit of allowing relatively easy analytical investigation of the effect of model order reduction, as seen in Section 4.1. 100 100 Full MOR n= 10 MOR n= 20 10 Normalized difference Normalized difference 10-1 10-2 10 -3 10-4 10-5 101 full diff->disc full disc-diff red n=10 diff->disc redn=10 disc-diff red n=20 diff->disc redn=20 disc-diff -1 10-2 10-3 10-4 10-5 102 103 104 105 10-6 101 Number of time steps 102 103 104 105 Number of time steps (a) Difference between both methods of sensitivity analysis versus number of time steps. The difference decreases when the number of timesteps increases, but more important: model order reduction (Ritz vectors) does not significantly change this. (b) Error with respect to accurate sensitivity (discretizedifferentiate on full model, for 32000 timesteps) for various methods, versus number of time steps. Figure D.1: Results of alternative sensitivity analysis. The data shows that model order reduction does not influence the difference between the two approaches. D.4. D ETAILS OF ERROR ESTIMATION The adaptive model order reduction algorithm using in this thesis relies on several error estimates, as explained in Section 2.5.5. This chapter discusses the associated details and results. D.4.1. F OURIER ANALYSIS OF LOAD The spectral load estimate is calculated by Eq. (2.50): e= max ωload , max ωred e= min ωred , min ωload (D.11) The frequency content of the model can be found by calculating the eigenvectors of the reduced model. The frequency of the load is more complicated. For harmonic loads this is directly available. However, for other cases such a step response it is not. To calculate the frequency content, the discrete time Fourier transform is employed (MATLAB: fft), following the procedure described by [61]. In the calculated frequency spectrum, a cut-off frequency is found such that 95% of the area below the spectrum is included. This frequency is used as ωload in the error estimate. D.4.2. D ETAILED RESULTS OF ERROR ESTIMATES In Chapter 5 the MOR error was investigated of the response calculated using the reduced model. This section details the results of the various error estimates. For both the step response and frequency response (Ω = 1 × 104 rad/s problems used in Chapter 5 this was studied, the results are shown in Fig. D.2. 82 D. D ETAILS OF IMPLEMENTATION 100 100 1 2 3 4 5 6 10-4 10-2 error measure [-] error measure [-] 10-2 10-6 10-8 10-10 1 2 3 4 5 6 10-4 10-6 10-8 0 20 40 60 80 10-10 100 0 20 40 n (a) Spatial load estimate for step response. 1 2 3 4 5 6 1 2 3 4 5 6 101 error measure [-] error measure [-] 100 102 101 100 10-1 100 10-1 0 20 40 60 80 10-2 100 0 20 40 n 80 100 (d) Spectral load estimate for frequency response. 100 100 1 2 3 4 5 6 1 2 3 4 5 6 10-10 error measure [-] 10-10 10-20 10-30 10-40 60 n (c) Spectral load estimate for step response. error measure [-] 80 (b) Spatial load estimate for frequency response. 102 10-2 60 n 10-20 10-30 0 20 40 60 n (e) Refinement estimate for step response. 80 100 10-40 0 20 40 60 80 100 n (f) Refinement estimate for frequency response. Figure D.2: Results of error estimatation. All estimates converge to zero, except for the spectral load estimate. Furthermore, the spatial load estimate is non-monotonic, making it less useful for adaptive model order reduction. The refinement estimates shows the desired monotonic convergence, which can be linked to the MOR errors found in Chapter 5. However, its magnitude is dependent on the frequency of the load, which implies that this should be taken into account when selecting the correct reference values.

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement