Optimization of bodies with locally periodic microstructure - - PowerPoint PPT Presentation
Optimization of bodies with locally periodic microstructure - - PowerPoint PPT Presentation
IRF2009 3 rd International Conference on Integrity, Reliability & Failure Porto, 20-24 July 2009 Optimization of bodies with locally periodic microstructure Cristian Barbarosie CMAF, Universidade de Lisboa joint work with Anca-Maria
Goal : Optimize the macroscopic properties (e.g. compliance) of a two-dimensional body made
- f a linearly elastic material and presenting locally
periodic (quasi-periodic) microscopic perforations.
IRF’2009 Cristian Barbarosie 1
Main ingredient : a code for optimizing the properties of a periodic microstruc- ture, by varying the shape and topology of the hole in the periodicity cell
- C. Barbarosie, Structural Optimization 1997, Computational Mechanics 2003 –
FORTRAN code, triangular finite element mesh on the two-dimensional torus, shape optimization through mesh variation
- C. Barbarosie, A.-M. Toader, Struct Multidisc Optim 2009, Shape and topology
- ptimization for periodic problems, Part I and Part II – topology optimization
added (hole nucleation), improved remeshing Finite element code for the macroscopic analysis, collaboration of Paulo Vieira (C++, libMesh) and of S´ ergio Lopes (FreeFem++) Interface (written in Python) between macroscopic and microscopic codes A similar approach, with a different treatment of the cellular problem :
- P. Coelho, P. Fernandes, J. Guedes, H. Rodrigues, Struct Multidisc Optim 2008
IRF’2009 Cristian Barbarosie 2
Linear elasticity −div (C∇u) = f in Ω u = 0
- n
ΓD (C∇u)n = g
- n
ΓN −(Cijkluk,l),j = fi in Ω ui = 0
- n
ΓD (Cijkluk,l)nj = gi
- n
ΓN Non-homogeneous material: C depends on x ∈ Ω. Small scale ε. Sequence Cε of tensor fields. −div (Cε∇uε) = f in Ω uε = 0
- n
ΓD (Cε∇uε)n = g
- n
ΓN Cε
ijkl ∈ L∞(Ω)
Which is the behaviour of the body (macroscopic behaviour) ?
IRF’2009 Cristian Barbarosie 3
Definition We say that a sequence Cε of elastic tensors H-converges to CH if, for any f ∈ L2(Ω) and for any g ∈ H1/2(ΓN), the solution uε ∈ H1(Ω) of problem −div (Cε∇uε) = f in Ω uε = 0
- n
ΓD (Cε∇uε)n = g
- n
ΓN converges, weakly in H1(Ω), to the solution u of problem −div (CH∇u) = f in Ω u = 0
- n
ΓD (CH∇u)n = g
- n
ΓN
IRF’2009 Cristian Barbarosie 4
For given α and β, 0 < α < β, we define Tα,β(Ω) as the space of all tensor functions C whose components belong to L∞(Ω) and such that Cξ ≤ βξ , ∀ ξ matrix Cξ, ξ ≥ αξ2 , ∀ ξ symmetric matrix Theorem The H-convergence defines a metrizable topology on Tα,β(Ω). The H-convergence has local character. Moreover, Tα,β(Ω) is a compact space when endowed with the H-topology.
IRF’2009 Cristian Barbarosie 5
Periodic microstructure: Cε(x) = C∗(x ε ), x ∈ Ω. C∗ : Rn → Rn×n×n×n periodic tensor field G periodicity group: C∗(x + v) = C∗(x) , ∀ x ∈ Ω , ∀ v ∈ G
IRF’2009 Cristian Barbarosie 6
For a periodic microstructure, the homogenized tensor CH is constant in Ω and can be defined in terms of cellular problems. For an arbitrary matrix A ∈ Rn×n
- −div (C∗∇w) = 0
in Rn w(x) = Ax + ϕ(x) , ϕ G−periodic w(y + v) = w(y) + A v , ∀ y ∈ Rn , ∀ v ∈ G A = 1 |Y |
- Y
∇wA CHA = 1 |Y |
- Y
C∗∇wA CHA, B = 1 |Y |
- Y
C∗∇wA, ∇wB
IRF’2009 Cristian Barbarosie 7
- −div (C∗(A + ∇ϕA)) = 0
in Rn ϕA G−periodic
- −div (C∗∇ϕA) = div (C∗A)
in Rn ϕA G−periodic CHA = 1 |Y |
- Y
C∗(A + ∇ϕA) CHA, B = 1 |Y |
- Y
C∗(A + ∇ϕA), (B + ∇ϕB)
- −div (C∗∇ϕA) = div (C∗A)
in Y ϕA G−periodic
IRF’2009 Cristian Barbarosie 8
Quasi-periodic microstructure: Cε(x) = C∗(x, x ε ), x ∈ Ω. C∗ : Rn×Rn → Rn×n×n×n pattern tensor field, periodic in the second argument G periodicity group: C∗(x, y + v) = C∗(x, y) , ∀ x ∈ Ω , ∀y ∈ Rn , ∀ v ∈ G
IRF’2009 Cristian Barbarosie 9
For a quasi-periodic microstructure, the homogenized tensor CH is no longer
- constant. It each point x ∈ Ω, the tensor CH(x) is defined in terms of a different
set of cellular problems, given by the pattern tensor field C∗(x, ·) :
- −div y(C∗(x, y)∇yw) = 0
in Rn w(y) = Ay + ϕ(y) , ϕ G−periodic A = 1 |Y |
- Y
∇wA CH(x)A = 1 |Y |
- Y
C∗(x, ·)∇wA CH(x)A, B = 1 |Y |
- Y
C∗(x, ·)∇wA, ∇wB
IRF’2009 Cristian Barbarosie 10
Macroscopic problem −div (CH∇u) = f in Ω u = 0
- n
ΓD (CH∇u)n = g
- n
ΓN Objective functional (e.g.) Φ =
- ΓN
gu = 2
- ΓN
gu −
- Ω
CH∇u, ∇u Constraint on the volume of material : V =
- Ω
θ
IRF’2009 Cristian Barbarosie 11
Chain of dependencies : C∗(x, y) → CH(x) → Φ δC∗ → δCH → δΦ Macroscopic level : Φ = 2
- ΓN
gu −
- Ω
CH∇u, ∇u δΦ = 2
- ΓN
gδu −
- Ω
δCH∇u, ∇u − 2
- Ω
CH∇u, ∇δu δΦ = −
- Ω
δCH∇u, ∇u δV =
- Ω
δθ
IRF’2009 Cristian Barbarosie 12
Microscopic level – fixed x ∈ Ω : Isotropic elastic tensor C∗(x, y), of Lam´ e coefficients λ and µ. Shape variations :
Y T
DSCHA, B = 1 |Y |
- ∂T
- 2µe(wA), e(wB) + λtr(e(wa))tr(e(wB))
- τ,
n DSCH =
- ∂T
S τ, n
IRF’2009 Cristian Barbarosie 13
Topology variations : DT CHA, B(y) = − π |Y | λ + 2µ λ + µ
- 4µe(wA), e(wB)+
λ2 + 2λµ − µ2 µ tr(e(wA)) tr(e(wB))
- (y)
DT CH(y) = T(y)
IRF’2009 Cristian Barbarosie 14
The macroscopic domain Ω is divided in finite elements K1, K2, . . . , Kn. In each Ke, a periodic pattern tensor field C∗
e(y) is considered, which gives rise to
the homogenized elastic tensor CH
e , with local material density θe.
Each periodic microstructure C∗
e is optimized, by using the chain of derivatives
presented above. Shape optimization and topology optimization steps (at the cellular level) are alternated.
IRF’2009 Cristian Barbarosie 15
For the case of (microscopic) shape variations, in each macroscopic finite element Ke consider a deformation field τe. The corresponding changes in the homogenized tensor CH
e and in the local density θe are:
δCH
e =
1 |Y |
- ∂Te
Se τe, n δθe = 1 |Y |
- ∂Te
- τe,
n This gives, for the macroscopic functional : δ(Φ + ΛV ) = −
- Ω
δCH∇u, ∇u + Λ
- Ω
δθ = −
- e
- ∂Te
Se,
- Ke
∇u ⊗ ∇u τe, n + Λ
- e
|Ke|
- ∂Te
- τe,
n =
- e
|Ke|
- ∂Te
γe τe, n γe are computable functions, depending on the macroscopic strain ∇u and on the microscopic solutions wA in the periodicity cell in Ke. For a steepest descent method, simply choose deformation fields τe = −γe n.
IRF’2009 Cristian Barbarosie 16
For (microscopic) topology variations, pick a macroscopic finite element Ke; consider a virtual nucleation of a small hole at location y in the periodicity cell Y . Then the corresponding variation in the lagrangean is δ(Φ + ΛV ) = −
- Ω
δCH∇u, ∇u + Λ
- Ω
δθ = −Te(y),
- Ke
∇u ⊗ ∇u ρ2 + Λ|Ke|ρ2 = |Ke| ηe(y)ρ2 Find the minimum point of the scalar function ηe defined in the periodicity cell Y . If the minimum value is negative, nucleate a small hole at the minimum point.
IRF’2009 Cristian Barbarosie 17
Control flow diagram
- Ke
∇u ⊗ ∇u
compute homogenized elastic coefficients and material density
- r topology optimization step
in each periodicity cell perform a shape optimization compute sensitivities solve macroscopic elastic problems(s) yes stop (globally) periodic microstructure Initiate process with convergence ? no IRF’2009 Cristian Barbarosie 18
Data flow diagram
- Ke
∇u ⊗ ∇u
CONTROL SCRIPT
- ptmization parameters
homogenized elastic coefficients densities sensitivities MACROSCOPIC ANALYSIS C++ libmesh FreeFem++ FORTRAN Python (shape, topology) MICROSCOPIC OPTIMIZATION sensitivities coefficients homogenized elastic IRF’2009 Cristian Barbarosie 19
- 100
200 50 150 140 160 180 200 Lagrangean 100 200 50 150 30 40 compliance 100 200 50 150 0.6 0.8 1 1.2 1.4 volume
IRF’2009 Cristian Barbarosie 20
- 100
200 300 400 500 600 140 160 180 200 Lagrangean 100 200 300 400 500 600 30 40 35 45 compliance 100 200 300 400 500 600 0.8 1 1.2 1.4 volume
IRF’2009 Cristian Barbarosie 21
- 100
200 300 130 150 170 190 Lagrangean 100 200 300 20 30 40 25 35 convex combination of compliances 100 200 300 0.7 0.9 1.1 1.3 volume
IRF’2009 Cristian Barbarosie 22
First version (parallel, naive) : the code launches m microscopic optimization processes, keeps a list of running processes, waits for the first one to finish, launches one more process and appends it to the list and so on. import subprocess list of procs = [] while True : while (len(list of procs)<m) and (. . . there still are undealt cells. . . ) : p = subprocess.Popen((optim cell executable,cell name), \ stdin=subprocess.PIPE, stdout=subprocess.PIPE) p.stdin.write(. . . data, parameters,. . . ) list of procs.append(p) if len(list of procs) == 0 : break p = list of procs[0] for line in p.stdout.readlines() : . . . manipulate the output : extract from line relevant informations. . . . . . e.g. homogenized elastic tensor and density. . . del list of procs[0]
IRF’2009 Cristian Barbarosie 23
Second version (parallel) : the code launches m microscopic optimization processes, keeps a list of running processes, selects the one which ends first, launches one more process and appends it to the list and so on. import select list of pipes = [] while True : while (len(list of pipes)<m) and (. . . there still are undealt cells. . . ) : p = subprocess.Popen(. . . same arguments. . . ) p.stdin.write(. . . data, parameters,. . . ) list of pipes.append(p.stdout) if len(list of pipes) == 0 : break a,b,c = select.select(list of pipes,[],[]) selected pipe = a[0] line = selected pipe.readline() . . . manipulate the output from line. . . if . . . the selected process has ended. . . : list of pipes.remove(selected pipe)
IRF’2009 Cristian Barbarosie 24
Third version (distributed) : the script connects to several machines and spreads microscopic optimization processes. import getpass, pexpect, pxssh password = getpass.getpass() for m in list of machines : ssh m = pxssh.pxssh() ssh m.login (m,’user name’,password) sftp m = pexpect.spawn(’sftp’,[m]) sftp m.expect (’password:’) sftp m.sendline (password) It keeps track of execution times for each process in each machine, thus re- evaluating constantly the performance of each machine. It then migrates cellular processes from less performant machines towards faster ones.
IRF’2009 Cristian Barbarosie 25
Conclusions :
- Code on two levels : macroscopic analysis (provides sensitivities) and microsopic
- ptimization and analysis (provides homogenized tensor)
- Heavy problem : hundreds/thousands of cellulars problems, each with its finite
element mesh (on torus)
- Easy to treat in parallel
- The scripting language Python is apropriate for managing many processes and
for distributing them among different machines linked through the internet
- Limitations : two-dimensional code (for periodic microstructures)
fixed periodicity group http://cmaf.ptmat.fc.ul.pt/~barbaros/en
IRF’2009 Cristian Barbarosie 26
Question : is this really different from optimizing directly 600 holes in the macroscopic domain ? The complexity is roughly the same.
IRF’2009 Cristian Barbarosie 27