Katsuyo Thornton*, R. Edwin García✝, Larry Aagesen* Summer School for Integrated Computational Materials Education 2014 Computational Mechanics Pre-Module Lecture Katsuyo Thornton*, R. Edwin García✝, Larry Aagesen* *Materials Science & Engineering University of Michigan ✝: Materials Engineering Purdue University 1
Purposes of the Module Develop understanding of and intuition for mechanics of materials through hands-on exercises Learn how computational tools can be used to determine stress distributions in material microstructures Demonstrate the importance of continuum mechanics via an application to a polycrystal. 2
How Do We Solve the Equations Once you obtain a PDE, there are many ways to solve the problem. Finite Element Analysis or Finite Element Method has been the dominant approach in computational solid mechanics. Relatively good convergence (higher accuracy with fewer mesh points). Internal boundary conditions. There are other methods that allow solutions, including a reformulation of the original equation, which can easily be solved using the finite difference method. 17
What is FEM? The finite element method is a numerical method to solve problems of engineering and physics. Useful for problems with complicated geometries, loadings, and material properties where analytical solutions cannot be obtained. Mathematically, the PDE is converted to its variational (integral) form. An approximate solution is given by a linear combination of trial functions. The solution is given by error reduction. Physically, it is equivalent to dividing up a system into smaller pieces (elements) where each piece follows the law of nature. 18
Discretizations Model a physical body by dividing it into an equivalent system of smaller bodies or units (finite elements) interconnected at points common to two or more elements (nodes or nodal points) and/or boundary lines and/or surfaces. 19
Steps in FEM (numerical) Discretize and Select Element Type Select a Displacement Function Define Strain/Displacement and Stress/Strain Relationships Derive Element Stiffness Matrix & Eqs. Assemble Equations and Introduce B.C.s Solve for the Unknown Displacements Calculate Element Stresses and Strains Interpret the Results 23
g13 g8 g14 g4 g12 g3 g9 g10 g6 g11 g2 g1 g7 g5
Finite Elements of Microstructures 1. Start with a micrograph 2. Assign material properties 3. Perform virtual experiments 4. Visualize and quantify
Modeling Material Properties
Collection of properties Material Collection of properties Microstructure Associates materials to phases (pixels) Image Associates colors to pixels Skeleton Geometry of mesh Mesh Equations, fields, and boundary conditions Solution Macroscopic properties, material evolution
Running OOF2 in the nanoHUB https://nanohub.org/tools/oof2
The Problem of Meshing Images
Fitting a Mesh to Pixel Boundaries Mesh operations work to minimize an “energy” functional E of the mesh ai= fractional area of pixel type i N = total number of pixel types
homogeneity E shape
Fitting a Mesh to Pixel Boundaries Initial Coarse Mesh Refining Elements Monte Carlo Node Motion and Edge Swapping Operations to reduce E Final Mesh
Adapting your Mesh is Like Washing your Laundry Not one single operation will do the job Sometimes you need to apply the same set of operations several times to get the effect you want The same script typically applies to similar looking microstructures Dirty skeletons go here
The Final Skeleton?
What Defines a Good Mesh? Mesh reproduces the geometrical features of material or part Elements must have a “good” shape The fields of mesh can be solved for The solution of the fields are very close to the analytic solution
Badly Shaped Elements Good Shapes Bad Shapes
Badly Shaped Meshes
Coarse Meshes
+Q -Q
Mesh Size Effects
Mesh Size Effects
Mesh Size Effects
Unsolvable Meshes ; ; Zeroth value of properties Large difference in properties
A Good Mesh?
Properties of a Good Mesh Reproduces accurately the geometry of the system Is coarse in those regions where the fields are not varying rapidly Is refined wherever the fields are varying rapidly Takes a reasonable time to solve Has “just enough” degrees of freedom
Extras and Deleted Scenes
The Error of the Solution Ideally, we want to solve exactly for In practice, however, we get The relative error is: *
Number of fields, f, per node Error will Depend on: Number of bits, x, to represent a double (smallest number you can represent, S) S =1/2x × Number of fields, f, per node f Number of nodes, N N smaller error will be: emin > S*f*N
Something you will Hear About: The Condition Number define the magnitude of a matrix as: :eigenvalue Define the condition number as:
Why you Should Care about the Condition Number In an ideal world, A=1 However, in real-life materials: if if if
How it Relates to the Error of the Calculation relative error relative accuracy of the solution the bigger the A the harder to solve
Assigning Fields and Equations displacement: making something active: to solve for it
Solving the Fields tolerance: how much error are you willing to live with? linear solvers: numerics to invert the FEM matrices preconditioners: black magic to improve on solvability
Lots of Options in the Skeleton Page Methods to improve mesh
The Anneal Method randomly displace a node by an amount delta if move decreases the energy of element, accept it go to 1
The Refine Method Refine those elements whose energy is greater than specified threshold
The Swap Edges Method
Snap Nodes