The University of Sydney Slide 1 FINITE ELEMENT METHODS IN BIOMEDICAL ENGINEERING Presented by Dr Paul Wong AMME4981/9981 Semester 1, 2016 Lecture 3
The University of Sydney Slide 1
FINITE ELEMENT METHODS IN BIOMEDICAL ENGINEERING
Presented by
Dr Paul Wong
AMME4981/9981
Semester 1, 2016
Lecture 3
The University of Sydney Slide 2
Workflow for Biomedical Problems
1. Data acquisition
• Scan region of interest
• Obtain material properties for tissues and implants
• Estimate expected loads
2. Solid modelling
• Convert image stacks into a virtual replica
• Combine with CAD model of prosthesis
3. Finite element analysis
• Generate appropriate mesh
• Characterise interaction between anatomy and prosthesis
• Verify simulation results and prosthesis design
The University of Sydney Slide 3
(RE)-INTRODUCTION TO FINITE ELEMENT ANALYSIS
Rationale and Concept
The University of Sydney Slide 4
Continuum Mechanics
– Analytical methods are only suitable for simple scenarios
P
A
T
The University of Sydney Slide 5
Limitations of Analytical Methods
– Biomedical problems are complicated:
– Sophisticated geometry
– Non-linear, anisotropic materials
– Complex loading and boundary conditions
– Coupled physics
The University of Sydney Slide 6
Limitations of Analytical Methods – Example
The University of Sydney Slide 7
Limitations of Analytical Methods – Example
– Is the approximation good enough?
– How much detail is required/feasible?
– Are the assumptions reasonable?
– How would you validate it?
R
M
x
y
R
M
y
x
The University of Sydney Slide 8
The Finite Element Method (FEM)
1. Approximate the complex shape (geometry) by breaking it down (discretising) into simpler, independent blocks (elements)
2. Recast the physics problem as a relation within each element
– i.e. connect the nodes of each element using a shape function
– Depends on material properties
3. Link all the elements together
– i.e. form the global equilibrium equation
4. Impose constraints (loads and boundary conditions)
5. Solve all equations simultaneously
The University of Sydney Slide 9
A Simple Example
∴ π = C/2r
http://www.xkcd.com/1184/
The University of Sydney Slide 10
A Simple Example
n πn = n sin(π/n) Exact π (to 16 s.f.)
1 0
4 2.828427124746190
16 3.121445152258052
64 3.140331156954753
256 3.141513801144301 3.141592653589793
The University of Sydney Slide 11
Discretisation
Continuum model
Discretised model
Discontinuous between
elements, but connected
through interface (e.g.
same displacement at
shared nodes)
Continuous distribution
within each element
(via shape function)ElementsNodes
The University of Sydney Slide 12
Discretising the Hip Implant
The University of Sydney Slide 13
Element Types
The University of Sydney Slide 14
Effect of Element Order on Model Size
Discretised model
(higher order)
Discretised model
(lower order)
Elements: 2
Nodes per element: 8
Total nodes: 12
Total DOFs: 36
Elements: 2
Nodes per element: 20
Total nodes: 32
Total DOFs: 96
Total Degrees of Freedom = Total number of nodes DOFs at each node
The University of Sydney Slide 15
Mixing Element Types
– T3 and Q4 are usually used together in a mesh with linear elements
– T6 and Q8 are usually used together when quadratic elements are desired
– Similar for volume elements
The University of Sydney Slide 16
Suggestions
– Focus on understanding the concept of finite elements and performing analyses in the software (ANSYS Workbench)
– Try using the program yourself
– Step-by-step guides for running a basic analysis are available on the UoS website (see Assessments tab)
– Take advantage of group learning
The University of Sydney Slide 17
(RE)-INTRODUCTION TO FINITE ELEMENT ANALYSIS
The nitty gritty stuff (a.k.a. mathematics)
The University of Sydney Slide 18
The Finite Element Method (FEM)
1. Approximate the complex shape (geometry) by breaking it down (discretising) into simpler, independent blocks (elements)
2. Recast the physics problem as a relation within each element
– i.e. connect the nodes of each element using a shape function
– Depends on material properties
3. Link all the elements together
– i.e. form the global equilibrium equation
4. Impose constraints (loads and boundary conditions)
5. Solve all equations simultaneously
The University of Sydney Slide 19
Dis
pla
cem
ent
Location
within element
Dis
pla
cem
ent
Location
within element
Intra-element Interpolation
The University of Sydney Slide 20
The Linear Triangular Element
– Only has 3 nodes
– Linear displacement interpolation within element
– Uniform strain inside element bounds
– Known as constant strain triangle (CST)
– Use where strain gradient is small
– Best to avoid in critical areas of structure and areas with stress concentration
– Recommended for preliminary FEA (quick but low accuracy)
The University of Sydney Slide 21
The Linear Triangular Element
– Displacements within each element are a weighted function of the displacements at the nodes
( , ) ( , )h
ex y x yU N d
31 2
31 2
Node 2Node 1 Node 3
00 0
00 0
NN N
NN N
N
3 nodeat ntsdisplaceme
2 nodeat ntsdisplaceme
1 nodeat ntsdisplaceme
3
3
2
2
1
1
v
u
v
u
v
u
ed
Displacements at node 1
Displacements at node 2
Displacements at node 3
The University of Sydney Slide 22
The Linear Triangular Element
Shape Function
– For linear interpolation:
– Consider the Kronecker Delta function:
– Let’s focus on N1 (for now)…
1 1 1 1N a b x c y
2 2 2 2N a b x c y
3 3 3 3N a b x c y
1 T
T
i
i i
i
a
N x y b
c
p
p
i i i iN a b x c y
1 for ( , )
0 for i j j
i jN x y
i j
1 1 1
1 2 2
1 3 3
( , ) 1
( , ) 0
( , ) 0
N x y
N x y
N x y
The University of Sydney Slide 23
The Linear Triangular Element
Shape Function
– We know that the weighting at node 1 is 100% (i.e. 0% contribution from the other nodes. Therefore, we have:
– Solve for constants:
– Substitute back into N1:
2 3 3 2 2 3 3 21 1 1, ,
2 2 2e e e
x y x y y y x xa b c
A A A
1 2 3 2 3 2 2
1[( )( ) ( )( )]
2 e
N y y x x x x y yA
1 1 1 1 1 1 1 1
1 2 2 1 1 2 1 2
1 3 3 1 1 3 1 3
( , ) 1
( , ) 0
( , ) 0
N x y a b x c y
N x y a b x c y
N x y a b x c y
The University of Sydney Slide 24
The Linear Triangular Element
Shape Function
– Similarly:
2 1 1
2 2 2
2 3 3
( , ) 0
( , ) 1
( , ) 0
N x y
N x y
N x y
2 3 1 1 3 3 1 1 3
3 1 3 1 3 3
1[( ) ( ) ( ) ]
2
1[( )( ) ( )( )]
2
e
e
N x y x y y y x x x yA
y y x x x x y yA
3 1 1
3 2 2
3 3 3
( , ) 0
( , ) 0
( , ) 1
N x y
N x y
N x y
3 1 2 1 1 1 2 2 1
1 2 1 2 1 1
1[( ) ( ) ( ) ]
2
1[( )( ) ( )( )]
2
e
e
N x y x y y y x x x yA
y y x x x x y yA
The University of Sydney Slide 25
The Linear Triangular Element
Strain Matrix
– Displacement function:
– Strain-displacement relationship:
– Combining, we get:
where
332211 uNuNuNu
,x
uxx
,
y
vyy
x
v
y
uxy
eee dB
Te v,u,v,u,v,ud 332211
332211
321
321
000
000
ababab
bbb
aaa
Be
332211 vNvNvNv
The University of Sydney Slide 26
The Linear Quadrilateral Element
– Displacement interpolation
– Shape function
– Natural coordinates
x, u
y, v
1 (x1, y1)
(u1, v1)
2 (x2, y2)
(u2, v2)
3 (x3, y3)
(u3, v3)
2a
fsy fsx
4 (x4, y4)
(u4, v4)
2b
( , ) ( , )h
ex y x yU N d
31 2 4
31 2 4
Node 2 Node 3Node 1 Node 4
00 0 0
00 0 0
NN N N
NN N N
N
)1)(1(
)1)(1(
)1)(1(
)1)(1(
41
4
41
3
41
2
41
1
N
N
N
N
)1)(1(
)1)(1(
)1)(1(
)1)(1(
41
4
41
3
41
2
41
1
N
N
N
N
, byax
Gaussian
points:
3
1
The University of Sydney Slide 27
The Linear Quadrilateral Element
– Strain inside element is NOT constant due to bilinear interpolation
– What does this imply?
abababab
bbbb
aaaa
11111111
1111
1111
0000
0000
LNB [Be]
The University of Sydney Slide 28
Element Types
The University of Sydney Slide 29
Dis
pla
cem
ent
Location
within element
Linear vs Quadratic Interpolation
The University of Sydney Slide 30
The Quadratic Triangular Element
– Additional node at each midpoint
– 6 nodes per element (12 DOFs)
– 2nd order interpolation function
– Linear strain
– Better at capturing high strain gradients and curved boundaries
The University of Sydney Slide 31
The Quadratic Quadrilateral Element
– Additional node at each midpoint
– 8 nodes per element (16 DOFs)
– Quadratic shape function
– Preferred for stress analysis due to high accuracy and capacity for modelling complex geometries
The University of Sydney Slide 32
Elemental Stiffness Matrix
– Strain energy measures the amount of work performed on an elastic structure during deformation
– Expressing this in terms of strain energy density for a differential volume:
– The stiffness is therefore defined as:
eeT
e
e
V
eeT
eT
e
V
eeT
e
V
eT
ee
V
xyxyyyxx
V
eT
ee
dkd
ddVBEBd
dVEdVE
dVdVU
2
1
2
1
2
1
2
1
2
1
2
1
dVBEBk
V
eeT
ee
63333666
The University of Sydney Slide 33
The Finite Element Method (FEM)
1. Approximate the complex shape (geometry) by breaking it down (discretising) into simpler, independent blocks (elements)
2. Recast the physics problem as a relation within each element
– i.e. connect the nodes of each element using a shape function
– Depends on material properties
3. Link all the elements together
– i.e. form the global equilibrium equation
4. Impose constraints (loads and boundary conditions)
5. Solve all equations simultaneously
The University of Sydney Slide 34
Global Stiffness Matrix
– For an entire structure composed of finite elements
where the global stiffness matrix is given by:
– Matrix size depends on total DOFs
– Larger matrices require more computation
N
e
eN UUUUU1
21
uKudkdUUT
N
e
eeT
e
N
e
e2
1
2
1
11
Matrix expansion
NkkkK ˆˆˆ21
The University of Sydney Slide 35
Global Equilibrium Equation
– In equilibrium, strain energy equals work done by external force
– Consider virtual energy method:
– Therefore, equilibrium equation is:
– Impose loads and boundary conditions
– Solve for the nodal displacement vector {u}
– Then determine stress, strain, etc.
puuKuTT
2
1
pu
uuKu
u
TT
2
1
puK
The University of Sydney Slide 36
Dis
pla
cem
ent
Location
within element
Dis
pla
cem
ent
Location
within element
Imposing Constraints
u0
U1 = U0+1
U2 = U1+0.5
U3 = U2+2
The University of Sydney Slide 37
The Finite Element Method (FEM)
1. Approximate the complex shape (geometry) by breaking it down (discretising) into simpler, independent blocks (elements)
2. Recast the physics problem as a relation within each element
– i.e. connect the nodes of each element using a shape function
– Depends on material properties
3. Link all the elements together
– i.e. form the global equilibrium equation
4. Impose constraints (loads and boundary conditions)
5. Solve all equations simultaneously
The University of Sydney Slide 38
PRACTICAL CONSIDERATIONS
The University of Sydney Slide 39
Exporting from ScanIP
Option 1: Export Surface Meshes
– STL format
– RP surface requires masks only
– Piecewise surface geometry
composed of triangles
– Adjacent components are
conformal
– IGES format
– Requires NURBS module
– Surface divided into patches
defined by splines
– NOT conformal
– Use as geometry input for CAD or
volume mesher
The University of Sydney Slide 40
Exporting from ScanIP
Option 2: Export Volume Meshes
– Require FE model from masks
– Export directly to ANSYS,
COMSOL, etc. or as NASTRAN
– Two algorithms available:
– +FE Grid (more robust)
– +FE Free (more refined)
– Advanced mesh parameters can
be used to customise the mesh
The University of Sydney Slide 41
Fixing the FE Modeller Licencing Problem
– Start menu > ANSYS > ANSYS Client Licencing > User Licence Preferences
– “PrepPost” tab
– Move “ANSYS Academic Meshing Tools” to the bottom of the list
The University of Sydney Slide 42
The Phillip (NAS)Tran Method
– Export surfaces as STL (RP)
– Binarise, use smart smoothing, and allow part change
– Disable triangle smoothing and decimation
– Import STLs into ICEM CFD
– Set mesh parameters
– Global: Curvature refinement
– Volume meshing: Edge criterion, number of smoothing iterations
– Part mesh setup: Max/min edge lengths
– Compute using Octree algorithm
– Export volume mesh as NASTRAN
The University of Sydney Slide 43
Trade-offs in Computational Modelling
Model accuracy
Computational cost
– For a given hardware setup, there is a trade-off between model accuracy and computational cost
The University of Sydney Slide 44
Trade-offs in Computational Modelling
Model accuracy
Computational cost
– Try to find a balance between the two
The University of Sydney Slide 45
Simplifying Assumptions
– Look for symmetry:
– About a plane
– Around an axis
– Only used in very simplified biomedical problems
– Reduce to a 2D problem using:
– Plane stress (i.e. thickness is small relative to other two directions)
– Plane strain (i.e. thickness significantly greater than the other two directions)
The University of Sydney Slide 46
Simplifying Assumptions
FE meshBone density
distribution
The University of Sydney Slide 47
Simplifying Assumptions
Cement
Cup
Load
The University of Sydney Slide 48
Mesh Refinement
– A single geometry can be meshed in many different ways
– Depends on the meshing algorithm, and the parameters passed to it
– Different programs use different algorithms
TYPE METHOD
H-refinement Reduce size of elements
P-refinement Increase order of polynomials on element
(e.g. linear to quadratic)
HP-refinement Use both h- and p-refinement
R-refinement Rearrange the nodes in the mesh
The University of Sydney Slide 49
Mesh Convergence
– FE models are numerical approximations
– There are substantially fewer nodes in any FE model than there are particles in the actual structure
– Limited number of nodes implies a smaller number of DOFs
– Hence, FE models are generally stiffer than the real structure
– Conversely, displacement results are usually smaller than the true values
– Using more DOFs will approach the exact solution
The University of Sydney Slide 50
Contact Conditions
Cemented Interface
– Seamless bonding
– Shared interfacial nodes
Cementless/Frictional Interface
– In contact with friction
– Requires two sets of interfacial
nodes
Material 1
Material 2
Material 1
Material 2
Master surface
Slave surface
The University of Sydney Slide 52
Interpreting Results
– Models are (by definition) simplifications of nature
– Be mindful of the assumptions used to construct the model
– Geometry simplifications
– Material properties
– Boundary conditions
– Be wary of errors
– Imperfect segmentation
– Discretisation errors from meshing process
– Numerical error when solving FE equations
– Software bugs
– Make sure your calculated value is relevant to your research question
The University of Sydney Slide 53
Model Validation
– A model on its own does not represent the truth
– Best practice is to compare in silico results to in vivo or in vitro experimental measurements
– Each method is subject to error
– Can be first-hand or second-hand
– Need to explain any differences
– The best models are still more valuable qualitatively than quantitatively… but this is starting to change
The University of Sydney Slide 54
EXAMPLE APPLICATIONS
The University of Sydney Slide 55
Hip Fractures
– Femoral neck impacted into head using surgical screws
– Questions from orthopaedic surgeons include:
– Why is there bone loss?
– Is bone loss predictable?
– How can we avoid bone loss and ensure greater clinical success?
– Wolff’s law
Bone loss
The University of Sydney Slide 56
Spinal Prostheses
– Spinal fusion
– Weight borne by cage
– Idea is to prevent further loads from compressing damaged spinal disk
– Usually causes bone loss in adjacent vertebrae
– Disk prostheses
– Completely replaces
damaged disk
– Allows adjacent vertebrae to
move
– Need to maintain DOFs
– Wear particle formation
The University of Sydney Slide 57
Spinal Prostheses
– High fidelity models provide accurate results
– Understanding the mechanics allows for further improvements to prosthesis designs
The University of Sydney Slide 58
Dental Implants
Hans Yoo (2007)
Local
refinement
Mitchell Farrar (2010)
Chaiy Rungsiyakull (2011)
The University of Sydney Slide 59
Multiphysics Finite Element Analysis
– Steady-state field problem
0
Q
zK
zyK
yxK
xzyx
PHYSICS TYPE Kx, Ky, Kz Q
Heat TransferThermal
conductivities Temperature
Internal heat
generation
Incompressible fluid
flowUnity amount
Stream function or
potential functionQ=0
Electrostatics Permittivity Electric potential Charge density
Magnetostatics Reluctivity Magnetic potential Charge density
The University of Sydney Slide 60
Cochlear Implants
– CIs work by injecting electric current into the inner ear
– This causes auditory nerves to send action potentials to the brain
– Questions:
– Which path does it take through the volume?
– Will this evoke the desired/optimal neural response?
– What could be changed to improve sound perception?
The University of Sydney Slide 61
Summary
– Limitations of analytical methods provides rationale for FEM
– FEM solution process
– Discretise the system into appropriate elements (2D/3D, linear/quadratic)
– Combine elements into a global stiffness matrix and solve for equilibrium
– Can be used for many different problem types, not just structural/mechanical
– Practical considerations
– Trade-offs
– Simplifying assumptions
– Mesh refinement
– Convergence
– Contact conditions
– Interpretation
– Validation
– Example research and clinical applications
The University of Sydney Slide 62
GROUP PROJECT UPDATES
No pressure…seriously
The University of Sydney Slide 63
TO THE LABS!