Inverse Design (and a lightweight introduction to the Finite Element Method) Stelian Coros
Computational Design Forward design: direct manipulation of design parameters Level of abstraction Exploration of design spaces Inverse design: automatically infer design parameters from functional specifications Optimization-based
Computational Design of Actuated Deformable Characters, Skouras et al, 2013 Inverse Design Example Design an object that can deform like this: Need model that predicts the way in which objects deform Design parameters: material parameters, points of application for forces or constraints
A Lightweight Introduction to the Finite Element Method
The plan Start with a quick review of mass-spring systems Modeling deformable objects using continuum mechanics and the finite element method
Mass Spring Systems One way of modeling deformable objects is as a network of masses and springs Spring Mass
Mass Spring Systems 1 mass point, 1 spring l 0 l y i X y i x Spring length before/after l = x - y i l 0 = X - y i Deformation Measure Elastic Energy Forces Stiffness Direction Vector f int (x) = Deformation Measure
Mass Spring Systems Things to note: In the absence of external forces, elastic objects return to reference (undeformed) configuration Hyperelastic assumption: deformation energy depends only on deformed configuration: elastic forces are conservative
Mass Spring Systems The acceleration of a point mass is given by: ma = f int (x) + f ext Use standard methods to integrate this system forward in time to compute motion Or compute static equilibrium configuration Principle of minimum potential energy A mechanical system in static equilibrium will assume a state of minimum potential energy: find x to minimize W(x), or equivalently, such that f int (x) + f ext = 0
Mass Spring Systems f int (x) =
Mass Spring Systems: Simulation Pseudocode a0 //Array of accelerations v0 //Array of velocities p0 //Array of positions For each particle, p mmass of the particle fsum of all spring forces acting on the particle a[p]f/m End vintegrate(a) pintegrate(v)
Mass Spring Systems Can be used to model arbitrary deformable objects, but Behavior depends on tessellation Find good spring layout Find good spring constants Different types of springs interfere Limited accuracy No explicit volume or area preservation
Alternative Start from continuum mechanics Discretize with Finite Elements Decompose model into simple elements Setup & solve system of algebraic equations Advantages Accurate and controllable material behavior Largely independent of mesh structure
Mass Spring vs Continuum Mechanics Mass spring systems require: 1. Measure of Deformation 2. Material Model 3. Deformation Energy 4. Internal Forces Continuum Mechanics relies on conceptually identical pieces of information
Continuum Mechanics: 3D Deformations For a deformable body, identify: undeformed state 3 R described by positions deformed state 3 ' R described by positions Displacement field u describes ' u : ' x X u(x ) in terms of X x z u(x) ' X x u(x ) y x
Continuum Mechanics: 3D Deformations Consider material points 1 and X 2 and d X such that 2 X 1 is infinitesimal Now consider deformed vector x d' x x X u X ) X u( ) z 2 X 1 d 1 X 2 d d y X d 2 ( 2 1 X1 u( X1 d) u( X1) u( x1) ud u( x1) d' x 1 d' ' x 2 ( I u)d u Deformation x gradient F= X xu xv xw u y y y v w u z v z w z
So Displacement field transforms points Jacobian transforms directions x X u(x ) d' ( I u) d Fd Deformation x gradient F= X
Displacement Field and Deformation Gradient In general, displacement field is not explicitly described. Nevertheless, toy examples:
Displacement Field and Deformation Gradient In general, displacement field is not explicitly described. Nevertheless, toy examples:
Displacement Field and Deformation Gradient In general, displacement field is not explicitly described. Nevertheless, toy examples:
Displacement Field and Deformation Gradient In general, displacement field is not explicitly described. Nevertheless, toy examples:
Displacement Field and Deformation Gradient In general, displacement field is not explicitly described. Nevertheless, toy examples:
Measure of deformations Displacement field transforms points x X u(x ) Jacobian transforms directions d' ( I u) d Fd How can we describe deformation at given point?
Back to spring deformation Deformation measure (strain): Equivalent to F! Undeformed spring: = 1 Undeformed (infinitesimal) continuum volume: = I
Strain (description of deformation in terms of relative displacement) Deformation measure (strain): Desirable property: if spring is undeformed, strain is 0 Can we find a similar measure that would work for an arbitrary volume?
3D Nonlinear Strain Recall: Displacement field transforms points Jacobian (i.e. deformation gradient) transforms vectors x X u(x ) d' ( I u) d Fd Idea: to quantify change in shape, measure change in squared length for any vector d' 2 d 2 d' T d' T d d d T ( F T F I) d Green strain 1 T E ( F F I) 2
Strain (description of deformation in terms of relative displacement) Deformation measure (strain): Property: if spring is undeformed, strain is 0 Can we find a similar measure that would work for an arbitrary volume? Green strain 1 T E ( F F I) 2
3D Linear Strain Green strain is quadratic in displacements 2 1 w v w u w w v v u v w u v u u z z y z x y z y y x x z x y x 2 2 2 ) ( ) ( 2 1 2 1 u u u u I F F E T T T Neglecting quadratic terms leads to the linear Cauchy strain (small strain) Written out: Notation ε = 1 2 u + ut = 1 2 F + Ft I
3D Linear Strain Linear Cauchy strain Geometric interpretation y,v x,u i : normal strains i : shear strains 2 1 w v w u w w v v u v w u v u u z z y z x y z y y x x z x y x 2 2 2 x y xy
Cauchy vs. Green strain Nonlinear Green strain is rotation-invariant Apply incremental rotation R to given deformation F to obtain F = RF Then E' 1 2 ( F' T F' I) 1 T T T ( F R RF I) ( F F I) 2 1 2 E Linear Cauchy strain is not rotation-invariant ε = 1 2 F + F t 1 2 F + Ft = ε artifacts for larger rotations
Mass Spring vs Continuum Mechanics Mass spring systems: 1. Measure of Deformation 2. Material Model 3. Deformation Energy 4. Internal Forces Continuum Mechanics: 1. Measure of Deformation: Green or Cauchy strain 2. Material Model
Material Model: linear isotropic material Material model links strain to energy (and stress) Linear isotropic material (generalized Hooke s law) Energy density Ψ = 1 2 λtr(ε)2 +μtr(ε 2 ) tr ε = ε ii Lame parameters λ and μ are material constants related to Poisson Ratio and Young s modulus Interpretation tr ε 2 = ε F 2 penalizes all strain components equally tr ε 2 penalizes dilatations, i.e., volume changes
Volumetric Strain (dilatation) Consider a cube with side length a For a given deformation ε, the volumetric strain is ΔV/V0 = (a 1 + ε 11 a 1 + ε 22 a 1 + ε 33 a 3 )/a 3 = ε 11 + ε 22 + ε 33 + O ε 2 tr ε a http://en.wikipedia.org/wiki/infinitesimal_strain_theory
Young s Modulus and Poisson Ratio Energy density: Ψ = 1 2 λtr(ε)2 +μtr(ε 2 ) Lame parameters λ and μ are material constants related to the fundamental physical parameters: Poisson s Ratio and Young s modulus (http://en.wikipedia.org/wiki/lamé_parameters) Young s modulus (E): measure of stiffness Poisson s ratio (ν): measure of volume preservation 10 Kg OBJECT E=10000000 GPa 10 Kg OBJECT E=60 KPa
Linear isotropic material Energy density: Ψ = 1 2 λtr(ε)2 +μtr(ε 2 ) Problem: Cauchy strain is not invariant under rotations artifacts for rotations Solutions: Corotational elasticity Nonlinear elasticity
Material Model: non-linear isotropic model Replace Cauchy strain with Green strain St. Venant-Kirchhoff material (StVK) Energy density: Ψ StVK = 1 2 λtr(e)2 +μtr(e 2 ) Rotation invariant!
Problems with StVK StVK softens under compression Energy Deformation Ψ StVK = 1 2 λtr(e)2 +μtr E 2
Advanced nonlinear materials Green Strain E = 1 2 Ft F I = 1 2 (C I) Split into deviatoric (i.e. shape changing) and volumetric deformations Volumetric: J = det F Deviatoric: C = det F 2/3 C Neo-Hookean material: Ψ NH = μ 2 tr C 3 μln (J) + λ 2 ln J 2 Energy
Different Models St. Venant-Kirchoff Neo-Hookean Linear
Mass Spring vs Continuum Mechanics Mass spring systems: 1. Measure of Deformation 2. Material Model 3. Deformation Energy 4. Internal Forces Continuum Mechanics: 1. Measure of Deformation: Green or Cauchy strain 2. Material Model: linear, StVK, Neo-Hookean 3. Energy Density (!)
Finite Element Discretization Divide domain into discrete elements, e.g., tetrahedra Explicitly store displacement values at nodes (x i ). Displacement field everywhere else obtained through interpolation: x X = N i X x i Compute Deformation Gradient: F = x X = N x i X i i X t
Basis Functions 4 nodes, undeformed positions X i, deformed positions x i basis functions N i X j : R 3 R Interpolate at vertices (delta-property) N i X j = δ ij Common choice: linear basis functions N i x, y, z = a i x + b i y + c i z + d i Compute N i (and N i X ) through X 4 V e X 3 X 1 Ω e X 2
From energy density to deformation energy Integrate energy density over the entire element: W e = Ψ F Ω e Deformation gradient F = If basis functions are linear: x X X = x i i N i X t X 4 F is linear in x i (nodal displacements) F is constant throughout element: V e X 3 W e = Ψ F = Ψ F V e Ω e X 1 Ω e X 2
Mass Spring vs Finite Element Method Mass spring systems: 1. Measure of Deformation 2. Material Model 3. Deformation Energy 4. Internal Forces Continuum Mechanics: 1. Measure of Deformation: Green or Cauchy strain 2. Material Model: linear, StVK, Neo-Hookean 3. Deformation Energy: integrate energy density 4. Internal Forces
An example Goal: find equilibrium configuration i.e., f i = 0 i Given x with f x 0, find Δx such that f x + Δx = 0 f x + Δx = f x + KΔx + O(Δx 2 ) Solve KΔx = f x for Δx Stiffness matrix K = f x
So, now you to can do this:
Computational Design of Actuated Deformable Characters, Skouras et al, 2013 Inverse Design Example Design an object that can deform like this: Need model that predicts the way in which objects deform Design parameters: material parameters, points of application for forces or constraints
Computational Design of Actuated Deformable Characters, Skouras et al, 2013 Inverse Design Example Design an object that can deform like this: FEM Model Design parameters: material parameters, points of application for forces or constraints
Pipeline + Input and Target Shapes Actuator Location Optimization Material Optimization Fabricated Deformable Model
Mathematical Formulation Design Parameters E x, p = E match x, x target subject to f total x, p = 0
Actuator Location Optimization
Material Distribution Optimization
Results Input Animation Fabricated Prototype
Results Rest Pose Target Pose Stiff Soft
Questions? Read paper for next class!