optology optimization and jump · 2020-06-08 · e v; (1d) x e 2f0 ;1 g 8e (1e) c: compliance,...

36

Upload: others

Post on 13-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Topology Optimization and JuMPImmense Potential and Challenges

Mohamed Tarek Mohamed

School of Engineering and Information Technology

UNSW Canberra

June 28, 2018

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 2: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Introduction

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 3: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

About Me

First year PhD student at UNSW Canberra

Multidisciplinary design optimization labSupervisor: Tapabrata Ray

Background:

BSc mechanical engineeringMSc industrial engineering

Research interests:1 Topology optimization algorithms2 Topology optimization and nite element modelling3 Multigrid methods and scalable topology optimization

NumFOCUS GSoC student

Locally optimal block preconditioned conjugate gradient(LOBPCG) in IterativeSolvers.jlBuckling analysis

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 4: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Structure Design

20mm

60mm

F = 1 N

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 5: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Structure Design

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 6: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Problems

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 7: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Problem Families

Variables:

1 Each optional mesh elementcorresponds to a variable,

2 Can be binary or continuous(variable thickness sheet)

Objectives:

1 Compliance minimization,

2 Material volume/costminimization,

3 Maximum stressminimization, or

4 Minimum eigenvaluemaximization.

20mm

60mm

F = 1 N

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 8: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Problem Families

Constraints:

1 Volume constraint,

2 Maximum complianceconstraint,

3 Maximum displacementconstraint,

4 Local/global stressconstraints,

5 Fatigue constraints,

6 Global stability constraints,and/or

7 Others.

20mm

60mm

F = 1 N

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 9: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Problem Families

Mechanical systems:

1 Linear, elastic, quasi-staticsystem,

2 Nonlinear, compliantmechanism,

3 Nonlinear, elasto-plasticsystem,

4 Linear/nonlinear vibratingsystem, or

5 Others.

20mm

60mm

F = 1 N

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 10: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Problem Families

Loads:

1 Single or multiple,

2 Static or dynamic,

3 Deterministic or stochastic,and

4 Design-dependent ordesign-independent.

20mm

60mm

F = 1 N

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 11: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Pipelines

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 12: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Topology Optimization Pipelines

User's Pipeline1 Problem context denition

Initial design in mesh formBoundary conditionsFixed cells, not allowed to changeDened programmatically or through .inp and similar les

2 Objective and constraint selection3 Topology optimization algorithm

Nested Analysis and Design (NAND), orSimultaneous Analysis and Design (SAND)

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 13: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Topology Optimization Pipelines

Nested Analysis and Design (NAND) Pipeline1 Decide material distribution variables

Does this element exist or not?Binary ∈ 0, 1, or relaxed ∈ [0, 1]

2 FEA

Cannot fully remove an element (numerical instability)xsoft = x(1− xmin) + xmin, xmin = 0.001Makes use of matrix-free linear system and eigenvalue solversCan be GPU-accelerated or distributed on many computers

3 Objective and constraint values and derivatives

Adjoint method: dierentiating through the analysis equationsWhen binary constraints are relaxed, "penalized" variables, i.e.xpenal = xp

soft are often used, for some known penalty typically1 < p ≤ 5.

4 Update material distribution and repeat

Optimization magic!

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 14: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Topology Optimization Pipelines

Simultaneous Analysis and Design (SAND) Pipeline1 FEA

Formulate the analysis equations as constraintsAnalysis variables are decision variables

2 Optimization modelling

Write the composite analysis-design problem as a biggeroptimization problemMaterial distribution decision variables xAnalysis decision variables, e.g. nodal displacements uAnalysis constraints, e.g. Ku = f and K =

∑e xpenal,eKe

Design constraints, e.g. σve ≤ σy , ∀e

3 Optimization magic!

Single pass

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 15: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Examples

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 16: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Example Problem 1

Volume constrainedcompliance minimization

Analysis: 1b and 1cDesign: 1a and 1dCheq lter not shown

minimizex

C = uTKu (1a)

subject to

Ku = f , (1b)

K =∑e

ρpeKe , (1c)∑e

vexe ≤ V , (1d)

xe ∈ 0, 1 ∀e (1e)

C : Compliance, convex in x

u: Displacements

K : Global stiness matrix

f : Load vector

Ke : Element stiness matrix e

ve : Volume of element e

xe : Does element e exist?

ρe : Soft xe := xe(1− xmin)+ xmin

V : Volume threshold

p: Known as the "penalty"typically ∈ [1, 5]

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 17: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Example Problem 2

Stress constrained volume minimization

σeij is the stress tensor inside element e linear in u

(σve )

2xe ≤ σ2yxe is also a valid constraint since σve ≥ 0 and xe is

binary(σv

e )2xe ≤ σ2yxe is bi-convex in u and xe

minimizex

∑e

vexe

subject to

(1b),

(1c),

σve xe ≤ σyxe ∀e,xe ∈ 0, 1 ∀e

σve :=

(1

2(σe11 − σe22)2 +

1

2(σe22−

σe33)2 +

1

2(σe33 − σe11)2 + 3(σe12)

2+

3(σe23)2 + 3(σe31)

2

) 12

∀e

σy : yield stress of the material

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 18: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Example Problem 3

Buckling constrained volume minimization

Positive semidenite constraintK is a linear function of xKσ is a bi-linear function of u and x

minimizex

∑e

vexe

subject to

(1b),

(1c),

Kσ =∑e

xe

∫Ωe

GeTψe

GedV ,

K + λsKσ < 0,

xe ∈ 0, 1 ∀e

Kσ: Stress stiness matrix

λs : Load multiplier under whichdesign must be stable

σe : matrix form of σeij from theprevious slide

ψe := kron(Idim×dim, σe)

G e : basis function derivatives ofelement e arranged in a specialorder

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 19: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Algorithms

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 20: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Algorithm Classication Tree

Acronyms:

SAND: Simultaneous analysis and design

NAND: Nested analysis and design

MINL-SDP: Mixed integer nonlinear and semideniteprogramming

INL-SDP: Integer nonlinear and semidenite programming(no continuous variables)

NL-SDP: Nonlinear and semidenite programming

SIMP: Solid isotropic material with penalization

BESO: Bi-directional evolutionary structural optimization [1]

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 21: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Algorithm Classication Tree

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 22: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Why am I here?

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 23: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Next Generation Topology Optimization

Continuous and binary variables

Flexible constraint handling

Block constraints with Jacobian of xed sparsity patternBi-linear, bi-convex and nonlinear constraintsConic constraintsPartial structure, e.g. some bi-linear and some bi-convex

Linear time and memory complexity

Can have 100s of millions of variables

Numerically robust to scaling

Scalable optimization pipeline (pre-processor and solver)

Eciently GPU-acceleratedEciently distributed to multiple machines

Single- and multi- objective

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 24: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Next Generation Topology Optimization

Possible with Julia's optimization ecosystem?

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 25: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Next Generation Topology Optimization

What can I oer?

Prayers!

Oh and I am ready to code (after paper submissions andGSoC!).

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 26: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Demo

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 27: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Demo

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 28: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Further Readings I

[1] Xiaodong Huang and Yi Min Xie. A further review of ESO type methodsfor topology optimization. Structural and Multidisciplinary Optimization,41(5):671683, 2010.

[2] Xia Liu, Wei-Jian Yi, Q.S. Li, and Pu-Sheng Shen. Genetic evolutionarystructural optimization. Journal of Constructional Steel Research,64(3):305311, 2008.

[3] K Svanberg. The method of moving asymptotes - a new method forstructural optimization. International Journal for Numerical Methods in

Engineering, 24(2):359373, 1987.[4] Krister Svanberg. A Class of Globally Convergent Optimization Methods

Based on Conservative Convex Separable Approximations. SIAM Journal

on Optimization, 12(2):555573, 2002.

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 29: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Questions?

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 30: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Extras

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 31: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Method of moving asymptotes (MMA)

Most popular nonlinear programming algorithm used intopology optimization

Sequential convex programming

First order approximation of f with respect to 1x−L or 1

U−x ,whichever is convex given the sign of f ′(x)

Originally proposed in [3]

Later improved and similar algorithms were proposed in [4]

Dual algorithm is fully separable so it can be GPU-acceleratedand distributed

Only handles inequality constraints

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 32: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Adjoint method

ρe = xe(1− xmin) + xmin

C = u ′Ku

K is an explicit function of x : K (x) =∑

e ρpeKe

u is an implicit function of x : K (x)u(x) = f

Using product and chain rules: dCdxe

= −(1− xmin)pρp−1e u ′Keu

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 33: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Implementation State

Modular experimental platform was setup:

> 5000 lines of Julia code across a few packages

TopOpt.jl (main, unpublished)TopOptProblems.jlLinearElasticity.jlJuAFEM.jlIterativeSolvers.jlPreconditioners.jl

Direct dependencies

FEA: JuAFEM.jl, Einsum.jl, IterativeSolvers.jl,Preconditioners.jl, StaticArrays.jlOptimization: Optim.jl, MMA.jlVisualization: Plots.jl, Makie.jl

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 34: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Supported Features

Finite element modelling1 Material: linearly elastic.2 Mesh: homogeneous 2D or 3D unstructured mesh of tri, quad,

tetra or hexa elements.3 Boundary conditions: nodal and face Neumann and Dirichlet

boundary conditions.4 Import: model can be imported from .inp les.5 Analysis: compliance, stress and buckling analysis.

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 35: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Supported Features

Linear system solver1 Direct sparse solver2 Assembly-based CG method3 Matrix-free CG method

Eigenvalue solver1 Assembly-based LOBPCG method

Mohamed Tarek Mohamed Topology Optimization and JuMP

Page 36: opTology Optimization and JuMP · 2020-06-08 · e V; (1d) x e 2f0 ;1 g 8e (1e) C: Compliance, convex in x u : Displacements K : Global sti ness matrix f : Load vector K e: Element

Introduction Problems Pipelines Examples Algorithms Why am I here? Demo References Extras

Supported Features

Topology optimization1 Chequerboard lter for unstructured meshes2 Can x some cells as black or white3 Compliance objective4 Volume constraint5 SIMP

MMA.jl [3]Continuation SIMP

6 Soft-kill BESO [1]7 Genetic Evolutionary Structural Optimization (GESO) [2]

Mohamed Tarek Mohamed Topology Optimization and JuMP