142 107 25MB
English Pages [412]
Finite Element Theory and Practical Analysis with Open Source Codes
Anthony Pickett IFB (Institute of Aircraft Design) University of Stuttgart, Germany
Copyright
➞
2023 Anthony K. Pickett
All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without written permission of the publisher. Posting on websites, blogs, peer-to-peer networks, or any other publicly accessible distribution media is forbidden. This book contains information obtained from authentic and highly regarded sources, but the author and publisher do not assume responsibility for the validity of all materials or consequences of their use. If any copyrighted material is used and not properly acknowledged please contact the author so that any omissions can be rectified as soon as possible.
First Printing, January 2020 Edition 3, May 2023 IFB (Institute of Aircraft Design) University of Stuttgart Pfaffenwaldring 31 70569 Stuttgart Germany
CONTENTS
Contents
i
Preface
ix
List of Symbols
xi
I
Finite element theory
1
1 Fundamentals of finite element analysis 1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Principles of the finite element method . . . . . . . . . . . . . . . . 1.2.1 Some FE terms and typical steps in an analysis
3 3 4
. . . . . . . .
5
1.2.2 Finite element types and their applications . . . . . . . . . . . 1.3 Bar element stiffness - direct method . . . . . . . . . . . . . . . . . 1.4 Basic relations for a bar element . . . . . . . . . . . . . . . . . . . .
7 10 11
1.4.1 Strain-displacement relations . . . . . . . . . . . . . . . . . . .
11
1.4.2 Shape function [N ] and strain-displacement [B] matrices . . . 1.5 Bar element stiffness - Variational methods . . . . . . . . . . . . .
12 13
1.5.1 Rayleigh-Ritz and minisation of total potential energy . . . . .
14
1.5.2 The Galerkin method . . . . . 1.6 Assembly, boundary conditions and 1.7 2D Transformations . . . . . . . . . 1.8 Line elements for 1D flow analysis . 1.9 Element assembly . . . . . . . . . .
. . . . .
17 21 23 29 31
1.9.1 Assembly of 1D elements . . . . . . . . . . . . . . . . . . . . .
31
1.9.2 Assembly of mixed elements . . . . . . . . . . . . . . . . . . .
33
i
. . . . . solution . . . . . . . . . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
CONTENTS
1.9.3 Symmetry and bandwidth . . . . . . . . . . . . . . . . . . . . . 1.10 Boundary conditions and rigid body modes . . . . . . . . . . . . . 1.11 Solution assumptions and validation . . . . . . . . . . . . . . . . .
33 34 36
2 Stiffness matrices and integration 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Strain-displacement relations . . . . . . . . . . . . . . . . . . . . . 2.3 Assumed field function elements . . . . . . . . . . . . . . . . . . . .
40 40 41 42
2.3.1 1D Beam elements . . . . . . . . . . . . . . . . . . . . . . . . .
42
2.3.1.1
Four dof frame element . . . . . . . . . . . . . . . . . . .
43
2.3.1.2
Six dof plane frame element . . . . . . . . . . . . . . . . .
47
2.3.1.3
Twelve dof 3D beam element . . . . . . . . . . . . . . . .
48
2.3.2 2D constant strain triangular element . . . . . . . . . . . . . .
51
2.3.3 Other 2D and 3D higher order elements . . . . . . . . . . . . . 2.4 Simplex elements . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58 58
2.4.1 The simplex 2D linear triangle . . . . . . . . . . . . . . . . . .
60
2.4.2 The simplex 2D quadratic triangle . . . . . . . . . . . . . . . .
63
2.4.3 Shape functions for a simplex 3D tetrahedra element . . . . . . 2.5 Isoparametric elements . . . . . . . . . . . . . . . . . . . . . . . . .
65 67
2.5.1 Concepts for a 1D isoparametric element . . . . . . . . . . . .
67
2.5.2 2D linear isoparametric quadrilateral element . . . . . . . . . .
69
2.5.3 2D quadratic isoparametric triangular element . . . . . . . . .
73
2.5.4 3D linear isoparametric solid element . . . . . . . . . . . . . . 2.6 Gaussian quadrature for integration . . . . . . . . . . . . . . . . . . 2.7 Plate bending and shell elements . . . . . . . . . . . . . . . . . . .
73 74 77
2.7.1 Kirchhoff and Mindlin deformation hypotheses . . . . . . . . .
77
2.7.2 Forces and moments in plate bending . . . . . . . . . . . . . .
79
2.7.3 A plate bending finite element . . . . . . . . . . . . . . . . . .
81
2.7.4 Shell finite elements . . . . . . . . . . . . . . . . . . . . . . . .
85
3 Nonlinear, dynamic and eigenvalue analysis 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Some comments on nonlinearity . . . . . . . . . . . . . . . . . . . . 3.3 Geometric nonlinear implicit analysis . . . . . . . . . . . . . . . . .
89 89 90 91
3.3.1 Large strains and element matrices . . . . . . . . . . . . . . . .
93
3.3.2 Large strain-displacement matrix [BL ]
. . . . . . . . . . . . .
94
. . . . . . . . . . . . . . . . . . . .
96
3.3.3 Stress stiffness matrix [kσ ] ii
CONTENTS
3.3.4 Geometric nonlinear analysis using [KO ], [KL ] and [Kσ ] . . . . 102 3.3.5 Newton-Raphson iterative solution . . . . . . . . . . . . . . . . 104 3.4 Transient dynamic analysis . . . . . . . . . . . . . . . . . . . . . . . 105 3.4.1 Explicit integration . . . . . . . . . . . . . . . . . . . . . . . . 107 3.4.2 Direct integration . . . . . . . . . . . . . . . . . . . . . . . . . 112 3.4.2.1
Central difference method . . . . . . . . . . . . . . . . . . 112
3.4.2.2
The Newmark method . . . . . . . . . . . . . . . . . . . . 114
3.4.2.3
The Hilber-Hughes-Taylor (HHT) method . . . . . . . . . 114
3.4.2.4
Direct integration for flow problems . . . . . . . . . . . . 115
3.4.3 Nonlinear dynamic analysis . . . . . . . . . . . . . . . . . . . . 116 3.4.4 Comparing explicit and implicit methods . . . . . . . . . . . . 118 3.5 Buckling analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 3.5.1 Finite element buckling analysis . . . . . . . . . . . . . . . . . 121 3.6 Free frequency analysis . . . . . . . . . . . . . . . . . . . . . . . . . 126 3.6.1 Finite element frequency analysis . . . . . . . . . . . . . . . . . 126 4 Loads, boundary conditions and contact 133 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 4.2 Load types and assembly . . . . . . . . . . . . . . . . . . . . . . . . 134 4.2.1 Load vector storage and assembly . . . . . . . . . . . . . . . . 134 4.2.2 Load types for mechanics . . . . . 4.3 Lumped and consistent mass matrices 4.4 Boundary conditions . . . . . . . . . . 4.5 Contact . . . . . . . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
134 137 138 139
4.5.1 Contact in implicit codes - Gap elements . . . . . . . . . . . . 140 4.5.2 Contact in explicit codes . . . . . . . . . . . . . . . . . . . . . 143 4.5.3 Some remarks on contact . . . . . . . . . . . . . . . . . . . . . 144 5 Heat transfer and related field problems 5.1 Introduction . . . . . . . . . . . . . . . . . 5.2 Flow continuity (conservation) . . . . . . . 5.3 The quasi-harmonic steady state equation 5.4 Heat transfer . . . . . . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
146 146 147 147 149
5.4.1 Basic equations of heat transfer . . . . . . . . . . . . . . . . . 149 5.4.2 Partial differential equations for heat transfer . . . . . . . . . . 151 5.5 Finite element equations for heat transfer . . . . . . . . . . . . . . 153 5.5.1 Finite element equations for 1D heat conduction . . . . . . . . 154 iii
CONTENTS
5.5.2 Rayleigh-Ritz method for steady state 1D heat transfer . . . . 157 5.5.3 Galerkin method for 2D steady state heat transfer . . . . . . . 164 5.5.3.1
Steady state 2D heat conduction . . . . . . . . . . . . . . 164
5.5.3.2
2D element equations for [k], {rQ } and {rq } . . . . . . . . 167
5.5.3.3
Convection surface heat flow for [kh ] and {rh } . . . . . . 170
5.5.4 Transient heat transfer analysis and capacity matrix [kc ]
. . . 174
5.5.5 3D heat transfer equations . . . . . . . . . . . . . . . . . . . . 175 5.5.6 Some comments on heat transfer analysis . . . . . . . . . . . . 176 5.6 Other possibilities for field analysis . . . . . . . . . . . . . . . . . . 180 6 Material constitutive laws 184 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 6.2 Rheological models for material behaviour . . . . . . . . . . . . . . 185 6.3 Elastic isotropic, orthotropic and anisotropic behaviour . . . . . . . 187 6.3.1 3D elasticity and transformations . . . . . . . . . . . . . . . . 187 6.3.1.1
Anisotropic 3D materials . . . . . . . . . . . . . . . . . . 188
6.3.1.2
Orthotropic 3D materials . . . . . . . . . . . . . . . . . . 188
6.3.1.3
Isotropic 3D materials . . . . . . . . . . . . . . . . . . . . 190
6.3.1.4
Transformations for 3D materials . . . . . . . . . . . . . . 190
6.3.2 2D elasticity and transformations . . . . . . . . . . . . . . . . 193 6.4 Material nonlinearity . . . . . . . . . . . . . . . . . . . . . . . . . . 194 6.4.1 Hyperelasticity . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 6.4.1.1
Some general hyperelastic models . . . . . . . . . . . . . 197
6.4.1.2
Hyperelastic material testing . . . . . . . . . . . . . . . . 198
6.4.1.3
Model calibration and fitting . . . . . . . . . . . . . . . . 200
6.4.1.4
Volumetric strains in hyperelastic materials . . . . . . . . 202
6.4.2 Plasticity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
II
Tutorials and exercises
213
7 Some comments on tutorials, codes, units and modelling 215 7.1 The tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 7.2 Commercial and open source codes . . . . . . . . . . . . . . . . . . 216 7.2.1 Computer Aided Design (CAD) . . . . . . . . . . . . . . . . . 216 7.2.2 FE analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 7.2.3 Selected open source CAD and FE codes . . . . . . . . . . . . 217 iv
CONTENTS
7.2.4 Numerical analysis: Codes and selection . . . . . . . . . . . . . 7.3 Getting started with FreeCAD . . . . . . . . . . . . . . . . . . . . . 7.4 Getting started with CalculiX . . . . . . . . . . . . . . . . . . . . . 7.5 The dedicated CalculiX post-processor (CalculiX GraphiX - CGX) 7.6 FreeCAD and CalculiX datasets . . . . . . . . . . . . . . . . . . . . 7.7 Getting started with FreeMAT (or GNU Octave) . . . . . . . . . . 7.8 Unit systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.9 Meshing, modelling and analysis . . . . . . . . . . . . . . . . . . . .
218 218 219 219 220 222 222 223
7.9.1 Some meshing guidelines . . . . . . . . . . . . . . . . . . . . . 224 7.9.2 Some modelling guidelines . . . . . . . . . . . . . . . . . . . . 225 7.9.3 Some analysis guidelines . . . . . . . . . . . . . . . . . . . . . . 227 Tutorial T1 3D solids: isotropic and orthotropic elasticity 230 T1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 T1.2 Background information and theory . . . . . . . . . . . . . . . . . . 231 T1.2.1 Tetrahedra elements . . . . . . . . . . . . . . . . . . . . . . . . 231 T1.2.2 Defining principal material (fibre) directions . . . . . . . . . . 232 T1.3 Tutorial T.T1a: Getting started with FreeCAD . . . . . . . . . . . 232 T1.4 Tutorial T.T1b: Model building and analysis for transverse stiffness E2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 T1.5 Exercise E.T1a: Analysis for shear stiffness G23 . . . . . . . . . . . 239 T1.6 Tutorial T.T1c: Analysis for transverse stiffness E2 (orthotropic fibre)240 T1.7 Exercise E.T1b: Analysis for shear stiffness G23 (orthotropic fibre) 242 T1.8 Exercise E.T1c: Possible optional UC analyses . . . . . . . . . . . . 242 Tutorial T2 2D shell analysis: Isotropic elasticity and orthotropic 243 composites T2.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 T2.2 Background information and relevant theory . . . . . . . . . . . . 244 T2.2.1 CalculiX elements for 2D analysis . . . . . . . . . . . . . . . T2.3 Tutorial T.T2a: Getting started with FreeCAD sketcher . . . . . T2.4 Tutorial T.T2b: Model and analysis for isotropic aluminium . . . T2.5 Exercise E.T2a: Convergence analyses, element types and bending performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T2.6 Exercise E.T2b: Orthotropic composites analysis combined with laminate theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . T2.7 Exercise E.T2c: The CalculiX composite element . . . . . . . . .
v
244 246 246 250 251 253
CONTENTS
Tutorial T3 2D nonlinear analysis including plasticity T3.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T3.2 Background information and theory . . . . . . . . . . . . . . . . . T3.3 Tutorial T.T3a: Linear geometry with elastic adhesive . . . . . . T3.4 Exercise E.T3a: Nonlinear geometry with elastic adhesive . . . . T3.5 Exercise E.T3b: Nonlinear geometry with elasto-plastic adhesive . T3.6 Exercise E.T3c: A further inelastic material study . . . . . . . . .
255 255 256 257 261 262 263
Tutorial T4 Fatigue and cycle life analysis T4.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T4.2 Background information and theory . . . . . . . . . . . . . . T4.3 Tutorial T.T4a: FE stress analysis for fatigue life prediction T4.4 Exercise E.T4a: Further FE fatigue analyses . . . . . . . . . T4.5 Exercise E.T4b: Analytical estimates for fatigue life . . . . .
. . . . .
264 264 265 267 273 274
Tutorial T5 Thermomechanical analysis for deformation and failure T5.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T5.2 Background information and theory . . . . . . . . . . . . . . . . . T5.3 Tutorial T.T5a: Thermomechanical analysis of a bi-metallic strip T5.4 Exercise E.T5a: Thermomechanical failure analysis of a cup . . . T5.5 Exercise E.T5b: Improved cup analysis . . . . . . . . . . . . . . .
275 275 276 279 283 285
Tutorial T6 Steady state fluid flow through a porous media T6.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T6.2 Background information and theory . . . . . . . . . . . . . . T6.3 Tutorial T.T6a: Analysis of seepage flow under a dam . . . T6.4 Exercise E.T6a: Composites infusion of an orthotropic fabric
. . . .
287 287 288 289 293
. . . . . . .
296 296 297 298 300 300 301 304
Tutorial T7 Eigenvalue frequency analysis T7.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T7.2 Background information and theory . . . . . . . . . . . . . . T7.3 Tutorial T.T7a: Simplified (Model A) tuning fork frequency T7.4 Exercise E.T7a: Frequency calibration model A . . . . . . . T7.5 Exercise E.T7b: Detailed (Model B) tuning fork frequency . T7.6 Tutorial T.T7b: Frequency of a preloaded disc on a shaft . . T7.7 Exercise E.T7c: Disc frequencies without preloads . . . . . . Tutorial T8
Eigenvalue and nonlinear buckling analysis vi
. . . . .
. . . .
. . . . . . .
. . . . .
. . . .
. . . . . . .
305
CONTENTS
T8.1 T8.2
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 Background information and theory . . . . . . . . . . . . . . . . . 306
T8.2.1
Classical buckling analysis . . . . . . . . . . . . . . . . . . . 306
T8.2.2 Finite element buckling analysis . . . . . . . . . . . . . . . T8.3 Tutorial T.T8a: Eigenvalue buckling analysis of a Euler strut . T8.4 Tutorial T.T8b: Eigenvalue buckling analysis . . . . . . . . . . T8.5 Exercise E.T8a: Eigenvalue buckling analysis with a preload . . T8.6 Exercise E.T8b: Nonlinear buckling analysis . . . . . . . . . . . T8.7 Exercise E.T8c: Nonlinear buckling analysis with imperfections
. . . . . .
307 308 309 311 312 314
Tutorial T9 Direct integration for transient and dynamic analysis 316 T9.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 T9.2 Background information and theory . . . . . . . . . . . . . . . . . 317 T9.3 Tutorial T.T9a: Transient 1D heat flow . . . . . . . . . . . . . . . 318 T9.4 Exercise E.T9a: Transient 3D heat flow . . . . . . . . . . . . . . . 321 T9.5 Tutorial T.T9b: Dynamic mechanical analysis . . . . . . . . . . . 322 T9.6 Exercise E.T9b: Dynamic analysis of a 1D axially loaded beam . 325 T9.7 Exercise E.T9c: Further exercises on dynamic mechanical analysis 326 Tutorial T10 Explicit integration for dynamic analysis T10.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T10.2 Background information and theory . . . . . . . . . . . . . . . . . T10.3 Tutorial T.T10a: Explicit integration of a single bar element . . . T10.4 Exercise E.T10a: Further exercises on Tutorial T.T10a . . . . . . T10.5 Exercise E.T10b: A two element version of Tutorial T.T10a . . . T10.6 Exercise E.T10c: Explicit analysis for bending of a beam element
327 327 328 328 331 332 334
Tutorial T11 Contact and hyperelasticity T11.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T11.2 Background information and theory . . . . . . . . . . . . . . . . . T11.3 Tutorial T.T11a: Penalty contact in explicit analysis . . . . . . . T11.4 Exercise E.T11a: Various exercises in explicit contact analysis . . T11.5 Tutorial T.T11b: Implicit contact analysis of a hyperelastic seal . T11.6 Tutorial T.T11c: Seal analysis with contact heat transfer . . . . . T11.7 Exercise E.T11b: Thermomechanical seal analysis for a quarter model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
335 335 336 338 340 341 343
Tutorial T12 Steady state flow in a hydraulic pipe network
347
vii
344
CONTENTS
T12.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 T12.2 Background information and theory . . . . . . . . . . . . . . . . . 348 T12.2.1 Three-node network element (D) . . . . . . . . . . . . . . . . 348 T12.2.2 Fluid section types: Liquids . . . . . . . . . . . . . . . . . . 349 T12.2.3 Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 T12.3 Tutorial T.T12a: FE analysis of a hydraulic pipe network . . . . 352 T12.4 Exercise E.T12a: Verification of the FE results . . . . . . . . . . . 358 Tutorial T13 CFD: Theory and programming a code 359 T13.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 T13.2 Background information and theory . . . . . . . . . . . . . . . . . 360 T13.2.1 Irrotational and rotational flow . . . . . . . . . . . . . . . . 360 T13.2.2 Introduction to CFD analysis . . . . . . . . . . . . . . . . . 361 T13.2.3 Descriptions for fluid flow . . . . . . . . . . . . . . . . . . . 361 T13.3 Navier-Stokes equations for viscous flow . . . . . . . . . . . . . . 363 T13.3.1 Mass conservation . . . . . . . . . . . . . . . . . . . . . . . . 364 T13.3.2 Momentum conservation . . . . . . . . . . . . . . . . . . . . 365 T13.3.3 Energy conservation . . . . . . . . . . . . . . . . . . . . . . . 367 T13.4 Solution of the Navier-Stokes equations . . . . . . . . . . . . . . . 367 T13.4.1 Poisson’s Pressure Equation for incompressible isothermal flow368 T13.4.2 Compressible fluids and thermal analysis . . . . . . . . . . . 368 T13.5 Finite difference discretization . . . . . . . . . . . . . . . . . . . . 368 T13.6 Exercise E.T13a: Programming a CFD solver . . . . . . . . . . . 370 Tutorial T14 CFD: FV method, OpenFOAM installation and ex373 amples T14.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 T14.2 Background information and theory . . . . . . . . . . . . . . . . . 374 T14.2.1 Basic theory for finite volume analysis . . . . . . . . . . . . 374 T14.2.2 Installing the codes . . . . . . . . . . . . . . . . . . . . . . . T14.3 Tutorial T.T14a: Turbulent fluid flow in a 2D ‘T’ tube joint . . . T14.4 Exercise E.T14b: Laminar flow and 3D modelling of the ‘T’ tube joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T14.5 Exercise E.T14b: Additional exercises . . . . . . . . . . . . . . . . T14.6 Exercise E.T14c: 2D high velocity flow over an airfoil . . . . . . .
376 377 381 382 383
Bibliography
386
Index
392 viii
PREFACE
This book combines essential Finite Element (FE) theory with a set of fourteen tutorials using relatively easy-to-use FE packages, so a student can undertake practical analysis and self study. Licensing with commercial softwares is often a problem for students and teaching purposes, consequently I have selected only open source codes for these tutorials. CalculiX is a comprehensive FE package covering linear, nonlinear, mechanical, fluid and thermal analysis. One particular benefit of this code is its structure and format, which is based on Abaqus and therefore the knowledge gained is relevant to a leading commercial code. FreeCAD is primarily a powerful CAD modelling package, that also includes excellent finite element meshing and modelling capabilities and is fully integrated with CalculiX. This second edition of the book also adds two new tutorials on computational fluid dynamics (CFD) theory and its application using OpenFOAM, which is integrated with FreeCAD. Three tutorials demonstrate dynamic FE and CFD analysis using algorithms programmed in FreeMAT, which is another open source code that is mostly compatible with the widely used commercial MATLAB product. This book has two parts: The first six chapters cover fundamental theory of the finite element method relevant to the second part, which presents fourteen tutorials containing worked and student exercises. Theoretical chapters cover the following: − Chapter 1 introduces fundamentals of the finite element method. Formulation of element stiffness is based on methods that are demonstrated for a one dimensional (1D) element using direct, energy and variational methods. Other important topics including modelling, element types, implicit solution, element assembly, loads and boundary conditions are also introduced. − Chapter 2 focusses on formulation of stiffness and characteristic matrices for families of 1D beam, two dimensional (2D) and three dimensional (3D) continuum elements, plate and shell elements, and includes techniques used for numerical integration of element volumes. These stiffness derivations ix
Nomenclature
apply three principal techniques, namely, assumed displacement, simplex and isoparametric formulations. − Chapter 3 covers solution methods for nonlinear, dynamic and linear eigenvalue analysis. The focus is structural and solid mechanics, but methods for solution of steady state and transient flow problems are also introduced. − Different methods to apply loads and boundary conditions are discussed in Chapter 4, plus an introduction to contact modelling for static and dynamic analysis. − The quasi-harmonic equation and its special forms describe a wide variety of field problems. These are covered in Chapter 5 where variational methods are used to derive equivalent finite element equations. This chapter focusses on heat transfer, but connection to other steady state and transient field problems are also discussed. − Chapter 6 concludes the theory with an introduction to linear and nonlinear constitutive material laws via rheological models. It then focusses on three important constitutive laws relevant to the tutorials covering isotropic and orthotropic elasticity, hyperelasticity and plasticity. The second part of this book presents one chapter on using the tutorials, information on installing codes (on Windows) and getting started, plus some general hints on meshing, modelling and interpretation of analysis results. This is then followed by the tutorials and exercises which cover linear, nonlinear and dynamic mechanical analysis, steady state and transient heat analysis, field analysis, fatigue, buckling and frequency analysis, hydraulic pipe network analysis, and lastly two tutorials on computational fluid dynamics. In each tutorial I have tried to link theory with application and to include exercises for further self study. This book is not intended in any way as a training manual for any of the codes, but hopefully it demonstrates some capabilities that these codes have and serves as a useful starting point for further work, or to move on to other commercial products. My main aim is to provide a unified text covering theory and practice, so a student can learn and experiment with these versatile and powerful analysis methods. Finally, I would like to acknowledge the professionalism of all those involved in the development of FreeCAD, FreeMAT, CalculiX, CalculiX GraphiX (CGX) and blueCFD/OpenFOAM, and to thank everyone for their dedication and generosity to make these codes openly available.
x
LIST OF SYMBOLS
Abbreviations CAD Computer Aided Design CFD Computational Fluid Dynamics CV Control Volume used in fluid analysis dof Degree of Freedom FD Finite Difference method FE Finite Element method FV Finite Volume method GUI Graphical User Interface LHS, RHS Left and Right Hand Side NR Newton-Raphson nonlinear method PDE Partial Differential Equation (Laplace, Poisson’s...) PPE Poisson’s Pressure Equation RBM Rigid Body Mode SCF Stress Concentration Factor Roman symbols [C] Global damping matrix [d], [D] Element and global displacement vector [k], [K] Element and global stiffness or characteristic matrix [KL ] Structure nonlinear (large displacement) stiffness matrix [KO ] Structure linear (small displacement) stiffness matrix = [K] [KT ] Global tangent stiffness matrix = [KO ]+[KL ]+[Kσ ] [Kσ ] Global stress stiffness matrix [M ] Global mass matrix [S] Compliance matrix = [E]−1 [T ] Transformation matrix e.g. between a material and coordinate frame A, Ae Area and element area
xi
List of Symbols B, [B] Individual and element strain-displacement functions c Specific heat E, [E] Young’s modulus, Energy, material property matrix G Shear modulus h Heat transfer coefficient (surface film coefficient) I Section second moment of inertia J, [J] Jacobian and element Jacobian matrix k Thermal conductivity, permeability L Length or shape functions for simplex elements m, {M } Nodal moment and vector of nodal moments m, n Direction cosines: m = cos(θ), n = sin(θ) N , [N ] Individual and element shape functions P Pressure p, {P } Nodal force and vector of nodal forces Q Internal heat generation q, {q} Flow rate (flux) qA , {qA } Total flow rate (flux) over an area A r, {r}, {R} Reaction force, element and global heat vectors S, Se Surface and surface area T Temperature t Time or thickness T , {T } Nodal temperature and vector of nodal temperatures Tf Environmental (field) temperature U Strain energy u, {u} Displacement and vector of nodal displacements u, v, w Displacements in the x, y, z directions (mechanical analyses) u, v, w Velocities in the x, y, z directions for Tutorials T13 and T14 on CFD ~ v, {v} or V Velocity and vector of fluid flow velocities V, Ve Volume and element volume Vf Fibre volume fraction W Potential energy of loading (pu), or work energy ( 21 pu) w Width Wi Weighting function used in Gaussian quadrature wi Galerkin weighting function x, y, z Cartesian coordinate frame z Normal distance from neutral axis Greek symbols α Thermal expansion coefficient ∆t Timestep in explicit integration with critical value ∆tcrit ε˙ Strain rate
xii
List of Symbols γ Shear strain µ Coulomb friction coefficient or fluid dynamic viscosity ∂2 ∂2 ∂2 T ∂ ∂ ∂ T 2 } and ∇ = { ∇ is the operator { ∂x ∂y ∂z ∂x2 ∂y 2 ∂z 2 } ν Poisson’s ratio or fluid kinematic viscosity ω Circular frequency π potential (energy) function ρ Density σ, {σ} Stress and stress vector τ Shear stress θ Rotation angle e.g. from a 1−2 to a x−y reference frame ε, {ε} Strain and strain vector ξ, η, ζ Natural coordinate system used in isoparametric finite elements k Thermal conductivity Subscripts and superscripts G Global coordinate value L Large deformation or local coordinate value O Original (undeformed) value 1, 2, 3 Material principal normal directions 23, 13, 12 Material principal shear directions e Element, elastic stress or strain p Plastic stress or strain x, y, z Cartesian coordinate frame y Yield stress Other symbols → Signifies a range between two limits a,b (a→b)
xiii
Part I
Finite element theory
1
CHAPTER
ONE
FUNDAMENTALS OF FINITE ELEMENT ANALYSIS
1.1
Introduction
Finite Element (FE) analysis was originally developed in the mid-1950s for aerospace structural analysis and has evolved, today, to become the most widely used general purpose computation method, with applications in nuclear, transport, manufacturing, sports, medical and a wide range of other areas. Specific types of analysis include, amongst many others, stress, failure, impact and crash analysis, buckling and frequency and diverse steady state and transient flow problems such as heat transfer, fluid flow in a porous medium, magnetism and electrostatics. In the last two decades FE simulation of manufacturing processes such as casting, plastics injection and metal stamping has also become increasingly important. Today, numerous commercial FE packages are available that have extensive analysis capabilities with a wide range of material laws to treat many different types of problems. There are also many other dedicated FE products to tackle specific applications that usually have tools for fast and efficient use to help an engineer design or optimise a particular process or problem. Despite the ease of use of these codes it is, nevertheless, important to have a sound understanding of the underlying theory and its correct application. In this chapter a general introduction to the FE method is presented. For this 3
Chapter 1. Fundamentals of finite element analysis
introduction a classical approach, based largely on implicit mechanics analysis is used to introduce fundamentals of the method. In addition, a brief description on 1D flow analysis, such as heat transfer and fluid flow is given. For now the focus is one dimensional (1D) bar and line elements to introduce various aspects of element formulations and FE techniques. In Chapter 2 more advanced beam and 2D/3D continuum elements are discussed, with subsequent chapters moving on to nonlinear and dynamic solution methods, field analysis and selected material laws.
1.2
Principles of the finite element method
Performing a successful FE analysis requires careful planning and a strategy for model preparation and its execution. Before introducing FE theory, some thoughts on issues an analyst will need to consider and address are highlighted. First, the problem to be tackled will need to be well understood concerning loading, how it functions and what the aims and expected outcomes of the analysis are. An appropriate modelling concept will need to be chosen, together with selection of suitable element types and material laws. The identification and application of correct external loading and other boundary conditions are not always straightforward or easy to represent. And the type of analysis required, which may be linear, nonlinear, transient, or some other must be carefully chosen. A linear mechanical analysis assumes constant properties and elastic material behaviour so stresses are proportional to applied load. It also assumes deformations are small so there is a linear relation between displacements and strains. If these conditions do not hold and effects such as material plastic yielding or large deformations, or both occur, then it will be necessary to conduct a nonlinear analysis. A field analysis like linear heat transfer assumes material thermal properties are constant and independent of temperature. In some cases different physics must be coupled, for instance, a thermomechanical analysis will be necessary if a structure undergoes expansion from heating and mechanical loading. This analysis may be linear or nonlinear depending on material properties, loading and deformations. Linear and nonlinear analyses yield a steady state solution that does not depend on time. Conversely, if material density (inertia) effects mechanical behaviour then a time dependent dynamic analysis is necessary, or in a heat analysis material heat capacity may necessitate a transient thermal solution. Another class of analysis performs a so-called ‘eigenvalue analysis’ to determine frequency or buckling response. These are just some possibilities, but there are others, and selecting the right analysis technique and an appropriate finite element code for the work is paramount to obtain successful results. Often meshing can be a particularly challenging task. All continua and structures have one, two or three dimensions, and in each case the problem to be modelled must be discretized with a mesh of appropriate element types to suit the 4
1.2. Principles of the finite element method
spatial geometry. For simple problems one element type may suffice, but for more complex problems it is often necessary to mix element types for a proper representation. The FE mesh must have sufficient detail in the right locations for good results, but usually the number of elements used must be limited so that practical analysis is feasible on the available computer. For example, a simple computationally efficient model is often preferable for prototype design or a parametric study, but for final design a model with far greater detail may be necessary. For simple linear analysis problems, modern high-performance computers allow large meshes to be quickly analysed, but for nonlinear problems careful meshing is essential to obtain a model that can yield accurate results at acceptable computation cost. In summary, considerable skill is necessary to build and execute a representative FE model that can deliver accurate results which must be correctly interpreted. The following is an apt quotation from a NAFEMS primer [1]: ‘The successful use of finite element programs relies on the skill of the analyst in setting up the model for the problem. This requires that he [/she] has knowledge of, or an instinct for, the load paths through the structure and the resulting stress distributions so that he [/she] can define a suitable mesh. In addition, he [/she] must also have more than a passing appreciation of the theory that was used to formulate the types of elements that are being used. Such a knowledge, and how the structural behaviour and the element behaviour interact, requires a considerable degree of experience on the part of the user that can only be obtained by practical use of the method...’.
1.2.1
Some FE terms and typical steps in an analysis
Some concepts and terminology used in finite element analysis are introduced with the aid of Figure 1.1. The structure (domain) is idealised with a mesh of elements that are inter-connected at common nodes. Nodal points also serve to introduce any applied loads or impose boundary conditions to prevent certain displacements. From the analysis, each node in a loaded structure will undergo displacements, and the relative displacement of all nodes attached to an element determine strains within that element. Stresses are then found from strains and the material constitutive law. For a field problem such as thermal analysis, imposed loads are fixed nodal temperatures or surface heat convection, with analysis results being distribution of nodal temperatures, which are often referred to as the internal variables. Internal distribution of heat flow (flux) is then found from temperature gradients and thermal conductivity. For the 2D mechanical problem depicted in Figure 1.1, each node can move with displacements u and v, respectively, in coordinate x and y directions. The coordinate frame x, y is sometimes referred to as the ‘global coordinate’ or ‘Cartesian’ frame. Each node is said to have two degrees of freedom (dof) for the two possible displacements, though it could have more dof to account for temperature, pressure, etc., if a coupled field analysis is performed. For 3D problems, each node 5
Chapter 1. Fundamentals of finite element analysis
pressure loading
pressure loading: approximated as nodal loads point load
point load at node
y(v)
nodes x(u)
support
support boundary conditions at nodes
elements
Figure 1.1: Some FE notations and a simple 2D idealisation
will have three translational dof, and for more complex elements such as beams and shells that also undergo bending, it will have additional rotational dof for each possible rotation direction. Meshing should provide nodes at the locations where imposed loads and boundary conditions are to be applied, and the mesh boundary should closely follow structure geometry. Furthermore, mesh density distribution should suit expected stress gradients, with generally smaller elements in areas of high-stress gradients, and a coarse mesh in areas of constant stress to help reduce computation times and computer memory. The mesh should be well graded without rapid changes in element sizes, and for best results elements must be well proportioned. A careful inspection of first analysis results may indicate areas of poor meshing which might need re-meshing and the analysis repeated. Many of these points are discussed further in Section 7.9. The flowchart shown in Figure 1.2 gives an outline of main computation steps in a standard linear ‘implicit’ analysis. Following these steps an analysis will first read in nodal, element, material and other model data such as loading, boundary conditions and control information on the type of analysis to be performed. Each element in the mesh has connectivity information on attached nodes and their spatial coordinates, together with information on geometric and material properties of the element. From this data a stiffness matrix for each element [k] is computed and assembled into the global structure stiffness matrix [K]. Element stiffness is a matrix that will be derived in Section 1.3, but for now we simply denote this [k]. Nodal loads are assembled and stored in a global structure load vector {P }. Boundary conditions suppress displacements at certain nodes and are imposed by modifying specific dof in the [K] matrix and {P } vector. A solution is then possible for nodal displacements {D} by inverting [K] and multiplying by {P }. Finally, strains for each element are found from relative displacement of its attached nodes {d}, and element stresses are obtained from the material law relating stresses to strains. 6
1.2. Principles of the finite element method
read in nodal points, element connectivity, material, etc., and control data compute each element stiffness [k] and assemble to the global stiffness [K] sum applied loads for the global load vector {P} apply boundary conditions to [K] and {P} invert [K] and compute the global nodal displacement vector {D} = [K]-1 {P} retrieve each element nodal displacements {d} from {D} compute element strains {ε}e from {d} and stresses {σ}e from the material law
Figure 1.2: Flow chart of key steps in a linear implicit FE analysis
1.2.2
Finite element types and their applications
Finite elements can be grouped as one-dimensional (1D), two-dimensional (2D) or three-dimensional (3D), depending on their number of spatial dimensions. A further classification often used is ‘continuum elements’ for representing continua and ‘mechanical elements’, which are typically used for mechanical or structural assemblies. Some popular elements and their classifications are shown in Figure 1.3. With regard to this figure it should be noted that although, for example, a beam element is classified as a 1D element, it can be used to construct a 1D, 2D or 3D geometric model. Similarly, 2D elements are regularly used to build 3D problems. structural elements
continuum elements
y(v) z(w)
2D triangle
3D tetrahedron
1D bar
3D solid
1D beam
2D thin shell
x(u)
2D quadrilateral
2.5D thick shell
Figure 1.3: Some basic finite elements: (◦) are nodes with only translational dof and (•) are nodes with translational and rotational dof 7
Chapter 1. Fundamentals of finite element analysis
Continuum 2D elements have nodal displacements u and v in the x and y directions. These elements only undergo in-plane deformations, thus creating in-plane stresses σx , σy , σxy . A 3D continuum element can deform in all three coordinate directions creating a three-dimensional state of stress σx , σy , σz , σxz , σyz , σxy . Structural finite elements can be joints, bars, beams, plates, shells and membranes. Some of these elements can undergo bending and therefore have additional rotational dof at the nodes. Nodes connecting adjacent elements ensure continuity of displacements, or other internal variables, at nodal points and elements are especially formulated to ensure that this continuity is enforced along element edges, so that deformations throughout the mesh are continuous. Element types that ensure continuity of displacements are said to have C 0 continuity. Some bending elements also have continuity of rotation, but this can be difficult to enforce and often this requirement is relaxed so that elements are computationally more efficient. Bending elements with displacement continuity and common tangents at their edges are said to have C 1 continuity, and there can be further possible levels of continuity concerning rates of curvature between adjoining bending elements. Certain 3D structures with specific loading and boundary conditions can be simplified as a 2D problem. Two common cases are a long continua with a constant cross section and thin continua, both having only constant in-plane loading in the thickness direction. These may be treated, respectively, as 2D ‘plane strain’ and 2D ‘plane stress’ problems as shown in Figures 1.4a and 1.4b. For plane strain the constraint prevents strain and creates stress in the thickness direction, whereas plane stress is free to contract without any stress. A further case is the rotationally symmetry structure shown in Figure 1.4c, which can be simplified as a 2D axisymmetric problem, provided any axial or radial loading also has rotational symmetry. Essentially, the same 2D finite element is used for all these cases, with the only difference being the material law used to relate stresses to strains. Material laws for 2D plane strain and plane stress are given in Equations 2.29.
a)
b)
c)
Figure 1.4: Possible 2D idealisations for a 3D structure. a) Plane strain. b) Plane stress. c) Axisymmetric
The power of the finite element method lies in its versatility to construct complex geometrical models with basic element types, each of which can have a wide range of constitutive laws to represent different material or other physical be8
1.2. Principles of the finite element method
haviours. As an example, the application of different element types that could be used to analyse the bike shown in Figure 1.5 is discussed. tubular frame 2D shells wheel rim 2D shells
saddle cover of membranes on a beam frame
spokes 1D bars
crank 3D solids Figure 1.5: Composite FE bike and application of different element types (Courtesy Munich Composites GmbH)
For this bike the basic frame is a thin-walled tubular section that could, in principle, be modelled with 1D beam elements having sectional properties for area and inertia, and an appropriate material law. Bars could not be used as the pin joints would create a ‘mechanism’ that would collapse in practice. Numerically this would yield a singular global stiffness matrix, so no unique solution is possible for similar reasons to those discussed in Section 1.10. A beam model transfers moments at joints and between elements preventing a mechanism to give correct global deformations, but beams cannot provide information on surface stresses or stress concentrations at joints. For these stresses at least a shell model is necessary. Shell elements only provide in-plane stresses which will vary across the thickness if bending occurs. For the composite bike shown, a so-called ‘multi-layered’ shell element would allow a ply-by-ply definition of the laminate, otherwise homogenised orthotropic mechanical properties for the laminate must be obtained and used. For a metal bike frame shell elements with an isotropic material law would suffice. If the tubular sections were relatively thick and through-thickness stresses felt to be important to compute, then a 3D solid model must be used, but several layers of solids will be necessary to approximate any bending behaviour. This would lead to a very large mesh that will be computationally expensive. A compromise might be to use thick shell elements throughout or, alternatively, detailed solid models for joint regions combined with an efficient shell model for the main tubular sections, with the two element types connected using tied constraints to ensure continuity of loads and displacements. 9
Chapter 1. Fundamentals of finite element analysis
For other parts of the bike, bar or beam elements could be used for the spokes, membrane or thin shell elements for the tyres and solid elements for the thick pedal crank. A membrane element is, in effect, a 2D version of a 1D bar element, since it does not have bending stiffness and cannot transfer moments. Specialised contact elements or common nodes could be used to treat interfaces between tyres and wheel rims, which would be modelled using shell elements. The saddle, for example, could be idealised as a membrane skin over a beam frame. For certain problems, however, different modelling strategies may be necessary depending on which results are required from the analysis. For example, Figure 1.6a shows material failure has occurred in the heat-affected zone of a welded bicycle joint, and Figure 1.6b shows metal fatigue failure at the stress concentration of a pedal crank, possibly initiated by a manufacturing defect. Both examples of failure could be predicted with advanced FE techniques, but an essential prerequisite is accurate prediction of the three-dimensional stress distribution, which requires a detailed 3D solid FE model. Beams for these parts cannot give such stress information, and even thick shells can only provide approximate 3D stresses. Usually, a localised FE solid model of the region is created for analysis, with loading conditions obtained from tests or a separate simplified FE analysis. An analysis for fatigue failure of a bicycle crank is undertaken in Tutorial T4.
a)
b)
Figure 1.6: Examples of failure. a) Rupture at a joint. b) Fatigue failure
1.3
Bar element stiffness - direct method
This section derives stiffness matrix [k] for a simple bar element, also called a ‘truss’ or ‘spring’ element, using an intuitive ‘direct’ derivation. Geometry, loading and displacements for this 1D element are shown in Figure 1.7. The bar has length L, an area A and modulus E, giving spring stiffness EA/L. Each node has only one dof, denoted by displacement u in the bar axial x-direction, so that each node 1, 2 can carry a force p2 , p2 and have end displacements u1 , u2 . Consider the two load cases shown in Figure 1.7. First, for case 1, node 1 is loaded by a force p1 causing a displacement u1 , while node 2 is constrained from 10
1.4. Basic relations for a bar element
moving by a reaction force p2 . For case 2, node 1 is constrained from moving while node 2 is loaded by a force p2 causing a displacement u2 . The force created by a displacement u is u(EA/L) and equilibrium of external and reaction forces for the two loading cases gives EA EA u1 and for axial equilibrium p2 = − u1 L L EA EA case 2: p1 = − u2 and for axial equilibrium p2 = u2 . L L
case 1: p1 =
(1.1)
L
case 1
case 2 2
1
Figure 1.7: Notation and load-displacement for the one dof bar element
For the general case of loading at both nodes, Equations 1.1 can be summed and expressed in matrix form as ( ) " #( ) p1 u1 EA 1 −1 = = [k] {d} L −1 1 p2 u2
(1.2)
where [k] is the bar element stiffness matrix having a size 2×2 for this 2 dof element and {d} is the nodal displacement vector.
1.4
Basic relations for a bar element
Direct methods to derive stiffness are only feasible for a few basic elements. It is therefore necessary to develop general techniques that can be used to derive a stiffness or characteristic matrix for any element to be used in diverse mechanical or field analysis problems. This is provided by variational methods that are covered in Section 1.5. For these approaches certain basic relations are necessary that are first presented.
1.4.1
Strain-displacement relations
A relation between material displacements and the strains they create is required. For the simple 1D material deformation shown in Figure 1.8, an imposed force 11
Chapter 1. Fundamentals of finite element analysis ∂u P causes the elemental length dx to increase to dx + ∂u ∂x dx, where ∂x is the displacement gradient, which is assumed constant. From the usual definition for strain and assuming initial displacement of the elemental length is u, the strain εx is ! ∂u dx − dx dx + ∂x change in length ∂u εx = = = . (1.3) original length dx ∂x
x
dx
P
u dx +
∂u dx ∂x
Figure 1.8: Deformation and strain for a 1D material
1.4.2
Shape function [N ] and strain-displacement [B] matrices
Other important relations are interpolation functions that can map displacement and strain at any point x along the length of a bar (x = 0→L) to end node displacements. Figure 1.9 shows two suitable linear interpolation functions, N1 and N2 for nodes 1 and 2. 2
1 u fi
u
A, E
fj
x L
N =1
N =1 N1
N x = 1 − x/L
N2
N x = x/L N =0
N =0 x=0
x=L
Figure 1.9: Bar element interpolation ‘shape’ functions 12
1.5. Bar element stiffness - Variational methods
In matrix form these functions give displacement ux at any point x as ( ) h x xi u h i 1 ux = 1− = N1 N2 {d} = [N ] {d} L L u2
(1.4)
where u1 and u2 are end node displacements and [N ] is known as the ‘shape function’ matrix. Applying Equation 1.3 to Equation 1.4, gives a relation for strain at any point x as du = εx = dx
dN1 dx
dN2 dx
{d} = [B] {d}
(1.5)
where [B] is known as the ‘strain-displacement’ matrix. It will be seen later that derivation of this matrix for any element type is key to finding its stiffness matrix. For this 1D bar element [B] is obtained from differentiation of Equation 1.4 giving 1 1 . [B] = − L L
(1.6)
It is evident from Equations 1.5 and 1.6 that strain in the bar element is constant and does not vary with position εx = [B] {d} =
1.5
(u2 −u1 ) . L
Bar element stiffness - Variational methods
Variational methods provide a foundation for general techniques to derive stiffness of any finite element using classical mathematical methods first proposed by Rayleigh-Ritz and Galerkin. Essentially both methods use calculus of variations to minimise a function, their differences lay in selection of the function to be minimised. Both methods will yield the same results, as will be seen in the following derivations for stiffness of a bar element. The Rayleigh-Ritz method approximates the displacement field of a domain with a polynomial or similar function and finds a solution by minimising this function whilst satisfying equilibrium boundary conditions. The function to be minimised is known as a ‘functional’ and provided this can be established provides a powerful means to derive finite element equations. The Galerkin method is one of a group of numerical methods that convert a continuous operator problem, such as a differential equation, into a discrete problem for solution, and there is a clear connection to the element based discretization schemes used in finite element 13
Chapter 1. Fundamentals of finite element analysis
analysis. Both approaches seek the minimum of a continuous function and are therefore termed variational methods. A detailed overview of these techniques is provided by Finlayson [2]. In these methods the functional and governing differential equations represent an accurate mathematical description of the problem, whereas their transformation to a discretized finite element form is approximate. In finite element terminology these are termed as, respectively, the ‘strong’ and ‘weak’ forms, or statements, of the problem.
1.5.1
Rayleigh-Ritz and minisation of total potential energy
For the Rayleigh-Ritz method total potential energy provides a suitable functional to be minimised for element stiffness. This principle states that the displacement field that minimises total potential energy of a system, and also satisfies essential boundary conditions, is the one that corresponds to a state of static equilibrium. This principle can be illustrated as follows. Consider an initially undeformed spring of length L, with an imposed force p causing displacement u at the free node as shown in Figure 1.10a. The internal spring stored energy U , potential energy of loading W and total potential energy Πp of the deformed system for an arbitrary displacement u are given by Equations 1.7, with their graphical interpretation shown in Figure 1.10b. stored energy potential energy of loading total potential
1 1 U = pu = ku2 2 2 W = pu 1 Πp = U − W = ku2 − pu . 2
(1.7)
energy U < < < < <
1/2 artificial damping occurs and accuracy reduces. The governing equilibrium equation at time t + ∆t is expressed as ¨ t+∆t + [C] {D} ˙ t+∆t + [K] {D}t+∆t = {P }t+∆t . [M ] {D}
(3.49)
A solution using Equations 3.48 and 3.49 is found as follows. From Equation 3.48a ¨ t+∆t is computed in terms of {D}t+∆t and other known information at time t. {D} ˙ t+∆t , also in terms of This is then substituted into Equation 3.48b to obtain {D} t+∆t t+∆t t+∆t ¨ ˙ {D} . This gives {D} and {D} in terms of the unknown displacements {D}t+∆t . These two relations are then used in Equation 3.49 to find {D}t+∆t . ˙ t+∆t Finally, {D}t+∆t is substituted into Equations 3.48a and 3.48b giving {D} t+∆t ¨ and {D} . This sequence then repeats with a new time interval ∆t. It may be possible to update the coefficient matrices if these change, but for any significant nonlinearity the technique must be combined with a Newton-Raphson solution as outlined in Section 3.4.3. 3.4.2.3 The Hilber-Hughes-Taylor (HHT) method A disadvantage of the Newmark method is that only the combination γ = 1/2 with β = 1/4 is second order accurate, any other combination reduces to first 114
3.4. Transient dynamic analysis
order accuracy. Unfortunately, this combination γ = 1/2, β = 1/4 does not have any high frequency damping. Such damping is usually desirable to suppress high frequency noise that can trigger an unstable solution. This type of noise is briefly studied and seen in Exercise E.T10b, albeit for an explicit integration problem. The Hilber-Hughes-Taylor (HHT) direct integration method [19], or alpha method, has the advantage that damping is provided while maintaining second order accuracy. In this method Newmark formulas in Equations 3.48 are used, and the dynamic equations of motion in Equation 3.49 are modified to have the form ¨ t+∆t + (1 + α) [C] {D} ˙ t+∆t − α [C] {D} ˙ t+∆t [M ] {D} + (1 + α) [K] {D}t+∆t − α [K] {D}t+∆t = {P }t+∆t .
(3.50)
In this case time increments depend on α and are given by t + ∆t = t + (1 + α)∆t . A solution is, otherwise, the same as that described for the Newmark method. This algorithm is implicit and second order accurate provided α has the limits 1 − ≤α≤0 3
with Newmark constants
γ=
1 − 2α 2
and
β=
(1 − α)2 . 4
If α = 0 the method reverts to the classical Newmark method without damping (dissipation), while α =− 1/3 has maximum dissipation. The HHT method for mechanical dynamics is applied in Tutorial T9. 3.4.2.4 Direct integration for flow problems Direct integration can be readily adapted and applied to other transient field problems like heat transfer and fluid flow. Governing equations for these problems only involve the first time derivative as expressed in the generalised Equations 3.31. For the following explanation heat transfer is considered, which is expressed in a simplified form as [KC ] {T˙ } + [K] {T } = {R}
(3.51)
where [KC ] and [K] are heat capacity and conduction matrices, {T˙ } is the differential of nodal temperatures with respect to time and vector {R} combines several flow vectors; the full definition of these relations is given in Equation 5.60. A solution is sought for temperature {T } over time, knowing initial temperature boundary conditions at time t = 0. It is assumed that matrices [K] and [KC ] are independent of temperature and it is known how {R} varies with time. 115
Chapter 3. Nonlinear, dynamic and eigenvalue analysis
As usual solutions are sought at time intervals ∆t, with temperature states denoted {T }t and {T }t+∆t . It is assumed there is a linear relation between temperature at two times given by h i t t+∆t {T }t+∆t = {T }t + ∆t (1 − β){T˙ } + β{T˙ }
(3.52)
where β has a similar function to that used in Newmark’s method Equation 3.48 and may be adjusted by the analyst. Equation 3.51 is expressed at times t and t + ∆t, with the first multiplied by 1 − β and the second by β yielding n o t (1 − β) [KC ] {T˙ } + [K] {T }t = (1 − β) {R}t n o t+∆t β [KC ] {T˙ } + [K] {T }t+∆t = β{R}t+∆t .
Adding these two equations and using Equation 3.52 to eliminate time derivatives gives 1 [K ] − (1 − β) [K] {T }t + (1 − β) {R}t + β{R}t+∆t C ∆t t+∆t (3.54) {T } = 1 [K ] + β [K] C ∆t so that {T }t+∆t can be found from known quantities with flow vector {R}t+∆t found from Equation 3.51 using {T˙ } =( {T }t+∆t − {T }t )/∆t. At the start initial temperatures {T }0 are used to find {T }0+∆t , these then become new known temperatures for the RHS of Equation 3.54 in the next time interval ∆t. For β < 1/2 the method is conditionally stable and requires a time step no larger than ∆tcrit =
2 (1 − 2β)λmax
where Hughes [20] gives λmax as the largest eigenvalue of the thermal problem. For β ≥ 1/2 the algorithm is unconditionally stable so any ∆t can be used, but in practice ∆t must be limited for accuracy. For implicit analyses β = 1/2 is popular. Other options for β and consequences are discussed by Cook et al. [15], together with other solution possibilities. Direct integration for heat transfer is used in Tutorial T9.
3.4.3
Nonlinear dynamic analysis
So far explicit and direct integration methods presented were linear and solved transient problems that had constant coefficient matrices. However, many problems will be nonlinear, due to effects like geometric large deformations and material behaviour (e.g plasticity) in mechanics, or material properties that are a function 116
3.4. Transient dynamic analysis
of results, such as temperature dependent thermal properties in heat analysis. This leads to non-constant coefficient matrices in the governing equations requiring additional calculation steps within the dynamic analysis. Explicit integration: Usually the small critical time step in explicit analysis allows geometric and material nonlinear behaviours to be easily followed during explicit integration. These are incorporated into the solution via calculation of element internal forces in Equation 3.37, where the element large displacement matrix [BO +BL ] from Equation 3.19 is used to account for large deformations and inelastic element stresses would be computed from a nonlinear material constitutive law, such as plasticity, that relates element strains to stresses. In practice, however, explicit codes use element formulations and solution schemes that continuously update nodal displacements, and element stresses and strains at each cycle, so that Equation 3.37 can be efficiently computed for the current deformed state and updated stress. Most nonlinear material behaviours are reasonably followed due to the small time step. Although it may be necessary to include an additional convergence scheme to ensure correct material behaviour, such as in plasticity where stresses and strains must correctly stay on a specified plastic yield surface. Implicit integration: Integrating transient nonlinear problems combine the concepts in Section 3.3.5 for iterative solution of implicit nonlinear static problems using a Newton-Raphson technique, with any of the implicit direct integration methods presented in this section. In the following equations solution of a nonlinear dynamic mechanics problem are derived. If the dynamic time interval is ∆t and the NR iterations are denoted n, then the dynamic equilibrium equations of motion neglecting damping are t+∆t ¨ n+1 + [KT ]t {∆D} [M ]t+∆t {D} − {Pint }t+∆t n+1 = {Pext } n
(3.55a)
where t+∆t {∆D}n+1 = {D}t+∆t . n+1 − {D}n
(3.55b)
The standard trapezoidal rule is used to estimate forward time displacements and velocities from current values and averaged velocity and acceleration values using {D}t+∆t = {D}t +
∆t ˙ t ˙ t+∆t {D} + {D} 2
˙ t+∆t = {D} ˙ t + ∆t {D} ¨ t + {D} ¨ t+∆t . {D} 2
(3.56a)
(3.56b)
Finally, substituting Equation 3.56b into Equation 3.56a and the result into Equa117
Chapter 3. Nonlinear, dynamic and eigenvalue analysis
tion 3.55b gives ¨ t+∆t = {D}
4 4 ˙ t t t+∆t ¨ t. {D} − {D} {∆D} − {D} + {D} − n n+1 ∆t2 ∆t
Substituting this relation into 3.55a yields [K]{∆D} = {P}
(3.57)
where [P] is [P] = {Pext }t+∆t − {Pint }t+∆t n 4 ˙ t 4 t t t+∆t ¨ − [M ] {D}n − {D} − {D} − {D} ∆t2 ∆t and [K] is [K] = [KT ] +
4 [M ] . ∆t2
In these relations [KT ] is tangent stiffness computed using {D}n . If this is not accurate the solution will diverge. Convergence is checked by residual out-ofbalance force given by ¨ t+∆t − [C]{D} ˙ t+∆t − {Pint }t+∆t . {ψ}t+∆t = {Pext }t+∆t − [M ]{D} Equation 3.57 is solved iteratively using a NR scheme at each time interval {∆t} to find the dynamic state of equilibrium. Although the solution is implicit and any time step could be used, in practice converge is usually difficult and small time steps are often necessary for an accurate solution. Dynamic nonlinear transient analyses are performed in Tutorial T9, where some of these convergence difficulties are encountered.
3.4.4
Comparing explicit and implicit methods
Explicit and implicit solutions are fundamentally different with each having their own advantages and disadvantages for a particular application. Generally, implicit methods are most suited to linear static and steady state problems, where material non-linearities and deformations are moderate. Contact treatment is possible, but it can be computationally expensive and convergence difficult. Usually, explicit methods are superior for short duration impact type problems and it is the only feasible method for events like car crash, where large material nonlinearity and geometric deformations occur, combined with extensive contact. Explicit codes 118
3.5. Buckling analysis
can also be used for longer duration events such as sheet metal stamping and even quasi-static loading. Table 3.1 broadly distinguishes some general features of these two methods, however, it should be added that the enormous main memory and speed of modern high-performance computing available today has led to some overlap of these classifications.
stability robustness analysis times memory costs static problems dynamic problems contact problems
implicit unconditionally stable poor for highly NL problems high for large problems high for large problems very effective limited nonlinearities limited capabilities
explicit conditionally stable ∆t 2000 kN) or material softening (α > 2) will lead to a section stiffness that cannot support applied load and the solution will breakdown.
converged solution
total displacement (L) [mm]
3. Adapt Exercise 2 to use the ‘modified’ Newton-Raphson method. 130
3.6. Free frequency analysis
4. Use the Newmark direct integration method to analyse the two bars in Exercise 2 assuming elastic behaviour (α = 0). For this dynamic analysis use a consistent mass matrix [M ] as described in Section 4.3 with Rayleigh damping given by [C] = a[M ] + b[K], using constants a = 0.25 s and b = 0.000025 s−1 . These damping parameters are problem dependent and depend on the level of damping desired. Note if the loading were static the end tip displacement u is obtained from the standard relation P = (EA/L)u giving 1.9 mm.
(1) 𝐿 𝐿
(2)
(3)
𝑃 𝑃 = 200000 𝑁
𝐴 = 100 𝑚𝑚
𝐸 = 210000 𝑀𝑃𝑎
𝐿 = 100 𝑚𝑚 𝜌 = 7.8 × 10
total displacement [mm]
❼ Construct a flowchart of analysis steps based on Equations 3.48 and 3.49. Take care to modify [K] and [M ] for boundary conditions. ❼ Is this method implicit or explicit, and why. ❼ Program this Newmark algorithm using FreeMAT or Octave. You will have to rearrange the governing equations and follow the solution described in the text. It is suggested to use Newmark constants Beta = 0.25, Gama = 0.5, with time 0 → 0.001 in steps of 0.000005 so the high axial frequency is captured with sufficient points for plotting. From results the following graph is plotted showing dynamic loading with and without damping, both having a free end displacement that oscillates about the static deformation of 1.9 mm. The slightly erratic looking undamped curve is caused by overlapping of frequencies from the two free nodes as discussed in Example 3-4. Applying damping has encouraged harmonic motion, but this behaviour will depend on the Rayleigh damping parameters used.
𝑡𝑜𝑛𝑛𝑒/𝑚𝑚
[C] = 0 [C] ≠ 0
time [sec]
Figure 3.15: Dynamic Newmark solution with and without Rayleigh damping
5. Modify Example 4 replacing the force loading with an imposed velocity of 1000 mm/s at the free end. Beware to set initial conditions to start a solution as specified by Equation 3.46. 6. Discuss the differences between a geometric nonlinear analysis and linear eigenvalue analysis for prediction of buckling, and likely causes of error for each. 7. Discuss limitations of a standard linear eigenvalue analysis to determine natural frequencies and mode shapes of a structure. 131
Chapter 3. Nonlinear, dynamic and eigenvalue analysis
8. Several tutorials using the FreeCAD/CalculiX codes are especially relevant to this chapter, with each having further exercises: ❼ Tutorial T3 covers geometric and material nonlinearity solved using the Newton-Raphson method. ❼ Tutorial T9 undertakes transient dynamic analysis for mechanic and thermal problems using direct integration. ❼ Tutorial T10 investigates explicit integration. ❼ Tutorials T7 and Tutorial T8 cover linear eigenvalue analysis for frequency and buckling.
132
CHAPTER
FOUR
LOADS, BOUNDARY CONDITIONS AND CONTACT
4.1
Introduction
Different types of loads can be applied in solid mechanics and field problems. This chapter discusses possible loads for mechanics, with a description of load types in field problems deferred to Chapter 5 which covers this topic. So far in this book, for mechanics, loads have only been nodal point forces, but there are other types of surface forces, and body forces like gravity and initial stresses or strains due to preloading. Relations to compute these and convert their effect to equivalent nodal loads are discussed. Also, opportunity is taken to briefly mention some general comments regarding boundary conditions and their application. Another important loading is possible contact between bodies. This is a large and specialised topic, so only an introduction is given here covering contact (gap) elements which are mostly used in implicit analysis, and some details on those used in explicit analysis. From this some further general comments on contact algorithms widely used in commercial codes are made. Implicit and explicit contact is treated in Tutorial T11. 133
Chapter 4. Loads, boundary conditions and contact
4.2
Load types and assembly
In the introductory Chapter 1 only forces conveniently applied at nodes were assumed for the load vector {P } of the equilibrium equations {P } = [K]{D}. However, there are other types of loads that can be applied and a summary of these is given for mechanical problems. But first a short recap of load vector assembly and storage is presented.
4.2.1
Load vector storage and assembly
As mentioned in Section 1.9 for element assembly, nodes are internally renumbered to minimise bandwidth of the global stiffness matrix [K]. It is also necessary for storage and handling of data that this renumbering is sequential. Load vector {P } will have a size equal to the number of dof per node multiplied by the total number of nodes, with a space allocated for each dof of each node. For instance, an arbitrary node numbered 6 might get renumbered to 3, and in a 2 dof problem (dof = 2) load px will be stored in location 3×dof − 1 = 5 and py in location 3×dof = 6 of vector {P }; with this scheme node 1 will have storage locations 1, 2. For a 3D problem (dof = 3) node 3 will have storage locations 7, 8, 9 in {P }. Obviously things are more complicated in models with mixed element types having a different number of dof per node, but the principles are the same. Storage in the displacement vector and stiffness matrix use the same numbering system. However, to avoid confusing the analyst, output results and any error messages will refer to the original input numbering system.
4.2.2
Load types for mechanics
In solid mechanics problems different types of loads are possible. These can be body forces due to preloaded stresses (or strains), thermal stresses, or forces due to self-weight or centrifugal types of loading. External loads can be line loads along 1D elements or surface pressures on 2D and 3D element faces that act normal or tangential to the surface, such as would occur in contact with friction. In all cases these forces have to be converted to equivalent nodal quantities and added to correct dof locations in the total nodal force vector {P }. The complete set of equilibrium equations for a solid mechanics problem are "
N Z X
e=1
T
V
#
[B] [E] [B] e dV {D} = {Pnf } + [K]
{Pnf }
N X
e=1
{psf }e +
{Psf }
N X
e=1
{pbf }e +
{Pbf }
N X
e=1
{pis }e
{Pis }
{P } = {Pnf } + {Psf } + {Pbf } + {Pis } 134
4.2. Load types and assembly
where the left hand side is summation of the assembled structure stiffness for all elements (e = 1→N ), as described in Section 1.9. {D} is the vector of displacements to be found from {D} = [K]−1 {P }. The right side vectors are nodal forces due to concentrated nodal forces {Pnf }, surface forces {Psf }, body forces {Pbf } and initial stresses (or strains) {Pis }, that all accumulate into a single total force vector {P }. In most analyses some of these force vectors will be zero. Nodal forces: {Pnf } is simply the total concentrated nodal force vector in the global frame containing all loads applied to nodal dof. Surface forces: {psf }e for an element are obtained by transforming any distributed surface forces to equivalent nodal forces using element shape functions. Consider the point and distributed load cases shown for a simple 1D element in Figure 4.1. For the point load in Figure 4.1a shape functions will distribute load to end nodes. These can be viewed as either reaction forces to the load using negative values, or provide statically equivalent forces at the end nodes for {psf }e so that
{psf }e =
(
r1 r2
)
=
L−x L
T
x L
p=
"
N1 N2
#
p
(4.1)
where N1 , N2 are shape functions for this 1D element from Equation 1.4 and x the point load location. q(x) =
L−x x q1 + q 2 L L
p
q2
q1 r1
r2
x
r1
r2
x
L a)
b)
Figure 4.1: Surface forces on a line element. a) Point load. b) Distributed load
If the line element has a linear load distribution with arbitrary force q1 at one end and q2 at the other, the variation q(x) can be described by the function shown in Figure 4.1b. End nodal forces are now found by integrating this variation over element length using the shape functions
{psf }e =
(
r1 r2
)
=
Z
L
0
h
N1 N2
iT
135
L q(x)dx = 6
(
2q1 + q2 q1 + 2q2
)
.
(4.2)
Chapter 4. Loads, boundary conditions and contact
Equation 4.2 could also be used if an edge of a 2D or 3D element were loaded. Further, it can be adapted as a general expression to convert normal surface pressure on a 2D or 3D element face to equivalent nodal forces {psf }e =
Z
[N ]T q dS
(4.3)
Se
where Se is element surface area of element e, [N ] contains 2D surface shape functions that depend on shape (triangle or quadrilateral) and number of nodes (linear or higher order) and q is the applied pressure, which could be constant or variable over the surface. Use of shape functions ensures that constant pressure applied to an irregular mesh is correctly converted to a distribution of equivalent nodal forces that represent the same uniform pressure. Body forces: These act throughout the volume of an element. The general expression to obtain nodal forces from an applied body forces is {pbf }e =
Z
[N ]T α dV
(4.4)
Ve
where integration is over each element volume Ve . For forces from self weight α is density×gravity (ρg). Another type of body force are centrifugal forces as used in Tutorial T7. Initial stress/strain forces: Expressions for nodal forces {pis }e due to initial stresses or strains are obtained as follows. From the general expression {pis }e = [k] {d} =
Z
V
[B]T [E] [B] dV {d}
(4.5)
if initial strains εO exist then {εO }e = [B] {d}
so
{d} = [B]T {εO }e .
(4.6)
Combining Equations 4.5 and 4.6, and using the elastic relation {σO }e = [E] {εO }e yields {pis }e = −
Z
T
Ve
[B] {σO }e dV
or
Z
Ve
[B]T [E]{εO }e dV
(4.7)
where a negative for initial stresses is necessary to balance nodal forces with internal stresses. Examples of initial loading could be pre-tensioning stresses {σO } or some other volume change that is suppressed, and initial strains {εO } could be due to volume change such as from thermal expansion or swelling effects. This 136
4.3. Lumped and consistent mass matrices
is discussed further and applied in Tutorial T5 where the initial strains {εO } are created due to thermal expansion strains {εT }. Total forces: In all of these expressions the integral may have to be computed numerically, either using Equation 2.51 or 2.53 for simplex elements, or using isoparametric [N ] and [B] matrices and Gaussian quadrature for isoparametric elements. Also, forces may be computed in a local element frame and care must be taken that these are correctly transformed to a global frame before adding to the global force vector {P }.
4.3
Lumped and consistent mass matrices
Mass distribution of a domain is represented by the [M ] matrix. This controls inertia behaviour in dynamic or fluid flow problems, heat capacity in transient heat transfer analysis, and is necessary to treat similar dynamic behaviours in other transient field problems. It is obtained by assembly of element mass matrices and is usually computed in either a so-called ‘lumped’ or ‘consistent’ form. In Examples 3-1 and 3-4, and generally for explicit FE analysis, a lumped mass matrix is used in which, for each element, total element mass is divided by the number of nodes it has. This nodal mass is then equally lumped to every translational dof of the attached nodes. Assembly adds all contributions from elements attached to each node. For fluid flow and bending elements in a dynamic analysis a rotational inertia is used for each rotational degree of freedom. This method of mass lumping is usually good enough and greatly simplifies an analysis since [M ] is diagonal requiring only minimum storage which, if required, is trivial to invert. For a simple bar element half the bar mass is lumped to each node giving ρAL 1 0 [m] = . 2 0 1 An alternative interpretation of mass distribution is obtained by using the same shape functions as those used to describe displacement variations across an element, so that mass distribution is consistent with displacement distribution. This gives a continuous representation that will apportion masses better, especially for irregular meshes. This matrix can be derived from dynamics as follows. The displacements and velocities of a point in an element are, respectively u = [N ]{d} v w
and
u˙ ˙ = [N ]{d} v˙ w˙ 137
Chapter 4. Loads, boundary conditions and contact
where a dot denotes differentiation with respect to time and [N ] are the usual element shape functions. For material density ρ the kinetic energy is KE = 1 2 2 ×mass×velocity , so that 1 ˙ T KE = {d} 2
Z
V
˙ . ρ[N ]T [N ]dV {d}
In this relation the term [m] =
Z
R
V
ρ[N ]T [N ]dV represents the element mass matrix [m]
ρ[N ]T [N ]dV .
(4.8)
V
For a simple bar element with uniform area A and density along its length the element consistent mass matrix is [m] = ρA = ρA
Z
Z
L
0 L
0
h
N1 N2
iT h
L−x L
x L
i N1 N2 dL
T
L−x L
x L
ρAL 2 1 dL = . 6 1 2
(4.9)
Thus, like stiffness, a consistent element mass matrix is fully populated and has the same dimensions as [k]. Assembly of element mass matrices follows the same procedures used for stiffness assembly, leading to a structure mass matrix [M ] that also has the same form as [K]. Equation 4.8 is general and applies to any type of element using its shape function matrix [N ]. For integration either an assumed displacement, simplex, or isoparametric element formulation as presented in Chapter 2 could be used.
4.4
Boundary conditions
An introduction to boundary conditions was given in Section 1.6, and applied in Examples 1-1 and 1-2. Some further general comments are pertinent. It was described in Section 1.10 that matrix [K] is singular, and that necessary and sufficient constraints must be applied to suppress all rigid body modes, so it may be inverted for [K]−1 and a solution {D} = [K]−1 {P } found. Boundary conditions are imposed for a dof by overwriting the diagonal term of the constrained dof in the stiffness matrix [K] with 1.0 and setting all other cells of that dof in the row and column to zero. Also, cells for this dof in the {D} and {P } vectors are set to zero. These constrained dof could be either a displacement, or for bending elements could be a rotation. Reaction forces at constrained nodes are retrieved after solution from equilibrium of forces between the constraint and attached elements. 138
4.5. Contact
In Chapter 5 on field analysis, Examples 5-1 through 5-6 cover heat conduction and demonstrate application of boundary conditions for fixed nodal temperatures and surface convection. These examples apply, essentially, the same methods as used for boundary conditions in mechanical analysis. Stiffness matrix [K] can be inverted by direct methods like Gaussian elimination and Choleski decomposition, or iterative methods like Gauss-Seidel. There are numerous others. These matrix inversion methods are specially designed to only store and operate on one symmetric half of the banded stiffness matrix, thereby saving storage and computation time.
4.5
Contact
Mechanical devices, fluid flow and heat transfer are typical phenomena where interaction between bodies can take place and must be taken into account. The problem of contact analysis is twofold: First, interaction between bodies must be identified with a search algorithm and possibly followed if surfaces are moving and, second, interaction must be treated. In mechanical contact forces are applied to resist penetration of surfaces and in dynamic problems this must also correctly transfer momentum between the two bodies. In field problems like heat transfer exchange of heat energy takes place. In this section contact is discussed in the context of mechanics, but many aspects would apply to other types of contact. Efficient analysis of contact was a particularly active area of research in the early 1990’s as explicit FE impact and crash analysis became feasible, which demanded computationally fast and robust modelling of contact. The basic idea of a search algorithm is to identify nodes from one surface that contact, or are likely to contact another surface, which is modelled by the faces of elements. Potential contact nodes are called ‘slave’ nodes and contact surfaces are ‘master’ surfaces. These definitions are further elaborated in Tutorial T11. Broadly, there are two types of contact. Either clearly identified slave and master surfaces are defined, such as in metal stamping where a metal sheet contacts tooling; this is often termed a ‘single surface’ contact. Or there is so-called ‘self-contact’, where large volumes are defined that contain many elements. This is invaluable for areas where contact surfaces cannot be identified in advance, such as self-contact from folding mechanisms in car crash simulation. Search algorithms for the former are straightforward and fast, whereas the latter is far more challenging due to the enormous number of potential contacts that must be checked. Usually self-contact requires a computationally fast periodic search to identify potential contact pairs, possibly considering the movements taking place, followed by a refined local search. A popular method proposed by Benson [23] uses a global bucket sort to organise sub-volumes into bucket cells based on geometry, with a pinball method proposed by Belytschko et al. [24], or similar algorithm, for fine 139
Chapter 4. Loads, boundary conditions and contact
search of active contacts. It is necessary that elements can move between buckets during large deformations. Contact is a large topic and only some basic concepts are introduced here covering so-called ‘gap’ elements, which is a simple means to treat contact via an added element, and some details on the penalty force method mostly used in explicit FE codes. These two options provide a basis for other contact algorithms. For the interested reader a review of search and contact algorithms, with an extensive list of further reading is provided by Bourago and Kukudzhanov [25]. In Tutorial T11 penalty force contact is applied to a simple dynamic beam problem using explicit analysis. Also, implicit nonlinear analysis of a rubber seal is undertaken with CalculiX using gap elements to model mechanical contact between surfaces and interface heat transfer.
4.5.1
Contact in implicit codes - Gap elements
Gap elements are an early and simple method to model contact between bodies. Despite some limitations they can be effective and are available in most commercial FE codes. Essentially these are 1D elements, as introduced in Section 1.3, with a material law having negligible stiffness for no contact and high stiffness for contact as shown in Figure 4.2. A possible extension is to superimpose a transverse stiffness to the spring element to account for friction. p
u δ
u x(u)
δ
u=δ
x(u)
Figure 4.2: Gap element compression stiffness with closure at u = δ
This 1D element ties pairs of nodes that lie opposite each other on either side of the contact interface and this is, perhaps, the main limitation that meshing should be structured so nodes can be paired for each gap element. Also, the mesh will have to be reasonably regular and fine for a good transfer of forces between the two bodies. Usually spring stiffness is linearly related to compression length, but nonlinear laws are often available to help control the magnitude of contact forces for cases of strong contact, or possibly soft contact between highly deformable bodies like foams. Inappropriate contact forces is often a source of numerical instability, or excessive penetration of surfaces. In the following only contact between 2D bodies is considered, but extension 140
4.5. Contact
to 3D is straightforward. Contact between two bodies connected by a gap element is shown in Figure 4.3. Normal direction is from node i to node j with tangential direction orthogonal to this. A normal spring with stiffness kn acts in the normal → − − direction → n and a tangential spring kt acts in the transverse direction t . (p ) (p ) j
n
k
j
k
t
(p )
y
i
yL
x
a)
(p )
xL i
b)
Figure 4.3: Node-to-node gap element. a) Node numbering and vector directions. b) Normal and transverse (friction) spring stiffnesses
From Figure 4.3 the gap element stiffness equations can be expressed as [k L ] {dL } = {pL }
(4.10)
where superscript L denotes local frame quantities. Force and displacement vectors are {pL } = { (pn )i (pt )i (pn )j
(pt )j }T
{dL } = { (un )i (ut )i (un )j
(ut )j }T
and the gap element stiffness matrix is
[k ] = L
kn 0 −kn 0 0 kt 0 −kt . −kn 0 kn 0 0 −kt 0 kt
(4.11)
Spring stiffness kn = EA/L is rather arbitrary, but could be estimated from an average of interface material Young’s moduli, the area that the spring represents and spring length at a suitable contact distance. If there is no contact stiffness kn is set to an artificial low value, and if contact occurs stiffness is assigned and its magnitude increases with depth of contact. A zero stiffness cannot be used for kn 141
Chapter 4. Loads, boundary conditions and contact
as this would lead to zeros appearing in the diagonal of the global stiffness matrix [K], which would give a singular matrix and prohibit a solution. Friction stiffness kt can take on different values depending on friction conditions. For frictionless contact stiffness kt in Equation 4.11 is set to a low value, or for ‘sticking’ friction it is set to a high value, otherwise Coulomb friction as described below is used. Some experimentation with different analyses might be necessary to find suitable values for low and high stiffness, but typically 10−12 and 103 times the gap element stiffness are reasonable. These values should not be too extreme or conditioning problems will occur in stiffness matrix inversion. For friction the following Coulomb law with coefficient of friction µ will have to be satisfied pt = µpn .
(4.12)
One approach to include this friction is to rewrite Equation 4.10 and Equation 4.11 to have a modified form for [k L ] (pn )i (p ) t i (pn )j (p ) t j
=
(un )i kn 0 −kn 0 (u ) µkn kt −µkn −kt t i −kn 0 kn 0 (un )j −µkn −kt µkn kt (ut )j
Writing the first two rows of Equation 4.13 gives (pn )i = kn (un )i − (un )j
.
(4.13)
(4.14a)
(pt )i = µkn (un )i − (un )j ) + kt ((ut )i − (ut )j .
(4.14b)
and using a negligibly small (but not zero) value for kt in Equations 4.14 gives the required relation for friction stated in Equation 4.12 (pt )i ≈ µ(pn )i .
(4.15a)
Similarly, the last two rows for node j gives (pt )j ≈ µ(pn )j .
(4.15b)
From Equations 4.13 the normal forces (pn )i and (pn )j are, correctly, equal and opposite with directions according to the convention in Figure 4.3b. Therefore the friction laws in Equations 4.15 are also equal and opposite. However, their loading directions are not known. There are two possibilities: 142
4.5. Contact
For (ut )i < (ut )j force (pt )i is positive and (pt )j negative For (ut )i > (ut )j force (pt )i is negative and (pt )j positive . For analysis the local element stiffness matrix [k L ] is modified depending on the desired contact and friction conditions. This is then transformed to the global frame using Equation 1.27 and assembled into the global stiffness matrix [K] in the usual way. This problem is nonlinear and an iterative solution is necessary since gap element status is not known in advance and, probably, there will be interaction with other gap elements defining a surface contact. For this a NewtonRaphson scheme to balance internal and external loads is performed. For the case of Coulomb friction, µ is first set to a positive value. From an analysis the direction of sliding for (ut )i and (ut )j is checked; for (ut )i < (ut )j the positive value for µ is correct, but for (ut )i > (ut )j the analysis is repeated using µ = − µ in Equation 4.13. Also, the solution will need to transform load and displacement vectors between the global x, y frame and the local gap element frame using Equations 1.26.
4.5.2
Contact in explicit codes
A major advantage of explicit integration is the efficient and robust way it can handle contact, which is one main reason for its use in analysis of problems like crash and impact. Some key features of contact are schematically shown in Figure 4.4 for the 2D representation of two bodies that have penetrated each other. 1m
2s
k
k
3m k
1s 2m
4s k
3s
4m
Figure 4.4: Principles of penalty force contact
Essentially, within each cycle of the explicit algorithm, nodes that have penetrated surfaces are identified. In Figure 4.4 ‘slave’ nodes 1s -4s have penetrated element faces that are denoted as ‘master’ segments. For each slave node the position of a corresponding fictitious ‘shadow’ node 1m -4m is determined that lies on a master segment and has a normal projection to the slave node. For each contacting pair opposing penalty forces pcont are applied to the slave and shadow nodes normal to the master surface to resist penetration. For friction equal and opposite friction forces µpcont are applied to these nodes acting parallel to the master surface to resist sliding. Slave node forces are transformed to the global frame and added to the global force vector; for shadow nodes forces are distributed to the attached segment nodes using relations like Equations 4.1 and similarly trans143
Chapter 4. Loads, boundary conditions and contact
formed and added to the global force vector. These added forces influence nodal accelerations so that contact and friction sliding are both resisted. The penalty force pcont is designed to act over many cycles. It is proportional to penetration and a reasonably general law should reflect average stiffness of the contacting materials and the area that the spring shadow node represents. Tutorial T11 gives an example of contact in an explicit algorithm and demonstrates a typical penalty force calculation. Exactly the same concepts are used for 3D contact where master segments are now the faces of solid or shell elements.
4.5.3
Some remarks on contact
There are many variations to these general contact descriptions. The idea of gap elements can be combined with the techniques mentioned for explicit codes to overcome limitation of structured meshing, so that gap elements can be freely attached from nodes to elements. This is, in effect, the method used in nodeto-face contact types used in many commercial FE codes where physical springs are not defined, but are actually a hidden part of the analysis. Often there are functions available to exponentially increase stiffness with intrusion, rather than the linear curve shown in Figure 4.2, for treatment of particularly hard contact. It is important that contact allows possible separation, which may occur in certain dynamic problems once sufficient elastic energy is stored to overcome applied loading. This phenomena is analysed in the first part of Tutorial T11. Exercises For these exercises use consistent units as discussed with regard to Table 7.1. E.g. units mm-N-s in tonne, mm, s, N, MPa are used here. 1. Compute the nodal body forces using Equation 4.4 due to gravitational loading for a simple bar element having constant section area A, density ρ and length L, orientated in the Cartesian frame as shown in Figure 4.1. Show that these are the same as those obtained using the lumped and consistent mass matrices and the relation Force = Mass × Acceleration (g). Note these forces are local to the element frame. If the element in an FE model is rotated relative to the Cartesian frame it may be necessary to transform forces to the gravitational direction (usually z).
2. Force equations like Equations 4.3, 4.4 and 4.7 are difficult to integrate for 2D and 3D elements and numerical integration must be used. Describe the main relations and necessary steps to find nodal forces due to gravity loading using Equation 4.4 for a 2D linear isoparametric quadrilateral element as described in Section 2.5.2. Integration uses Gaussian quadrature. 3. For the simple two bar element study from Exercise 4 in Chapter 3, which is reproduced below: 144
4.5. Contact
❼ Find the assembled lumped and consistent mass matrices [M ].
(1) 𝐿 𝐿
(2)
(3)
𝑃 𝑃 = 200000 𝑁
𝐴 = 100 𝑚𝑚
𝐸 = 210000 𝑀𝑃𝑎
𝐿 = 100 𝑚𝑚 𝜌 = 7.8 × 10
total displacement [mm]
❼ Compare results for a consistent and lumped mass matrix using the Newmark algorithm. Use damping [C] = 0 for time 0 → 0.001 s in steps of 0.000005 s. From result plots (shown below) it is difficult to draw conclusions for this simple example, but the consistent mass matrix results appears to better capture the two superimposed modes for nodes 1 and 2.
𝑡𝑜𝑛𝑛𝑒/𝑚𝑚
consistent
lumped
time [sec]
❼ Compare frequency from these dynamic analyses with the analytical linear eigenvalue solution using Equation 3.70 for an unloaded structure.
4. The first part of Tutorial T11 gives a worked tutorial and exercises on explicit analysis with penalty contact. This involves coding of the explicit algorithm using FreeMAT or Octave. Try working through this part of the tutorial and the suggested exercises.
145
CHAPTER
FIVE
HEAT TRANSFER AND RELATED FIELD PROBLEMS
5.1
Introduction
Field analysis applies to a wide range of physical problems that can be described by the general quasi-harmonic equation. Special cases of which are the Fourier, Laplace and Poisson’s differential equations. The particular equation to use depends on boundary conditions, but essentially the same equation can be used for analysis of heat conduction, seepage flow through a porous medium, fluid dynamics, acoustics and distribution of electrical and magnetic potential, amongst others. This is demonstrated in the second part of this book by Tutorial T5 which performs a steady state heat analysis and Tutorial T6 which uses the same field equations, both expressed in finite element form, for steady state fluid flow analysis. In this chapter the main focus is heat conduction. This is used to develop various governing differential equations for thermal analysis, from which the analogy to fluid flow and other field problems will be drawn. From these differential equations finite element equations are derived that may be applied to linear steady state and nonlinear analysis. Like mechanical analysis in Chapter 3, transient analysis is made possible by introducing dynamic material behaviour that is dependent on mass. In transient heat analysis this is heat capacity. Such problems can be solved using Newmark based methods or explicit integration. 146
5.2. Flow continuity (conservation)
5.2
Flow continuity (conservation)
Regardless of the steady state flow process there must be continuity. That is, if some quantity like mass or heat flows through a unit volume there can be no net loss or gain in the quantity so conservation is preserved. In Figure 5.1 inflows are qx , qy , qz , that define transfer rates per unit area, with outflow having added increments of transfer gradients.
Figure 5.1: 3D flow conservation
From Figure 5.1 balance of inflow and outflow gives qx dydz + qy dxdz + qz dxdy = ∂qy ∂qx ∂qz qx + dx dydz + qy + dy dxdz + qz + dz dxdy ∂x ∂y ∂z which simplifies to ∂qz ∂qx ∂qy + + = 0. ∂x ∂y ∂z
(5.1)
Thus summation of transfer gradients must balance and equal zero for continuity.
5.3
The quasi-harmonic steady state equation
For certain problems it is possible there is a gain or loss to the quantity in Equation 5.1. A gain is termed a ‘source’, such as heat creation due to some internal chemical reaction and a loss is termed a ‘sink’, such as fluid saturation of a porous media during liquid flow. If this rate of gain or loss is Q per unit volume then the steady state is ∂qz ∂qx ∂qy + + = Q. ∂x ∂y ∂z
(5.2) 147
Chapter 5. Heat transfer and related field problems
Usually flows are related to gradients of some quantity φ, which is often termed the field variable, or potential. For instance, in a thermal problem flow of heat (flux) q is −k dT dL , where k is material thermal conductivity, dT is temperature change over a length dL, and the field variable is temperature T . Fluid flow through a porous media has a similar relation depending on permeability and pressure gradient where the field variable is pressure, and in electrostatics material permittivity relates electric displacement to electric potential. ∂φ
In general we can say q = − k ∂L , so that ∂φ ∂x qx ∂φ . = −k qy ∂y qz ∂φ ∂z
(5.3)
As explained for Equation 1.28, the negative sign is introduced so that flow is positive for a negative transfer gradient (flow from a high φ to a low φ). Combining Equations 5.2 and 5.3, and introducing possible orthotropy with kx , ky , kz gives the governing quasi-harmonic equation for steady state distribution of some field function, or potential φ, as ∂ ∂x
kx
∂φ ∂x
+
∂ ∂y
ky
∂φ ∂y
+
∂ ∂z
kz
∂φ ∂z
+ Q = 0.
(5.4a)
Often a gradient operator ∇ is introduced so Equation 5.4 is written as ∇T [k]∇φ + Q = 0
(5.4b)
∂ ∂ ∂ T where ∇ = { ∂x ∂y ∂z } and [k] is a diagonal matrix of constants. Equation 5.4 must be solved over the domain, subject to satisfying boundary conditions on the surfaces or edges. Boundary condition are either fixed values of the potential φ, or normal flow components imposed or released from the surface.
In the following section heat analysis is considered and the quasi-harmonic equation is converted to specific cases giving the Fourier, Poisson and Laplace equations, each of which treats a particular thermal problem. These governing differential equations are then converted in Section 5.5.1 to equivalent finite element equations so that an FE idealisation of the problem may be modelled for analysis. Although heat flow is used here for these derivations the same finite element equations can be applied to other field phenomena represented by the quasi148
5.4. Heat transfer
harmonic equation or any of its special cases. Some examples of this are mentioned at the end of this chapter.
5.4
Heat transfer
Prediction of heat transfer is an important field of finite element analysis. Knowledge of temperature distribution is essential for many applications, and may be necessary to determine deformations due to temperature changes, or to predict thermal stresses in constrained bodies. A linear analysis will provide temperature distribution in a body in which heat flow is assumed to have reached a steady state. If material properties change with temperature then a nonlinear analysis, which will use a Newton-Raphson solution, is necessary. A transient analysis, which may also include nonlinear behaviour, is used to study temperature evolution prior to steady state, or behaviour under some kind of changing heating. Tutorial T5 contains exercises on steady state temperature distribution with convection to predict deformation and material failure, while Tutorial T9 investigates aspects of transient temperature distribution. A recommended book covering this topic is Lewis et al. [26]. This section first introduces some basic laws of heat transfer, its generation and storage. These are then used in relations for conservation of thermal energy in a body to derive governing Partial Differential Equations (PDE) for different cases of thermal loading. In a subsequent section these PDE will be converted to approximately equivalent FE equations to model heat transfer.
5.4.1
Basic equations of heat transfer
The main mechanisms of heat transfer through a plate are depicted in Figure 5.2, consisting of in-plane conduction with convection and radiation losses from free surfaces. In the following basic laws for these heat transfer processes (except radiation), covering conservation, heat generation and storage are summarised.
Figure 5.2: In-plane heat conduction and surface losses 149
Chapter 5. Heat transfer and related field problems
Energy conservation: For a given volume V of material heat energy transfers that take place over time must balance, so that input and generation equal output and conversion. This may be expressed as dEin dEgen dEout dEint + = + dt dt dt dt
(5.5)
where Ein
is inflow energy
Egen is energy generated by internal sources Eout is outflow energy Eint
is change of internal energy .
Heat conduction: This is governed by Fourier’s law which defines heat transfer flux through a unit area of material. For a direction x this is given by q = −k
∂T ∂x
or for total heat flux
qA = qA = −kA
∂T ∂x
(5.6)
where the negative sign enables positive flux q for flow taking place from a high to a low temperature. In SI units and using 1 W = 1 J/s the individual properties are q
is heat flux per unit area [J/m2 /s] or [W/m2 ]. Flux is a rate quantity and is direction dependent (temperature is a scalar)
qA
is total heat flux over area A [J/s] or [W]
k
is material thermal conductivity [J/m/s/◦ K] or [W/m/◦ K]
A is surface area [m2 ] ∂T is temperature gradient (temperature change over length dx) [◦ K/m] . ∂x Heat convection: This is governed by Newton’s law of cooling for transfer of heat energy from a solid to a surrounding fluid or air. For a unit area this flux is quantitatively given by q = h(T − Tf )
with total heat flux
qA = qA = hA(T − Tf )
(5.7)
where h is heat transfer coefficient, or film coefficient [J/m2 /s/◦ K] or [W/m2 ] T is surface temperature of the body [◦ K] Tf is temperature of the surrounding medium [◦ K] . 150
5.4. Heat transfer
Heat generation: Heat can be created from electrical, chemical or other sources. It is defined by Egen dEgen = QV dt
(5.8)
where Q is rate of heat generated per unit volume per unit time [J/m3 /s] V is volume of body [m3 ] . Energy stored: A material will store heat energy Es as it is heated and release energy as it is cooled. This depends on the rate of temperature change, mass and specific heat capacity given by dT dEs = ρcV dt dt
(5.9)
where ρ is material density [kg/m3 ] c is specific heat capacity [J/kg/◦ K] .
5.4.2
Partial differential equations for heat transfer
In Figure 5.3 heat energy flowing by conduction in and out of a 2D volume of unit thickness is shown with q denoting energy divided by area [W/m2 ]. qy +
dy
∂q y ∂y
dy
qx +
qx
∂q x dx ∂x
y
qy
x dx
Figure 5.3: Heat flow across a 2D elemental volume of size dx×dy
From Figure 5.3 and invoking the requirement for energy conservation during a time interval dt, Equation 5.5 can be expressed as 151
Chapter 5. Heat transfer and related field problems
(qx dy + qy dx) dt + Qdtdxdy (5.10) ∂qy ∂qx = (qx + dx)dy + (qy + dy)dx dt + ρcdT dxdy ∂x ∂y where
dEint dEs dT = = ρc dxdy. dt dt dt
This simplifies to −
∂qy ∂qx dxdy + dydx dt + Qdtdxdy = ρcdT dxdy . ∂x ∂y
(5.11)
Using Equation 5.6 the heat inflow qx and its derivative are ∂T qx = −kx ∂x
∂qx ∂ = ∂x ∂x
and
∂T −kx ∂x
.
(5.12) ∂q
Identical relations can be found for flow qy and rate of flow ∂yy in the y-direction. Substituting these into Equation 5.11 and simplifying gives the governing partial differential equation for heat conduction in an orthotropic body (assuming the coordinate and material orthotrophy axes coincide) as ∂ kx ∂x
∂T ∂x
∂ + ky ∂y
∂T ∂y
+ Q = ρc
dT . dt
(5.13)
For an isotropic body kx = ky = k and Equation 5.13 yields ∂ k ∂x
∂T ∂x
∂ +k ∂y
∂T ∂y
+ Q = ρc
dT . dt
(5.14)
For heat transfer in a 3D volume having dimensions dx×dy×dz, as shown in Figure 5.1, similar expressions are obtained with extra terms for flow in the z-direction. In this case face areas now depend on dx, dy and dz from which 3D heat transfer laws are derived. These derivations are not done here since extension from a 2D law to 3D one is obvious. The following partial differential equations are specific cases of 2D heat transfer. Fourier equation: For transient flow without heat sources Q, Equation 5.14 becomes the Fourier equation k
∂2T ∂2T + ∂x2 ∂y 2
= ρc
dT . dt
(5.15) 152
5.5. Finite element equations for heat transfer
Poisson’s equation: For steady state heat flow ( dT dt = 0) with heat sources, Equation 5.14 reduces to Poisson’s equation k
∂2T ∂2T + ∂x2 ∂y 2
+Q=0
(5.16)
Laplace’s equation: If heat sources are absent Equation 5.16 reduces to Laplace’s equation k
∂2T ∂2T + ∂x2 ∂y 2
= 0.
(5.17)
Boundary conditions: Solution of any of these PDE must take account of boundary conditions, which are either known temperatures or surface heat fluxes: For imposed temperature
T = TO
For imposed heat flux
q = qO
(5.18) or
q = −k
∂TO ∂n
(5.19)
o is temperature where TO and qO are fixed temperatures and heat flux, and ∂T ∂n → − gradient on the surface normal n . It is noted that temperature is a scalar quantity, whereas flux is a vector that has a direction.
Fixed boundary temperatures are termed ‘essential’, or Dirichlet boundary conditions. At least one essential boundary condition must be imposed for a solution. In a finite element analysis represented by Equation 5.26, this is done by introducing fixed boundary temperatures in {T } and suitably modifying the characteristic matrix [K] and RHS flow vector {R}. Several examples in this chapter demonstrate these changes. Natural boundary conditions, or Neumann conditions, depend on derivatives of temperature. These are surface heat fluxes at the boundary that are imposed via the RHS flow vector in Equation 5.26. Any boundary nodes in this vector that are zero would, for a heat problem, represent perfect insulation. Or, for instance, for a fluid flow analysis would represent an impervious boundary.
5.5
Finite element equations for heat transfer
Following the approach in Chapter 1 for mechanics, a simple ’direct’ method is first used to derive an element conduction matrix [k]. This method is only practical for simple elements with basic thermal loading and therefore 1D heat conduction governed by the Laplace equation for a 2 node line element is considered. Op153
Chapter 5. Heat transfer and related field problems
portunity is also taken to explain some features of the Laplace equation and the necessary boundary conditions for a finite element solution. The ‘Rayleigh-Ritz’ and ‘Galerkin’ variational methods are then applied to convert strong forms of governing differential Equations 5.14 through 5.17 to weak forms so that any type of finite element can be derived. These derivations also satisfy essential and natural boundary conditions in Equations 5.18 and 5.19. These two variational methods both yield the same equations. However, in order to demonstrate both techniques the Rayleigh-Ritz method is used here for derivation of 1D FE equations and the Galerkin method for 2D FE equations, from which the 3D expressions can be stated. It should be mentioned there are alternative methods to numerically solve PDE’s. One possibility is actually done in Tutorial T13, where the Poisson’s pressure equation for fluid flow is solved using a 2D finite difference scheme. This approach could easily be adapted to other partial differential equations, but it is difficult to apply to a domain with irregular boundaries. Consequently, the following FE methods are usually preferred and today it is regarded as the most versatile technique for heat transfer and other field analysis problems.
5.5.1
Finite element equations for 1D heat conduction
The simplest PDE is the Laplace equation for steady state heat conduction without any heat sources. This is therefore used here as a basis to develop a 1D line element for conduction heat transfer and to study necessary boundary conditions for a solution. The setup to be modelled is shown in Figure 5.4.
T=T2
T=T1
dT
2
1
dx
t x
Figure 5.4: Temperature variation across a homogeneous material of thickness t
For 1D the Laplace equation reduces to
k
∂2T ∂x2
=0
or
∂2T ∂x2
= 0. 154
5.5. Finite element equations for heat transfer
Integrating each side of this equation twice leads gives T (x) = C1 x + C2 . where the two unknown constants C1 and C2 must be found from boundary conditions. For a homogeneous material of thickness t with known boundary temperatures T1 at x = 0 and T2 at x = t, as shown in Figure 5.4, this gives T2 − T1 T1 = C2 and T2 = C1 t + C2 so that T (x) = x + T1 . t This shows that temperature variation is linear and that two boundary conditions are necessary to describe it. These can be two essential fixed temperatures, or any one temperature with a natural flux on the opposite face which, in effect, specifies the flow gradient on that face. Two natural boundary conditions will not provide enough information to find absolute temperature values. Derivation of a 1D element conduction matrix proceeds as follows. From Equation 5.12 we have qx = −kx
∂T . ∂x
If kx is assumed constant (= k) through the thickness t, then 1D flow q (= qx ) for a constant temperature gradient is given by T2 − T1 q= −k . (5.20) t For a line element with end nodes 1, 2 the temperature gradient and flow q at each node are T2 − T1 T2 − T1 dT =+ and q1 = −k at node 1 dt t t dT T2 − T1 T2 − T1 =− and q2 = +k . at node 2 dt t t In matrix form in terms of nodes i, j this is expressed as ) ( ) " #( qi 1 −1 Ti k = or abbreviated as {q} = [k]{T } . t −1 1 qj Tj If areas change like in a 1D network of different pipes to analyse hydraulic fluid flow, then it is necessary to use {qA } = A[k]{T } so that continuity of flow (qA = 0) can be imposed between connecting pipes of different area.
155
Chapter 5. Heat transfer and related field problems
Example 5-1: 1D heat conduction with essential and natural boundary conditions This example is based on Exercise 6 from Chapter 1 and reproduced below. It is used here to demonstrate a simple FE analysis with application of essential and natural boundary conditions.
23°C
q1
q12
q2
q23
q3
2
1
200 mm
5°C
foam conductivity k = 0.025 mW/mm/°C
brick conductivity k = 0.6 mW/mm/°C
3
100 mm
Assembling the conduction matrix [K] for both elements and imposing essential (fixed temperature) boundary conditions, noting that q2 is zero at node 2 to enforce flow continuity between the two elements, gives
0.6 0.2 0.6 − 0.2 0
0.6 − 0.2 0.6 0.025 + 0.2 0.1 0.025 − 0.1
0
T1 = 23➦C 0.025 T2 − 0.1 T3 = 5➦C 0.025 0.1
q1 = q2 = 0 q3
.
From the second equation T2 = 21.61➦C and using Equation 5.20 the flow in each element is 4.15 mW/mm2 which correctly shows flow continuity. Nodal values are q1 = +4.15 mW/mm2 , q2 = 0 mW/mm2 and adhering to the sign convention q3 = −4.15 mW/mm2 . If natural (surface flux) boundary conditions are imposed these are added to the RHS vector. For instance, lets see if imposing −4.15 mW/mm2 at node 3, instead of the fixed temperature, correctly returns temperature T3 = 5➦C.
0.6 0.2 0.6 − 0.2 0
0.6 0.2 0.6 0.025 + 0.2 0.1 0.025 − 0.1 −
0
T1 = 23➦C 0.025 T2 − 0.1 T3 0.025 0.1 156
q1 = q2 = 0 q3 = −4.15
5.5. Finite element equations for heat transfer
Solving these three equations for the three unknowns T2 , T3 , q1 does indeed give the same results as previous with T3 = 5➦C. Remark(s): ❼ If only natural boundary conditions are defined a solution is not possible since matrix [K] is singular. At least one essential condition is necessary for [K] to be non-singular. This is comparable to the explanation given for an unconstrained bar in Section 1.10. ❼ Sign conventions define flux q to be positive for inflow and negative for outflow for this temperature gradient.
5.5.2
Rayleigh-Ritz method for steady state 1D heat transfer
Recalling the aim of the Rayleigh-Ritz method presented in Section 1.5.1 is to find a functional of the problem that can be minimized. For a bar element stiffness this functional was total potential energy of the loaded bar, that was for R minimised T displacements using calculus of variations to yield the relation V [B] E [B]dV . For heat transfer an analogous functional must be identified to be minimised with respect to temperature distribution leading to FE matrix equations for heat transfer. In both cases this functional must be capable of satisfying both essential and natural boundary conditions. The tapered 1D bar element in Figure 5.5a is used to illustrate the method for heat energy transfer. Initial boundary conditions are fixed temperature TO on the left end with fixed heat flux qO on the right end. Heat conduction occurs along the bar with surface convection q = h(T − Tf ) over the full perimeter length, where T and Tf are, respectively, internal varying temperature and Tf is constant environment temperature. In Figure 5.5b boundary heat transfers for an elemental section are shown, which also includes possible rate of heat generation Q from an internal source. area A(x) and perimeter P(x) q=h (T-Tf)Pdx
prescribed TO
1 x
prescribed qO
2
Aq
QV
Aq+d(Aq)dx dx
dx dx
L
a)
b)
Figure 5.5: Heat energy transfers in a tapered 1D bar. a) Boundary conditions, internal conduction and surface convection. b) Heat transfer components in an elemental section 157
Chapter 5. Heat transfer and related field problems
For the elemental section using volume V = Adx and perimeter surface P dx, heat energy inflow and generation must balance heat outflow and convection loss energies so that Aq + QAdx = Aq + d(Aq) + h(T − Tf )P dx .
(5.21)
Using Equation 5.6 in Equation 5.21 and simplifying gives the governing differential equation dT d Ak dx + QA − h(T − Tf )P = 0 dx
(5.22)
which is subject to the essential and natural boundary conditions at x = 0, T = TO at x = L, q = qO
which is equivalent to
dT qO =− . dx k
A functional for this heat transfer problem, that is analogous to total potential energy used for mechanical elements in Equation 1.10 is
Π=
Z
L
x=0
"
1 Ak 2
dT dx
2
# 1 2 + hP T − T (QA + hP Tf ) dx . 2
(5.23)
This functional is suitable to formulate finite element equations since, from calculus of variations, it can be shown that the stationary condition dΠ dT = 0 gives the governing differential Equation 5.22. It also can satisfy any natural boundary conditions since it contains the term dT dx . A detailed discussion on this is provided by Cook et al. [15]. Defining variation of temperature and derivative of temperature across an elemental section between nodes 1 to 2 with the usual shape function matrices gives
T =
and
h
dT = dx
N1 N2
dN1 dx
i
(
dN2 dx
T1 T2
)
(
= [N ] {T }e T1 T2
)
where N1 = 1 − x/L and N2 = x/L. 158
dN {T }e = dx
(5.24)
5.5. Finite element equations for heat transfer
From Equations 5.23 and 5.24 the following equations are obtained for the functional of an element 1 Πe = {T }Te 2
Z
L
0
dN dx
T
Z L 1 dN T [N ]T hP [N ] dx {T }e dx {T }e + {T }e Ak dx 2 0
[k] T
− {T }e
Z
[kh ]
L T
0
T
[N ] QAdx − {T }e {rQ }
Z
L
[N ]T hP Tf dx .
(5.25)
0
{rh }
For an element minimisation of heat energy is found from the stationary value. From Equation 5.25 we obtain dΠe =0 dT
which yields the relation
[k] + [kh ] {T }e = {rQ } + {rh }
where matrices [k], [kh ] and vectors {rQ }, {rh } are highlighted in Equation 5.25. Assembly of these matrices and vectors is done in the usual way giving the global relation
[K] + [Kh ] {T } = {RQ } + {Rh } .
(5.26)
i h In these matrices [k] is the conduction matrix, in which dN dx is the conventional element [B] matrix. Matrix [kh ] represents internal heat transfer due to convection heat flow from free surfaces. Combined matrices [k] and [kh ] are analogous to stiffness in a mechanical analysis. Vector {rQ } represents internal heat generation and vector {rh } represents surface convection heat transfer; the combination of these is analogous to a load vector. In general A and P will vary with position x. It is possible material properties k, h, Q may be functions of time, but solution of Equation 5.26 will yield only a steady state condition. Also, time dependent energy storage from heating (or cooling) in Equation 5.9, which acts like inertia in a dynamic mechanical problem, is not taken into account. For constant material properties solving the following linear equations yields steady state temperature distribution −1 {T } = [K] + [Kh ] ({RQ } + {Rh }) .
In summary, a differential equation for 1D heat transfer has been developed, which was then represented by an appropriate functional and minimised using the Rayleigh-Ritz method to obtain equivalent finite element equations. It is relatively straightforward to extend this concept to 2D and 3D heat transfer since suitable 159
Chapter 5. Heat transfer and related field problems
functionals for these can also be identified. Theory for this is given in FE textbooks such as Rao [10] and Cook et al. [15]. It is helpful to put some numbers to the matrices in Equations 5.25, which is done in the following 1D example. Example 5-2: 1D heat conduction with surface convection This example consists of a straight rod having a fixed (essential) boundary condition of 150➦C at one end and a convection (natural) boundary condition along the perimeter length. Dimensions, properties and setup are shown in the figure below. Assuming only one element calculate the free end steady state temperature. h = 10 W/m2/°C, Tf = 25°C
conductivity k = 40 W/m/°C area A = 300 mm2, perimeter P = 60 mm
150°C 1
2 L = 200 mm
Figure 5.6: Setup, properties and dimensions for heating of a 1D rod
For the conduction [k] and convention [kh ] 1 Z L Z L − L [B]T Ak [B] dx = [k] = 1 0 0 L " # 1 −1 Ak = L −1 1 [kh ] =
Z
L
[N ]T hP [N ] dx = 0
hP L = 6
"
2 1 1 2
#
Z
L
0
characteristic matrices we have 1 1 Ak − dx L L
x 1− n x L 1− hP x L L
x o dx L (5.27)
and the vector of surface convection heat transfer is ( ) L−x Z L Z L 1 LhP T f L hP Tf dx = . {rh } = [N ]T hP Tf dx = x 2 1 0 0 L (5.28) 160
5.5. Finite element equations for heat transfer
Since there is no internal heat source generation ({rQ } = 0) the assembled matrices for Equation 5.26 for this single element are "
Ak L
1 −1 −1 1
hP L + 6
2 1 1 2
# (
T1 T2
)
LhP Tf = 2
1 1
.
(5.29)
Using the same consistent units mm-N-s as the tutorials and noting the units conversions in Table 7.1, the equivalent thermal properties stated in Figure 5.6 are: SI units 40 W/m/➦C 10 W/m2 /➦C
conductivity k film coefficient h
mm-N-s units 40 mW/mm/➦C 0.01 mW/mm2 /➦C
This gives constants LhP Tf Ak hP L = 60 [mW/➦C], = 20 [mW/➦C], = 1500 [mW] . (5.30) L 6 2 Using these constants in Equation 5.29 yields "
60 −60 −60 60
40 20 20 40
# (
T1 T2
)
T1 T2
)
1500 1500
)
.
+
=
(
1500 1500
)
so that "
100 −40 −40 100
#(
=
(
(5.31)
The boundary condition T1 = 150➦C is enforced in the second equation of Equation 5.31 to find T2 , giving −40 × T1 + 100 × T2 = 1500 ⇒ T2 =
1500 + 40 × 150 = 75 ➦C . 100
Alternatively Equation 5.31 can have boundary conditions imposed and be rewritten in the following form with information in the second row shifted to the RHS. Matrix inversion can then be done for a solution "
1 0 0 100
#(
T1 = 150 T2
)
=
(
150 1500 + 40 × 150
161
)
Chapter 5. Heat transfer and related field problems
leading to
(
T1 T2
)
=
"
1 0 0 100
#−1 (
150 7500
)
=
(
150 75
)
➦C .
A finite element analysis of the problem using FreeCAD and CalculiX, with techniques described in Tutorial T5 is presented below. In these codes 1D line elements for heat transfer are available, but surface convention must be done via surfaces. Consequently, the problem is analysed as a 3D geometry with many elements giving a free end temperature of 82➦C. 150 140 82°C
130 120
≈95°C
110
150°C 100 90 80
Figure 5.7: 3D FE results of heat transfer in the 1D rod
Remark(s): ❼ This result T2 = 75➦C compares favourably with a detailed 3D FE analysis (82➦C) in Figure 5.7. The difference is mainly due to convection heat transfer, which varies along the length and is poorly represented using only one element. Example 5-3 uses 2 elements for better representation and results. ❼ Imposed (natural) flux boundary conditions {rh } have been added to the RHS of Equation 5.29. If internal heat generation (or lost) were present matrix {rQ } in Equation 5.25 would be computed and also added to the RHS of Equation 5.29.
Example 5-3: Heat transfer in an assembly of 1D elements The same problem as Example 5-2 is analysed, but using two bar elements to improve representation of surface convection along the length. 1
3
2
150°C
L = 100 mm
162
L = 100 mm
5.5. Finite element equations for heat transfer
For this analysis matrices for the bars are computed in the same way as done in Example 5-2, except using the new element lengths L = 100 mm. The new constants in Equations 5.30 are Ak = 120 [mW/➦C], L
hP L = 10 [mW/➦C], 6
LhP Tf = 750 [mW] . 2
For each element Equation 5.29 now yields "
120 −120 −120 120
+
20 10 10 20
# (
Ti Tj
)
=
(
750 750
)
.
Assembling the two elements gives 140 −110 0 T1 T −110 280 −110 2 0 −110 140 T3
750 = . 1500 750
Applying the same technique used in Example 5-2 to fix end boundary condition T1 = 150➦C gives T1 = 150 1 0 0 T2 0 280 −110 T3 0 −110 140
150 = 1500 + 150 × 110 750 − 150 × 0
from which nodal temperatures are found using T1 T2 T3
Remark(s):
−1 1 0 0 150 = 0 280 −110 18000 750 0 −110 140
1 0 0 150 = 0 0.0052 0.004 18000 0 0.004 0.0103 750
150 = ➦C . 97 80
❼ Although only 2 elements are used results do significantly improve (T3 = 80➦C) compared to the single element analysis in Example 5-2 and do show a convergence trend toward the 3D FE results presented in Figure 5.7. 163
Chapter 5. Heat transfer and related field problems
5.5.3
Galerkin method for 2D steady state heat transfer
As an alternative to the previous Rayleigh-Ritz method the Galerkin method of weighted residuals, which has been introduced in Section 1.5.2 for mechanical problems, is now used to convert heat transfer differential equations to finite element equations. In the following a 2D isotropic body for steady state and transient heat flow is considered, from which it is possible to state equations for 3D heat transfer including that of an anisotropic body. 5.5.3.1 Steady state 2D heat conduction Finite element equations for 2D steady state heat conduction are now derived from the more general Poisson’s equation which includes a heat source Q. Recalling that Poisson’s Equation 5.16 is given by
k
∂2T ∂2T + ∂x2 ∂y 2
+ Q = 0.
(5.32)
From Galerkin’s method explained in Section 1.5.2 it is required that residuals of trial functions that are used to approximate a solution are set to zero, so from Equation 1.13 Z
wi e dA = 0
(5.33)
A
where wi are weighting functions and e is the trial function, which both vary with position over the integral area A. In Galerkin’s method the problem governing differential equation is used for the trial function. Therefore, if T in Equation 5.32 is an approximation to the exact temperature distribution the residual is
e=k
∂2T ∂2T + ∂x2 ∂y 2
+ Q.
(5.34)
Combining Equations 5.33 and 5.34 gives Z
2 ∂ T ∂2T + Q dA = 0 . wi k + ∂x2 ∂y 2 A
(5.35)
This relation can be applied to an element with nodes numbered i = 1→n and nodal temperatures Ti . The weighting functions wi are replaced by shape functions Ni giving an estimate of temperature Te at any point x, y in an element as Te = N1 (x, y)T1 + N2 (x, y)T2 · · · · · · + Nn (x, y)Tn = [Ni ]{T }e 164
(5.36)
5.5. Finite element equations for heat transfer
where {T }e are unknown nodal temperatures. The Galerkin Equation can therefore be rewritten as Z
"
[Ni ]T k A
∂ 2 Te ∂ 2 Te + ∂x2 ∂y 2
!
#
+ Q dA = 0
or expressed as Z
T
[Ni ] k A
∂ 2 Te ∂ 2 Te + ∂x2 ∂y 2
!
dA +
Z
[Ni ]T QdA = 0 .
(5.37)
A
For understanding the LH term in Equation 5.37 in expanded form is N1 Z N2 ∂ 2 N1 ∂ 2 N1 + k k . .. ∂x2 ∂y 2 A Nn
∂ 2 Nn ∂ 2 Nn ··· ··· k + k ∂x2 ∂y 2
{T }e dA
which produces a n × n matrix to be post-multiplied by nodal temperatures and integrated over the area. For a finite element solution of Equation 5.37 it is necessary to reduce the order of the differential of the first term. This is done using integration by parts (Green’s theorem) which is now stated without proof. In finite element applications (and in this case) it is common to have a second order differentiable function weighed by shape functions [Ni ] that apply over a domain area A bounded by a surface S. Taking the general expression Z
[Ni ] A
∂2T dA ∂x2
which acts over the domain depicted in Figure 5.8. According to Green’s theorem the equivalent expression with only first order terms is −
Z A
Z ∂T ∂Ni ∂T dA + [Ni ] l dS ∂x ∂x ∂x S
where the first integral is over element area A and the second is over perimeter S, in which l is a direction cosine between the normal ~n and x-direction over the surface integral. In a similar manner a y-direction integral with direction cosine m is obtained as 165
Chapter 5. Heat transfer and related field problems
Z
∂2T [Ni ] 2 dA = − ∂y A
Z A
Z ∂T ∂Ni ∂T dA + [Ni ] m dS . ∂y ∂y ∂y S
Figure 5.8: Volume, boundary and normals for a domain
Applying this theorem to Equation 5.37 gives −
Z
A
∂Ni ∂x
T
! ∂Ni T ∂ Te ∂ Te dA + k k ∂x ∂y ∂y
! Z e e ∂ T ∂ T T +m + [Ni ] k l dS + [Ni ]T QdA = 0 ∂x ∂y S A Z
(5.38)
in which conductivity k is specified here as isotropic, but could be orthotropic with different values for the x and y directions. Also, note that Green’s theorem has led to integrals for both internal conduction and surface convection heat transfer. From Equation 5.36 we have ∂ Te ∂Ni = {T }e ∂x ∂x
and
∂ Te ∂Ni = {T }e . ∂y ∂y
(5.39)
After combining Equations 5.38 and 5.39, rearranging and using the notation [N ] ≡ [Ni ] we obtain Z A
∂N ∂x
T ∂N T ∂N ∂N + dA {T }e k k ∂x ∂y ∂y =
Z
[N ]T qdS + S
Z
[N ]T QdA
(5.40)
A
in which surface flux components are denoted q
∂T ∂T +m q=k l ∂x ∂y
.
(5.41) 166
5.5. Finite element equations for heat transfer
Equation 5.40 can be abbreviated as [k] {T }e = {rq } + {rQ }
(5.42)
where the element characteristic matrix responsible for heat conduction and vectors contributing to heating forces {r} are [k] =
Z A
{rq } = {rQ } =
Z
∂N ∂x
T ∂N T ∂N ∂N + dA k k ∂x ∂y ∂y
[N ]T qdS
(5.43)
S
Z
[N ]T QdA . A
These relations can be expressed in terms of the usual element shape function matrix [N ] and its differential [B] matrix for any element. 5.5.3.2 2D element equations for [k], {rQ } and {rq } The relations in Equations 5.43 for heat analysis are best understood by relating them to a single element. For this purpose the following example using a simple planar 2D triangular element is selected. Example 5-4: 2D element equations for [k], {rQ } and {rq } Each node of the triangle has one dof, with internal variable temperatures T1 , T2 , T3 assigned to nodes 1, 2 and 3 as shown in Figure 5.9. T3 x3, y3
y
T1 x1, y1
T2 x2, y2 x
Figure 5.9: 3 dof triangular element for thermal analysis
Following the approach adopted for the 2D constant strain triangular element
167
Chapter 5. Heat transfer and related field problems
in Section 2.3.2, a linear field function for temperature distribution is assumed with three coefficients for the three dof element c1 h i T (x, y) = c1 + c2 x + c3 y = 1 x y c2 . c3
Forcing the field function to conform to nodal temperatures at the vertex nodes requires that 1 x1 y1 T1 c1 T2 = 1 x2 y2 c 2 c3 1 x3 y3 T3
(5.44)
and after inversion
c (x y − x y ) (x y − x y ) (x y − x y ) 1 2 3 3 2 3 1 1 3 1 2 2 1 T1 1 c2 = (y3 − y1 ) (y1 − y2 ) T2 (5.45) (y2 − y3 ) 2Ae c3 (x3 − x2 ) (x1 − x3 ) (x2 − x1 ) T3
where Ae is triangle area. Combining Equations 5.44 and 5.45 gives the shape function matrix [N ], which interpolate temperature at any point x, y to nodal temperatures (x2 y3 − x3 y2 ) (x3 y1 − x1 y3 ) (x1 y2 − x2 y1 ) T1 h i 1 T (x, y) = 1 x y (y2 − y3 ) (y3 − y1 ) (y1 − y2 ) T2 2Ae (x3 − x2 ) (x1 − x3 ) (x2 − x1 ) T3 h
= N1 N2
T1 i N3 T2 = [N ]{T }e . T3
(5.46)
It can be seen that these shape functions are identical to those previously derived for the constant strain triangle element in Equations 2.24. As usual the [B] matrix is obtained by differentiating Equations 5.46 to yield ∂T ∂N1 ∂N2 ∂N3 = T1 + T2 + T3 ∂x ∂x ∂x ∂x
and
168
∂T ∂N1 ∂N2 ∂N3 = T1 + T2 + T3 ∂y ∂y ∂y ∂y
5.5. Finite element equations for heat transfer
giving the following [B] matrix relating temperature gradients to nodal temperatures ∂N1 ∂T ∂x ∂x = ∂N1 ∂T ∂y ∂y
∂N2 ∂x ∂N2 ∂y
∂N3 T1 T1 ∂x T2 = [B] T2 . ∂N3 T3 T3 ∂y
It is now possible to show that the LH term in Equation 5.40 for the three element nodes (n = 3) and the three degrees of freedom i = 1→ 3 is the element R integral A [B]T [E][B]dA, that is n P
j=1
R
k
A
∂Ni ∂Nj ∂Ni ∂Nj + ∂x ∂x ∂y ∂y
Z = A =
R
A
∂N1 ∂x ∂N2 ∂x ∂N3 ∂x
∂N1 ∂y ∂N2 ∂y ∂N3 ∂y
dA
[E]
∂N1 ∂x ∂N1 ∂y
∂N2 ∂x ∂N2 ∂y
∂N3 ∂x dA ∂N3 ∂y
[B]T [E][B]dA
where conductivity constant k is replaced by a conductivity matrix, denoted here as [E]. For a thermally isotopic 2D material this is k = [E] =
"
k 0 0 k
#
.
(5.47)
Similar to Equation 2.27 it can be shown that the [B] matrix is given by # " 1 y23 y31 y12 [B] = 2Ae x32 x13 x21
(5.48)
with xij = xi −xj and yij = yi −yj for i, j = 1, 2, 3 where triangle area Ae is obtained from Equation 2.22. Flux vector {rQ } in Equation 5.43 uses element shape functions to distribute internal heat generation Q to nodal quantities. However, for flux
169
Chapter 5. Heat transfer and related field problems
vector {rq } different surface shape functions are used. This is demonstrated in Example 5-5 for heat transfer through a triangular element. All of these element matrices [k], {rq } and {rQ } are assembled in the usual way for a finite element domain, giving the global governing system of equations {T } = [K]−1 {Rq } + {RQ } . (5.49)
[K] {T } = {Rq } + {RQ } so that
5.5.3.3 Convection surface heat flow for [kh ] and {rh } Convection is described by Equation 5.7. This can be included by adding an additional flow term to Equation 5.41 to give
∂T ∂T +m q=k l ∂x ∂y
+ h (T − Tf )
or included in Equation 5.40 as Z A
∂N ∂x
Z
T ∂N T ∂N ∂N + dA {T }e k k ∂x ∂y ∂y
∂T ∂T = [N ] k l +m ∂x ∂y S T
dS +
Z
S
h (T − Tf ) dS +
Z
[N ]T QdA .
(5.50)
A
R The new integral for convection S h (T − Tf ) dS leads to two new matrices that have already been derived in Equation 5.25 for a 1D bar using a variational function. The 2D form of these matrices are Z Z T [kh ] = [N ] h [N ] dS and [rh ] = [N ]T hTf dS . S
S
In abbreviated form, for one element, this gives
[k] + [kh ] {T }e = {rq } + {rh } + {rQ } .
(5.51)
In these relations [kh ] is a new matrix based only on elements attached to a convection surface to compute surface thermal loads, and {rh } is a contribution to the flow vector from environmental (field) temperature Tf . Both of these involve surface integrals and therefore use surface shape functions. Calculation of these matrices is illustrated in the next example. Example 5-5: Heat transfer in a 2D triangular element Conduction heat transfer across a single triangular element is analysed caused by a fixed 200➦C temperature along one edge with convection loss along the
170
5.5. Finite element equations for heat transfer
other two edges. Environmental temperature is 25➦C with other dimensions and properties shown below. Find the steady state temperature at node 2. (0,50)
conductivity k = 40 W/m/°C thickness t = 1mm
200°C
50 mm
3
1
2 (100,0)
(0,0)
y
h = 10 W/m2/°C, Tf = 25°C x 100 mm
In this analysis a consistent unit system mm-N-s is used, so conductivity k is 40 mW/mm/➦C and surface heat transfer coefficient h is 0.01 mW/mm2 /➦C. For this single element with conduction and convection the following equation applies, which must be solved for temperature {T }e
[k] + [kh ] {T }e = {rh } .
(5.52)
R The element characteristic conductivity matrix [k] is A [B]T [E][B]dA. Therefore, using the [B] matrix for this triangle element from Equation 5.48 and the thermal conductivity matrix [E] from Equation 5.47 gives [k] =
Z
[B]T [E] [B] dV = Ae t [B]T [E] [B] Ve
# " # y23 x32 " y23 y31 y12 1 1 k 0 = Ae t y31 x13 2Ae 0 k 2Ae x32 x13 x21 y12 x21
(5.53)
where the volume integral is replaced by Ae t. For this geometry thickness t = 1 mm and triangle area is found from Equation 2.22 giving Ae = 2500 mm2 . R From Equation 5.48 and from A [B]T [E][B]dA the [B] and [k] matrices are 1 [B] = 2 × 2500
"
−50 50 0 −100 0 100
#
171
=
"
−0.01 0.01 0 −0.02 0 0.02
#
Chapter 5. Heat transfer and related field problems
#" # −0.01 −0.02 " −0.01 0.01 0 40 0 [k] = 2500 × 1 × 0.01 0 0 40 −0.02 0 0.02 0 0.02 50 −10 −40 = −10 10 0 . −40 0 40
(5.54)
R Next, element surface convection matrices [kh ] = Se h [N ]T [N ] dS are computed for the two surfaces (edges) that convect heat. For this integral line element shape functions are used, which are the same as that used in Example 5-2 in Equation 5.27. This is shown below, whereby surface integrals over Se are replaced by thickness and length integrals.
(0,50) 3
1 y
𝑘
2
(0,0) 𝑘
x
For line 1-2 [kh ]12
12
23
=𝑡
(100,0)
=𝑡
ℎ𝑁
ℎ𝑁
𝑁 𝑑𝐿
x 1− n x L 1− h[N ]T [N ] dS =ht = x L Se 0 L " # " # 0.33 0.17 htL12 2 1 = . = 6 1 2 0.17 0.33 Z
Z
L12
𝑁 𝑑𝐿
x o L
The same relation applies to edge 2-3 using its length L = 112 mm. Each matrix [kh ] is expanded to a 3×3 matrix (to add to [k]) by adding appropriate zeros for the node not involved with each convection edge. This gives
[kh ]12
0.33 0.17 0 = 0.17 0.33 0 0 0 0
and
172
[kh ]23
0 0 0 = 0 0.37 0.19 . (5.55) 0 0.19 0.37
5.5. Finite element equations for heat transfer
Combining Equations 5.54 and 5.55 gives
[k] + [kh ]12 + [kh ]23
50.33 −9.83 −40.0 = −9.83 10.67 0.19 . −40.0 0.19 40.37
Now vectors for convection heat transfer along the two edges {rh }12 and {rh }23 are calculated, which are adapted from Equation 5.28
{rh }12 =
Z
T
hTf [N ] dS = htTf Se
Z
L12
0
L−x L x L
L12 htTf dx = 2
(
1 1
)
.
For edges 1-2 and 2-3 with suitable expansion to a 3×1 vector we obtain 12.5 = 12.5 0
0 {rh }12 and {rh }23 = 14 14 12.5 giving {rh }12 + {rh }23 = . 26.5 14
Finally, the system of equations corresponding to Equation 5.52 is 50.33 −9.83 −40.0 T1 T2 −9.83 10.67 0.19 −40.0 0.19 40.37 T3
12.5 = . 26.5 14
For a solution essential boundary conditions are applied to nodes 1 and 3 (T = 200➦C) and equations are modified as done in previous examples to give 1 0 0 200 T2 0 10.67 0 0 0 1 200
200 = 26.5 + 9.83 × 200 − 0.19 × 200 200
so that T2 can be found from matrix inversion and multiplication with the RHS, which would give
173
Chapter 5. Heat transfer and related field problems
T2 =
26.5 + 9.83 × 200 − 0.19 × 200 = 182.7 ➦C . 10.7
This compares well with the FE results obtained from FreeCAD and CalculiX shown below. 200°C
195°C 200°C
190°C
185°C
182°C
180°C
Remark(s): ❼ This shows necessary calculations for conduction and convection, if boundary fluxes or internal heat generation occur further matrices are added.
5.5.4
Transient heat transfer analysis and capacity matrix [kc ]
Many thermal problems may have to be analysed as transient, since materials will heat-up and store energy as a function of time. Conversely, they will release energy with time if heating is removed. This behaviour is characterised by the properties specific heat capacity and density. After sufficient time a steady state heat distribution will be reached provided applied thermal boundary conditions remain constant. Transient thermal problems are described by the general differential Equation 5.14. For a 2D problem this is recalled as k
∂2T ∂2T + ∂x2 ∂y 2
+ Q = ρc
dT dt
where thermal inertia is due to the product of material density ρ, specific heat capacity c and the differentiation of temperature with respect to time dT dt . Including this new term in Equation 5.40 gives Z A
∂N ∂x
T Z dT ∂N T ∂N ∂N + dA {T }e + [N ]T ρc dA k k ∂x ∂y ∂y dt A =
Z
[N ]T qdS + S
174
Z
[N ]T QdA . A
(5.56)
5.5. Finite element equations for heat transfer
In abbreviated form for one element this is
[k] + [kh ] {T }e + [kc ] {T˙ }e = {rq } + {rh } + {rQ }
(5.57)
where the new term [kc ] is the heat capacity matrix. For a 2D element Z
[kc ] =
ρc[N ]T [N ] dA . A
This matrix involves an area integral and is computed and assembled for all elements of the domain. Its form is the same as an element mass matrix; see for example Equation 4.9 for a bar element.
5.5.5
3D heat transfer equations
Exactly the same relations for conduction, convection and heat capacity to Equations 5.42, 5.51 and 5.57 apply for a 3D heat analysis. In summary the general equation for heat transfer is
[k] + [kh ] {T }e + [kc ] {T˙ }e = {rq } + {rh } + {rQ }
(5.58)
where only certain terms will apply depending on the nature of the analysis. The individual matrix and vector terms are [k] =
Z
[kh ] = [kc ] =
T
[B] [E] [B] dV Ve
Z
Z
h [N ]T [N ] dS Se
T
ρc [N ] [N ] dV Ve
{rq } = {rh } = {rQ } =
Z
[N ]T qdS Se
Z
[N ]T hTf dS
(5.59)
Se
Z
[N ]T QdV . Ve
Note that for 3D elements integration of the different matrices and vectors is now done either over element volume Ve or over element boundary surfaces Se . It should be emphasised that [k] is computed and assembled for all elements. [kc ] is only necessary and assembled for all elements if a transient analysis is required and vector {rQ } is only required if there is an internal heat source. Matrix [kh ] and vector {rh } are computed and assembled for surface elements and surfaces that have convection and, lastly, vector {rq } is only assembled for surfaces with applied boundary fluxes. This concept also applies to 1D and 2D problems. Examples 5-5 and 5-6 should help to clarify some on these calculations. 175
Chapter 5. Heat transfer and related field problems
5.5.6
Some comments on heat transfer analysis
Element matrices and vectors in Equations 5.59 are assembled in the usual way for an FE domain, so that the following global system of equations is obtained [Kc ] {T˙ } + [K] + [Kh ] {T } = {Rq } + {Rh } + {RQ } .
(5.60)
Essential boundary conditions for fixed temperatures are imposed by modifying certain matrices and vectors so required nodal temperatures appear in {T }, and natural boundary conditions for surface fluxes are enforced via {Rq }. Any zeros in {Rq } + {Rh } + {RQ } for surface nodes enforces that there is no flow normal to the surface, with other zeros for internal nodes enforcing continuity. Example 5-6 demonstrates some of these calculations. If thermal boundary conditions and material properties are constant and do not vary with temperature, then a steady state solution of temperatures is obtained from the linear equations −1 {T } = [K] + [Kh ] {Rq } + {Rh } + {RQ } .
(5.61)
For the case that all flow vectors {R} are zero, so [K]{T } = {0}, the domain is represented by the Laplace equation with perfectly insulated boundaries. A finite element solution will give distribution of nodal temperatures that depends only on imposed essential boundary values and any variation of material conductivity over the domain. If conductivity k or surface heat transfer coefficient h vary with temperature then the problem becomes nonlinear requiring an iterative Newton-Raphson type solution. A coupled thermomechanical analysis is also possible, which will also be nonlinear if mechanical properties like Young’s modulus are temperature dependent. An example linear thermomechanical steady state analysis is performed in Tutorial T5. A transient problem ([Kc ] 6= 0) requires a time dependent solution, which could use an explicit or implicit solution using one of the techniques discussed in Section 3.4. An implicit transient heat analysis is performed in Tutorial T9. For a 3D thermally orthotropic material property matrix [E] is diagonal containing conductivities k1 , k2 and k3 , corresponding to the principal material frame 1, 2, 3. For a 2D problem it will contain only k1 and k2 . This conduction matrix can be transformed to any other frame using the following relation "
κx κxy κyx κy
#
= [T ]
"
k1 0 0 k2
#
[T ]T 176
5.5. Finite element equations for heat transfer
where the 2D transformations matrix [T ] is given by "
cos θ sin θ [T ] = − sin θ cos θ
#
"
cos θ − sin θ and [T ]T = sin θ cos θ
#
and θ is the angle between the principal material frame and the Cartesian (or another) frame system. Handling orientation directions is discussed in Section 6.3.1 and applied in Tutorial T1, albeit for a composites stress analysis. Example 5-6: Steady state conduction, convection and surface flux This example follows on from Example 5-5 with three elements assembled as shown below. Heating is on the left face with insulation on the lower faces. Heat losses are via convection from the top face and flux flow from the inclined face. Calculate steady state temperature at the nodes. h = 10 W/m2/°C, Tf = 25°C (100,50) 4
3 200°C
50 mm
(0,50)
thickness t = 1mm conductivity k = 40 W/m/°C
1 y (0,0)
2 insulation
(100,0)
5
(200,0)
insulation
x 100 mm
100 mm
Many of the properties have already been calculated in Example 5-5 and will be used. Again, consistent units mm-N-s are used so conductivity k is 40 mW/mm/➦C, surface heat transfer coefficient h is 0.01 mW/mm2 /➦C and flux flow on the inclined surface is -5 mW/mm2 . In the following elements are identified by their attached node numbers and surfaces by their end node numbers. This problem now involves conduction, convection and imposed fluxes, which requires the following governing equation to be assembled and solved for temperature {T }
[K] + [Kh ] {T } = {Rq } + {Rh } .
(5.62)
The characteristic conductivity matrix for element 123 was calculated in Equa-
177
Chapter 5. Heat transfer and related field problems
tion 5.54, which is the same as element 254. Below are the conductivity matrices for all elements, including 324 which is calculated from Equation 5.53. In these matrices (and vectors) information showing relevant dof is added to help identify assembly operations.
[k]123
1 50 = −10 −40
2 −10 10 0
3 −40 1 0 2 40 3
[k]324
3 10 = 0 −10
2 0 40 −40
4 −10 3 −40 2 50 4
[k]254
2 50 = −10 −40
5 −10 10 0
4 −40 2 0 5 40 4
Assembly of these characteristic matrices gives the total domain conductivity matrix as 1 2 3 4 5 50 −10 −40 0 0 1 −10 10 + 50 + 40 0 −40 − 40 −10 2 X −40 0 40 + 10 −10 0 3 (5.63) [k] = 0 −40 − 40 −10 40 + 50 0 4 0 −10 0 0 10 5 Convection only occurs along edge 34. Values for this have already been calculated for edge 12 in Example 5-5, which are now used for edge 34 [kh ]34
htL34 = 6 1 0 0 0 = 0 0
2 0 0 0 0 0
"
2 1 1 2 3 0 0 0.33 0.17 0
#
=
"
4 0 0 0.17 0.33 0
0.33 0.17 0.17 0.33 5 0 0 0 0 0
1 2 3 4 5
178
#
(5.64)
5.5. Finite element equations for heat transfer
Similarly, flux for convection flow along edge 12 in Example 5-5 can be used for edge 34 1 0 1 ( ) 2 0 12.5 (5.65) {rh }34 = = 12.5 3 12.5 4 12.5 0 5 Now flux along edge 45, using length L45 = 112 mm and q = −5 mW/mm2 is {rq }45
L−x L45 T L [N ] qdS = qt = x Se 0 L Z
Z
1 0 1 2 ( ) 0 −280 = = 0 3 −280 −280 4 −280 5
qt dx = 2
(
L45 L45
)
(5.66)
Finally, combining all these results gives the relation in Equation 5.62 as
T1 50 −10 −40 0 0 0 T −10 100 0 −80 −10 0 2 = . T −40 0 50.33 −9.83 0 12.5 3 T4 0 −80 −9.83 90.33 0 −267.5 T5 0 −10 0 0 10 −280
Applying boundary conditions for fixed temperatures T1 = T3 = 200➦C and using the method from previous examples yields
T1 1 0 0 0 0 200 0 100 0 −80 −10 T 0 + 10 × 200 2 = 0 0 1 0 0 T3 200 0 −80 0 90.33 0 T4 −267.5 + 9.83 × 200 0 −10 0 0 10 T5 −280 179
.
Chapter 5. Heat transfer and related field problems
After inverting the total characteristic matrix nodal temperatures are T1 T 2 = T3 T4 T5
1 0 0 0 0 0 0.052 0 0.046 0.052 0 0 1 0 0 0 0.046 0 0.052 0.046 0 0.052 0 0.046 0.152
200 200 2000 168 = ➦C . 200 200 1698.5 168 −280 140
These results are verified from a CalculiX analysis of the problem as shown below. 200°C
140°C
200°C 140°C
Remark(s): ❼ If heat capacity were included with matrix [kc ] from Equations 5.59 the problem would become transient requiring a dynamic solution. ❼ For a volume domain, volume integrals are computed for the different characteristic matrices and area integrals would be used to get surface information. These integrals will consistently use either Cartesian, simplex, or natural coordinate systems, as described in Chapter 2, depending on the type of element selected.
5.6
Other possibilities for field analysis
At the start of this chapter the quasi-harmonic governing differential Equation 5.4 was introduced, from which special forms were derived for particular cases. Approximate finite element equations to represent these governing differential equations were then derived. In this chapter, so far, the focus has been heat transfer as a means to elaborate the various equations and to demonstrate their analysis with the finite element technique. However, these governing differential equations, and therefore the approximate finite element representations, can treat a wide range of other phenomena that are broadly classified as field problems. These include, amongst others, electric potential, torsion, seepage flow in a porous media, irro180
5.6. Other possibilities for field analysis
tational flow of an ideal fluid, electrostatics and magnetostatics. Matrices and vectors for field problems are formulated, assembled and solved in an identical manner to that done for heat transfer. For instance, comparable characteristic matrices [k] for an electric potential analysis will use the same element [B] matrix, since this depends only on geometry, but the material property matrix [E] will now use material electrical conductivities instead of thermal conductivities. In this case the field variable is electric potential (voltage), possible internal heat generation is replaced by a possible internal current source. The essential boundary conditions will now be fixed voltages, with natural boundary conditions being externally applied currents. Solution of the assembled matrices and vectors is identical to that for heat transfer using either a linear, nonlinear or transient scheme depending on the physical problem being modelled. Some examples of other field functions and their properties are listed in Table 5.1. field problem heat transfer seepage flow electric potential electrostatics magnetostatics irrotational flow elastic torsion
field variable/ essential BC temperature pressure potential (voltage) field potential magnetomotive force velocity potential stress function
material property thermal conductivity permeability
source Q
electrical conductivity electrical permitivity magnetic permeability
internal heat internal flow internal current electric charge int. magnetic force
reciprocal of shear modulus
angle of twist per unit length
natural BC heat flux fluid flow flux boundary current field intensity ext. magnetic field intensity imposed vel. (essential BC)
Table 5.1: Example steady state field functions
The possibility to use the same code and algorithms for analysis of different field problems is demonstrated in the tutorials, in moving from Tutorial T5 to Tutorial T6. For both studies dedicated options for a thermal field analysis are used, although Tutorial T6 is a fluid flow (seepage/infusion) problem. This will be successful, but does require media permeability to be defined instead of thermal conductivity, and pressure boundary conditions to be entered instead of temperature. Exercises For these exercises use consistent units as discussed with regard to Table 7.1. E.g. units mm-N-s in tonne, mm, s, N, MPa are used here. 181
Chapter 5. Heat transfer and related field problems
1. Two reservoirs are connected by three pipes of different diameters as shown below. Use Equation 1.29 to assemble FE equations for a solution. The known pressures are inlet P1 = 1 bar + ρgz where z = 8000 mm is height above datum. This pressure drives the flow. The outlet is to atmosphere at P4 = 1 bar. For flow continuity qA 2 = qA 3 = 0. Assume each pipe is 5000 mm long, atmospheric pressure 1 bar = 0.1 N/mm2 , water dynamic viscosity µ = 1 × 10−9 N.s/mm2 , water density ρ = 1 × 10−9 tonne/mm3 and gravity g = 9810 mm/s2 . 1bar atmospheric 3000mm
reservoir
z
datum
5000mm
1
d = 100mm 2
d = 60mm 3
d = 50mm 4
1bar atmospheric reservoir
Compute the flow rates in each pipe and unknown pressures at the pipe junctions. Check there is correct flow continuity between all pipes, that is, they each transport the same amount of water per unit time. 2. A more complex pipe network analysis is undertaken in Tutorial T12. This has different types of pipes that are only partially filled, which requires a nonlinear solution. For the interested reader try this tutorial and the suggested exercise.
conductivity k = 40 mW/mm/°C ρ = 7.8 × 10 tonne/mm c = 4.2 × 10 mJ/tonne/°C area To = 25°C 3 A = 300 mm2 1 2 150°C L = 100 mm
L = 100 mm
temperature [°C]
3. For the 1D rod from Exercise 5-2, which is modelled with 2 bar elements in Exercise 5-3 write a FreeMAT or Octave script to compute transient heat flow (for the 2 bar model). Assume initial temperature is 25➦C with a 150➦C temperature suddenly applied at node 1 at time t = 0. All other properties are given below. Use the Newmark direct integration scheme outlined in Section 3.4.2.4 to compute temperature evolution at nodes 2 and 3. Only account for conduction and heat capacity flow.
node 3 node 2
time [sec]
182
5.6. Other possibilities for field analysis
4. If both elements in Example 5-3 have an internal energy source added Q = 10000 kW/m3 what are the modified steady state temperatures at nodes 2 and 3. 5. Several tutorials using the FE codes cover field analysis, with each having further exercises: ❼ Tutorials T5 and T6 undertake, respectively, 2D steady state finite element analysis of heat conduction and fluid flow through a porous material. Both are based on physics represented by the Laplace equation. ❼ Tutorial T9 is a transient analysis for heat transfer solved using direct integration. ❼ Tutorial T11 is nonlinear thermal problem involving contact that is solved by the Newton-Raphson method.
183
CHAPTER
SIX
MATERIAL CONSTITUTIVE LAWS
6.1
Introduction
Successful material constitutive modelling is an essential part of any finite element analysis, whether it be mechanical, field or CFD analysis, that does require a good understanding of the underlying theory, any limitations and required model input parameters. This chapter gives an introduction to this topic by considering three important models for solid materials, namely, elasticity, hyperelasticity and plasticity. These materials are applied in several tutorials in the second part of this book. Today, all commercial FE codes have a comprehensive library of standard constitutive models covering most common materials. For more exotic materials implementation of dedicated laws via user subroutines is usually possible, although this can be a challenging task that does require programming skills and a clear understanding of the material behaviour to be characterised. First some fundamental material laws are described via 1D rheological models. These provide a useful means to build constitutive laws that can be adapted to incorporate different behaviours. This is then followed by theory for isotropic, orthotropic and anisotropic elastic solids, hyperelasticity for large nonlinear elastic deformation of elastomers and rubber, and plasticity theory for ductile metals and similar materials. 184
6.2. Rheological models for material behaviour
6.2
Rheological models for material behaviour
Rheological models can be most helpful to build a physical representation to aid understanding of material behaviour. In the following it is shown how onedimensional elastic springs, viscous dashpots and friction sliders are used to construct rheological models for elastic and nonlinear elastic, elasto-plastic and time dependent viscous behaviour. From these it is usually possible to extend the concepts to construct more complex material behaviours, that could be converted to numerical models for implementation in an FE code. Elasticity: Figure 6.1a depicts a linear elastic spring. Nonlinear elasticity is introduced in Figure 6.1b by making modulus a function of displacement u. In both cases unloading follows the loading curve, although hysteresis unloading along a different path for energy absorption, such as occurs in foams, is also possible. u
E
a) Elastic σ = Eε
σ
ε
b) Nonlinear elastic
E = E(u)
σ
E
σ
u
E(u)
σ
σ = E (u) ε
ε
hysteresis ε
Figure 6.1: Rheological elastic models
Viscosity: Figure 6.2a shows a basic viscous dashpot so that stress now depends on strain rate ε˙ (= ∆u/∆t) and the coefficient of viscosity η (= σ/ε). ˙ In Figure 6.2b a parallel elastic spring is added for visco-elastic behaviour. These dashpots can also represent stress relaxation in time-dependent creep problems and are often used for numerical damping purposes in dynamic FE codes. a) Viscous
η
σ
u
ε
ε >ε >ε
ε
σ, t
ε =0
σ = η ε˙
ε η
b) Visco-elastic
u
σ σ, t
σ = Eε+η ε˙
E
Figure 6.2: Rheological viscous models 185
ε E
ε ε
Chapter 6. Material constitutive laws
Plasticity: Figure 6.3a shows a basic friction slider to represent rigid perfectlyplastic behaviour. In Figure 6.3b and Figure 6.3c elastic springs are added for elasto perfectly-plastic and linear hardening behaviours. In all of these models unloading is parallel to the elastic loading curve, and after yielding at σ = σy there is a permanent plastic strain εp . Figure 6.3d introduces a dashpot for added strain rate effect to harden plasticity with dynamic loading. a) Rigid perfectly-plastic
σ
u
σ
σ
σ
if σ > σy then σ = σy
ε
ε σ
b) Elastic perfectly-plastic E
σ
if ε < σy /E elastic σ = Eε
σ
u E
σ
if ε > σy /E plastic σ = σy
ε σ
c) Elasto-plastic linear hardening
u
E
if ε < σy /E elastic σ = Eε if ε > σy /E elastic σ = σy +Ep ε
σ
E
E
σ σ
E
p
σ
if ε < σy /E elastic σ = Eε E
E
u
ε
ε
ε
d) Visco-plastic linear hardening
if ε > σy /E visco-plastic
ε
ε
ε
σ
E
σ
σ, t E
η
σ = σy +Ep εp +η ε˙
ε
ε
ε
Figure 6.3: Rheological elasto-plastic models
All of these models, except linear elasticity, have a nonlinear stress-strain relationship. For an implicit analysis this will require some form of Newton-Raphson iterative method for a solution as described in Section 3.3.5. Essentially loads are incrementally applied and iterations performed at each load increment to improve ‘trial stresses’ and find an equilibrium state where internal forces balance applied loads. These trial stresses appear in the out-of-balance forces of Equation 3.18 and the stress stiffness matrices presented in Section 3.3.3. Alternatively, the explicit FE method described in Section 3.4.1 can be an efficient solution method for problems involving highly nonlinear materials, since the solution algorithm uses extremely small time steps that can allow a nonlinear stress-strain behaviour to be accurately followed. Isotropic and orthotropic elasticity is used in Tutorials T1 and T2 for 3D and 2D problems, including examples involving fibre reinforced composites. 3D elastic 186
6.3. Elastic isotropic, orthotropic and anisotropic behaviour
analysis is also tackled for fatigue life analysis in Tutorial T4. Hyperelasticity is used in Tutorial T11 for a rubber seal example and plasticity in Tutorial T3 for ductile adhesive in a bonded joint.
6.3
Elastic isotropic, orthotropic and anisotropic behaviour
Elastic stress-strain behaviour can be isotropic, orthotropic or anisotropic depending on the material microstructure. An isotropic elastic material such as glass and unworked metals have properties that do not vary with direction and are fully characterised by Young’s modulus E and Poisson’s ratio ν, with shear modulus G given by
G=
E . 2(1 + ν)
(6.1)
Thus isotropic materials only have two independent properties and an infinite number of symmetry planes. Orthotropic materials such as wood, composite plies and stretched metals have three mutually orthogonal symmetry planes. Anisotropic materials include composite laminates with non-orthogonal plies, which have no symmetry planes so properties vary in all directions. In the following a general expression for an anisotropic material is stated, from which specific forms for orthotropic and isotropic behaviour are given.
6.3.1
3D elasticity and transformations
For a 3D material the stress-strain relations are {σ} = [E]{ε} where [E] is a 6 × 6 symmetric matrix of material constants. The compliance relates strains to stresses and is given by {ε} = [S]{σ} where [S] = [E]−1 . Using only general terms for coefficients the full compliance matrix is εx εy ε z γ yz γ xz γ xy
=
S11 S12 S13 S14 S15 S16
S12 S22 S23 S24 S25 S26
S13 S23 S33 S34 S35 S36
S14 S24 S34 S44 S45 S46
187
S15 S25 S35 S45 S55 S56
S16 S26 S36 S46 S56 S66
σx σy σz σyz σxz σxy
= [S]{σ} .
(6.2)
Chapter 6. Material constitutive laws
6.3.1.1 Anisotropic 3D materials These are characterised by a fully populated compliance matrix in Equation 6.2. This has the consequence that an applied uni-axial load will cause coupled stretch and shear deformations and, conversely, shear loads cause extension and shear deformations. The [E] and [S] matrices are symmetric so 21 material properties are necessary to fully characterise anisotropic behaviour. Anisotropic materials are rarely used in practice because of their undesirable deformation behaviour under load. 6.3.1.2 Orthotropic 3D materials These materials have three planes of symmetry that are orthogonal to each other. This greatly simplifies the constitutive laws and deformation behaviour. For such materials it is convenient to describe properties with respect to the symmetry directions and, if necessary, use transformation relations to convert these to equivalent properties in any other frame, such as an element local frame or the global coordinate frame. Principal directions and the Cartesian coordinate (or another) system for a 3D orthotropic material are shown in Figure 6.4, together with the stress components in each system. σ3 σ31 σ13
σ32 σ12 σ23 σ21
3 σ2
σz σzy
σzx σxz
z y
2 σyz
σxy
1
σy
σyx
σx
x
Figure 6.4: Local (principal) and global coordinate frames and stresses. Principal quantities are always denoted by numerics and Cartesian by alphanumerics
For rotational equilibrium shear stresses are complementary (σ12 = σ21 , etc.,), therefore there are six stress and strain components in the local L material frame 1, 2, 3 and the Cartesian, or global G frame x, y, z. These are {σ L } = {σ1 , σ2 , σ3 , σ23 , σ13 , σ12 }
{εL } = {ε1 , ε2 , ε3 , γ23 , γ13 , γ12 }
and
(6.3) G
{σ } = {σx , σy , σz , σyz , σxz , σxy }
G
{ε } = {εx , εy , εz , γyz , γxz , γxy } . 188
6.3. Elastic isotropic, orthotropic and anisotropic behaviour
In terms of compliance [S] in the principal material coordinate frame 1, 2, 3 the full 3D relations relating strains to stresses is given by Hooke’s law ε1 ε2 ε3
γ23 γ13 γ12
=
1 E1 ν12 − E1 ν13 − E1
ν21 E2 1 E2 ν23 − E2
0
0
0 0
−
ν31 E3 ν32 − E3 1 E3
−
0
0
0
0
0
0
0
0
0
0
1 G23
0
0
0
0
0
1 G13
0
0
0
0
0
1 G12
σ1 σ2 σ3
σ23 σ13 σ12
.
(6.4)
Now the [S] matrix only has nine unique material constants since symmetry requires that ν12 ν21 = , E2 E1
ν31 ν13 = E3 E1
ν32 ν23 = . E3 E2
and
Also, the zero terms in Equation 6.4 ensure there is no coupling of extension and shear deformations for applied loading in the principal frame directions. As usual the orthotropic elasticity matrix [E] = [S]−1 . Many orthotropic materials such as extruded polymers and unidirectional composites are transversely isotropic. That is, on a plane perpendicular to the main 1-axis in Figure 6.4 material behaviour is isotropic. In this case we have E2 = E3 , ν12 = ν13 , ν21 = ν31 , ν23 = ν32 and G12 = G13 , where directions 2 and 3 are orthogonal axes at any orientation on the perpendicular plane. The modified strain-stress relation is
ε1 ε2 ε3 γ23 γ13 γ12
=
1 E1 ν12 − E1 ν12 − E1
ν21 E2 1 E2 ν23 − E2
0
0
0
1 G23
0
0
0
0
0
0
−
ν21 E2 ν32 − E2 1 E2
−
189
0
0
0
0
0
0
0
0
0
0
0
0
1 G12
0
0
0
1 G12
σ1 σ2 σ3 . σ23 σ13 σ12
(6.5)
Chapter 6. Material constitutive laws
Since the standard isotropic law gives G23 = E2 /2(1 + ν23 ), it now means there are only five independent constants E1 , E2 (=E3 ), G12 (=G13 ), ν12 (=ν13 ) and ν23 to fully characterise this material behaviour. 6.3.1.3 Isotropic 3D materials These do not have properties that are direction dependent and are fully characterised by any two elastic properties from Young’s modulus E, Poisson’s ratio ν and shear modulus G, due to interdependency of properties in Equation 6.1. Therefore, Equation 6.4 simplifies to give the compliance [S] as
εx εy εz
γyz γxz γxy
=
1 E ν − E ν − E
ν − E 1 E ν − E
ν − E ν − E 1 E
0
0
0
0
0
0
0
0
0
1 G
0
0
0
0
1 G
0
0
0
0
0
0
0 0 0 0 0 1 G
σx σy σz
σyz
σxz σxy
(6.6)
which applies in any frame direction. 6.3.1.4 Transformations for 3D materials Transformation of stiffness from one frame to another is often necessary, for example, material stiffness in a principal material frame will need to be transformed to a local element frame, so element stiffness can be formulated. Or possibly stresses or strains computed in an element coordinate frame may need to be transformed to a material frame to check for failure. These types of operations are an essential part of analysis when analysing materials like composites. First, some general transformation relations for 3D materials are derived that are then reduced for 2D materials. Stress and strain transformations In these operations the transformation matrix [T ] shown in Figure 6.5 is used, where direction cosines l1 , l2 , ... n3 denote angles of rotation θ of each local axis xL , y L , z L about global axes x, y, z. Transformation of the 3 × 3 second rank stress tensor uses the standard transformation given by {σ L } = [T ] {σ G } [T ]T
or
{σ G } = [T ]T {σ L } [T ] 190
6.3. Elastic isotropic, orthotropic and anisotropic behaviour zL zL
z y yL
θ
yL
θ
x
xL
,
xL
,
yL
θ
,
zL
y
z
1
1
1
2
2
2
3
3
3
x
Figure 6.5: Direction cosines between coordinate systems xL y L z L and x y z, with the three direction cosines for xL to the x, y and z-axes shown, namely, l1 , m1 and n1
for instance, global to local stress is L L l1 l2 l3 σxL σxy σx σxy σxz σxz l 1 m1 n 1 L L σxy σyL σyz = l2 m2 n2 σxy σy σzy m1 m2 m3 . L L n1 n2 n3 l 3 m3 n 3 σxz σzy σz σxz σyz σzL
Alternatively multiplying out matrices and rearranging gives the expression for stress transformation as {σ L } = [Tσ ] {σ G } where stress is now expressed in vector form as in Equation 6.3 and transformation [Tσ ] is
[Tσ ] =
l12 m21 n21 2m1 n1 2l1 n1 2l1 m1 2 2 2 l2 m2 n2 2m2 n2 2l2 n2 2l2 m2 2 2 2 l3 m3 n3 2m3 n3 2l3 n3 2l3 m3 l2 l3 m2 m3 n2 n3 (m2 n3 + n2 m3 ) (l2 n3 + n2 l3 ) (l2 m3 + m2 l3 ) l1 l3 m1 m3 n1 n3 (m1 n3 + n1 m3 ) (l1 n3 + n1 l3 ) (l1 m3 + m1 l3 ) l1 l2 m1 m2 n1 n2 (m1 n2 + n1 m2 ) (l1 n2 + n1 l2 ) (l1 m2 + m1 l2 )
.
(6.7)
The 3D transformation matrix for strains [Tε ] is the same as [Tσ ] provided tensor shear strains and not engineering shear strains are used in any strain transformations. Tensor shear strain is half engineering strain given by γ/2, which must be used for all shear strains in both frames being transformed. Since [Tσ ] = [Tε ] these can be replaced by [Tεσ ]. Note transformation matrix Equation 6.7 is organised for the sequence of 3D stresses and strains used in this book (x, y, z, yz, xz, xy) 191
Chapter 6. Material constitutive laws
and (1, 2, 3, 23, 13, 12). Stiffness and compliance transformation In this case we know [E L ] in {σ L } = [E L ] {εL } and need to find [E G ] that relates {σ G } to {εG }. For transformations we have {σ L } = [Tεσ ]{σ G } and {εL } = [Tεσ ] {εG }, but {εG } and {εL } must be converted to use engineering shear strains to get [E G ]. For this a matrix [R] is introduced so that 1 0 0 0 0 0 ε ε x x 0 1 0 0 0 0 ε ε y y ε 0 0 1 0 0 0 ε z z = = [R]{εG } γyz /2 γyz 0 0 0 2 0 0 γ /2 0 0 0 0 2 0 γ xz xz γ γxy /2 0 0 0 0 0 2 xy or
εx εy εz γyz /2 γxz /2 γxy /2
=
1 0 0 0 0 0
0 1 0 0 0 0
0 0 0 0 0 0 0 0 1 0 0 0 0 1/2 0 0 0 0 1/2 0 0 0 0 1/2
εx εy εz γyz γxz γxy
= [R]−1 {εG }
with identical relations for local frame strains {εL }. Now local and global strains are transformed using [R]−1 {εL } = [Tεσ ] [R]−1 {εG }, which now has engineering shear strains. From this relation and using {σ G } = [Tεσ ]−1 {σ L } and {σ L } = [E L ] {εL } yields {σ G } = [Tεσ ]−1 [E L ] [R] [Tεσ ] [R]−1 {εG } so transformed elasticity is [E G ] = [Tεσ ]−1 [E L ] [R] [Tεσ ] [R]−1
(6.8)
and from inversion transformed compliance is [S G ] = [R] [Tεσ ]−1 [R]−1 [S L ] [Tεσ ] = [E G ]−1 .
(6.9)
This approach to transformations is normally applied in composites analysis. An alternative interpretation often found in the literature uses Equation 6.7 for 192
6.3. Elastic isotropic, orthotropic and anisotropic behaviour
[Tσ ] with [Tε ] given by [R] [Tεσ ] [R]−1 . In this case [Tε ] is the same as [Tσ ] in Equation 6.7, except all 2’s in the top right quadrant shift to the lower left quadrant. Now stiffness in Equation 6.8 is [E G ] = [Tσ ]−1 [E L ] [Tε ] with all transformations using [Tσ ] and [Tε ] and engineering shear strains. For inverse operations it can be shown that [Tσ ]−1 = [Tε ]T .
6.3.2
2D elasticity and transformations
For a 2D material only relevant rows and columns from the 3D elastic constitutive laws and transformation relations are required. A 2D isotropic material uses Equation 6.6 to obtain the 2D compliance relation in the Cartesian frame as εx εy γ xy
=
1 E ν − E 0
σx σy 0 σ 1 xy G
ν E 1 E
−
0
0
.
(6.10)
For an orthotropic 2D material in the principal 1, 2 frame the compliance law is ε1 ε2 γ 12
=
1 E1 ν12 − E1
ν21 − E2 1 E2
0
0
0 0 1 G12
σ1 σ2 σ 12
(6.11)
which can be transformed to any other frame using σx σ1 σ2 = [Tεσ ] σy σxy σ12
and
σ1 σx −1 σ2 . σy = [Tεσ ] σ12 σxy
The 2D transformation matrix [Tεσ ] is obtained from the 3D transformation in Equation 6.7 by considering only rotations in the x-y plane. This is done by setting n1 = n2 = l3 = m3 = 0 and n3 = 1 giving l12 m21 2l1 m1 [Tεσ ] = l22 m22 2l2 m2 l1 l2 m1 m2 (l1 m2 + m1 l2 )
193
Chapter 6. Material constitutive laws
or using the common notation in Figure 1.16 with l1 = cos θ, m1 = sin θ, l2 = −sin θ and m2 = cos θ, and abbreviating cos θ = c and sin θ = s gives
c2 s2 2cs [Tεσ ] = s2 c2 −2cs . −cs cs (c2 − s2 ) The strain transformation is ε ε x 1 = [Tεσ ] εy ε2 γxy /2 ε12 /2
ε ε 1 x −1 . = [Tεσ ] ε2 εy ε12 /2 γxy /2
and
For these transformations it can be shown that the inverse stress and strain transformation is
[Tεσ ]−1
c2 s2 −2cs = s 2 c2 2cs . cs −cs (c2 − s2 )
With minor modifications the same relations as Equations 6.8 and 6.9 can be applied to transform 2D stiffness and compliance.
6.4
Material nonlinearity
Solution methods for geometric nonlinear behaviour, where strains are nonlinearly related to displacements, have been addressed in Section 3.3. A second common form of nonlinearity is material behaviour, where stresses do not change proportional to strains. Most materials will exhibit some nonlinear stress-strain behaviour if they can sustain large strains prior to failure. This can be due to changes in the microstructure or possibly initiation of damage. Ductile metals will undergo plasticity once elastic limits are exceeded, and composites or concrete will exhibit microcracking. There are other forms of nonlinear behaviour such as viscous time dependent effects due to dynamic or long term creep loading, or coupled properties such as temperature dependent elasticity in a thermomechanical analysis. In this section two common types of material nonlinearity are discussed, namely, hyperelasticity and elasto-plasticity. 194
6.4. Material nonlinearity
6.4.1
Hyperelasticity
Elastomers and similar rubber like materials can undergo large reversible elastic strains up to 600%, unless stretch is so excessive that damage to the long chain molecular structure occurs. These elastic strains are also highly nonlinear due to progressive stretching and alignment of the molecules. Further, these materials are nearly incompressible so Poisson’s ratio is close to 0.5. Thus they have a very large bulk modulus K = E/3(1 − 2ν) so volume change with hydrostatic loading is very small, but they will easily deform under shear loading due to comparatively low shear modulus. The large nonlinear strains for this class of material are characterised in terms of the stretch ratio λ, which is different to engineering strain ε. By definition stretch ratio λ is deformed gauge length L divided by initial gauge length LO λ=
L LO
which can be related to engineering strain by λ=
LO + u =1+ε LO
L
force (P)
where u is the stretch displacement. A schematic interpretation of these strain measures is shown in Figure 6.6a, with a typical test force-stretch curve for an elastomer shown in Figure 6.6b. The mechanisms taking place involve early phase stretching of polymer chains that can easily move relative to each other. The response tends to plateau until maximum chain stretching occurs, at which point stiffness rapidly increases. u
P
L
stretch ratio λ
a)
b)
Figure 6.6: Typical nonlinear uni-axial force-extension for a hyperelastic material. a) Strain measures. b) Hyperelastic loading
Hyperelastic materials are assumed to be isotropic, elastic, nearly incompressible and are characterised in terms of stored energy via a strain energy density function. Stress versus strain (stretch) is then obtained using differentials of this 195
Chapter 6. Material constitutive laws
energy function with respect to strain. As an analogy a standard isotropic material could also be defined in terms of its energy strain. The stored energy would be σε/2 and using σ = Eε gives strain energy U = Eε2 /2. For this analogy, if a test were done and strain energy U used to quantify material behaviour, then σ = dU/dε = Eε, gives our usual behaviour relating stress to strain. Over the years different models have been proposed for these strain energy functions, that are either dependent on strain invariants or principal stretches, so that, in general terms, these models are variations of either U = C 1 I1 + C 2 I2 + C 3 I3
or
U = C 1 λ1 + C 2 λ2 + C 3 λ3
where Ii are strain invariants, λi are principal stretches and Ci are coefficients that must be fitted to test measurements. Large strain theory, also known as large deformation theory, must be used to predict deformation of elastomers since large material strains and rotations will invalidate assumptions inherent in infinitesimal strain theory used in Equations 3.2. A description of this theory and further reading is provided in reference [27]. One feature of this theory is derivation of the Green deformation tensor, which is independent of rotation terms, and has three eigenvalues λ21 , λ22 and λ23 . From this standard relations for a tensor yield three expressions for strain invariants I1 = λ21 + λ22 + λ23
(6.12a)
I2 = λ21 λ22 + λ22 λ23 + λ23 λ21
(6.12b)
I3 = λ21 λ22 λ23 .
(6.12c)
Invariance of these relations means that their values do not change with axis orientation and any transformation from one frame to another yields the same values. Broadly, the first invariant characterises the square of individual stretches, the second includes shear effects and the third quantifies volumetric changes. Hyperelastic models based on invariants use a mixture of these with fitting coefficients to calibrate a model to test measurements. Thus these models are phenomenological and are not based on any rigorous theory. For an incompressible material deformed volume is constant and I3 = 1. Incorporating this condition from Equation 6.12c in Equation 6.12b gives I1 = λ21 + λ22 + λ23 I2 =
(6.13a)
1 1 1 + 2+ 2. 2 λ1 λ 2 λ 3
(6.13b)
196
6.4. Material nonlinearity
6.4.1.1 Some general hyperelastic models In the following strain energy density functions for some popular hyperelastic models are stated, together with some general comments on their accuracy. Neo-Hookean: This is an early model first proposed by Rivlin [28] that today is mainly of historical interest. It is based on statistical thermodynamics of cross-linked polymer chains suitable for plastics and rubber-like substances, and is termed neo-Hookean since coefficient C10 can be selected so that the model becomes Hookean linear elastic. The strain energy density function for this model has the form U = C10 (I1 − 3)
(6.14)
where coefficient C10 is found from testing. This model fails to predict the plateau region or increase in modulus at large strains and is only accurate for strains up to about 20%, it is also inadequate for biaxial stress states. For a better approximation of these effects the following Mooney-Rivlin model offers some improvements. Two term Mooney-Rivlin: This model combines linear functions of the first and second strain invariants given by U = C10 (I1 − 3) + C01 (I2 − 3)
(6.15)
where C10 and C01 are experimentally calibrated against suitable tests described in the next section. This model can generally fit strains up to about 100%→200%, but is known not to work well for certain stress combinations. Yeoh: This model involves only the first stretch invariant 2
3
U = C10 (I1 − 3) + C20 (I1 − 3) + C30 (I1 − 3) =
3 X i=1
Ci0 (I1 − 3)i
(6.16)
where the three coefficients must be calibrated against one standard test. Yeoh [29] has reported that the model works quite well for various deformation modes using uni-axial test data, but can be poor for low strains. Ogden: Rather than using strain invariants this model [30] assumes the energy function is a combination of individual functions of each principal stretch given by U=
N X 2µi
i=1
αi
(λα1 i + λα2 i + λα3 i − 3)
(6.17)
where µi and αi are empirical constants to be found from testing. Usually N = 3 is sufficient for a third order strain energy function, which would require information 197
Chapter 6. Material constitutive laws
from any three of the test configurations described below. This model is widely used today and capable of modelling very large strains under mixed stress states. 6.4.1.2 Hyperelastic material testing Experimental information is necessary to characterise a hyperelastic material and several dedicated tests are available for uni-axial, biaxial and shear loading. Some constitutive models can only utilise information from a single test, whereas others may be calibrated against several tests to obtain a model that is as general as possible. Regardless of the model selected it is important, as a general rule, that the selected test(s) reasonably replicate the loading case(s) to be analysed. Conventions for specimen dimensions and stretch directions are summarised in Figure 6.7. Specimen geometry has length LO , width WO and thickness TO , with length aligned in the loading direction. Principal stretch (strain) directions are usually denoted as 1, 2, 3 with 2 in the loading direction, 1 in the transverse direction and 3 in the thickness direction. P
2
LO
3 TO
1
WO P
Figure 6.7: Dimensions and principal stretch directions for hyperelastic coupon tests
A schematic diagram of common tests and typical curves for tension loading of a hyperelastic material is presented in Figure 6.8, with some further details given below. 1. Uni-axial tension: This uses a long slender specimen giving principal stretch λ2 = λ = L/LO .
(6.18a)
Assuming incompressible behaviour the other principal stretches are p √ λ1 = λ3 ≈ 1/ λ = 1/ A/AO 198
(6.18b)
6.4. Material nonlinearity
2.0
planar tension (shear) 1.0
eng. stress [MPa]
biaxial tension
tension
stretch
1.0
Figure 6.8: Schematic diagram of typical tests and test results for a hyperelastic material
where AO and A are original and instantaneous areas. The corresponding stresses in term of ‘engineering’ stress are σ2 = P/AO
and
σ1 = σ3 = 0 .
For a state of pure tension length LO should be at least 10 × WO and measurements should be made in the central region away from loading grips. 2. Uni-axial compression: This usually uses a thick disc of material compressed between platens in a testing machine. A state of pure compression is difficult to achieve due to friction effects with the platens. The same strain and stress relations apply as the tension case. 3. Biaxial tension: This usually uses a cruciform specimen loaded in biaxial tension creating principal stretches λ1 = λ2 = λ = L/LO
(6.19a)
with through-thickness principal stretch λ3 = 1/λ2 .
(6.19b)
The engineering stresses are σ1 = σ2 = P/AO
and
σ3 = 0 .
4. Shear: A ‘planar tension’ test is widely used to measure shear. This involves a wide short specimen that is loaded in tension in the short direction. Due to material incompressibility and lateral constraint from the loading grips a state of pure shear is induced at 45➦ to the stretching direction giving 199
Chapter 6. Material constitutive laws
λ1 = 1,
λ2 = λ = L/LO
(6.20a)
with through-thickness principal stretch λ3 = 1/λ .
(6.20b)
The engineering stresses are σ1 6= 0,
σ2 = P/AO
and
σ3 = 0 .
It is recommended that WO ≥ 10 × LO for a state of pure shear at the specimen center. From these measurements and considerations of Mohrs circle shear stress τ and shear strain γ are found. Other lap type shear tests are also possible. 6.4.1.3 Model calibration and fitting Results from these different tests must be fitted to a chosen hyperelastic model. For this fitting an engineering stress versus stretch relationship for tension/compression and/or shear must be found for the selected constitutive model. Fitting then involves calibrating the coefficients to get the best agreement between model and test measurements. For each model essentially the same steps are followed which are described for the Yeoh and Ogden models. Yeoh model (tension and compression) Combining Equations 6.13 and 6.18 gives I 1 = λ2 +
2 λ
and
I2 =
1 + 2λ . λ2
(6.21)
Rivlin [28, 31] derived the following relation involving differentials of stored strain energy with respect to strain invariants that relates engineering stress to extension for uniaxial loading ∂U 1 ∂U 1 . + σ =2 λ− 2 λ ∂I1 λ ∂I2
(6.22)
In the Yeoh model only I1 appears. Performing the differentiation ∂U/∂I1 in Equation 6.16 gives ∂U = C10 + 2C20 (I1 − 3) + 3C30 (I1 − 3)2 ∂I1 200
(6.23)
6.4. Material nonlinearity
and substituting in the expression for I1 from Equation 6.21 we obtain 2 ∂U 2 2 2 2 = C10 + 2C20 λ + − 3 + 3C30 λ + − 3 . ∂I1 λ λ
(6.24)
Combining Equations 6.22 and 6.24 gives the stress-stretch relation as
1 σ =2 λ− 2 λ
"
C10 + 2C20
2 # 2 2 2 λ + − 3 + 3C30 λ + − 3 . λ λ 2
If necessary this series relation could be extended for further fitting coefficients C40 , etc. The problem now involves finding coefficients C10 , C20 , C30 so the model best fits test measurements. Only one test can be calibrated and some engineering judgement is needed to select the most appropriate for the load case to be analysed. These could either be pure tension/compression or biaxial tension/compression, or if the problem is predominantly shear then the following version should be used. Yeoh model (shear) For shear the same steps are followed, except from Rivlin [28] the strain invariants for pure shear are I1 = I2 = 3 + γ 2
(6.25)
where γ is now shear strain, and Equation 6.22 is replaced by the expression τ = 2γ
∂U ∂U + ∂I1 ∂I2
(6.26)
with τ being shear stress. From Equations 6.23, 6.25 and 6.26 the shear stress versus shear strain relation is τ = 2γ C10 + 2C20 γ 2 + 3C30 γ 4 .
Again, coefficients C10 , C20 , C30 must be found for a best fit to shear test measurements. Ogden model (tension and compression) From the Ogden strain energy function Equation 6.17 and using the tension/compression relations in Equations 6.18 the modified strain energy density function is U=
N X 2µi
i=1
αi
1 α i λαi + 2 λ− 2 −3 . 201
(6.27)
Chapter 6. Material constitutive laws
From Ogden [30] the stress-stretch relation is obtained from derivatives of the strain energy function using ∂U . ∂λ
σ=
Performing this differentiation of Equation 6.27 gives N X
σ=
i=1
αi 2µi λαi −1 − λ− 2 −1
where coefficients µ and α must be calibrated for different tests i. Ogden model (shear) Using the shear relations in Equations 6.20 and the Ogden model Equation 6.17 the strain energy density function can be expressed as N X 2µi
U=
i=1
αi
(1 + λαi + λ−αi − 3)
which leads to the following expression for shear stress versus stretch τ=
N X
2µi (λαi −1 + λ−αi −1 ) .
i=1
Curve fitting This involves calibrating coefficients of the selected model stress-strain constitutive model against test results. For simpler models this can be done by ‘trial and error’ to get a best compromise, but for more advanced models an optimisation approach usually using least squares is necessary. The method is straightforward as described by Rackl [32]. Some commercial FE codes have pre-processing or integrated tools in the solver to numerically determine these coefficients from input test data. 6.4.1.4 Volumetric strains in hyperelastic materials So far hyperelastic models and tests have assumed incompressible behaviour. In reality, however, hydrostatic pressure may cause some hydrostatic straining, especially for certain foams that have hyperelastic behaviour. For these materials Equation 6.12c may be rewritten to include hydrostatic strains I3 =
λ21 λ22 λ23
=1+
∆V VO
2
= J2
(6.28) 202
6.4. Material nonlinearity
√ where J = I3 is the volume ratio (V /VO ). A test procedure involving the compression of discs of material in a confined volume is usually used to measure volumetric stress-strain behaviour. For all hyperelastic models presented in Equations 6.14 through 6.17 the strain energies are, effectively, only dependent on loading mechanisms that change material shape, there is no contribution to strain energy from volumetric strains. This volumetric strain contribution can be added so that general expressions for total strain energy is either U = UD (I1 , I2 ) + UH (J)
or
U = UD (λ1 , λ2 , λ3 ) + UH (J)
where UD and UH are, respectively, deviatoric and hydrostatic strain energies. A common expression for hydrostatic strain energy UH is UH =
N X 1 (J − 1)2i Di
(6.29)
i=1
where J is the volume ratio and Di are coefficients that must be fitted to test measurements, with N selected so that sufficient terms are available for a satisfactory fit. Finally, if hydrostatic strain energy contribution is important, Equation 6.29 is added to either of the hyperelastic models from Equations 6.14 through 6.17.
6.4.2
Plasticity
Material plasticity occurs in many manufacturing processes such as sheet metal forming and forging. It also controls fatigue life, impact behaviour and ultimate load capacity of components made from ductile metals and any attempt to numerically predict these types of processes or events must accurately account for its effect. Other ductile non-metallic materials, like the polymer adhesive in the joint study of Tutorial T3, are also well represented by the yielding and irreversible strains that occur in plasticity. The foundation of classical plasticity theory has been largely developed by Hill [33] and Prager [34], among others. Before presenting an elementary theory of plasticity, a few basic terms and concepts are first described. Plasticity is due to sliding of crystal planes over each other caused by shear loading. In some materials the ease of slippage is influenced by hydrostatic stress, whereas for others, like metals, this effect is considered negligible. Figure 6.9 separates hydrostatic and shear (deviatoric) stress components acting on a material due to arbitrary applied principal stresses σ1 , σ2 , σ3 . Hydrostatic stress is the mean stress (σ1 + σ2 + σ3 )/3 which acts equally on all faces and produces only volumetric strains. Deviatoric stresses are the remaining stress differences shown that cause shearing and drive plastic flow. Summation of stresses on each set of faces gives the total stress. 203
Chapter 6. Material constitutive laws
σ =
σ
σ σ
=
σ +σ +σ 3
σ
σ
σ −σ 3
+ σ −σ 3
total
hydrostatic part
σ −σ 3
σ −σ 3
+
σ −σ 3 σ −σ 3
deviatoric (shear) parts
Figure 6.9: Hydrostatic and deviatoric stress contributions in a loaded material
Figure 6.10a shows a typical uni-axial stress versus strain curve from testing a ductile material. The initial behaviour is linear elastic with modulus E, which applied up to a yield stress σ y at which point plastic strain εp is zero. With further loading the response is elasto-plastic accompanied by hardening as stress increases nonlinearly with increase in plastic strain. Unloading will be parallel to the initial elastic loading curve, leaving a permanent plastic strain εp > 0. In the case of dynamic loading high strain rates (ε˙ > 0) cause viscous effects that raise the yield curve. ε
σ
ε>0
σ ε=0 σ σ =
σ ε
σ
E
E
σ σ
ε ε
σ +σ +σ 3
ε
hydrostatic axis σ =σ =σ
a)
b)
Figure 6.10: Elasto-plastic behaviour. a) Uni-axial tension stress-strain curve. b) Plastic yield envelope
Figure 6.10b shows a typical envelope of yield stress σ y for all states of stress in principal stress space. The axis of the cylinder intersects the three orthogonal principal stress axes and represents a state of pure hydrostatic stress. It is assumed the cylinder extends infinitely since hydrostatic stress does not influence yielding (in metals at least). Any point on the hydrostatic axis represent the state of hydrostatic stress σ h and radius to the yield surface at this point is the sum of deviatoric stresses σ d that causes yielding σ y . Any state of stress inside the 204
6.4. Material nonlinearity
envelope is elastic. A state of stress outside the envelope is not permissible and socalled flow rules ensure stresses move around the envelope surface during loading. For a hardening material, as depicted in Figure 6.10a, the envelope will expand with plastic strain. The envelope depicted in Figure 6.10b is the von Mises yield criterion which is widely used in FE codes for metals and similar ductile materials. Another common criterion uses the Tresca yield surface based on principal shear stresses. But there are many others that can broadly be grouped as either mathematical models of the yield surface, or phenomenological models that try to incorporate experimental measurements and other observations of yield surface behaviour. Some advanced models include effects from manufacturing processes such as extrusion and sheet rolling that change the morphology and lead to anisotropic plasticity. Strain rate and temperature dependent plasticity are other possibilities, as is hydrostatic dependent yield stress for foams and soils which modify the cylinder in Figure 6.10b to have a conical shape. Further, cyclic loading causes irreversible strains and changes in yield stress; this is known as the Bauschinger effect and leads to kinematic strain hardening that is represented by translations of the yield envelope in stress space. All these effects may be important in special cases, but for most work the standard von Mises plasticity law is reasonable and is the model discussed here to introduce plasticity theory. Three requirements are necessary to formulate plasticity theory, namely, a constitutive law to describe elastic behaviour inside the yield envelope, a criterion to identify the yield surface and flow rules to describe post-yield behaviour that ensure stresses correctly stay on the yield surface. In the elastic region constitutive laws presented in Section 6.3 are applied. In the following the von Mises yield criterion and Prandtl-Reuss flow rules are described to account for yield limits and post-yield behaviour. von Mises yield criterion This criterion uses strain energies to find the critical shear strain energy that causes yielding. The volumetric strain εv of a cube, like that shown in Figure 6.9, is the unit change in its volume ∆V /V , which is
εv =
(1 + ε1 )(1 + ε2 )(1 + ε3 ) − 1 . 1
Assuming that strains are small we can neglect higher order terms so that
εv ≈ ε1 + ε2 + ε3 .
(6.30)
In terms of principal stresses Equations 6.6 and 6.30 yield 205
Chapter 6. Material constitutive laws
εv = =
σ1 ν(σ2 + σ3 ) − E E
+
σ2 ν(σ3 + σ1 ) − E E
+
σ3 ν(σ1 + σ2 ) − E E
(σ1 + σ2 + σ3 ) (1 − 2ν) . E
The volumetric strain energy is 1/2 × mean stress × volumetric strain giving 1 Uv = 2
(σ1 + σ2 + σ3 ) 3
× εv =
1 (σ1 + σ2 + σ3 )2 (1 − 2ν) . 6E
The total strain energy is 1/2 × stress × strain for all three components. Using Equations 6.6 this gives 1 1 1 2 1 σ1 + σ22 + σ32 − 2ν(σ1 σ2 + σ2 σ3 + σ3 σ1 ) . U = σ 1 ε1 + σ 2 ε2 + σ3 ε3 = 2 2 2 6E Finally, the shear strain energy Ud is U − Uv . Using G = E/2(1 + ν) it can be shown this is Ud =
i 1 h (σ1 − σ2 )2 + (σ2 − σ3 )2 + (σ3 − σ1 )2 12G
from which we can state that the stress terms represent a constant in stress space for a given value of shear strain energy Ud (σ1 − σ2 )2 + (σ2 − σ3 )2 + (σ3 − σ1 )2 = constant .
(6.31)
Using the convention σ1 > σ2 > σ3 a uni-axial tension test will yield at σ1 = σ y with σ2 = σ3 = 0, thus this stress state in Equation 6.31 gives (σ1 − σ2 )2 + (σ2 − σ3 )2 + (σ3 − σ1 )2 = 2(σ y )2 . It is standard convention to define the yield surface such that the yield function f = 0 represents the surface, with f < 0 inside for elastic behaviour and f > 0 outside for plastic behaviour. Therefore, the von Mises yield criterion is expressed as 12 1 2 2 2 (σ1 − σ2 ) + (σ2 − σ3 ) + (σ3 − σ1 ) − σy = 0 2
(6.32)
where the square root expression is termed equivalent or effective stress σ, and the general relation for the yield surface is 206
6.4. Material nonlinearity
f (σ) = σ − σ y . Johnson and Mellor [35] provide a derivation giving an equivalent relation for σ in terms of Cartesian coordinate stresses as 1 2 1 2 2 2 2 2 2 (σx − σy ) + (σy − σz ) + (σz − σx ) + 3σyz + 3σzx + 3σxy (6.33) σ= 2 which is invariant and valid for any coordinate system. In summary, the von Mises criterion is represented by a cylinder of infinite length that is equally p inclined to the three principal axes. It can be shown the cylinder radius is √2/3 σ y . For 2D stress (σ3 = 0) is an ellipse with p the envelope y y major axis length 2 2 σ and minor axis length 2 2/3 σ as shown in Figure 6.11. The 2D von Mises criterion is obtained from Equation 6.32 with σ3 = 0 giving
σ12 − σ1 σ2 + σ22
1
2
− σy = 0
1 where effective stress σ is σ12 − σ1 σ2 + σ22 2 . Strain hardening of the von Mises envelope is done by increasing σ y with plastic strain εp to expand the envelope.
σ
σ
σ
f(σ) = 0 (plastic) σ
f(σ) < 0 (elastic)
f(σ) > 0 (inadmissible)
Figure 6.11: 2D von Mises yield surface and possible states for f (σ) = σ − σ y
Elasto-plastic relations As indicated in Figure 6.11 the yield surface is the limit of elasticity. Elasto-plastic analysis uses incremental methods to update loads, from which stresses and strains are updated. For any stress state f (σ) < 0, either during loading or unloading, elasticity laws apply. If stresses reach the yield surface f (σ) ≥ 0 then stresses must slide around the yield surface (which may expand with hardening) so that elasto-plastic stresses are in equilibrium with applied loads. For a stress increment 207
Chapter 6. Material constitutive laws
{dσ} = {dσx , dσy , dσz , dσyz , dσzx , dσxy } this condition can be expressed as f (σ + dσ) = f (σ) +
∂f ∂σ
T
{dσ} = 0
(6.34)
∂f
where { ∂σ }T is the normality vector to the yield surface. This vector direction, for a given stress state on the yield surface, is obtained from differentials of Equation 6.33 with respect to each stress component. The possible load or unload conditions and 3D normality vector are depicted on the 2D schematic diagram in Figure 6.12.
Figure 6.12: 2D yield surface, load or unload and the 3D normality vector
From Equation 6.34 the ‘consistency condition’ to ensure stresses are maintained on the yield envelope is
∂f ∂σ
T
{dσ} = 0 .
(6.35)
Total strains for an elasto-plastic material comprise of elastic and plastic contributions. Using increments, due to the nonlinear relation between stress and strain in an elasto-plastic material, gives {dε} = {dεe } + {dεp } . In this relation the elastic part is governed by Hooke’s law, whereas for a yielding material relations are needed that force stresses to move tangentially around the yield envelope and plastic strains to increase normal to the surface. For a given plastic potential f (σ) Prandtl-Reuss assumed plastic strains increase as df p p p p p p p (6.36) {dε } = {dεx , dεy , dεz , dεyz , dεzx , dεxy } = dλ dσ 208
6.4. Material nonlinearity
where factor dλ is a positive scalar of proportionality that determines the length ∂f ∂f of the vector { ∂σ } in Figure 6.13. In effect { ∂σ } sets the ratios in which plastic strain components increase and dλ is a scaling factor for this increase. Both dλ ∂f and { ∂σ } are unknown and must be updated in an iterative solution scheme.
Figure 6.13: Principles of strain increments
Equation 6.36 forces plastic strains to increment normal to the yield surface. This is suitable for most metals and is referred to as an ‘associated’ flow rule. There are also ‘non-associated’ rules for soils, polymers and similar materials that assume the normality vector for plastic strains are not associated to the yield criterion, but to some other surface function. For an elasto-plastic analysis the usual procedure is to apply a load increment to create displacements and total strain increments. We then seek an elasto-plastic constitutive matrix [Eep ], analogous to Hooke’s law, that relates elasto-plastic stress increment to total strain increment {dσ} = [Eep ]{dε} . The following derivation for [Eep ] and solution procedure is based on the original work of Zienkiewicz and Nayak [36, 7]. For elastic stresses Hooke’s law relates stresses to strains {σ} = [E]{εe } = [E]{ε − εp } or in rate form {dσ} = [E]{dε − dεp } .
(6.37)
Plastic strains are determined by the flow in Equation 6.36. Combining Equations 6.36 and 6.37 gives ∂f {dσ} = [E] {dε} − dλ . (6.38) ∂σ 209
Chapter 6. Material constitutive laws
This expression for stress increment is now used in the consistency relation in Equation 6.35 giving
∂f ∂σ
T
[E] {dε} − dλ
∂f ∂σ
= 0.
From this equation the scalar proportionality factor dλ is found
∂f T [E]{dε} ∂σ dλ = T . ∂f ∂f [E] ∂σ ∂σ Finally, dλ is substituted into Equation 6.38 and after rearranging gives ∂f T ∂f [E] [E] ∂σ ∂σ {dσ} = [E] − T {dε} = [Eep ]{dε} . ∂f ∂f [E] ∂σ ∂σ
This expression for [Eep ] gives the elasto-plastic stress increment for a given state of stress and a total strain increment. However, it is important to note this is nonlinear since stress updates modify the value of [Eep ] and an iterative solution is necessary. Essentially, the elasto-plastic constitutive matrix replaces the elasticity matrix for element stiffness so that [k] =
Z
[B]T [Eep ] [B]dV . V
Practical schemes for solution of this nonlinear problem are outlined in references [36, 7] for 3D and 2D plane stress and plain strain analysis. Basically these methods use the Newton-Raphson interative scheme described in Section 3.3.4 for nonlinear geometric analysis, where stress {σ} in Equation 3.18 now uses updated elasto-plastic stresses to calculate and minimize out-of-balance residual forces. Within these operations elasto-plastic constitutive laws are invoked to maintain stresses on the yield surface. Some of the steps are shown in Figure 6.14, where a load increment creates an elastic stress increment {dσ e } that exceeds the yield surface at B. These stresses are brought back to the yield surface at C using the normality rule, giving an estimate for elasto-plastic stresses {dσ}. The nonlinear nature of these constitutive relations means that further iterations are necessary for convergence, before a further load increment can be applied. A detailed description of these steps is given by Krabbenhøft [37]. 210
6.4. Material nonlinearity
Figure 6.14: Principles of stress updates
This basic approach is readily adapted for a different yield envelope to replace Equation 6.33, or isotropic hardening where the yield stress σ y increases with plastic strain. Non-associated plastic flow can be included by replacing the normality vector {δf /δσ} in Equation 6.34 with a different function. Also, kinematic hardening and anisotropic plasticity are possible. Implementation of the scheme in an explicit algorithm is straightforward, but despite the small time step and small displacement increments it is, never-the-less, usually necessary to perform iterations to prevent elasto-plastic stresses drifting from the yield surface. Exercises Tutorials and exercises using the FE codes that have relevant material laws covered in this chapter are: ❼ Tutorials T1 and T2 use elastic isotropic and elastic orthotropic composites for 2D and 3D continua. ❼ Tutorial T3 analyses an adhesive lap joint in which the adhesive is modelled as an elasto-plastic material. ❼ Tutorial T4 uses a simple elastic material, but does, hopefully, give an interesting insight to fatigue analysis and fatigue life prediction. ❼ Tutorial T11 uses a hyperelastic material law in CalculiX to perform a geometric and material nonlinear analysis of a rubber seal.
211
Part II
Tutorials and exercises
213
CHAPTER
SEVEN
SOME COMMENTS ON TUTORIALS, CODES, UNITS AND MODELLING
The first part of this book introduced linear and nonlinear finite element theory for mechanical and field analysis, basic theory and computational methods for dynamic analysis and some essential constitutive laws. This second part now undertakes practical application of these numerical methods via tutorials and exercises, and also introduces Computational Fluid Dynamics (CFD) analysis. Many commercial codes are available that would be suited for these tutorials and most offer special students versions, although there are often some restrictions or costs. However, for this work I have opted to select only open source codes that can be freely downloaded and used. The packages chosen are FreeCAD and CalculiX for FE analysis, OpenFOAM for fluid dynamics and FreeMAT or Octave for some numerical programming of explicit algorithms and their analysis. For student learning these codes are excellent, although it should be borne in mind they are non-commercial and may lack some of the capabilities and refinement of commercial products. This chapter provides groundwork for these tutorials by providing details on each and the analysis codes used, including installation of codes and suggestions to get started. It concludes with some hints and guidelines on unit systems, meshing, modelling, analysis and interpretation of results. 215
Chapter 7. Some comments on tutorials, codes, units and modelling
7.1
The tutorials
The set of tutorials that follow do give a reasonably broad introduction to FE and CFD analysis. I have tried to make each self-contained with worked examples and exercises that link to necessary theory. These tutorials tend to build on each other, so you will need to work progressively through them, but especially the first two are most important to get started and appreciate basic functions of FreeCAD and CalculiX. There are fourteen tutorials in total covering the following topics: − T1: 3D solids for isotropic and orthotropic elasticity. − T2: 2D shells for isotropic elasticity and orthotropic composites. − T3: Nonlinear analysis involving large deformations and plasticity. − T4: Fatigue and cycle life analysis. − T5: Thermomechanical analysis for deformations and material failure. − T6: Steady state fluid flow through porous media. − T7: Linear eigenvalue frequency analysis for free and preloaded devices. − T8: Linear eigenvalue and nonlinear buckling including imperfections. − T9: Transient dynamic analysis for heat transfer and deformations. − T10: Explicit analysis using algorithms and FreeMAT. − T11: Contact and hyperelastic material in dynamic transient analysis. − T12: Steady state fluid flow in a hydraulic pipe network. − T13: CFD theory and programming a code. − T14: CFD examples using OpenFOAM. It should be emphasised that these are not intended to provide a thorough training course for any of the codes and you may need to invest some time practising with other on-line material. Some perseverance will most likely be necessary!
7.2 7.2.1
Commercial and open source codes Computer Aided Design (CAD)
A comprehensive list of computer aided design packages for CAD modelling and FE meshing is provided in reference [38] where the two notable open source codes are FreeCAD and Salome, both of which are well integrated with FE analysis codes and available on Linux and Windows operating systems. FreeCAD is a general purpose 3D modeller that has been under continuous development since 2002. It has a structure that is organised in workbenches to 216
7.2. Commercial and open source codes
build a model, and has many features that are similar to commercial products like CATIA and SolidWorks. It also has good FE meshing capabilities using Gmsh or Netgen and convenient options in the menu driven Graphical User Interface (GUI) are provided to build and run 1D, 2D or 3D mechanical, thermal or fluid problems via CalculiX, or other FE solvers Z88, Elmer, Mytran and OpenFoam. FreeCAD is hosted on GitHub [39] with further information provided on their homepage [40]. The second package Salome has advanced CAD, meshing and is integrated with the FE analysis code Code Aster. It also has strong capabilities for pre- and postprocessing of FE results. Detailed information, downloads and documentation are available from their homepage [41].
7.2.2
FE analysis
A comprehensive list of 78 commercial and open source finite element codes is summarised in reference [42], together with categories of their analysis capabilities. From this the three open source finite element codes most suited to the aims of this book are CalculiX, Code Aster and Elmer. Reference [43] is another source of useful comparative information. CalculiX in reference [42] is recognised as having extensive capabilities with a broad range of constitutive models, but poor CAD, meshing and model building capabilities. Today, however, these deficiencies are largely overcome by its seamless integration with FreeCAD. The users manual is adequate and many helpful analysis examples are to be found on-line. Perhaps the most serious limitation is that CalculiX lacks true beam and shell elements, although it does have pseudoversions of these elements based on 3D solids that do work reasonable well. Code Aster is another FE code that is extremely versatile and is coupled to the pre- and post-processor code Salome, making it a powerful general purpose FE package. This code has been developed since the late 1980’s by EDF in France for internal needs, but is available today as open source. It has an active users group, but one slight disadvantage to using this code and its documentation is that occasionally some knowledge of the French language is helpful. Lastly, Elmer is another FE based multiphysics code developed since the mid1990’s by Finnish universities and industry supported by the Finnish government. It can tackle a broad range of problems in fluid dynamics, solid mechanics, electromagnetics, heat transfer and acoustics. It is also integrated in FreeCAD, or it can be used as a stand alone code.
7.2.3
Selected open source CAD and FE codes
In conclusion CalculiX/FreeCAD was selected for this book. The two codes are well integrated, although post-processing via FreeCAD is not especially good and 217
Chapter 7. Some comments on tutorials, codes, units and modelling
sometimes it is necessary to use the CalculiX dedicated post-processor (CalculiX GraphiX - CGX), which is rather basic but can be useful and is used in a few of the tutorials. Both FreeCAD and CalculiX are easily downloaded and installed on Windows (or Linux), and there is good documentation and an active users community. One particular benefit of FreeCAD is that FE models are quickly and easily built, at least for these tutorials, making it especially suitable for teaching purposes. But there are limitations as many CaluliX options are not currently supported by FreeCAD, although it is often possible to circumvent this by editing changes into the CalculiX dataset at runtime. A further important advantage is that input data format, documentation and many algorithms are based on the Abaqus code so a student, indirectly, gains an important insight to using this popular commercial product. It should be added, however, that the Salome and Code Aster package does have more capabilities and could have been a genuine alternative. Elmer/FreeCAD is another possibility, but this combination is mainly oriented toward advanced multi-physics problems.
7.2.4
Numerical analysis: Codes and selection
For programming of numerical algorithms undertaken in Tutorials T10, T11 and T13 probably the best code is MATLAB, which is a leading commercial product in this field. However, there are several excellent open source codes that are more than adequate for these problems. A list of these codes is given in reference [44], with a more detailed assessment of some open source products in reference [45]. For this work FreeMAT was selected since it has the same scripting language as MATLAB with good capabilities and reasonable graphics for the relatively simple tasks required here. GNU Octave [46] is another MATLAB clone that is also open source and could have been used. It has similar capabilities to FreeMAT, with slightly better plotting graphics.
7.3
Getting started with FreeCAD
FreeCAD is downloaded and installed from reference [47]. This automatically includes other softwares for meshing and CalculiX for FE analysis. A good way to start using FreeCAD is to study some on-line publications and videos. Some suggestions are: 1. Reference [48] gives information on installation, layout of the GUI, the workbench topics and possible operations with the mouse to manipulate viewing. 2. Reference [49] provides various informations to get started, including a set of links to recommended videos and tutorials. 218
7.4. Getting started with CalculiX
3. Using a web search engine and appropriate keywords can be effective to track information for a particular problem. Meshing tools: Gmsh and Netgen Gmsh and Netgen are both open source 2D and 3D finite element meshers that are integrated into FreeCAD, or can be used as stand alone tools. Application of both options in FreeCAD is straightforward allowing mainly choice of element type, control of minimum element sizes and to a limited extent grading of meshes. Further information is provided on the Gmsh website [50] and the Netgen website [51].
7.4
Getting started with CalculiX
CalculiX is another code that is available as a stand-alone tool on Linux and Windows, but its use in FreeCAD does provide a more convenient platform for FE analyses and visualisation of results. It is automatically installed with FreeCAD from reference [47]. Some sources of useful information include: 1. The CalculiX website [52] provides user manual documentation [53], examples, downloads and a variety of other valuable information. 2. Reference [54] gives specific details on the CalculiX finite element options that are available (via the GUI icons) in FreeCAD. Further information on this is also given in reference [55]. 3. As with FreeCAD, there is an active user community that can be a valuable source of information for problem solving; also, using a web search engine with appropriate keywords can be helpful.
7.5
The dedicated CalculiX post-processor (CalculiX GraphiX - CGX)
In some tutorials CalculiX results are not possible to visualise via the FreeCAD post-processor and it is necessary to use the dedicated CalculiX post-processor (CalculiX GraphiX - CGX). This can be downloaded from reference [56], or better an automated windows installation version can be obtained from reference [57]. CalculiX results are stored in the .frd file after a successful analysis. It is important that a directory to store this file is specified so it can be located, this is done in FreeCAD when an analysis is started, otherwise a default temporary directory is used. If the CGX post-processor is correctly installed from reference [57], then double clicking with the mouse on the .frd file will automatically open the file and post-processor. 219
Chapter 7. Some comments on tutorials, codes, units and modelling
Full documentation for using CalculiX GraphiX (CGX) is provided in reference [58]. However, commands and using the program is quite intuitive so that with some experimentation it should be possible to quickly grasp the necessary basics. Within the viewing window of CGX different mouse keys enable rotation, translation and zooming. By clicking with the mouse just to the left of the main box different viewing options will open as shown in Figure 7.1. Most of these options are self-explanatory and the best is just to experiment.
Figure 7.1: Opening plot options in the CalculiX GraphiX - CGX post-processor
Viewing a particular contour at a particular time (state) is selected under Datasets. For linear analyses there is only one state. For a linear thermomechanical analysis there is one state for temperature and one for deformations. For transient and eigenvalue analyses there are many states corresponding to time intervals or eigenmodes. In addition to the required state the desired contour type is selected as shown in Figure 7.2. This sequence is then repeated to select the desired variable under Datasets > -Entity-. For example DISP stands for displacements and under -Entity- you will find variables for x, y, z displacements, amongst others.
7.6
FreeCAD and CalculiX datasets
All datasets created by a FreeCAD with CalculiX analysis are shown in the flowchart in Figure 7.3. For FreeCAD only the .FCStd file is created. This is 220
7.6. FreeCAD and CalculiX datasets
Figure 7.2: Selection of states and variables for contour plotting
progressively updated as the model is being built and contains all CAD and FE data. It can be saved and reopened at any time to continue working or to modify. FreeCAD FreeCAD postprocessing
.inp
.FCStd
FreeCAD model database file
CalculiX input file
CalculiX CalculiX CGX postprocessor
.frd
main results file
.dat
optional output: displacements/stresses/frequencies…
.cvg
nonlinear analysis convergence information
.sta
nonlinear analysis iteration information
Figure 7.3: File structure for FreeCAD and CalculiX
If a FE analysis is activated in FreeCAD the CalculiX input file .inp is created. Either the analysis can start directly, or this file can be edited in FreeCAD to add or change certain parameters that may not be available in FreeCAD. This file has the same structure as the commercial product Abaqus. A successful CalculiX 221
Chapter 7. Some comments on tutorials, codes, units and modelling
analysis will create the four results files shown, from which the .frd file is the main one for post-processing and visualisation of results, either with FreeCAD or with the CalculiX post-processor CGX. The .dat file contains certain results information like reaction forces (if requested in the input) or eigenvalues from a frequency analysis. All of these files are in readable ASCII format, except the binary FreeCAD .FCStd file.
7.7
Getting started with FreeMAT (or GNU Octave)
FreeMAT is used in three tutorials to demonstrate the principles of explicit and CFD analysis via programmed algorithms. For anyone with a knowledge of programming the FreeMAT scripting language should be reasonably comprehensible, with a logic that is fairly easy to program. For inexperienced programmers you will need to invest some time with the literature and/or web tutorials such as in references [59, 60]. FreeMAT is downloaded from the website [61] and readily installed on windows. Further information is available from the homepage [62]. GNU Octave is downloaded from reference [46].
7.8
Unit systems
CalculiX, and finite element codes generally, will work with quantities expressed in any units system, but it is important that the selected system is consistent. For instance, in a mechanical analysis Force = Mass × Acceleration, which does require the units of force, mass and acceleration to be consistent. One possible set is force in kN, mass in kg and acceleration in mm and msec, which would give results for stress in GPa. FreeCAD has a useful materials database that can store properties in any units system. Rather unusually it is necessary to specify the units of each quantity. The CalculiX .inp file that is written has quantities in the tonne, mm, s, N system. This is the mm-N-s units system which is used for most tutorials in this book. Table 7.1 completes a list of common consistent units for the mm-N-s system and also provides some other commonly used sets of units. There is no universal set of units to recommend for FE analysis and often different disciplines may prefer a particular system. Generally the SI set is widely used but, for example, the impact and crash industry mostly uses mm-kg-ms, which may only be because time in msec, or some other quantity, is convenient. Sometimes a unit system may simply be chosen to conform with an established testing method or some other regulations. It can be argued that the default set chosen in FreeCAD and used in this book using mm-N-s is not ideal, since certain properties do have awkward large (or small) numbers. For instance, density in 222
7.9. Meshing, modelling and analysis
tonne/mm3 gives a very small number. In rare cases this might cause round off errors or poor matrix conditioning leading to unnecessary numerical problems. mm-N-s length time mass temperature (or ➦K) density force modulus/stress pressure energy expansion coefficient heat flux heat transfer coef. specific heat capacity thermal conductivity vol. heat generation permeability kinematic viscosity dynamic viscosity
mm-kg-ms
basic mm msec kg ➦C mechanical analysis tonne/mm3 kg/mm3 N kN MPa GPa MPa GPa N·mm kN·mm 1/➦C 1/➦C field analysis mW/mm2 kW/mm2 mW/mm2 /➦C kW/mm2 /➦C mJ/tonne/➦C J/kg/➦C mW/mm/➦C kW/mm/➦C mW/mm3 kW/mm3 mm2 mm2 mm2 /s mm2 /msec 2 N·s/mm kN·msec/mm2 mm s tonne ➦C
SI(MKS)
mm-g-ms
m s kg ➦C
mm msec g ➦C
kg/m3 N Pa (=1 N/m2 ) Pa N·m (=1 J) 1/➦C
g/mm3 N MPa MPa N·mm 1/➦C
W/m2 W/m2 /➦C J/kg/➦C W/m/➦C W/m3 m2 m2 /s N·s/m2
W/mm2 W/mm2 /➦C mJ/g/➦C W/mm/➦C W/mm3 mm2 mm2 /msec N·msec/mm2
Table 7.1: Some sets of consistent units for basic, mechanical and field analysis
7.9
Meshing, modelling and analysis
There are many potential pitfalls and sources of possible errors in an FE analysis. These can range from complex aspects concerning numerical accuracy of the elements and algorithms used through to more fundamental errors such as modelling and meshing, and characterisation of material behaviour. A typical source of numerical problems in an implicit analysis is poor conditioning of the global stiffness matrix [K] due to large differences between values in the matrix. This can lead to round-off errors during matrix inversion, or failure to invert. Usually this is caused by large differences in stiffness or size of adjacent elements, or poor element aspect ratios, all of which should be avoided. In explicit analysis hourglassing due to use of under integrated elements can be a problem as mentioned in Section 2.6. In FE textbooks Bathe [17] and Cook et al. [15], 223
Chapter 7. Some comments on tutorials, codes, units and modelling
discuss in some detail accuracy of element interpolation functions, numerical integration, limitations of constitutive models and deficiencies of solution algorithms. These numerical phenomena are not discussed further here, instead this section concentrates only on the more practical aspects of building a successful FE model and its analysis. For the inexperienced analyst there can be many decisions to be made that can make it a daunting task to build a realistic finite element model and perform an analysis. Often interpretation of results is not always straightforward. Hopefully the following brief comments can help clarify some issues which, for convenience, I have separated into meshing, modelling and analysis guidelines. These comments are mostly general, with a few being specific to the FreeCAD and CaluliX codes used in the FE tutorials.
7.9.1
Some meshing guidelines
Modelling and analysis, rather than meshing, is the main focus of the tutorials in this book. But good meshing is most important for a robust analysis giving best results, and some comments are appropriate. First, it has to be said FreeCAD only uses free meshing algorithms for 2D triangular and tetrahedral meshes. These algorithms not have great control options to ‘grade’ a mesh so that element sizes can be accurately distributed to suit a given problem. Commercial meshing codes often have better options which, if available, should be used. Creating good meshes does require some practice and experience. The key is to have an appreciation of the stress or flux flow through the domain for the different load (or flow) conditions to be analysed. From this a mesh can be designed so that a fine mesh, with smaller elements, is used in regions with high gradients (not necessarily high values), with a coarse mesh used in areas where gradients are low. For mechanical problems, like the plate with a notch in Tutorial T2, this would mean a fine mesh around the root of the notch with a coarser mesh remote from this region. It is also important that grading of element sizes between these two regions is gradual without abrupt changes. Essentially the mesh should look right with well proportioned elements that are well distributed. For larger models the total number of elements to be used may be restricted by the available hardware, practical limits on computation time or required accuracy. It may be possible to take the view, especially for smaller problems, to use a very fine mesh throughout and let the computer do the work. This can be realistic for a linear analysis, but is not necessarily good practice, and you will quickly run into difficulties if the analysis has to be changed to nonlinear, or many parametric studies have to be undertaken to optimise a design. The aim is to estimate the total number of elements considering the aforementioned limitations and then design a mesh to suit anticipated distribution of stress or flow to yield best results. Inevitably some compromises are unavoidable. 224
7.9. Meshing, modelling and analysis
In implicit analysis it is usually recommended to use higher order elements. These have more dof and are computationally more expensive, but a coarser mesh can be used giving better results. For an explicit analysis a fine mesh of lower order elements gives the best compromise of accuracy and computation speed, but extra care is necessary to avoid unduly small elements since these will control the integration time step. Note also that calculation time tends to increase with square of total dof for a linear implicit FE analysis, and is proportional to total dof for an explicit analysis. Other considerations in planning a mesh are to provide correct location of nodes for any boundary conditions or loads to be applied and appropriately split the model so different material properties can be assigned to each region. One restriction of FreeCAD is that boundary conditions and loads are assigned to CAD items like points, edges or surfaces, which will then be assigned to FE nodes. Also, in FreeCAD material groups can only be assigned to different CAD surfaces and volumes so, if necessary, these must be created separately. Commercial codes usually have mesh checking options, some that are advisable to check are: 1. Mesh continuity to ensure all elements are properly connected. 2. Possible duplicated nodes or elements that may have been created by erroneous meshing operations. 3. Elements should be well proportioned without excessive distortions. Plane and solid elements should not have aspect ratios larger than 1:2→1:4 and shell elements should not have warping beyond 10➦→15➦. Some codes (not FreeCAD) have graphical tools to check and visualize element quality. Example meshes are shown in Figure 7.4 for a quarter symmetric and full mesh of a plate with a hole model. A quarter model will yield the same results as a full model provided certain boundary and loading conditions are met, this is discussed in the next section. Regarding meshing in Figures 7.4a, 7.4b and 7.4c, all correctly try to grade element densities to capture stress concentrations at the root of the notch. But Figure 7.4a is poor regarding element shapes and their distribution, Figure 7.4b shows a definite improvement but is still rather poor with some badly distorted elements. Figure 7.4c is a far better example that also uses superior quadrilateral elements. It has to be said that meshes used in the following tutorials are not the best examples of good meshing, such as the regular triangular mesh used for the plate with a notch in Tutorial T2. This was unfortunately necessary to limit modelling effort, so that studies could focus on analysis methods.
7.9.2
Some modelling guidelines
Key aspects to modelling are selection of appropriate element types and material laws, and representative application of boundary conditions and loadings so real225
Chapter 7. Some comments on tutorials, codes, units and modelling
Figure 7.4: Meshing and symmetry. a) A poor mesh (symmetry model). b) A better mesh (symmetry model). c) A good mesh (full model). d) Schematic of the full and quarter models. e) The symmetric quarter model with equivalent load and boundary conditions.
istic deformations (or flow) are modelled. The following are miscellaneous points to consider. Can a 3D geometry be reasonably approximated as a 2D or axisymmetric problem, or can advantage be taken of symmetry. The latter will require symmetry of geometry, material properties, loading and boundary conditions, that must be applied as depicted in Figure 7.4e. In Tutorial T1 approximate symmetry conditions are imposed to represent a composites volume and greatly reduce model size. This can be done, but as discussed in the tutorial, care is needed to interpret results and appreciate any limitations of the modified model. Most FE codes have an extensive library of elements. Selection of the best element for a particular application depends on several factors such as the deformation mechanisms or flow processes to be modelled, required accuracy and possibly other factors like computation speed or storage requirements. Some other points to take into account are: 1. It is essential that the selected element type can represent all relevant deformation modes that the true structure will undergo for the loading conditions being applied. For example, a shell element can accurately model stretching and bending of thin sheets but it cannot account for through-thickness stresses. If these are needed then 3D solid elements must be used. Similarly, 1D bar and 1D beam elements each have different applications with only beam elements able to model moments and torsion. Plates, shells and membranes all have very distinct applications. 226
7.9. Meshing, modelling and analysis
2. Generally, quadrilateral and solid elements perform better than triangles and tetrahedras. But the latter are advantageous for free meshing of surfaces and volumes, and consequently are the preferred elements used in FreeCAD (there are many others in CalculiX). By default FreeCAD activates the best higher order elements available in CalculiX for output to the analysis dataset. 3. Some complex mechanical problems may need different elements to be combined. Beware continuum elements only have translational dof, whereas others have translational and bending dof. A point connection of these two element types will not transfer any moments causing a hinge mechanism. Realistic constitutive modelling is essential and modern FE codes all have a large library of basic and advanced models to cover most common materials. These require input parameters from physical tests that can often be supported by data available on the web or material producers data-sheets. As mentioned in Chapter 6 commercial FE codes also have user material subroutines for direct programming of a new law. But often the main challenge here is to collect representative experimental data so a clear understanding of material behaviour can be gained, that can then be converted to a constitutive model and programmed. Material properties for field analysis can be especially hard to quantify; measuring Young’s modulus for a mechanical analysis is straightforward from a standard test, but accurately measuring properties like permeability is difficult and often no standardised test procedure exists. Furthermore, essential boundary conditions for field problems, like fixed pressures and temperatures, are usually well defined and easily assigned. But properties like heat transfer coefficients for convective surface flow and other boundary flow conditions can be difficult to precisely quantify, since their properties are highly sensitive to environmental and local effects. A good model for linear elastic mechanical analysis can be expected to produce accurate stress distributions, however, moving on to topics such as failure prediction is not as easy as one might expect. The difficulty is often lack of truly predictive failure criteria, especially for ductile and advanced materials like composites. Simple criteria for maximum stress and strain can be a reasonable starting point, but these do not account for complex interaction of stresses (tri-axiality) or effects like plasticity and damage prior to failure and therefore have limited accuracy.
7.9.3
Some analysis guidelines
If an analysis fails carefully check the output listing for any error (or warning) messages that can help identify the problem to be rectified. This output file is a readable (ASCII) listing that gives main details of the model and solution progress. Otherwise, some other possibilities to help track errors could be: 1. Temporarily remove different options and rerun the analysis to identify pos227
Chapter 7. Some comments on tutorials, codes, units and modelling
sible causes of the abnormal termination. 2. Try replacing sophisticated material laws with simpler ones. Indeed, an early linear elastic analysis is often helpful to check the mesh, applied loads and boundary conditions before progressively building more complex parts for the final model. 3. Do a simple linear analysis first, before trying nonlinear. If the linear analysis does not work the nonlinear one certainly will not. Following a successful analysis some steps to verify results could include: 1. Check stress (or flow) contour plots carefully. Any spurious behaviours or erratic values could indicate local meshing problems. 2. For an implicit analysis boundary reaction forces must balance applied loads. For an explicit analysis energy conservation should be checked; this is tackled in Exercise E.T11a and shown in Figure T11.5b. 3. Check deformations (or flow contours) are consistent with the applied loads and boundary conditions. Sometimes it can be useful in the post-processor to scale displacements and magnify deformations to better inspect behaviour. 4. Check that the mesh design is suited to the results obtained. 5. If results are several orders of magnitude in error, it is possible that geometry, loads or material properties use an inconsistent set of units. 6. If phenomena like element locking or hourglassing are encountered, then the mesh may need improving, or special elements, or fully integrated elements activated. Three further topic should be mentioned concerning mesh dependency, nonlinear analysis and support from testing to help calibrate/validate complex models: 1. Mesh dependency can be an issue, whereby results are dependent on element sizes and mesh density. Values of stress (or flow) at stress concentrations will change with element sizes, especially if the material is elastic, with smaller elements giving higher stresses. This is studied further in Tutorial T2 and is also relevant to Tutorials T4 and T5. One approach to circumvent the problem can be to use the same element sizes in critical areas for different designs so that a valid comparison can be made. For elasto-plastic material behaviour plasticity will limit peak stresses so results are less sensitive to meshing. However, there should still be several elements in the plastic zone at full applied load, so plasticity evolution can be properly captured. This is done in Tutorial T3. 2. Nonlinear analyses can be especially challenging. Some points concerning implicit and explicit nonlinear analysis are: i. Implicit analysis using a Newton-Raphson method can be difficult. The problem has to be well posed, even then some experimentation 228
7.9. Meshing, modelling and analysis
of the solution method (NR or modified NR), load/displacement increments and convergence criteria may be necessary. Displacement control to load a structure is preferable and usually converges faster than load control. It can be helpful to monitor convergence norms; these should show a steady and continuous convergence. An example of implicit geometric and material nonlinear analysis is provided in Tutorial T3, with Tutorials T8 and T11 demonstrating some of the convergence difficulties that can occur. ii. Explicit analysis is usually very robust and can model extreme deformations, large material nonlinearity and extensive contact provided the critical time step criteria is observed. The main sources of instability are excessive element deformations or severe contact. If instability occurs the solution will quickly diverge and terminate. Instabilities are often seen as a sudden increase in total internal energy which must be checked with an energy balance. Effects of time step control on explicit stability and principles for energy balance calculations are covered in Tutorials T10 and T11. 3. Test measurements and any relevant experimental measurements can be invaluable to help support FE model development. Indeed, for important design work and complex problems it can be advisable to undertake appropriate experimental work in parallel to numerical analyses in order to build a predictive finite element model. Exercises 1. Install the different codes: ❼ FreeCAD with CalculiX and meshing tools from reference [47]. ❼ FreeMAT from reference [61] and/or GUI Octave from reference [46]. ❼ The CalculiX post-processor (CalculiX GraphiX - CGX) from reference [57].
2. Investigate the references and suggestions: ❼ In Section 7.3 to get started with FreeCAD. ❼ In Section 7.4 to get started with CalculiX. ❼ In Section 7.7 to get started with FreeMAT or GNU Octave.
229
TUTORIAL
ONE
3D SOLIDS: ISOTROPIC AND ORTHOTROPIC ELASTICITY
T1.1
Purpose
Linear elastic FE analyses using isotropic and orthotropic material laws are undertaken. For this study a fibre reinforced composites example is used involving a simple Unit Cell (UC) with a single fibre embedded in a resin matrix. Two load cases are analysed to estimate transverse tension and transverse shear stiffness of the composite volume. The main aims are to introduce the FreeCAD modeller, and demonstrate some basic features to build a model and create a finite element mesh with Gmsh. Material laws, applied loads and boundary conditions are then added and the analysis performed with CalculiX, with subsequent post-processing of results also done in FreeCAD. One outcome of these analyses highlights the difficulties to define suitable boundary conditions so that a local numerical model of this type can precisely model true deformation behaviour of the in situ composite. 230
T1.2. Background information and theory
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with three tutorials and three exercises as follows. Description Tutorial T.T1a
Getting started with the FreeCAD modeller
Tutorial T.T1b
Model building and analysis for transverse stiffness E2
Exercise E.T1a
Analysis for shear stiffness G23
Tutorial T.T1c
Analysis for transverse stiffness E2 (orthotropic fibre)
Exercise E.T1b
Analysis for shear stiffness G23 (orthotropic fibre)
Exercise E.T1c
Possible optional UC analyses
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
Tutorial T.T1a is intended to help get started with FreeCAD using several on-line sources. Tutorials T.T1b and T.T1c then build and analyse a simple solid model of a composites UC for isotropic and orthotropic elastic analysis.
T1.2
Background information and theory
For this study tetrahedra elements based on the isoparametric formulation outlined in Section 2.5 are used, with elasticity and transformations laws for 3D materials described in Section 6.3.1. Some brief additional details for the 3D tetrahedra element used in CalculiX and methods to specify orthotropic axes directions are outlined below.
T1.2.1
Tetrahedra elements
CalculiX has two tetrahedra elements C3D4 and C3D10 shown in Figure T1.1 having, respectively, 4 nodes and 10 nodes. In these element names ‘C’ denotes continuum and ‘3D’ three dimensions.
Figure T1.1: The C3D4 and C3D10 tetrahedra elements available in CalculiX
The C3D4 has a node at each vertex, with 1 point integration. It is known to be overstiff and is not recommended unless many element are used, especially in 231
Tutorial T1. 3D solids: isotropic and orthotropic elasticity
areas of stress concentrations. The C3D10 element is a higher order element with vertex and mid-side nodes, and 4 integration points to calculate stiffness. This element is far superior and gives better results. It is therefore the recommended general purpose tetrahedra element in CalculiX and the default element written by FreeCAD to the input analysis file .inp.
T1.2.2
Defining principal material (fibre) directions
Isotropic materials, at least on a macroscopic scale, have the same properties in all directions and there is no need to define axes directions. Other materials like composites, however, have direction dependent properties and principal directions must be defined. FE codes use a variety of methods to define this orthotropic axis frame. These are all based on the same ideas and the following is typical. Referring to Figure T1.2, the necessary transformation relations are established by defining two points a and b (relative to the origin 0, 0, 0) that define the local directions xL and yL . These coordinates are specified in the global frame. Point b can lay on the yL axis, or can be any point to identify the xL -yL plane. The local zL axis is the cross product of xL and yL . In this tutorial the model will be built in the x, y, z global frame as shown in the figure below, so that fibre axis direction 1 coincides with the UC z-axis (global) direction and a possible vector for a is 0, 0, 1. Point b could be in any orthogonal direction since the carbon fibre will be defined as a transversely isotropic material, so 0, 1, 0 is selected. In CalculiX this is applied using the *ORIENTATION option which will be shown later. 3D transformations from one frame to another use relations from Section 6.3.1.4. z zL
yL
3 y
b a
y (global)
2
1
xL (local) x (global) x (global)
z (global)
Figure T1.2: Local and global axes systems used in CalculiX
T1.3
Tutorial T.T1a: Getting started with FreeCAD
It is recommended to invest some time to appreciate the main functions and operations of FreeCAD by exploring other documentation and videos cited in Section 7.3 and elsewhere. Also, a similar FreeCAD tutorial is available that may be useful to consult (https://freecadweb.org/wiki/FEM_Shear_of_a_Composite_Block).
232
T1.4. Tutorial T.T1b: Model building and analysis for transverse stiffness E2
T1.4
Tutorial T.T1b: Model building and analysis for transverse stiffness E2
Figure T1.3 shows a schematic view of fibres dispersed in a composite. A common assumption is to idealise the composite using a UC containing a single fibre surrounded by a cube of resin. If the fibre diameter d and ratio of fibre volume to total volume Vf is known, then the size s of the UC is found from Vf = π(d/s)2 /4. For a fibre diameter 0.008 mm and fibre volume fraction Vf = 0.6, this relation gives outer cell dimensions 0.00915 × 0.00915 mm. 3
s
2 1 d
Figure T1.3: Section of a unidirectional composite and a UC idealisation
It appears that using micrometers as the length scale in FreeCAD does cause some visualisation problems. Consequently, the UC is scaled 1000 times and analysed in millimetres. This will not change any stress or strain results provided the applied displacement loadings (or forces) are also scaled 1000 times. Using scaled dimensions the two UCs to be analysed for transverse tension and shear are shown in Figure T1.4.
9.15mm
5mm
y
3
2
8mm 1
x 9.15mm
a)
b)
Figure T1.4: UCs analysed for stiffness. a) Transverse tension E2 . b) Shear G23
Table T1.1 gives mechanical properties to be used for two isotropic resins, isotropic glass fibre and carbon fibre which is orthotropic (transversely isotropic). 233
Tutorial T1. 3D solids: isotropic and orthotropic elasticity
MY750 resin 8551-7 resin E-glass fibre IM7 carbon fibre
E1 [GPa] 3.35 4.08 74.0 276.0
E2 =E3 [GPa] 3.35 4.08 74.0 19.0
G12 =G13 [GPa] 1.24 1.48 30.8 27.0
G23 [GPa] 1.24 1.48 30.8 7.0
ν12 =ν13
ν23
0.35 0.38 0.2 0.2
0.35 0.38 0.2 0.014
Table T1.1: Assumed material properties reproduced from reference [22]
Building the UC CAD model An FE model is built and analysed for transverse stiffness E2 using the UC shown in Figure T1.4a, with isotropic E-glass fibre and MY750 resin from Table T1.1. 1. Start FreeCAD and open a new file, or an existing file if previous work was partially done and saved. 2. Make sure working windows are open using View > Panels and activating tabs for ‘Report view’ and ‘Combo view’. This opens panels on the left side of the screen which is referred to as the ‘Tree’. 3. Also activate all the tabs to view option icons under View > Toolbars. 4. Under the workbench (highlighted below) open the workbench ‘Part’. Your Graphical User Interface (GUI) with the ‘Tree’ active should look something like this, though it may differ slightly depending on the FreeCAD version.
5. It is good practice to give each part or entity a suitable unique name as they are created, otherwise default names are assigned. Alternatively, names can 234
T1.4. Tutorial T.T1b: Model building and analysis for transverse stiffness E2
be changed by clicking on any item in the tree and activating the ‘rename’ option that opens when the right mouse key is pressed. 6. First we create the outer matrix by clicking the ‘cube solid’ icon . The default cube size is modified by clicking on the new ‘Cube’ in ‘Combo View’ and under the ‘Data’ tab (highlighted below) its sizes are overwritten to be 9.15 mm × 9.15 mm with a height 5.0 mm. Center the modified cube with icon .
7. A fibre cylinder is now created using similar operations with icon . Under the ‘Data’ tab set radius 4.0 mm and height 5 mm. Again, recenter to view. You will see you have to reposition the cylinder to 4.575, 4.575, 0.0. Click on cube in the tree and under the view tab (lower left corner) set transparency to 50% to get the typical CAD view below.
235
Tutorial T1. 3D solids: isotropic and orthotropic elasticity
8. Currently the cube and cylinder overlap. A Boolean Fragmentation operation is done to separate the two parts by highlighting both parts in the ‘Tree’. Then click Part > Split > Boolean Fragments, or use icon . By default these two parts will be connected. Creating the mesh 1. Change the workbench to FEM. 2. Start a new analysis container with icon . All new analysis entities to be assigned, the mesh and materials will now become part of this container. 3. Click on the new part in the tree (item ‘BooleanFragments’ - which could be renamed to UC), and then icon to start FE mesher Gmsh. Using default Max and Min element sizes produces a reasonable mesh, but I have chosen a finer one with maximum element size 0.5 mm to obtain that shown below. Different mesh densities can be tried and viewed with ‘Apply’, with the final one accepted using ‘OK’. 4. Check there is a distinct outline at the fibre-matrix boundary with a continuous mesh across this interface.
Assigning loads and boundary conditions For constraints and loads we shall fix the negative x-direction face and apply a 1.0 mm displacement to the positive x-direction face, which is also constrained in all other directions. 1. For these operations its easiest to hide the mesh. Click on the mesh in the tree and then the right mouse key. Activate hide selection to leave only a view of the CAD model. 236
T1.4. Tutorial T.T1b: Model building and analysis for transverse stiffness E2
2. You will also need to translate and/or rotate the model for the following selections. Crtl with right mouse key is used for translations and Shft with right mouse key for rotations. Zooming is possible with the scroll wheel. 3. Use the FEM displacement constraint icon to fix the rear x-direction face. In the new panel add this face to the list by clicking on it and Add, then fix all dof. It is also possible to rename this constraint, e.g. Rear x-face fixed.
4. Rotate the model (Shft key and mouse) so the front x-direction face can be selected. The same operations are done to fix all directions except x, which is given a 1.0 mm displacement. Again, this can be renamed. 5. At any time, if required, entities, mesh and CAD shapes can be shown or hidden by clicking on the entity in the ‘Tree’ and activating viewing options via the right mouse key. Assigning materials For each part (Cube and Cylinder) a material is assigned: 1. Open the FreeCAD material selector with icon
.
2. In the new panel that opens activate the solid tab, then add the part (Cube or Cylinder) to the geometry reference list by clicking Add and then the required part in the main model window. 3. The easiest is probably to assign a material from the list of standard ones available, then use the material editor to modify necessary properties. These are Young’s modulus and Poisson’s ratio. Shear modulus will be obtained from the elastic law E = 2G(1+ν). All other properties can be left unchanged. Set matrix (MY750) and fibre (E-glass) properties to those in Table T1.1, but beware to input properties according to the FreeCAD units shown. When done save with OK and repeat for the second material. 237
Tutorial T1. 3D solids: isotropic and orthotropic elasticity
Running the analysis 1. A CalculiX analysis is run using icon . This is automatically added to the analysis container when it was opened. in the ‘Tree’ to open an analysis panel. Select 2. Double click on icon analysis type ‘Static’, then write the .inp file and run the analysis. Files are written to a default location that is read by FreeCAD for post-processing. But an option is available to write them to a different user directory for easier editing (if required) and possible storage. 3. If the analysis is successful continue to post-processing results. If it fails check for error messages to help track corrections to be made. It may also be necessary to examine the .inp file via an editor. See also Section 7.9.3. Examining results (post-processing) If the analysis is successful two new results file appears in the ‘Tree’. A CCXresults file containing contour and deformation information for plotting and a ccxdat-file containing specific results information. In this case this file only contains reaction force information at the support and loaded ends.
For contours double click on icon . A new panel opens that allows different contour plots to be plotted, select Max Principal Stress as shown below.
238
T1.5. Exercise E.T1a: Analysis for shear stiffness G23
Some results that can be inferred from contour plot and reaction force information are: 1. Stress Concentration Factor (SCF) =
4340 MPa maximum stress = = 2.67 average stress 1625 MPa
where average stress is reaction force divided by area (= 74350/(9.15 × 5)) = 1625 MPa. Beware your results may differ slightly since peak stresses depend on mesh density, with smaller elements giving higher stresses at stress concentrations. This phenomenon is studied in Tutorial T2. 2. Transverse modulus E2 =
1625 MPa average stress = = 14.87 GPa strain 1.0/9.15
where strain is applied displacement divided by original length. These results are realistic and compare reasonably with test measurement E2 = 16 GPa from Table 2.4 in reference [22]. 3. An estimate for Poisson’s ratio ν23 can be obtained from the ratio of transverse strain (in direction y) to axial strain (in direction x), which can be found from plots of displacement (not shown). This gives total displacement y 2 × 0.19 transverse strain y original length y 9.15 = = 0.38 = ν23 = total displacement x 1.0 axial strain x original length x 9.15 which reasonably agrees with test measurement ν23 = 0.4 from reference [22]. Another useful post-processing option is visualisation of displacements by selecting a displacement type and activating the displacement show tab. Displacements can be magnified, which can be useful to visualise effects in small displacement problems. It is also possible to view surface or a section (slice) of the UC using the ‘Pipe’ icon . These contour plots are better quality and also have a legend of contour values. To finish, save the file containing the model CAD data with a suitable name.
T1.5
Exercise E.T1a: Analysis for shear stiffness G23
For this analysis the same materials and model from Tutorial T.T1b are used, except the model is modified for shear. The negative y-face is now full fixed and the positive y-face is fixed in all directions, except x, which has an imposed displacement of 1 mm. Briefly, the steps are: 239
Tutorial T1. 3D solids: isotropic and orthotropic elasticity
1. Copy the .FCStd model file from Tutorial T.T1b to a new directory, giving both the copied file and new directory suitable names. 2. Start FreeCAD and read in the copied .FCStd file. Activate workbench FEM. 3. In the ‘Tree’ delete the existing boundary conditions and all results files, or use icon to delete results. 4. Assign new constraints. Fully fix the base (negative y-direction face). For the opposite top face fix all directions, except x-direction which has a positive 1 mm displacement. 5. Start a new analysis. You should obtain a contour plot of deformed shear stress like that shown below. Shear modulus is average shear stress (obtained from reaction force in the ccxdat-file and section area) divided by imposed shear strain (= 1.0/9.15), giving Gxy = 2.55 GPa. This agrees rather poorly with test value G23 = 5.7 GPa from reference [22]. This error is mostly due to lack of constraints on the x-boundary faces, which are free and do not properly represent deformations that would occur in a real composite.
T1.6
Tutorial T.T1c: Analysis for transverse stiffness E2 (orthotropic fibre)
Perform an analysis for transverse modulus E2 as done in Tutorial T.T1b, but using orthotropic (transversely isotropic) carbon fibre and 8551-7 resin from Table T1.1. New information for orthotropic properties and fibre directions is now necessary. 1. Copy the model dataset from Tutorial T.T1b to a new directory, giving both an appropriate new name. Start FreeCAD and read in the new dataset. 2. The model is analysed as done previously by starting a CalculiX run except now, after the .inp is written, the file is edited adding the following data that 240
T1.6. Tutorial T.T1c: Analysis for transverse stiffness E2 (orthotropic fibre)
includes orthotropic properties and directions for the fibre only. Details are given below.
In the editor search for the assigned material properties for the isotropic fibre and replace the line *ELASTIC and the following property line with the lines *ELASTIC, TYPE=ENGINEERING CONSTANTS E1 , E2 , E3 , ν12 , ν13 , ν23 , G12 , G13 G23 , Temperature where E1 , E2 , etc., are property values from Table T1.1. Note consistent units MPa are used and for constant temperature use e.g. 294➦K. Since the problem is temperature independent this pair of property lines is only specified once. Also, add the new *ORIENTATION card and the following vector information for the two principal axes that were described in Section T1.2.2. Finally, add the ORIENTATION=OR1 identifier. OR1 is just an arbitrary name that links the *ORIENTATION and *SOLID SECTION definitions, and RECTANGULAR is the type of transformation. 3. Close the editor with
to save the changes and continue the analysis.
Examining results Opening the results files and plotting Max Principal Stress should yield maximum and minimum values of about 2330 MPa and 198 MPa. As before stress values may change slightly depending on your mesh density. Following the same calculations as done previously the SCF ≈ 2.22, which is lower than Tutorial T.T1b since the carbon fibre has a lower transverse stiffness. For 241
Tutorial T1. 3D solids: isotropic and orthotropic elasticity
this model transverse modulus is E2 =
average stress 1048 MPa = = 9.59 GPa strain 1.0/9.15
which compares reasonably well with test value 8.4 GPa from reference [22].
T1.7
Exercise E.T1b: Analysis for shear stiffness G23 (orthotropic fibre)
1. Use the shear UC from Exercise E.T1a and repeat the steps taken in Tutorial T.T1c to estimate Gxy for the IM7 carbon fibre with 8551-7 resin. Compare the analysis results with the test value 2.8 GPa from reference [22]. 2. So far the C3D10 element described in Section 7.4 has been used by CalculiX for all calculations. Try using the less accurate C3D4 element. This is simply done by exchanging C3D10 with C3D4 in the .inp file, using the editor just before executing the analysis. This will produce results that are less accurate, but the analysis is about one order of magnitude faster due to reduced total dof.
T1.8
Exercise E.T1c: Possible optional UC analyses
It should be mentioned that applied boundary conditions and loads (via displacements) are approximate and done here for simplicity. A better analysis should use periodic boundary conditions which forces edge deformations to replicate those that a UC would undergo within the body of a composite. An example is reported in reference [63] using periodic boundary conditions with CalculiX. This is something you might want to try, but it would require some effort and data entered into the .inp file via the editor. Alternatively, a grid of UCs could be created, say 3×3 or better 5×5, with only the central UC examined for stresses, strains and used to get mechanical properties. This central UC would now have edge deformations that are correctly influenced by adjoining UCs. Creating and meshing such a model with FreeCAD is simple, but extracting the correct results for this central UC could be more difficult. Closing remarks In principle this UC idealisation could also be used to predict composites failure, but it would require at least a non-linear elasto-plastic analysis for the matrix with failure criteria, including possible fibre-matrix interface failure. This would be difficult with CalculiX since it does not have suitable failure criteria. Other codes, especially an explicit FE code, will be better to model failure and damage. 242
TUTORIAL
TWO
2D SHELL ANALYSIS: ISOTROPIC ELASTICITY AND ORTHOTROPIC COMPOSITES
T2.1
Purpose
In Tutorial T1 basic steps to build a CAD model with FreeCAD, create an FE mesh with Gmsh, perform a 3D analysis with CalculiX and examine some results were introduced. This tutorial with exercises extend these techniques to 2D analysis of a plate with a central notch having elastic isotropic and orthotropic material behaviour for a composite. Conventional laminate analysis can be used to obtain homogenised orthotropic composites properties for FE analysis. Alternatively, CalculiX has possibilities to analyse a hybrid material that mixes different material models. This capability is used here to show how a laminate composite with stacked plies having different thicknesses, fibre directions and properties for each ply can be analysed. Both approaches are examined and compared. CalculiX has a range of conventional elements for 2D plane stress and plane strain analysis. However, currently FreeCAD converts all 2D elements to shell elements and consequently this is the element used in this tutorial for this plate analysis. This shell element is, in fact, an adapted 3D solid element and opportunity is also taken here to examine its bending performance compared to classical bending theory. 243
Tutorial T2. 2D shell analysis: Isotropic elasticity and orthotropic composites
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with two tutorials and three exercises as follows. Description Tutorial T.T2a
Getting started with FreeCAD sketcher
Tutorial T.T2b
Model and analysis for isotropic aluminium
Exercise E.T2a
Convergence analyses, element types and bending performance
Exercise E.T2b
Orthotropic composites analysis combined with laminate theory
Exercise E.T2c
The CalculiX composite element
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
Tutorial T.T2a helps get started with FreeCAD and the ‘sketcher’ workbench. This knowledge is then used in Tutorial T.T2b to build and analyse a plate with notch part that is further analysed in exercises for orthotropic composites.
T2.2
Background information and relevant theory
This plane 2D problem could be modelled with various element types available in CalculiX. Each has certain limitations and advantages and a brief discussion on possible 2D, 3D and shell elements is given below which supplements the general theory on element formulations presented in Chapter 2. The isotropic and orthotropic elastic material laws used in this tutorial are covered in Section 6.3.1.
T2.2.1
CalculiX elements for 2D analysis
This in-plane loaded plate with a notch study, shown in Figure T2.3, is an inplane 2D problem that could be treated using economical plane stress or plane strain elements as discussed in Section 1.2.2. Where, for this thin sheet, the plane stress assumption would be most correct. In CalculiX 2D plane stress and plane strain elements are denoted, respectively, as CPSX and CPEX, where X is the number of nodes equal to 3 or 6 for triangle elements and 4 or 8 for quadrilateral elements. Derivation of stiffness matrices for these elements has been presented in Chapter 2. Unfortunately FreeCAD does not currently handle these elements. Instead it outputs a 2D mesh to the CalculiX .inp file as shell elements, which is a reasonable option for 2D plane stress problems, despite it being computationally more expensive due to the extra dof that this element has. Conventional shell elements have been discussed in Section 2.7.4. These are intended for modelling large thin walled structures that undergo in-plane and bending deformations. Figure T2.1 illustrates deformation of a shell element showing translational and rotational dof at each node, which enable in-plane and bending strains within the element to be represented. These elements do not account for 244
T2.2. Background information and relevant theory
through-thickness stresses and thickness variation is approximated by membrane strains assuming constant volume εz =−(εx + εy ).
Figure T2.1: Typical shell element nodal dof and internal stresses
The CalculiX shell element is, in fact, replaced by a higher order 3D element that has a depth equal to the shell element thickness. This is shown in Figure T2.2a where an 8 node quadrilateral shell SR8 is converted to a 20 node brick C3D20 and in Figure T2.2b where a 6 node triangle S6 is converted to a 15 node wedge C3D15. The manual [53] reports that both these 3D elements perform well. This same idea is used in CalculiX for beam elements. Presumably CalculiX has adopted this approach to simplify programming and code architecture so that all element types in the code only have translational degrees of freedom. The extra nodes of these elements can treat through-thickness stresses and do reasonably represent rotation bending behaviour via translations of the surface nodes. The bending accuracy of this approach using these shell-solid elements is examined as a sub-study in Exercise E.T2a.
a)
b)
Figure T2.2: a) 2D shell-solid S8 element. b) 2D shell-solid S6 element
One disadvantage of a CalculiX shell-solid element is the high number of nodes and therefore dof per element, compared to a conventional shell element. This will lead to a very large global stiffness matrix, which will require much greater storage and computational effort to solve for larger problems. For the planar analyses in 245
Tutorial T2. 2D shell analysis: Isotropic elasticity and orthotropic composites
this tutorial solid elements, like those used in Tutorial T1, could also have been used. These would have had to be generated in FreeCAD using a volume model of the plate with a notch.
T2.3
Tutorial T.T2a: Getting started with FreeCAD sketcher
For this tutorial a 2D geometry is created using the sketching workbench in FreeCAD. This has many capabilities, but we shall only use a few basic features to create the plate with a notch geometry and FE mesh. Before starting it is advisable to spend some time to become aware of the basic functionality of this workbench. Two good sources for further information are: https://www.freecadweb.org/wiki/Sketcher_tutorial https://www.freecadweb.org/wiki/Sketcher_Workbench If you intend to make extensive use of the sketcher workbench you will need to invest considerable time and practice. There are numerous on-line videos to be found that are very informative.
T2.4
Tutorial T.T2b: Model and analysis for isotropic aluminium
Dimensions, loading and support conditions for the plate with a notch are shown in Figure T2.3. For the first analyses elastic aluminium is used having the isotropic properties in Table T2.1.
Figure T2.3: The plate with a notch geometry and loading for Tutorial T2
For isotropic materials this problem has two planes of symmetry and a one quarter model could be analysed. However, a later exercise uses a composite laminate that prevents symmetry, consequently a full model is used throughout this tutorial. 246
T2.4. Tutorial T.T2b: Model and analysis for isotropic aluminium
Aluminium
Ex [GPa] Ey [GPa] 69.0 69.0
Gxy [GPa] 25.94
νxy 0.33
νyx 0.33
Table T2.1: Material properties from the FreeCAD database for aluminium-T6061
Building the plate with a notch CAD model The following steps are done in FreeCAD to build the model ready for meshing: 1. Start FreeCAD and open a new file, or open an existing file if previous work was partially done and saved. 2. Make sure that the working windows are open using View > Panels and activating tabs for ‘Report view’ and ‘Combo view’. 3. Under the workbench open the workbench ‘Sketcher’. 4. Click on icon
to ‘create a new sketch’ and choose the x-y plane.
to ‘create a rectangle’ and drag a rectangle over the region from 5. Click icon approximately -100. -50. to +100. +50., then use constraint icons and to correct plate dimensions and center it. These constraints fix dimensions like plate edge lengths and distances from the center to a point so it can be repositioned. But there are options to achieve this. 6. Click icon to ‘create a slot’ and create a vertical slot (notch) of approximately 10 mm radius and 40 mm total length about the centroid of the plate. Again use icons and to correct the slot dimensions and center it. So far the construction should look like that shown below.
7. Close the current construction window in the ‘Tree’. 8. Open the workbench ‘Parts’, click on the created ‘Sketch’ in the ‘Tree’ and then icon to connect the edges. 247
Tutorial T2. 2D shell analysis: Isotropic elasticity and orthotropic composites
9. Click on the created ‘Connect’ in the ‘Tree’ and then Part > Make face from wires. The plate with notch should now appear coloured. Creating the mesh and finalising the model 1. Open the workbench ‘FEM’ and start a new analysis container with icon
.
2. The plate can now be meshed using Gmsh. Click on the part in the main window (or in the ‘Tree’) and then . A 3 mm maximum element size is reasonable. 3. Set the plate thickness to 2 mm with icon
.
4. Using icon the negative x-direction edge is fully fixed. These boundary conditions should appear on the plate in the main view. If required they can be hidden by clicking on the entity in the ‘Tree’ and using the right mouse key to open viewing options. to fix the positive x-direction edge in all directions, except free 5. Use icon in the x-direction. 6. Using icon apply a line load of 1000 N to the positive x-direction face in the positive x-direction. The correct direction is set by clicking on the lower edge to see the loading arrows point in x-direction. 7. Finally, assign a material using icon
. Select material Aluminium-6061-T6.
8. The FE mesh, with applied loads should look like that shown below.
9. It is suggested to save the model (file .FCStd), which contains all CAD data, mesh and other assigned data to a suitable directory with a suitable name, before proceeding to analysis. Analysis and some results 1. The model is analysed as in Tutorial T1 by activating solver icon
.
2. Standard results are visualised by clicking on the new results file in the ‘Tree’ and icon . The maximum x-displacement for 1 kN line load is 0.0174 mm, 248
T2.4. Tutorial T.T2b: Model and analysis for isotropic aluminium
which can be roughly confirmed using hand calculations for a rectangular plate without a notch (ε = E/σ). 3. For this mesh density, the principal stress plot gives the maximum 23.2 MPa and average stress, which is applied force (1000 N) divided by section area, gives the stress concentration factor (SCF) at the root of the notch as ≈ 4.6. 4. An improved view of the plate with contours and a legend is possible using the ‘Pipe’ option , giving the view below for a plot of maximum principal stress, which appears in units Pa.
Creating better meshes The mesh used for this study is convenient, but not particularly good. Ideally it should have a finer mesh around the notch for better capture of stress concentrations and a coarser mesh in other areas to reduce computation and storage costs. Local mesh refinement can be done using icon together with . After setting a rather coarse mesh with Gmsh the option is used to select lines around the notch and assign a finer mesh. The following mesh is obtained using coarse elements of 10 mm with 1 mm around the notch.
249
Tutorial T2. 2D shell analysis: Isotropic elasticity and orthotropic composites
T2.5
Exercise E.T2a: Convergence analyses, element types and bending performance
The example from Tutorial T.T2a can be used for other studies on convergence and performance with different element types. In each case modified models are created and rerun using the following sequence of steps: 1. If the same dataset is used delete any previous results by making sure the is active (double click on it) and use delete icon , or analysis container click on the result(s) file in the ‘Tree’ and use the keyboard delete key. 2. Change any entities information in the analysis container, such as applied loads or boundary conditions, or the FE mesh. 3. Rerun the analysis as usual for new results. Some suggestions for further studies are outlined below together with some comments on expected results: 1. Mesh dependency: Try three different meshes with maximum element sizes 6, 3 and 1 mm. Simply remesh and rerun analyses. You should find results tend toward a SCF of about 4.6. This shows the usual convergence trend that a good finite element will exhibit with mesh refinement. The effect of higher stresses with smaller elements at stress concentration is discussed further in Section 7.9.3. 2. Element type: Compare results and CPU time for the default six node shell element S6 and the three node shell element S3. To do this start the solver and write the .inp file but, before executing CalculiX, open the editor and change the line *Element, TYPE = S6, ELSET = Efaces to *Element, TYPE = S3, ELSET = Efaces. This is located between the node and element lists, about half way down the dataset. Save the file with icon and complete the analysis. You should find results are less accurate, but runs much faster due to the greatly reduced total dof of the problem. 3. Plane stress or plane strain: Both element types could be run by changing the element type in the editor from S6 to CPS6 and also changing *SHELL SECTION to *SOLID SECTION. The CalculiX analysis will run successfully. Unfortunately FreeCAD cannot read the results files, but they could be read with the CalculiX CGX post-processor described in Section 7.4. 4. Bending behaviour: Bending performance can be assessed using a built-in cantilever with an end load. This is easily done by rebuilding the rectangular plate (200 mm×100 mm) without a notch. Fully fix the negative x-direction end and apply an out-of-plane z-direction line force of 10 N at the free end. Set plate thickness to 2 mm and assign material aluminium T6061. Classical Timoschenko beam theory gives deflection δ = P L3 /3EL = 5.79 mm. 250
T2.6. Exercise E.T2b: Orthotropic composites analysis combined with laminate theory
CalculiX FE analysis using default S6 elements predicts δ = 5.5 mm, which is within 5%. The S3 element predicts only δ = 0.93 mm showing it is seriously over stiff for bending. This poor behaviour is mentioned in the CalculiX manual [53].
T2.6
Exercise E.T2b: Orthotropic composites analysis combined with laminate theory
In CalculiX it is possible to mix different materials to create a hybrid material. One obvious example is reinforced concrete in which material models for steel and concrete are combined. In this exercise different fibre reinforced polymer plies are merged to represent a fibre reinforced composite laminate. The plate with a notch from Tutorial T.T2b is now analysed as a composite laminate with layup [0/-45/45/0/0/45/-45/0]. This notation defines fibre directions for 8 plies, each 0.25 mm thick, made from IM7 carbon fibres in 8551-7 resin. Mechanical properties for a single ply in its fibre frame 1, 2 are provided in Table T2.2. E1 [GPa] 165.0
E2 [GPa] 8.4
E3 [GPa] 8.4
G12 [GPa] G13 [GPa] G23 [GPa] ν12 5.6 5.6 2.8 0.34
ν13 0.34
ν23 0.5
Table T2.2: Ply properties for IM7/8551-7 composite from reference [22]
From classical laminate analysis [22], using a code such as [64], stiffness properties for the [0/-45/45/0/0/45/-45/0] laminate can be found. In this layup direction 0➦ is the x-direction. Results using code [64] are summarised in Table T2.3. Ex [GPa] Ey [GPa] 93.16 25.41
Ez [GPa] 8.4
Gxy [GPa] Gxz [GPa] Gyz [GPa] νxy 23.89 4.1 2.9 0.72
νxz 0.024
νyz 0.45
Table T2.3: Orthotropic composite laminate properties from reference [22]
These laminate properties properties can be used to perform an orthotropic elastic analysis of the plate with CalculiX. The main steps are: 1. Copy the aluminium model (.FCStd file) from Tutorial T.T2b to a new directory with a new name. 2. Start a new analysis, but before executing CalculiX open the FreeCAD editor and exchange the *ELASTIC and isotropic properties with the following orthotropic properties. Also, add the *ORIENTATION vector information 1,0,0 for direction 1 and 0,1,0 for direction 2 as previously described in 251
Tutorial T2. 2D shell analysis: Isotropic elasticity and orthotropic composites
Section T1.2.2. These moduli are in consistent units MPa and 294 is constant temperature in degrees Kelvin. Finally, add the ORIENTATION=OR1 identifier linking *ORIENTATION information to *SOLID SECTION definitions, which must be changed to *SHELL SECTION.
An analysis should yield a higher SCF (= 5.38) and lower axial deformation (= 0.013 mm) than the aluminium case, due to greater longitudinal stiffness (Ex = 93.16 GPa > 69.0 GPa). A typical plot using the ‘Pipe’ plotting option for Stress-x is shown below. Also included in this figure is a panel to adjust the contour scale information that can be opened by double clicking on the legend.
It is left as an exercise to obtain results for the laminate rotated 90➦, these are obtained using the same procedures with orientation vectors 0, 1, 0 and 1, 0, 0. The following table summarises results you should obtain for x-displacement, stress-x and SCF for the aluminium plate and composite plates with laminates orientated in the 0➦ (Ex = 93.16 GPa) and 90➦ directions (Ex = 25.41 GPa). Clearly, x-displacement increases with lower axial stiffness and SCF reduces due to lower stiffness. Beware peak stresses and SCF will be sensitive to the mesh density.
Aluminium Composite laminate (0➦) Composite laminate (90➦)
x-displacement [mm] 0.017 0.013 0.045 252
stress-x [MPa] 23.18 28.20 17.82
SCF 4.60 5.38 3.39
T2.7. Exercise E.T2c: The CalculiX composite element
T2.7
Exercise E.T2c: The CalculiX composite element
In CalculiX it is possible to stack different materials within one element. In Section 5.14 of the manual [53] this is done for a concrete beam that mixes material laws for concrete and steel reinforcement. Using the same approach it is also possible to stack layers of composite plies having different properties and fibre directions. Unfortunately using the FreeCAD/CalculiX codes this does require some editing, but it does work and visualisation of results is possible. For the laminate in Exercise E.T2b try this by editing in the following cards into the .inp file before running the model. In this data principal orthotropic ply properties are used and three fibre orientations 0➦, -45➦ and +45➦ are defined. The *SHELL SECTION cards build the laminate layup with this material and orientation information. This task is most easily done by editing a separate text file with cut-and-paste operations to build the laminate information. This is then imported into the FreeCAD .inp file at runtime to replace the existing *MATERIAL and *SHELL SECTION information.
This analysis will yield the same deformations as Exercise E.T2b, since stiffness is the same for both laminate representations. In post-processing we find a 3D model of the laminate is created with one layer of solids per ply. A view of this is shown below for elements around the notch where highest principal stresses are found in the 0➦ plies compared to offset plies. Contour plotting allows selection from a list of variables for nodal displacements, element stresses and strains, etc., using keywords. Furthermore, mathematical operations on these is possible. The following plot shows contours for a composites failure criteria taking into account fibre direction stresses sxx, syy and sxy, with each having failure limits from tests of 2360 MPa, 73 MPa and 90 MPa. The formula created in the calculate panel would give a value 1.0 at failure. In this 253
Tutorial T2. 2D shell analysis: Isotropic elasticity and orthotropic composites
case the maximum is 0.25 so analysis applied load of 1000 N could be increased four times for first ply failure, which occurs in weak internal off-axis loaded plies that have low transverse/shear strength.
It is interesting to modify the layup by changing one outer 0➦ ply to 45➦ so the layup is no longer symmetric. Rerunning the analysis will clearly show the new 45➦ orientation of surface stresses and cause out-of-plane deformations due to loss of laminate symmetry.
254
TUTORIAL
THREE
2D NONLINEAR ANALYSIS INCLUDING PLASTICITY
T3.1
Purpose
Two common types of nonlinear analysis involve inelastic material and large deformation behaviour, which can be performed either separately, or in combination. This tutorial applies both to a 2D model of a bonded single lap joint. Most adhesives have some ductility, indeed, a bonded joint can only carry high loads if some degree of plasticity occurs at the overlap ends where peak stresses occur. Analysis of plastification at high loads is therefore necessary to estimate likely failure loads. For a bonded single lap joint eccentric loading of the two adherends causes joint rotation leading to a nonlinear relationship between applied loads and deformations. Thus the problem is also geometrically nonlinear and both nonlinearities must be taken into account to correctly predict elasto-plastic normal (peel) and shear stresses in the adhesive layer. A simple lap joint is modelled with FreeCAD and meshed. A linear analysis is first undertaken to predict small deformation elastic peak stresses in the joint. Exercises then apply large deformation and nonlinear material behaviour to study the effect that these have on adhesive stress distribution. 255
Tutorial T3. 2D nonlinear analysis including plasticity
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with one tutorial and three exercises as follows. Description Tutorial T.T3a
Linear geometry with elastic adhesive
Exercise E.T3a
Nonlinear geometry with elastic adhesive
Exercise E.T3b
Nonlinear geometry with elasto-plastic adhesive
Exercise E.T3c
A further inelastic material study
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
Tutorial T.T3a builds a model for elastic analysis of an adhesive lap joint. This is then adapted in the exercises for large deformation and nonlinear material behaviour.
T3.2
Background information and theory
Stresses in a single overlap joint A closed form solution of stress distribution in a bonded single lap joint was first obtained by Goland and Reissner [65] showing how stresses vary across the bondline depending on geometry and properties of the adherends and adhesive. This theory assumes linear material and geometric behaviour giving the elastic stress distributions shown schematically in Figure T3.1a, with peak stresses at the adhesive ends that may reduce to zero in the central region for long overlaps. For normal stress there are regions of compression that balance tension stresses. The theory does not predict inelastic behaviour which is depicted in Figure T3.1b, where peak stresses plastify and plastic zones grow inward until a critical plastic strain at the ends is reached and rupture occurs.
peel (normal) stress shear stress
elastic
elasto-plastic
a)
b)
Figure T3.1: Stresses in a single overlap joint. a) Elastic adhesive. b) Inelastic adhesive 256
T3.3. Tutorial T.T3a: Linear geometry with elastic adhesive
FE options used for analysis For this study the CalculiX S6 shell element is used to represent a 2D section of the lap joint. This element is based on the isoparametric family of elements from Section 2.5 and has already been applied in Tutorial T2. For large deformation analysis the Green-Lagrange strains are used to formulate nonlinear straindisplacement matricies [BL ] and built the large deformation stiffness matrix [KL ] or compute nonlinear out-of-balance forces in Equation 3.18; this theory is described in Section 3.3. Elastic material behaviour uses Hooke’s law from Equation 6.3.2. For studies using inelastic adhesive behaviour plasticity laws described in Section 6.4.2 are used. For both material and geometric nonlinearity the iterative Newton-Raphson scheme detailed in Section 3.3.5 is applied to obtain a converged solution that satisfies convergence criteria in Equations 3.29.
T3.3
Tutorial T.T3a: Linear geometry with elastic adhesive
Dimensions of the single lap joint to be analysed are shown in Figure T3.2, with elastic and plastic properties for the adhesive and aluminium provided in Table T3.1. The adhesive thickness is 0.3 mm and joint width is 2 mm. Loading tabs as shown in Figure T3.2 are included to replicate a true test specimen used in test machines. They are also a convenient means to block end rotations in the FE model when applying force loading to the ends. In reality blocks are bonded to the adherend surface and not as depicted in the figure. x=20 3
y=6.3
x=220
3
0.3
y=0 y x
x=0
x=100
x=120
x=200
Figure T3.2: Single lap joint geometry and dimensions [mm]
property Young’s modulus [GPa] shear modulus [GPa] Poisson’s ratio yield strength [MPa] ult. tensile strength [MPa] elongation at break [%]
aluminium 6061-T6 69 25.94 0.33 276 310 18
adhesive 3.0 1.1 0.36 30 35 5
Table T3.1: Mechanical properties for 6061-T6 aluminium from the FreeCAD database and estimated properties for epoxy adhesive 257
Tutorial T3. 2D nonlinear analysis including plasticity
Ideally 2D plane strain elements should be used to model a section of a wide joint, but as noted in Tutorial T2 FreeCAD cannot currently post-process results from this element type. Alternatively, a full 3D analysis of a finite width lap joint is feasible, but this would require many solid elements in the width direction which would be computationally expensive for the nonlinear analyses to be done. As a compromise the same S6 shell element from Tutorial T2 is used, with element thickness now representing the joint width direction. Building the single lap joint CAD model The following steps build the lap joint model ready for analysis: 1. Start FreeCAD and open a new file. 2. Make sure the ‘Report view’ and ‘Combo view’ panels are open. Then open the workbench ‘Draft’. 3. The model will be built in the x-y plane (use the top view icon). 4. For the lower adherend click on icon to ‘create a rectangle’. Draw a rectangle anywhere and then click on the new rectangle in the Tree. Dimension and position can then be changed in the tab ‘Data’. Set the height to 3.0 mm and length to 100.0 mm, with position (placement) x = 20.0 mm, y = 0.0 mm and z = 0.0 mm. Also make sure the option ‘Make Face’ is set to true. 5. Repeat these operations for the adhesive layer setting height to 0.3 mm and length to 20.0 mm, with position x = 100.0 mm, y = 3.0 mm and z = 0.0 mm. For the upper adherend set height to 3.0 mm and length to 100.0 mm, with position x = 100.0 mm, y = 3.3 mm and z = 0.0 mm. Again these must be set as faces = true in the Data tab. 6. Rectangles for the loading tabs are added and positioned in the same manner, and set to faces. Dimensions and position are taken from Figure T3.2. 7. It is wise to appropriately rename each of the rectangles to obtain that shown below.
258
T3.3. Tutorial T.T3a: Linear geometry with elastic adhesive
8. Change the workbench to ‘Part’. 9. Highlight the five lap joint parts in the Tree and use icon as one part.
to connect them
Preparing and performing a linear elastic analysis 1. Start workbench ‘FEM’ and open a new analysis container with icon
.
works quite well for this geometry. Use the ‘UserDe2. The Netgen mesher fined’ option with a maximum element size 1.5 mm and growth rate 0.05 to control how adjacent element sizes can change and keep other defaults. This produces the following mesh, anything like this would be suitable.
It is usually necessary to experiment with meshing tools Netgen and Gmsh to get a mesh with well proportioned elements that is suitable for a particular purpose. This mesh has sufficient elements to capture adherend bending and is reasonably fine in the bond line with good grading between different regions. It is deliberately not too fine, to limit computation time for the nonlinear analyses. 3. In the ‘Tree’ hide the mesh and view the CAD geometry (connected group) so that entities for loads, boundary conditions, etc., can be assigned. 4. For constraints and loading: (a) Fully fix the end of the left loading tab using icon . (b) Use icon to fix vertical movement of the upper and lower faces of both loading tabs leaving the x-direction free. (c) Lastly, use icon to move the end of the right loading tab with 2 mm x-displacement. Constraints and loading (for half of the joint) are shown below.
259
Tutorial T3. 2D nonlinear analysis including plasticity
5. Materials are assigned with icon . For the two adherends and tabs use database aluminium 6061-T6 and for the adhesive use database ABS-Generic and overwrite the modulus and Poisson’s ratio with values from Table T3.1. 6. Use icon
to set the thickness of all joint faces and tabs to 2.0 mm.
7. Use icon
to run the problem as a linear elastic ‘Static’ analysis.
Results for the linear elastic analysis Results of vertical y-direction displacements showing joint rotation due to the eccentric loading is shown below. These deformations are based on the initial undeformed stiffness matrix and it will be shown in Exercise E.T3a that these are not accurate for this large displacement geometrically nonlinear problem.
Using the pipe option stress distributions for peel (σy ) and shear stress (σxy ) can be plotted with FreeCAD. Unfortunately these plots are not particularly good, therefore I have used the CalculiX CGX post-processor described in Section 7.4 to produce the same contour plots shown below that include deformations. Close inspection show these stresses compare with trends given by a Goland and Reissner closed form solution shown in Figure T3.1a. For adhesive peel stress high end peak values are found, with regions of compression toward the center. Shear stresses are also highest at the edges and reduce to nearly zero in the center.
260
T3.4. Exercise E.T3a: Nonlinear geometry with elastic adhesive
As mentioned in Tutorial T2, peak stresses are mesh dependent so expect values to change slightly with element sizes. Similar plots and contour limits can be by specifying syy or produced with the standard FreeCAD plot option via icon sxy for normal or shear stress in the user defined equation for contour plotting. that allows two Another useful plotting option is the line clip filter icon points to be selected on a surface, on to which a graph of a variable is created. Below a line was selected along the adhesive layer with normal stress syy plotted.
T3.4
Exercise E.T3a: Nonlinear geometry with elastic adhesive
A geometric nonlinear analysis is simple to activate and run. Just start the linear analysis from Tutorial T.T3a, but edit the .inp file before running. Change the and save the changes. line *STEP to *STEP,NLGEOM. Close the file with icon Then continue to run the analysis. In a dataset all information on the analysis type are defined between the *STEP and *END STEP cards. Among these option NLGEOM triggers a geometric nonlinear analysis with a fictitious time t = 0 to t = 1 with default 100 load increments. It is also possible to activate a geometric nonlinear analysis via the Data tab under the solver option . This analysis will take considerably longer to run giving markedly different results. For instance adherend y-displacements are reduced to about 1.0 mm with far less joint rotation. This reduces the adhesive peak peel stresses by about 15% compared to linear results. For this geometry the difference between linear and geometric linear analysis is clearly seen if applied displacement is increased to say 10 mm. Try both analyses with this displacement. Although this loading level is extreme it will show linear 261
Tutorial T3. 2D nonlinear analysis including plasticity
analysis produces deformations and therefore stresses that become unrealistic. For this geometry a linear analysis is only reasonable for relatively small displacements, or low applied forces. The need, or not, for a geometric nonlinear analysis will be problem dependent and sometimes only by comparing results from the two types of analysis can its significance be judged.
T3.5
Exercise E.T3b: Nonlinear geometry with elastoplastic adhesive
For this elasto-plastic analysis the 2 mm displacement load is removed and replaced with a force load of 800 N. This load level will plastify a large area of the bondline. Higher loads cause excessive yielding and are difficult to converge. Again, changes are made in the editor before analysis. This time change *STEP to *STEP, NLGEOM, INC=1000, where INC increases the load steps to 1000. Also, add plasticity properties to the elastic adhesive properties from Table T3.1. These are added just below the existing elastic properties.
Different plasticity models are available in CalculiX for isotropic and kinematic hardening and different means are available to input plasticity curve data. The above is the simplest using ISOTROPIC hardening (default) and two points for the curve defining yield stress and plastic strain at a fixed temperature (273➦K). The last point is added to clearly define the curve beyond the ultimate strain at plastic strain 0.05. More points could be added for a better curve definition, and the block of points could be repeated at another temperature for interpolation in a thermo-mechanical analysis. After editing close the file with icon to save the changes. Then continue the analysis. Either FreeCAD or CGX (used here) can be used to produce the following contour plots of shear strain and elasto-plastic von Mises stress given by Equation 6.33. The von Mises results correctly show that plastic yield stress 30-38 MPa is not exceeded in the adhesive due to plastic flow. Higher von Mises stress do appear in the elastic adherends just outside the bondline. It is also seen that shear strains are high throughout the bondline due to plastic flow, with 12% at the ends, so this joint can be expected to fail since the 5% limit in Table T3.1 is exceeded. 262
T3.6. Exercise E.T3c: A further inelastic material study
T3.6
Exercise E.T3c: A further inelastic material study
The aluminium plate with a notch from Tutorial T.T2b is another ideal example for elasto-plastic analysis. Adapt this model adding the necessary control information and plasticity properties for aluminium from Table T3.1. Try both force and displacement loading. An appropriate applied force to create significant plastic flow at the notch can be estimated from the plate section area at the notch and yield stress. You should find displacement loading is a faster analysis and convergence more robust compared to force loading, this is normal.
263
TUTORIAL
FOUR
FATIGUE AND CYCLE LIFE ANALYSIS
T4.1
Purpose
Most materials will undergo fatigue failure at some point caused by the slow growth of cracks due to cyclic loading. Typically these cracks initiate at locations of stress concentrations such as sharp changes in geometry, or a manufacturing discontinuity like a weldline, but production defects due to local porosity or some other imperfection are also possible sources. The stress levels causing fatigue are usually low and well below material ultimate tensile strength. Once initiated many thousands or millions of cycles are needed to propagate the crack, with its rate of growth depending on the amplitude of cyclic stresses. Effectively, each load cycle advances the crack a small amount until a critical failed surface area is reached, at which point sudden rupture of the remaining intact area will occur at low load. Finite element analysis can be applied to design production processes to minimise defects, or modify a geometry to minimise stress concentrations and thereby the likelihood of fatigue failure. There are also advanced techniques to simulate crack propagation. Usually, however, an FE analysis is used to estimate fatigue life of a component, that is, how many loading cycles it will accept before failure. This involves linear elastic FE analysis to predict stress concentrations. These concentrations are then related to test data giving information on applied stresses versus fatigue life, so that the number of cycles to failure can be estimated. This is the main aim of this tutorial using the failure example of a bicycle crank arm shown in Figure T4.3. 264
T4.2. Background information and theory
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with one tutorial and two exercises as follows. Description Tutorial T.T4a
FE stress analysis for fatigue life prediction
Exercise E.T4a
Further FE fatigue analyses
Exercise E.T4b
Analytical estimates for fatigue life
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
Tutorial T.T4a builds a model and undertakes an elastic stress analysis of a bicycle crank arm. Exercises then consider other load cases and fatigue life (number of cycles to failure) of the part.
T4.2
Background information and theory
Some general background information on fatigue behaviour, testing and analysis are briefly mentioned. Fatigue analysis is an advanced discipline, but hopefully this rather simple introduction and example helps convey some of the issues involved. Testing and theory for fatigue failure Material testing for fatigue involves cyclic loading a test specimen to failure. Usually this in done in tension, but compression is also possible and in both cases the applied loads are set to create a specific range of maximum and minimum stress. Typically cyclic testing is maintained at 30-60 Hz to failure at cycle N , with at least five tests performed at different range of stresses and three repeats of each test, so that a curve may be constructed relating maximum stress to cycles to failure. Such curves are named ‘W¨ohler curves’ after the developer August W¨ohler, or simply Sn curves as shown in Figure T4.4. Some features of a typical Sn curve are depicted in Figure T4.1. From static testing the elastic region is up to yield stress, thereafter plastic behaviour occurs up to ultimate stress at which point rupture initiates as shown in Figure T4.1a. Any cyclic fatigue testing with a maximum stress between yield and ultimate stress will cause plastic yielding with ‘low cycle’ fatigue failure that occurs within about 10,000 cycles. ‘High cycle’ fatigue occurs if applied maximum stresses are below the yield stress causing elastic failure. This requires far greater cycles to failure. If applied stress is below an ‘endurance limit’ failure will not occur and the material has ‘infinite life’; however, this is material dependent and tends to occur in steels but less so in aluminium. Typically the endurance limit stress is 40-50% of the ultimate strength. On a log-log plot the different curve phases are linear as shown in T4.1b. For any loading in the elastic region the Sn curve can be used to estimate cycles to failure; however, for parts loaded in the plastic region a strain life approach is 265
Tutorial T4. Fatigue and cycle life analysis
stress [MPa]
ultimate strength yield strength elastic region plastic region strain
fatigue strength [MPa]
usually recommended which uses an En curve (strain versus number of cycles) for analysis. Prediction of low cycle fatigue using the En curve is referred to as the strain-life (e-N) method and is concerned with initiation of a crack, whereas high cycle fatigue using the Sn curve is a stress-life (S-N) or ‘total life’ method that makes no distinction between initiation or growth of a crack and only estimates final rupture. Most fatigue analyses, and this tutorial, is concerned with elastic failure and high cycle fatigue. ultimate strength
yield strength
1000 100
plastic region
10
1
10
102
endurance limit (steel)
elastic region 103
104
105
aluminium 106
107
N number of cycles to failure
a)
b)
Figure T4.1: Material behaviour. a) Static stress-strain curve to failure. b) Sn log fatigue strength (stress) versus log N cycles to failure curve
Other important aspects of material fatigue behaviour and testing are illustrated in Figure T4.2. In Figure T4.2a a schematic interpretation of different R values is shown, which is the ratio of minimum to maximum stress. A common R value for testing is 0.1 so the material is maintained in tension. Testing can be conducted at different mean stresses and it has been observed experimentally that the Sn curve shifts downwards with increased mean tension loading causing the number of cycles to failure to reduce. This effect is clearly seen in Figure T4.4 where, for any R curve, the cycle life reduces as the maximum stress increases. In real structures a part may be subjected to a spectrum of cyclic loading. Clearly this happens with the bicycle crank arm studied in this tutorial, which will undergo varying stresses from torsion and bending in each cycle. Miner’s rule is a simple law that accumulates damage contribution from each of the different stress levels k X ni =C Ni
(T4.1)
i=1
where k is the number of different stress levels applied, ni is the number of cycles applied and Ni is the number of cycles to failure for each of the stress levels i = 1 → k. In effect each ni /Ni is a damage fraction that contributes to final failure at C = 1. 266
T4.3. Tutorial T.T4a: FE stress analysis for fatigue life prediction =0.5
stress
=-1
stress
=0
fatigue strength [MPa]
stress
>0
increased tension reduces life
0
102 106 103 104 105 N number of cycles to failure
Toolbars > Thermal Constraints. 8. Use icon
to set the initial temperature to 293 ➦K (= 20 ➦C).
9. Via icon (= 80➦C).
select the two support faces and set a fixed temperature of 353➦K
10. All other surfaces lose heat to the environment. Use icon to select these 2 faces and set the surface film coefficient to 10.0 W/m /K (default) and the environment temperature to 293 ➦K (= 20 ➦C). 11. Use icon
to run the analysis as linear elastic ‘Thermo mechanical’.
Results of the thermomechanical analysis Open the results with icon . The following is an example view of absolute deformation with a scale factor 200 to exaggerate displacements.
With the pipe option it is possible to obtain standard views for displacement, stress and strain contours. Also available is steady state temperature distribution which varies from 353 ➦K at the fixed support to 337 ➦K at the free ends. 282
T5.4. Exercise E.T5a: Thermomechanical failure analysis of a cup
T5.4
Exercise E.T5a: Thermomechanical failure analysis of a cup
This is another (personal) example involving failure. This time it is a plastic cup made from thermoset melamine [70]. The cup was filled with boiling water causing rapid expansion of the inner surface that must be resisted by the outer surface, which was cold, with the net effect that tensile stresses develop on the outside causing sudden rupture. Figure T5.2a shows the failed cup. The extensive fracture shown is caused by stored strain energy releasing to the initial crack leading to rapid crack growth. This exercise undertakes a thermomechanical analysis to try and predict the location and conditions only for initial failure. 85mm
100mm 2.5mm
2.5mm 60mm
a)
b)
Figure T5.2: Thermomechanical failure study of a cup. a) The broken cup. b) Simplified CAD model with dimensions [mm] 283
Tutorial T5. Thermomechanical analysis for deformation and failure
An accurate FE idealisation of the cup from CAD geometry would be preferable, but for this exercise only the simplified representation shown in Figure T5.2b is assumed. This type of model is sufficiently accurate to explore the problem, and would be the sort of model one might use for a pre-design, possibly to try different geometry variations or to rank performance of different materials. Cup dimensions are also provided in this figure. As seen in Figure T5.2b, this simplified cup geometry is axisymmetric in terms of loading and geometry since we ignore the handle. CalculiX does have several elements (CAX-) for 2D axisymmetric analysis and this would be the most computationally efficient element to use. Unfortunately, FreeCAD does not currently support this element type, though the analysis will run if the model is built using a section of shell elements and the element type is changed via the editor just before running an analysis. Results would have to be examined via the CalculiX CGX post-processor. As an alternative a 3D mesh of solid elements is used here comprising one symmetric quarter model with appropriate symmetry boundary conditions. This allows a fine mesh to be used that is still relatively fast to analyse. Building the cup CAD model A simple CAD model is created using the workbench ‘Part’ and the icon for a cone. This can also create a truncated cone with different upper surface radius and lower surface radius over a defined height. 1. Overlay a truncated cone representing the outer geometry with another truncated cone representing the inner volume. Dimensions are set in the ‘Data’ tab for icon , also set the angle to 90➦ for a quarter model. 2. The inner volume must be shifted 2.5 mm to have the right base thickness and be flush with the top. with type ‘Difference’ to remove the inner volume 3. Do a boolean operation from the total volume leaving only the simplified cup. Preparing the cup FE analysis 1. A new analysis container is opened and the CAD model meshed with Gmsh or Netgen. Rather like the fatigue study accurate surface stresses must be computed so a relative fine mesh is necessary. I used Netgen with maximum element size 1.0 mm. fix displacements of the base in the vertical z-direction only. 2. Using icon The two vertical symmetry faces are appropriately fixed in their x or y normal directions. This combination of constraints will stop all rigid body modes and allow free expansion of the cup. 3. Thermal boundary conditions are different to those in Tutorial T.T5a since 284
T5.5. Exercise E.T5b: Improved cup analysis
heat is assumed to be applied rapidly and any surface convection heat losses will not have time to take place. Therefore outer surfaces and the top have an environment temperature 20➦C and inner surface contains boiling water at temperature 100➦C. These can be set in Centigrade or Kelvin. 4. Typical elastic and thermal properties for melamine plastic are given in Table T5.2 and assigned. property Young’s modulus [GPa] Poisson’s ratio tensile strength [MPa] thermal conductivity [W/m/K] thermal expansion coeff. [µm/m/K] specific heat [J/kg/K]
melamine 7.0 0.35 30.0 0.5 60.0 1200.0
Table T5.2: Mechanical and thermal properties for melamine
5. Finally, the model is run as a linear elastic ‘Thermo mechanical’ problem with icon . Results Check that deformations and temperature distributions give sensible results. Look at the principal stress results with the pipe option , you should find that the tensile failure stress in Table T5.2 is just reached. The cup does say in small writing underneath ‘20➦-85➦’, how safe is this 85➦ limit.
T5.5
Exercise E.T5b: Improved cup analysis
A main aim of the previous exercise was to check if material stress limits are reached and if failure is likely. These types of semi-brittle materials can be very sensitive to any local imperfections or stress concentrations which can trigger failure. It is interesting to note that two cups failed in the same way with cracks running adjacent to the handle. This may be coincidence, but it might suggest the handle does influence thermal stresses and should be included for greater accuracy. Modelling a simple handle is therefore suggested as an exercise. Since CAD data of the cup is not available we must try to improvise with a simplified handle. This can be created using the toros solid option in the Part workbench to obtain a model similar to the real cup shown in Figure T5.2a. Half symmetry for the cup with handle exists and could be used, but the following uses a full model. 285
Tutorial T5. Thermomechanical analysis for deformation and failure
Build the new full model with a toroid added and positioned to approximate the view in Figure T5.3a. Use handle dimensions and position that look realistic. A boolean operation is done to remove the overlapping toroid from the outer truncated cone and to remove the inner truncated cone from the outer cone giving the view in Figure T5.3b. Meshing and other data are assign as before. The base should be fixed in the vertical direction only. This is not strictly correct as lateral rigid body modes are possible, but the analysis does run and restraining these directions would cause additional unrealistic mechanical stresses. Results in Figure T5.3c do shown a significant 30% increase of principal stress around the handle compared to Exercise E.T5a. This suggests failure may indeed start at the root of the handle.
a)
b)
c)
Figure T5.3: Simplified cup with added handle. a) CAD parts. b) The merged model. c) Contours of maximum principal stress [MPa]
at the cupIt is interesting and easily done to add a 5 mm fillet with option to-handle edges as shown in Figure T9.1a of Tutorial T9. After remeshing a new analysis should show about 10% reduction in peak principal stress, thereby lowering the chances of failure. This demonstrates how even an approximate model can give valuable insights to performance and help guide sensible design improvements. A final FE analysis would be advisable once the CAD design is fixed, before committing to manufacture of injection tooling and part production.
286
TUTORIAL
SIX
STEADY STATE FLUID FLOW THROUGH A POROUS MEDIA
T6.1
Purpose
Different engineering and scientific phenomena can often be described by the same governing partial differential equation. For instance the Laplace equation presented in Section 5.4.2, with and without convection boundary conditions, was applied via equivalent finite element equations to solve heat transfer problems in Tutorial T5. These same equations and solution methods can be used for other steady state events like electrostatics and fluid flow, with a summary of some further possibilities discussed in Section 5.6. This tutorial uses finite element representation of the Laplace equation and techniques from the last Tutorial T5 to analyse steady state seepage flow under a dam and infusion of an orthotropic composites fabric with a viscous resin. It will be seen the only difference to heat transfer analysis is that material property conduction is replaced by permeability and the field variable temperature is now pressure, with both having fluxes (flow rates) depending on gradients of the field variable. 287
Tutorial T6. Steady state fluid flow through a porous media
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with one tutorial and one exercise as follows. Description Tutorial T.T6a
Analysis of seepage flow under a dam
Exercise E.T6a
Composites infusion of an orthotropic fabric
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
Tutorial T.T6a builds a model for analysis of slow seepage flow under a dam. Based on this the following exercise performs a similar analysis for liquid flow through a dry orthotropic composite fabric.
T6.2
Background information and theory
In Chapter 5 basic theory, partial differential equations and boundary conditions for flow problems are covered in the context of heat transfer, and it is discussed that these equations are also valid for other flow problems. Further, the RayleighRitz and Galerkin methods are applied to convert flow PDEs to equivalent finite element equations, which are summarised in Equations 5.58 and 5.59. This tutorial tackles steady state fluid flow through a porous media which is governed by the Laplace partial differential equation. From Equation 5.17 for flow through an orthotropic material this is given by ∂2φ ∂2φ (T6.1) k1 2 + k2 2 = 0 ∂x ∂y where k1 , k2 are principal permeabilities and the field variable φ = P is pressure. As discussed in Section 5.5.6 the FE approximation of this equation is [K] {P } = {0}, where [K] is the domain characteristic matrix that is assembled from element matricies [k] given by Equations 5.59. If surface fluxes were present these natural boundary condition flows would appear in the RHS of this governing FE equation, but in this case these are zero and the null vector enforces flow continuity at all nodes. That is, net flow at each node is zero, so inflow of mass equals outflow of mass for conservation. After essential boundary pressures are assigned a solution for {P } is possible. It should be added Tutorials T13 and T14 analyse another class of flow problem to predict rotational flow of viscous fluids, so that phenomena like turbulence can be modelled. This tutorial and the theories on which Chapter 5 is based assume flow is slow and irrotational, so that flow paths only dependent on gradients of pressure distribution. The analyses in the could be tackled using 2D elements. Unfortunately FreeCAD cannot currently post-process 2D model results, consequently these studies use the CalculiX tetrahedra C3D10 element based on theory in Section 2.4.3. The CalculiX pseudo-shell element S6 could also have been used. 288
T6.3. Tutorial T.T6a: Analysis of seepage flow under a dam
T6.3
Tutorial T.T6a: Analysis of seepage flow under a dam
This problem is adapted from an example in the CalculiX manual [53]. Dam geometry and all dimensions are depicted in Figure T6.1. The problem involves groundwater flow under a dam that is driven by different hydraulic head pressures upstream and downstream from the dam. Soil under the dam is divided into two zones (area 1 and area 2), each having different orthotropic permeabilities. Both the dam and rock bed located 15.8 m under the dam are treated as impervious. The aim of this analysis is to predict variation of hydraulic head under the dam, from which gradients of hydraulic head can be used to estimate flow rates. Excessive flow rates will lead to soil erosion, or so-called piping, that can cause dam failure.
6.1
18.3
2.5
1.52
dam
6.1
k1 k2
6.1
area 1
k4 area 2
k3 bedrock
30.0
30.0
Figure T6.1: Geometry of the dam reproduced from Dhondt [53], with approximate conversion of length units to meters [m]
Taking the base of the dam as reference the upstream hydraulic head is 8.6 m and downstream hydraulic head is 4.02 m. Atmospheric pressure is ignored. The permeabilities are k1 = 4k2 = 10−2 cm/s in area 1 and 25k3 = 100k4 = 10−2 cm/s in area 2; note carefully the direction of these permeabilities in Figure T6.1. Building the DAM model For analysis only the soil area needs to be meshed, since hydraulic head pressure H will be specified (instead of temperature) directly at the water-soil interface. The dam and rockbed are impervious and need not be modelled. In effect these surfaces and the two ends of the model will have zero flux. The dam is assumed infinitely long, so a 2D plane strain type element would be the obvious choice for this analysis, but as mentioned FreeCAD can currently only handle 3D solid elements for field analysis. Consequently, a 3D slice of the dam-soil model is built, first using a 2D section that is then extruded to a 3D volume. The upstream and downstream lengths modelled are limited to 30 m, since regions beyond 30 m do not significantly influence flow. 289
Tutorial T6. Steady state fluid flow through a porous media
1. One convenient meshing strategy is to use the workbench ‘Draft’ to create three rectangles (R1, R2, R3 in Area 1) shown below using icon and then specify the exact position and size of each in the Data tab. These rectangles have all necessary edges to specify boundary conditions for analysis.
R1 R2
R3 area 2
area 1
2. The three rectangles can be mirrored about their centreline using icon obtain the remaining rectangles as shown below.
to
3. Change to workbench to ‘Part’, highlight all the rectangles in the ‘Tree’ and connect them with icon . to extruded the connected surface to a solid. Use a distance of 4. Use icon 1000 mm in the normal direction.
290
T6.3. Tutorial T.T6a: Analysis of seepage flow under a dam
Preparing the dam FE model 1. Change to workbench ‘FEM’ and open a new analysis container 2. Create a mesh with Gmsh sonable.
.
. A maximum element size 1000.0 mm is rea-
3. Although this is a field analysis the full mesh still has to be mechanically fixed with icon . This is a requirement of the thermomechanical solution scheme used in CalculiX. 4. Only the upstream and downstream surfaces at the water-soil interfaces have boundary conditions. Defining the base of the dam as datum the upstream hydraulic head is 8600 mm and downstream head is 4020 mm. Use the heat to assign these heights in millimetres as a substitute for temperature icon values on these surfaces.
5. Material properties are assigned to areas 1 and 2. Only permeability is required which is input as thermal conductivity. Currently FreeCAD only accepts isotropic values so this must be entered later in the editor at runtime. For now just assign any two materials for areas 1 and 2. Selection of a material region is done via a face, but make sure the tab for solids selection is active so these are taken. 6. Add initial temperatures to the model with icon here, but is required for the CalculiX analysis. 291
. This has no meaning
Tutorial T6. Steady state fluid flow through a porous media
7. Start solver and write the .inp file. This must be edited to define orthotropic permeability values as shown below. By default orthotropic permeabilities correspond to Cartesian x, y, z directions. In this case the zdirection values are meaningless since there is no flow in this direction. If principal permeabilities are in another axis frame ORIENTATION axes are used similar to those in Tutorials T1 and T2.
8. Save the changes with icon
and continue the analysis.
Results A contour plot of temperature produces the distribution of hydraulic head H shown below.
In this study upstream permeabilities in area 1 are high so head gradient change is small. Most changes in head gradients occur downstream in the low permeability area 2. CalculiX does compute flow (flux) given by q = −k×∆H/∆L, but unfortunately FreeCAD post-processing cannot currently plot these. However, this can be done 292
T6.4. Exercise E.T6a: Composites infusion of an orthotropic fabric
using the CalculiX post-processor GraphiX-CGX, which is introduced in Section 7.4. For plotting flux the variable HFL (heat flux) must be added to the output element list via the FreeCAD editor at runtime.
The .frd CalculiX results file is then read by CGX allowing the flux contour plot shown in Figure T6.2b to be plotted. In this study maximum flux occurs downstream, at the foot of the dam, where possible piping could occur.
a)
b)
Figure T6.2: Contour plots from CalculiX GraphiX-CGX. a) Hydraulic head [mm]. b) Flux [mm/sec]
For this study it is interesting to interchange the orthotropic permeabilities k3 and k4 . It will be seen this leads to a markedly different pressure distribution and therefore flow behaviour.
T6.4
Exercise E.T6a: Composites infusion of an orthotropic fabric
Infusion of a fabric by a liquid resin is a common composites manufacturing process, that can be analysed using flow analysis. Again, EquationT6.1 applies with the field variable being pressure P with a slightly different measure of permeabilities k1 , k2 used. In this case flow velocity is flow per unit area, or flux [m/s] q=−
∆P κ ∆P = −k η ∆L ∆L
(T6.2) 293
Tutorial T6. Steady state fluid flow through a porous media
where κ is fabric permeability [m2 ] and η is resin viscosity [Pa.s], so the quantity used as a substitute for thermal conductivity is k = κ/η. Perform a FE field analysis of a fabric 300 mm×300 mm with a central injection hole 10 mm diameter. The injection pressure at the central hole (from a pipe) is 2 bars (2×10−05 N/m2 ) with outlet pressure at the circumference equal to atmospheric (1 bar). Resin viscosity is 0.3 Pa.s and fabric orthotropic permeabilities are κ1 = 2.1 × 10−11 m2 and κ2 = 3.1 × 10−12 m2 . Assume the fabric principal 1-direction is at 45➦ to the Cartesian x-direction. This arrangement models the typical test set-up shown in Figure T6.3b to measure fabric permeabilities using a liquid of known viscosity. For analysis only the fabric is necessary. All mould tooling is ignored. The fabric with a hole is easily modelled in FreeCAD and converted to a 3D solid volume of say 10 mm thickness. After meshing pressure boundary conditions are added to the hole circumference and boundary with other entities assigned as done in Tutorial T.T6a. Make sure the standard .inp file default units mm, s, N, are used; this also helps precision of decimal numbers since permeabilities are extremely small. Both input precision (decimal places) and output contour plot precision can be changed in the FreeCAD preferences and on the contour plot legend. I also used applied pressure in bars instead of N/mm2 to avoid problems with precision on the output plots. Finally, you will need to enter orthotropic permeability values instead of conductivity and their directions in the FreeCAD editor at runtime as shown below.
Analysis contour plot for pressure is shown in Figure T6.3a. Knowledge of pressure distribution is useful to design tooling stiffness, while information on flux distribution in Figure T6.3c helps to appreciate filling rates and flow directions. 294
T6.4. Exercise E.T6a: Composites infusion of an orthotropic fabric
Figure T6.3: Composites fabric infusion. a) Pressure [bar]. b) Typical test set-up. c) Flux [mm/sec]. (Contour plots are from CalculiX GraphiX)
In principle this type of analysis could be applied to any 2D or 3D fabric infusion analysis, however, usually a dedicated FE infusion code such as LIMS [71] is preferred. These codes have trade dedicated options to design infusion manufacturing processes and special control volume techniques to accurately follow fabric (mould) filling. Such codes are able to treat complex geometries, include temperature effects and model filling processes that may involve multiple flow fronts.
295
TUTORIAL
SEVEN
EIGENVALUE FREQUENCY ANALYSIS
T7.1
Purpose
Eigenvalue analysis is an important application of the finite element method to identify natural frequencies and mode shapes for ‘free’ vibration. There are many applications such as structures and bridges subjected to earthquake or wind loading, or vehicle components subjected to engine or road surface vibrations. The aim is to ensure the structure or component natural frequencies do not coincide with those of the external loading. If they do dangerous harmonic motions can develop, possibly causing structural collapse or longer term material fatigue failure, or in a vehicle may cause passenger discomfort. In this tutorial eigenvalue analysis is used to identify natural frequencies and mode shapes for ‘free’ vibration of a tuning fork and a spinning disc that has added preloads from centrifugal forces. A tuning fork is a specially designed metal bar that, when properly struck, acoustically resonates at a fixed frequency or pitch. Its main use is tuning musical instruments. The first part of this tutorial analyses dimensions for free vibration of a fork so that the correct pitch occurs and then moves on to investigate an improved design. The second part of this tutorial considers frequencies of a preloaded disc where internal stresses influence stiffness and thereby frequency response. This example shows another powerful capability of CaluliX, and other FE codes, that allows sequential analyses to be made so results from one analysis can be fed through to subsequent analyses. In this case internal stresses from a stress analysis are used to modify stiffness for an eigenvalue frequency analysis. 296
T7.2. Background information and theory
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with two tutorials and three exercises as follows. Description Tutorial T.T7a
Simplified (Model A) tuning fork frequency
Exercise E.T7a
Frequency calibration model A
Exercise E.T7b
Detailed (Model B) tuning fork frequency
Tutorial T.T7b
Frequency of a preloaded disc on a shaft
Exercise E.T7c
Disc frequencies without preloads
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
Tutorial T.T7a undertakes a classical frequency problems for linear eigenvalue analysis of a musical tuning fork and its calibration. Tutorial T.T7b then tackles a more complex frequency problem involving preloads that modify stiffness matrices.
T7.2
Background information and theory
Theory for linear eigenvalue frequency analysis is presented in Section 3.6, which states the linear eigenproblem in Equation 3.68 to determine eigenvalues ωi2 and corresponding vectors of mode shapes {Di } for i = 1, N degrees of freedom. Recalling Equation 3.68 we have {K} − ω 2 {M } = 0 . (T7.1) where eigenvalues ωi2 are roots that make the determinant zero and are values at which natural vibrations occur.
For a ’free’ (unloaded) vibration problem [K] = [KO ] is the usual assembled linear structure stiffness matrix. Whereas for a preloaded structure [K] = [KO + Kσ ] is the assembled linear and stress stiffness matrix, where [Kσ ] accounts for stiffness change due to membrane stresses. This matrix is derived for different element types in Section 3.3.3 and applied in Example 3-2, albeit for a buckling problem. These matrices are based on the undeformed geometry. Preloading in this tutorial is due to centrifugal forces, but it could be due to any other standard load, or an effect like gravitational self weight. In Equation T7.1 the mass matrix [M ] can be ‘consistent’ or ‘lumped’, although for frequency analysis in CalculiX it is consistent. These two types of mass matrices are discussed in Section 4.3. Material damping in Equation T7.1 is neglected so oscillations are undamped. If damping is important then a dynamic modal analysis is necessary which solves the dynamic equations of motion given by Equation 3.33 for nodal displacements, velocities and accelerations as a function of time; such an analysis can be done over a specific frequency range. This is possible with CalculiX which uses techniques described in references [15, 7]. 297
Tutorial T7. Eigenvalue frequency analysis
In a linear eigenvalue frequency analysis it is usually the lowest frequencies that are of most interest, but it might not be, and natural frequencies over a certain range can also be found. CalculiX allows the user to define this range and the number of eigenvalues and eigenmodes to be extracted. The analyses presented here all use tetrahedra solid elements based on the formulation presented in Section 2.4.3, and assume small displacement and linear elastic material behaviour.
T7.3
Tutorial T.T7a: Simplified (Model A) tuning fork frequency
Frequency analysis for two models of the tuning fork shown in Figure T7.1 are analysed. This first tutorial uses the simple representation (Model A) in Figure T7.1a, which is easily created in FreeCAD by merging different cubes together. It is the sort of model one might use for a pre-design. Figure T7.1b shows a more sophisticated shape (Model B) that could represent a final design; this is tackled in Exercise E.T7b. For these studies CalculiX-Steel (E = 210 GPa, ρ = 7900 kg/m3 ) from the FreeCAD material database is used. 32
16
a) Model A
40
80 4 16
b) Model B 8
Figure T7.1: Model variations for the tuning fork. All section dimensions are 4 × 4 mm with other dimensions in millimetres [mm]
An analytical solution for fork frequency is s 1.8752 a2 E f= 2πL2 12ρ where f is fork frequency [Hz], 1.875 is a constant, L is prong length [m] with prong thickness a [m], E is Young’s modulus [Pa] and ρ material density [kg/m3 ]. For a required frequency this formula could be used to estimate prong length, which is typically 80 – 90 mm with a thickness a of 4 – 5 mm. 298
T7.3. Tutorial T.T7a: Simplified (Model A) tuning fork frequency
Building the simplified tuning fork (Model A) Model A in Figure T7.1a is easily built using the workbench ‘Part’ with cubes for each section. Remember length, width and height for each cube are in the x, y and z directions respectively. 1. Open a new file and the workbench ‘Part’. 2. Create four cubes with icon , then size and position each using the ‘Data’ tab according to the dimensions and positions of the four solids in Figure T7.1a for model A. 3. Merge the four parts with icon
.
4. Change the workbench to ‘FEM’ and open a new analysis container 5. Mesh with Netgen
.
. A maximum element size 1 mm is reasonable.
6. Fully constrain the surfaces of the handle 7. Assign material CalculiX-Steel to the fork
. .
8. Start the analysis with icon selecting a ‘Frequency’ analysis and a location to save results, since we will want to look at certain files. By default FreeCAD writes a CaluliX input .inp file requesting the first ten egenvalues and mode shapes to be computed. If required this number, or the frequency range to extract eigenvalues, can be changed within properties for the solver , or via the editor in the .inp file at runtime. 9. Then complete the analysis. Results The first four modes from the analysis are plotted below. Note FreeCAD deliberately scales displacements to aid visualization of modes, so the displacement scale factor should be set to 1.0. It is mode 4 that would naturally occur from correctly striking a fork on its lower edge. The other modes would either not occur, or would be quickly damped with this design. A frequencies listing is also output 299
Tutorial T7. Eigenvalue frequency analysis
to the .dat file which is reproduced below showing that mode 4 has a natural frequency of 415 Hz. As discussed in Section 3.6 and demonstrated in Example 3-3 an eigenproblem analysis can only provide relative displacement amplitudes not actual values, stresses and strains are also meaningless.
T7.4
mode 1
mode 2
mode 3
mode 4
Exercise E.T7a: Frequency calibration model A
Try a few new analyses to improve the frequency from 415 Hz to the desired 440 Hz. This is easily done by changing the length of the two arms at the CAD level and rerunning the analysis. You may find you have to redefine constraints. Perform 2 - 3 new analyses to see the trends, from which it should be quickly possible to estimate necessary arm length for a pitch of 440 Hz.
T7.5
Exercise E.T7b: Detailed (Model B) tuning fork frequency
Tutorial T.T7a and Exercise E.T7a could be viewed as a simplified pre-design, that provides the basis for an improved design which is done here. Partially this also highlights some CAD modelling capabilities in FreeCAD. 300
T7.6. Tutorial T.T7b: Frequency of a preloaded disc on a shaft
Using the workbench ‘Sketcher’ it is relative straightforward to build the CAD Model B in Figure T7.1b, but it does take some practice. You may need to revisit Tutorial T2 which introduced this workbench. Another useful reference is [72]. As a hint I found it easiest to first create the two half circles then use straight edges to roughly draw the forks and handle. Constraints and length options are then used to accurately dimension the section. It is important to get a fully constrained section. In workbench ‘Part’ the section is connected and wires converted to a face. This is then extruded 4 mm to create a solid volume and meshed with Netgen using a 1 mm element size. The handle should be fully fixed and CalculiX-Steel used, then the frequency analysis done. The results .dat file shows that mode 4 at 380Hz is the mode of interest, with deformation results shown below. As done in Exercise E.T7a prong length must be modified (shortened) to obtain the desired pitch of 440 Hz.
This design can be made more attractive by adding 1 mm fillets to all edges. The problem would have to be remeshed, new boundary conditions added and rerun. Try a new analysis, you should find the frequencies reduce slightly.
T7.6
Tutorial T.T7b: Frequency of a preloaded disc on a shaft
This is a complex frequency example taken from the CalculiX users manual [53], where full details are given on setup, analysis and results. The mesh and most information can be created with FreeCAD, but some details must be input via the FreeCAD editor at runtime. The disc and shaft are both made from standard steel and consist of a thin disc 301
Tutorial T7. Eigenvalue frequency analysis
10 mm diameter of 0.25 mm thickness mounted centrally on a hollow shaft 100 mm long of 2 mm outer diameter and 1 mm inner diameter as shown in Figure T7.2. Loading is due to centrifugal forces created by rotation about the longitudinal axis at 9000 rad/sec. Both ends of the shaft are pinned (free to rotate), with all translations fixed. 10 ∅
9000 rad/sec
1∅ 2∅
0.25 100
Figure T7.2: Disc on a hollow shaft, dimensions in [mm]
Three analysis steps are made as described in Section 6.9.3 of the CalculiX manual [53]. First, a *STATIC step computes internal stresses and deformations due to centrifugal forces from spinning of the system. Second, a *FREQUENCY step uses these internal stresses and deformations to compute the stress stiffness matrix [Kσ ] and calculate eigenfrequencies and eigenmodes. Third, a *COMPLEX FREQUENCY, CORIOLIS step includes the Coriolis forces that are created from off-axis spinning of the disc with each eigenmode. Building the disc on a shaft model 1. Start a new FreeCAD session with a new file and open the ‘Part’ workbench. 2. Create three cylinders using icon for the hollow, solid shaft and solid disk. It is advisable to rename these so they are clearly identified in the next operations. 3. Two boolean operations using icon are performed with option Difference to remove the hollow from the shaft, and the shaft from the disc.
4. Connect all parts by highlighting them in the ‘Tree’ and using icon 302
.
T7.6. Tutorial T.T7b: Frequency of a preloaded disc on a shaft
5. Change the workbench to ‘FEM, start a new analysis container and mesh the structure with Netgen . A maximum element size 0.5 mm should produce a reasonable mesh.
6. Finally, constrain the shaft free ends shaft and disc.
and assign CalculiX-Steel
to the
7. Start solver , change the directory location for results files and write the .inp file. Then enter the editor and change the following: (a) Add steel density to the elasticity data. This is needed for centrifugal forces.
(b) The remaining information is modified to have the following.
303
Tutorial T7. Eigenvalue frequency analysis
This involves the three analysis steps mentioned above. In step one a geometric nonlinear stress analysis in done with rotational velocity ω = 9000 rad/sec input as ω 2 . The rotation axis is defined by two points 0,0,0 and 0,0,1. The *FREQUENCY step computes the first 10 eigenvalues and eigenmodes and keyword PERTURBATION means stresses and deformations from the previous step are used. The *COMPLEX FREQUENCY step also computes the lowest 10 eigenvalues and eigenmodes, and keyword CORIOLIS means Coriolis forces are included. 8. Save the changes with icon
and complete the analysis.
Results A detailed discussion on results is given in the manual [53]. The following shows two typical deformation modes and a summary printout of ten eigenvalues and frequencies from the analysis .dat results file.
mode 1
mode 3
As before these views show exaggerated displacements for visualisation, and true displacements and stresses are not available from this eigenvalue analysis. In this case it is important that this spinning disc is not near a system that operates at any of the identified natural (resonant) frequencies to avoid possible dangerous harmonic motions from being excited.
T7.7
Exercise E.T7c: Disc frequencies without preloads
It is suggested to compare the effect of preloads and Coriolis forces on the frequency response of the rotating disc. Try an analysis ignoring the last step (*COMPLEX FREQUENCY) that adds Coriolis forces and try an analysis using a ’free’ frequency analysis as done in Tutorial T.T7a. In each case new frequency results are in the .dat results file. 304
TUTORIAL
EIGHT
EIGENVALUE AND NONLINEAR BUCKLING ANALYSIS
T8.1
Purpose
Buckling is a common failure mode in thin walled structures that are loaded by in-plane compression, but it can also occur under shear loading since compression exists in one of the principal stress directions. Essentially buckling occurs once in-plane compression forces reach a critical level causing a sudden out-of-plane deformation. As discussed in Section 3.5, this transition from in-plane load carrying to a bending mode is an instability, or bifurcation. After buckling load redistributions may take place so that further loading is possible and the structure regains stability, or possibly the structure will collapse. Often a structure may undergo several bifurcation points before an unstable collapse load is reached. This tutorial first analyses compression loading of a slender strut as an eigenvalue problem to compute buckling loads and deformation modes. Following this buckling of a thin walled section is analysed including the effect of preloads which, like the rotating disc problem in Tutorial T.T7b, do modify structure stiffness and thereby influence buckling loads. Linear eigenvalue analysis is computationally fast and simple but does have limitations. These will be discussed and a comparison made with an alternative approach to compute buckling instability using nonlinear FE analysis, which can also include effects like geometric and material nonlinearity and possible imperfections. 305
Tutorial T8. Eigenvalue and nonlinear buckling analysis
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with two tutorials and three exercises as follows. Description Tutorial T.T8a
Eigenvalue buckling analysis (Euler strut)
Tutorial T.T8b
Eigenvalue buckling analysis
Exercise E.T8a
Eigenvalue buckling analysis with a preload
Exercise E.T8b
Nonlinear buckling analysis
Exercise E.T8c
Nonlinear buckling analysis with imperfections
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
In Tutorial T.T8a linear FE eigenvalue analysis of an axially loaded slender column is undertaken and compared with classical Euler formula for prediction of critical loads. Tutorial T.T8b applies the same FE eigenvalues analysis techniques to a thin walled box beam, from which following exercises take on nonlinear buckling analysis of the beam including effects of large deformations, material nonlinearity, preload and imperfections.
T8.2
Background information and theory
A brief review of basic analytical and FE theory for buckling analysis is given. For FE theory some brief comments on eigenvalue and nonlinear FE analysis are reviewed that distinguish these two types of analysis and some limitations and advantages of each for buckling analysis.
T8.2.1
Classical buckling analysis
Buckling occurs when the stored membrane energy is transferred into bending energy without any change of external loading, that is, different deformation modes are possible for the same applied compression load. Using these considerations the original work of Euler derived analytical criteria for critical buckling loads of an axially loaded column with different support conditions. These derivations are to be found in standard textbooks such as Timoshenko and Gere [73]. Figure T8.1 shows possible loading behaviour of an axially loaded pin-ended column, with the Euler critical buckling load given by Pcrit = n2 π 2 EI/L2
(T8.1)
where n is the number of half wavelengths in the buckling mode shape. In Figure T8.1, only the first and second buckling modes are shown, but more modes for n=3, 4, etc. are theoretically possible. However, in practice structural 306
T8.2. Background information and theory
imperfections will most likely trigger the first mode at the lowest load. Also shown in this diagram is the effect of imperfections, which tend to encourage an earlier, more gradual transition to the new buckling deformation mode at the bifurcation point. Classical solutions have also been derived for compression loaded plates with different support conditions and for problems having imperfections. P
force (P)
perfectly straight column behaviour 2nd buckling mode (n=2) further higher order modes
imperfect column behaviour
P
= 4π EI/L
P
1st buckling mode (n=1) P = π EI/L the dashed line is an ‘equally possible’ mode
displacement
Figure T8.1: Buckling mode shapes and critical loads for a pin-ended Euler column including effects of imperfections
T8.2.2
Finite element buckling analysis
Theory for eigenvalue buckling analysis is presented in Section 3.5.1, which states the linear eigenproblem for buckling instabilty in Equation 3.59. From this eigenvalues λi and corresponding vectors of buckling mode shapes {Di } for i = 1, N degrees of freedom are found. Example calculations demonstrating the method are provided in Examples 3-2 and 3-3. Recalling Equation 3.59 eigenvalues are the roots (values of λ) that make the following determinant zero | [KO ] + λ [Kσ ] | = 0
(T8.2)
so that eigenvalues λ are, effectively, ‘buckling factors’ that scale applied loads to obtain the loads that cause zero stiffness and represent instability. In Equation T8.2 [KO ] is the standard linear stiffness matrix and [Kσ ] is the stress stiffness matrix that is assembled from element stress stiffness matrices [kσ ], which account for stiffness change due to internal element stresses. Stiffness [kσ ] is derived for various element types in Section 3.3.3. Eigenvalues are found using an extraction method [15, 21]. Eigenvalue buckling analysis is informative, but not necessarily accurate since stiffness is based on the initial geometry, small strain theory and assumes elastic material behaviour. In reality large deformations often occur prior to buckling, 307
Tutorial T8. Eigenvalue and nonlinear buckling analysis
possibly combined with inelastic material behaviour, both of which can greatly influence buckling behaviour. Consequently, the second half of this tutorial uses large deformation elasto-plastic analysis, similar to techniques used for the lap joint in Tutorial T3, as an alternative to predict buckling. This approach also has the potential to identify if post-buckling behaviour is stable or not, and find the ultimate load for unstable collapse. Often standard implicit methods will struggle near bifurcation points due to convergence difficulties with near zero structure stiffness. In these cases specialised techniques to control load and displacement increments are possible, or explicit dynamic analysis provides an effective solution that can easily handle bifurcation points and negative stiffness during unstable buckling. Explicit algorithms are studied in Tutorials T10 and T11, albeit for simple 1D problems without buckling. This tutorial tries to highlight differences between FE eigenvalue and nonlinear buckling analysis, although the points noted here may differ for other problems. It will be seen that eigenvalue results must be carefully interpreted, nevertheless, the method is fast and simple, and can be valuable to identify potential buckling modes and study the effect of any design changes. In this tutorial solid elements are used for Tutorial T.T8a, whereas the thin walled box beam is modelled with CalculiX pseudo-shell element S6. It should be mentioned that buckling of thin walled geometries is arguably one application where a proper shell element in CalculiX would be preferable.
T8.3
Tutorial T.T8a: Eigenvalue buckling analysis of a Euler strut
A simple eigenproblem FE analysis is performed to compare buckling loads and buckling modes with classical Euler formula in Equation T8.1. For this a simple compression loaded long slender strut is used with one end built-in (fully fixed) and the other end pinned (laterally constrained and free to rotate). For this case n = 1/0.7 in Equation T8.1. Dimensions, loading and Euler critical load are shown below. 10×10 mm
P
P
= 2.045π
EI L
1000 mm
Building the slender strut 1. Open a new file and the workbench ‘Part’. Create a slender strut using a cube with dimensions 10 mm×10 mm and length 1000 mm. 308
T8.4. Tutorial T.T8b: Eigenvalue buckling analysis
2. Open an analysis container and suitably mesh the strut. Fully fix one end, with the other end laterally constrained and apply a unit compression load 1 N to the free end face. 3. Assign CalculiX-Steel to the strut. 4. Start a standard CalculiX solver and run the model with option ‘Static’. Select a suitable location for storage of results and edit the .inp file by exchanging the *STATIC card with the following buckling card *BUCKLE and add 10 (on the next line) for ten eigenvalues to be computed.
Alternatively, from FreeCAD version 20.0 there an analysis option ‘Buckling’. The number of modes is set via the input file or solver options from default = 1 to 10. 5. Click on icon
, save the changes and complete the analysis.
Results FreeCAD will load ten plots of deformation modes and in the results directory the .dat file gives a listing of corresponding buckling factors. Modes 1 and 3 are plotted below together with the listing of buckling factors. The lowest buckling factor for mode 1 is 3528. Therefore, for the unit applied load the actual buckling load is 3528 × 1.0 = 3528 N. This compares well with Equation T8.1, which gives 3533 N. If a different compression end load is applied eigenvalues will change, but the actual buckling loads remain the same. If the applied load is tension negative eigenvalues will be computed with the same mode shapes.
mode 1
mode 3
T8.4
Tutorial T.T8b: Eigenvalue buckling analysis
An eigenvalue analysis of a thin walled box section is performed using the CalculiX S6 shell element with linear elastic material behaviour. The box section is 100 mm 309
Tutorial T8. Eigenvalue and nonlinear buckling analysis
deep by 50 mm wide and 500 mm long, which acts as a cantilever beam with built in support and end loading. Building the box beam 1. Open a new file and the workbench ‘Part’. Create one cube with icon ing the outer dimensions of the box beam.
hav-
2. The four outer faces (without ends) of the cube can be converted to faces in workbench ‘Draft’ using icon Facebinder . 3. The remaining steps are standard: Open an analysis container and suitably mesh the faces. Fully fix one end and apply a unit (1 N) vertical downward force along the upper line of the free end. Assign shell thickness 3 mm and CalculiX-Steel to the model. 4. Finally start a standard CalculiX solver with type ‘Static’, but before running the model the same changes to control cards as described in Tutorial T.T8a are edited into the .inp file at runtime. Or analysis type ‘Buckling’ is activated, but the number of modes will still have to be changed to 10. 5. Save the completed dataset and run the analysis. Results Deformations for the first 10 eigenmodes are output for plotting in FreeCAD. The following shows the first three modes (with exaggerated deformations) and buckling factors from the .dat results file. In this case these results predict a first buckling load at 136 kN, since a unit (1 N) line load was applied in the analysis.
mode 1
mode 2
mode 3
310
T8.5. Exercise E.T8a: Eigenvalue buckling analysis with a preload
T8.5
Exercise E.T8a: Eigenvalue buckling analysis with a preload
For frequency analysis of the rotating disc in Tutorial T.T7b preloads caused internal stresses that modified the stress stiffness matrix used in Equation T7.1, and thereby changed natural frequencies of the system. In the same way preloads influence buckling, also by modifying the stress stiffness [Kσ ] in Equation T8.2. This requires two analysis steps: First to compute internal stresses due to preloads, and then to perform a standard eigenvalue buckling analysis with the applied trial buckling load. Membrane stresses from the first analysis are superimposed on membrane stresses from the second analysis to compute a preloaded stress stiffness matrix [Kσ ]. Try the following preloaded structure. Apply an additional compression axial line force of 50 kN to the 1 N buckling line load for the problem from Tutorial T.T8b.
Start the analysis as ‘Static’ and edit the .inp file at run time. Cut and paste the section of code from *STEP to *ENDSTEP so this appears twice one after the other. In the first step section delete the lines for buckling load, so only a standard linear analysis with axial preload is performed. In the second step section delete the axial preload so only the buckling load is applied. Also, change *STEP to *STEP,PERTURBATION so stresses from the first step are used in the second analysis and change *STATIC to *BUCKLE with 10 modes as shown below. This second step does a linear stress analysis and adds stresses from the first analysis to obtain [Kσ ] for eigenvalue extraction.
311
Tutorial T8. Eigenvalue and nonlinear buckling analysis
It should be found that axial preloads encourage buckling and lower buckling loads by about 8%. In this case buckling modes are the same. It is also interesting to apply a tension preload, which will hinder buckling and raise buckling loads by about 10%.
T8.6
Exercise E.T8b: Nonlinear buckling analysis
In eigenproblem analysis material behaviour is assumed elastic and all stiffnesses are based on initial geometry. This will not be realistic for many structures where buckling only takes place once large deformations, or some plasticity, or both have occurred. This exercise performs a nonlinear large deformation analysis of the cantilever box beam to help illustrate these effects and highlight some limitations of linear eigenvalue buckling analysis. If a standard linear small deformation analysis of the cantilever model is performed it will not be possible to identify any buckling behaviour, since stiffness is based on initial geometry. Try this first. Replace the applied end load with a 50 mm vertical displacement. Also, it is helpful to add the following cards in the editor at runtime so that reaction forces are output.
Typical results for this linear analysis are shown below. Simple bending occurs without any sign of buckling. The vertical reaction forces from the .dat file for 50 mm displacements is 513 kN. These two values scale linearly for a linear analysis and clearly at some point during the loading deformations become unrealistic.
312
T8.6. Exercise E.T8b: Nonlinear buckling analysis
Next, try geometric and material nonlinear analyses for 50 mm end displacement: 1. First, for geometric nonlinearity, replace *STEP with *STEP, NLGEOM in the input file at runtime. The buckling modes should now be clearly visible with much reduced reaction forces. 2. Then add plasticity for more realism with the following additional cards in *MATERIAL defining a plastic hardening curve for steel at 273➦K. This analysis should give similar deformation modes but reaction forces will further reduce due to plasticity.
Overall this nonlinear analysis will give realistic results. The reaction force time history extracted from the .dat file is plotted below and indicates a first buckle at 0.25 seconds which, from plots, is found to be similar to mode 1 in the eigenvalue analysis. This deformation plastically hardens so collapse does not occur. A second buckle then occurs at the root of the cantilever at about 0.8 seconds, which is similar to mode 3 in the eigenvalue analysis. These two instabilities occur at 50 kN and 53 kN, compared to 136 kN and 198 kN from the linear eigenvalue analysis. Clearly there is a large difference. These nonlinear analyses are computationally expensive and can be challenging to complete, especially selecting the best solution algorithms and convergence parameters to achieve convergence can be tricky. But results are far more accurate, plus information on displacements, stresses, strains and deformation sequences are available and likelihood of global collapse can be inferred from slope of the force versus displacement response.
z-reaction force [N]
60000 50000 40000 30000 20000 10000 0 0
0.2
0.4
0.6
time [sec] 313
0.8
1
Tutorial T8. Eigenvalue and nonlinear buckling analysis
Note in these analyses time is not physical time. It is used here as a convenient means to measure solution progress and is the standard approach used by implicit FE codes for this purpose. By default a nonlinear analysis runs from time = 0 → 1 [time units]. In this case time is proportional to imposed displacement so that, for instance, at time 0.5 s the imposed displacement is 25 mm.
T8.7
Exercise E.T8c: Nonlinear buckling analysis with imperfections
It is well know that imperfections reduce buckling loads and may even trigger different buckling modes. Usually imperfections are present from manufacturing or construction that cause variations to material properties and geometry. These effects can be incorporated into a numerical model in various ways, such as moving nodes or adjusting material properties. In some cases it might be possible to incorporate results from a previous analysis, like springback deformations and thickness variations from metal stamping. These effects could be included in an eigenvalue buckling analysis, but ideally a full geometric nonlinear analysis is preferable. For this exercise imperfections are created by applying forces to slightly distort the section, before doing the cantilever loaded nonlinear analysis. Try a linear static analysis for the first step with side faces having applied forces of 5 kN as shown below. In the second step a geometric nonlinear analysis based on Exercise E.T8b is performed. Combining two analysis steps to do this requires some straightforward editing at runtime, similar to that done in Exercise E.T8a.
step 1 analysis
step 2 analysis
From results you should see a small reduction in the first buckling load as shown below. This difference is only small, probably because load transfer is dominated by the section corners and not greatly influenced by the chosen imperfection. You may also find the solution fails to converge and aborts. This is caused by near zero stiffness in the force versus displacement response leading to a lack of convergence. This is not unusual with implicit methods and shows some of the difficulties of nonlinear implicit analysis to predict buckling. Often it is better to use a dynamic 314
T8.7. Exercise E.T8c: Nonlinear buckling analysis with imperfections
explicit analysis which is a far more robust solution method; however, this has the disadvantage that loads must be slowly applied to approximate a quasi-static solution which can be computationally expensive. A dynamic Newmark analysis could be another possibility.
z-reaction force [N]
60000
z-reaction force [N]
50000 40000 30000 20000
without imperfection 50000 48000 46000 44000 42000 40000
with imperfection
0.1
10000
0.2
time [sec]
0 0
0.1
0.2
0.3
0.4
time [sec]
315
0.3
TUTORIAL
NINE
DIRECT INTEGRATION FOR TRANSIENT AND DYNAMIC ANALYSIS
T9.1
Purpose
So far all tutorials, even the nonlinear ones, are steady state. That is, in mechanical analysis a solution is found where distribution of the displacement field variable creates internal forces that balance external imposed displacements or applied loads, or in field analysis the field variable distribution causes internal fluxes that balance external essential and natural boundary conditions. These solutions are independent of time. Many phenomena are, however, non-steady state having a response that changes with time. In mechanics this is a ‘dynamic’ response in which inertia causes velocity to change with time, while in heat transfer it is a ‘transient’ response where mass and material specific heat capacity cause temperature to vary with time. Analogous behaviours are to be found in other transient field problems like propagation of electro-magnetic waves and fluid flow. A non-steady event also satisfies equilibrium, but now it is the dynamic equations of motion, or state, that are solved using an iterative or time marching scheme to track response as time progresses. If applied loading is constant a dynamic or transient problem will at some time reach steady state, but if loading undergoes continuous changes the response will perpetuate in some non-steady way. Prediction of a non-steady event can be important perhaps to estimate time to reach a steady state or a particular state, or to predict extremes that occur over time. Both transient and dynamic problems will be studied in this tutorial. 316
T9.2. Background information and theory
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with two tutorials and two exercises as follows. Description Tutorial T.T9a
Transient 1D heat flow
Exercise E.T9a
Transient 3D heat flow
Tutorial T.T9b
Dynamic mechanical analysis
Exercise E.T9b
Dynamic analysis of a 1D axially loaded beam
Exercise E.T9c
Further exercises on dynamic mechanical analysis
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
Tutorial T.T9a undertakes a simple 1D transient heat flow analysis with surface convection to study evolution of heat and time to approach steady state. This is then extended to a more complex 3D geometry. Tutorial T.T9b and a following exercise perform mechanical analysis of a beam represented by a 1D row of solid elements. Different loading conditions are applied to compute deformations and oscillations.
T9.2
Background information and theory
In this tutorial examples apply implicit direct integration to solve transient flow and dynamic motion of mechanical problems using techniques discussed in Section 3.4.2. Specifically, for heat transfer problems an algorithm of the type discussed in Section 3.4.2.4 is used, whereas for mechanical dynamics the HHT method from Section 3.4.2.3 is applied. For additional information on direct integration see Sections 6.9.7, 6.9.8 and 7.41 of the CalculiX users manual [53]. As usual FreeCAD is used to prepare the models, write input datasets for CalculiX and start analyses. But depending on the analysis options used by CalculiX it may, or may not, be possible to use FreeCAD for post-processing results. For cases where FreeCAD does not work the dedicated CalculiX post-processor CGX is used, which does offer more capabilities that are briefly explained in this tutorial. It should be mentioned that CalculiX can perform complex heat analysis including cyclic heating, radiation and effects of gas flow. The interested reader may wish to study an example ‘thermal analysis of a furnace’ in Section 5.4 of the manual [53]. The second part of this tutorial uses direct integration for mechanical dynamics. This does work, but is more challenging. It appears direct integration involving relatively large mesh deformations and inelastic material behaviour is not a strength of CalculiX. You will find other state-of-the-art commercial FE codes like LS-DYNA [74], PAM-CRASH [75] and Abaqus [76] will handle these problems far better. 317
Tutorial T9. Direct integration for transient and dynamic analysis
T9.3
Tutorial T.T9a: Transient 1D heat flow
A good practice to test any unfamiliar material law or new option in an FE code is to setup and experiment with a suitable numerical test. Ideally this should be as simple as possible so one can focus on the feature(s) being tested. For this tutorial it is transient heat transfer that is of interest which is investigated using a 1D row of elements with sudden heating applied to one end and constant convection heat loss along all other faces. Building the 1D test 1. Open a new file and start the workbench ‘Part’. Create a cube section dimensions 10 mm×10 mm and length 200 mm.
with
2. In the FEM workbench open an analysis container. Fix the body initial temperature to 293➦K , assign one end to have a constant temperature 400➦K and all other faces to have surface convection heat flow to the environusing the default heat transfer coefficient 10.0 W/m2 /➦K. ment at 293➦K Lastly, assign CalculiX-Steel to the model.
3. For running the model select option ‘Thermo mechanical’ with a suitable location to store results files. Then via the editor exchange/add the following information to appropriate parts of the .inp file.
The *HEATTRANSFER, DIRECT information replaces the two cards *COUPLED TEMPERATURE... and specifies that a pure heat analysis is done of 100 seconds duration in analysis increments of 10 seconds. This increment is fixed since analysis type DIRECT is chosen. Output plots will also be available at 10 second intervals with information NT (nodal temperature) and HFL (element heat flux). 4. Save the changes with icon
and complete the analysis. 318
T9.3. Tutorial T.T9a: Transient 1D heat flow
Results FreeCAD cannot post-process transient heat results (using option *HEAT TRANSFER), so the CalculiX post-processor (CGX) introduced in Section 7.4 is used. With the mouse double click on the .frd results file stored in the results directory to automatically open it and start post-processing. Then click to the left of the viewing box to open selection options. For an animation start with Animate > Toggle Dataset Sequence.
Then select the first stored state and NDTEMP. Repeat this but select ‘-Entity-’ and ‘1T’. This will load nodal temperatures for all stored states. The same steps are done if flux is wanted.
319
Tutorial T9. Direct integration for transient and dynamic analysis
These steps cause an animation of heat flow to start over all states.
For an x-y time history graph select Graph > Time. This opens the opportunity to select several nodes (with the left mouse key over nodes on the mesh) for time history plotting. Use the right mouse key to stop selection and the following plot will appear. Note there is a second DOS type window open containing important information on these operations.
This graph shows temperature evolution at selected nodes and their trend toward steady state. The following are some analysis variations you might want to try. Note these can be done fast by not closing the FreeCAD analysis panel after each analysis. The .inp file can then be edited, analysis repeated, and each time just reopen the new .frd results file for post-processing. 1. Try different properties for density, specific heat and/or conductivity. 320
T9.4. Exercise E.T9a: Transient 3D heat flow
2. Try different film coefficients for faster surface convective flow (heat loss). 3. Adding STEADY STATE to the *HEAT TRANSFER card analyses the steady state condition.
T9.4
Exercise E.T9a: Transient 3D heat flow
It is a fairly straightforward exercise to adapt the 3D solid cup model from Exercise E.T5b for transient heat analysis by adding the functions just used in Tutorial T.T9a. For this study I used the filleted cup version mentioned in Exercise E.T5b. Using this cup model (or after rebuilding it) assign a fixed internal surface temperature of 373➦K (100➦C) with all other surfaces having convective heat flow to atmosphere at 293➦K (20➦C). Either Kelvin or Centigrade temperatures can be used. Assign a surface film coefficient of 10.0 W/m2 /➦K for convection and thermal properties for melamine from Table T5.2. Some example results from the CGX post-processor are shown below. It is seen that steady state temperature is quickly reached in thin parts of the cup, but at 100 seconds a remote point on the handle hardly increases in temperature due to excellent insulation properties of melamine.
a)
b)
Figure T9.1: 3D transient heat analysis of the cup. a) Contours of temperature at 150 seconds. b) Time histories of temperature at selected points
Try using CalculiX-Steel in the FreeCAD material database for this cup. You should quickly see why, apart from other reasons, this is not a good idea.
321
Tutorial T9. Direct integration for transient and dynamic analysis
T9.5
Tutorial T.T9b: Dynamic mechanical analysis
The simple 1D solid model from Tutorial T.T9a is now modified and analysed as a mechanical cantilever beam with loading transversely applied at the free end to cause bending. Both static and dynamic deformations are analysed and compared. Dimensions and loading for this setup are shown below. area = 10mm × 10mm
y x
1000 N
200 mm
Figure T9.2: Geometry and loading for the 1D cantilever beam
Small and large deformation static analysis First, it is informative to predict static (steady state) deformation of the beam considering both small and large deformation behaviour. For building the FE model take the 1D heat conduction model from Tutorial T.T9a and remove all thermal analysis features. Fix one end with icon and apply a transverse total force of −1000 N to the opposite free end with icon . The existing CalculiX-Steel and standard CalculiX solver are used. A static linear FE analysis with CalculiX should produce deformation shown in Figure T9.3a with a maximum y-direction deflection of about −15.2 mm and zero net contraction on the x-direction. You will find this result compares well with deflection from classical formula for simple bending of an end loaded cantilever beam given by P =
3EI δ L3
or
δ=
L3 P 3EI
where P is force and δ is end point displacement. It is a useful exercise to derive this relation from the stiffness matrix for a 2D beam in Equation 2.9 applying the technique for boundary conditions described in Section 1.6. These results are based on linear analysis assuming small displacement theory. For this large displacement problem linear analysis will over predict displacement and give xdisplacement (at the beam centreline) as zero so that, incorrectly, beam length has effectively increased. For correct deformation behaviour the nonlinear strain-displacement matrix [BL ] based on Green-Lagrange strains in Equations 3.2 must be used to compute large deformation stiffness matrix [KL ], which is solved by a Newton-Raphson iter322
T9.5. Tutorial T.T9b: Dynamic mechanical analysis
ative scheme. Theory on this has been presented in Section 3.3 and applied in Tutorial T3 for the adhesive lap joint. Geometric nonlinear analysis of this beam with CalculiX is activated by simply changing *STATIC to *STATIC, NLGEOM in the FreeCAD editor at runtime. This will give a slightly reduced beam y-displacement of −15.1 mm with an x-displacement so correct beam length is maintained. Dynamic analysis A dynamic analysis involves accelerations, velocities and displacements that vary with time. For instance, for this beam problem, if force is applied to the straight beam its inertia (mass) will initially resist motion, but slowly it will start to move. If this force is maintained velocities will increase so that eventually static deformations are reached. However, momentum will now cause an overshoot of this point leading to an oscillatory motion about the static equilibrium loading condition. Examples of this can be seen in Figure 3.15 from Example 4 in Chapter 3. If applied force changes the beam will move to oscillate about a new mean deformation. Velocities are directly related to beam mass, with a heavier beam moving more slowly causing, also, greater oscillation amplitudes and lower frequency. Heavy damping will stiffen response and stop damping, whereas light damping as used in Figure 3.15 will mostly suppress oscillations. Some of these trends are shown schematically in Figure T9.3b.
negative z-deflection
increasing damping
10ρ static ρ
increasing density
time
a)
b)
Figure T9.3: Comparison of deformations. a) Linear analysis. b) Dynamic analyses with varying inertia and damping
This physical behaviour is correctly captured by implicit direct integration which solves the dynamic equation of motions at regular increments of time. For a dynamic analysis the following additional information is added/exchanged via the editor at runtime to appropriate places in the CalculiX .inp file. First, assign a directory to store results. For this dynamic analysis I used the direct option to fix time increments to 0.001 s, mainly to force more regular output points for better graphical plotting. Also, I arbitrarily chose an end time of 0.05 s which allows loading and residual oscillations to be established. Density must be set 323
Tutorial T9. Direct integration for transient and dynamic analysis
and the default limit for number of iterations (to abort an analysis) overwritten to 100000. Finally, for effective convergence it is best to ramp-up loading over a finite time using the *AMPLITUDE option, in this case 0.01 is chosen and then held constant, this has a name that must be linked to the loading. add to material section replace analysis type (end time=0.05 s in steps of 0.001s) add to control load (linear from 0, 0 to 0.01,1 then constant) modify for linear load application using function A1
Completing the analysis will produce many plot files in FreeCAD, however, due to beam oscillations these are difficult to interpret. Therefore the following plot is created from the .frd file stored in the results directory using CalculiX post-processor (CGX). The same approach as in the previous heat tutorial is used except now displacement with entity D2 (y-direction) is plotted for one end node and one mid-length node. For the end node it can be seen oscillations are correctly about the static displacement -15.2 mm. Note this behaviour is typical for elastic materials, if plasticity were included static and dynamic deformations are likely to differ due to greater plastic deformation caused by inertia effects from dynamic loading.
Considering the trends mentioned previously with regard to Figure T9.3, some suggestions for parameters you might want investigate are: 1. Modify the density. Do the frequency and amplitudes change as expected. 2. Change speed of loading to see how this effects amplitude and frequency. Beware loading too fast will present convergence difficulties. 324
T9.6. Exercise E.T9b: Dynamic analysis of a 1D axially loaded beam
3. Try Rayleigh damping with keyword *DAMPING as mentioned in the users manual [53]. Some values for Rayleigh damping that can be adjusted are given in Example 4 in Chapter 3. 4. Force loading could be changed to initial velocities using a *INITIAL CONDITIONS with TYPE = VELOCITY, see the users manual [53]. 5. You may also find it interesting to include plasticity to compare static and dynamic behaviours. Some of these behaviours will also be studied in Exercise E.T10c using explicit analysis methods.
T9.6
Exercise E.T9b: Dynamic analysis of a 1D axially loaded beam
This exercise reproduces Exercise 4 in Chapter 3 following, largely, the same steps as Tutorial T9.5. First, in FreeCAD change the beam load in Tutorial T.T9b to be axial tension P = 200000 N. From results in Figure 3.15 an analysis time of 0.001 seconds causes about 6 high frequency axial oscillations to occur. In the FreeCAD editor modify input to have *DYNAMIC control with time increment of 0.0001 s for a total time 0.001 s. This will give at least 10 increments, but more will be done because time increment size is adjusted depending on rate of convergence. Also, use *STEP, INC=100000, NLGEOM for step information and assign a density for dynamic analysis. Lastly, applied loading is ramped via a *AMPLITUDE function. A reasonable scaling function has 1.0 at time 0.0001 s that is then held constant (= 1.0) to the end of analysis at 0.001 s. As in Tutorial T.T9b this amplitude is linked to the *CLOAD keyword. Results for one end and one mid-length node using the CalculiX post-processor should give the following plot.
325
Tutorial T9. Direct integration for transient and dynamic analysis
Points on the above curves correspond to a result at each time increment. A more regular output and better curves is possible using *DYNAMIC, DIRECT with times 0.00001, 0.001 to create 100 equally spaced time increments. These results agree well with Figure 3.15 with differences in amplitude due to the finer mass distribution of this detailed FE model. You may wish to try some of the suggestions from the last tutorial for varying parameters. Also, try switching off the applied force at a certain time. This can be done by modifying the applied load via the *AMPLITUDE keyword to have a constant zero force after a certain time, for instance 0.0002 s. You should now see that the beam moves to oscillate about its neutral position.
T9.7
Exercise E.T9c: Further exercises on dynamic mechanical analysis
In principle this direct integration method should be capable to analyse more complex dynamic problems such as the cantilever box beam in Exercises E.T8b and E.T8c. These could be tackled using a two step analysis with static preload and dynamic analysis. You may wish to try. I must admit I failed which could be fault of the analyst or possibly indicate practical limits of the code. Other commercial FE codes like LS-DYNA [74], PAM-CRASH [75] and Abaqus [76] specialise in this type of loading and would have no difficulties, especially if an explicit analysis was selected. Explicit integration is tackled in the next tutorial.
326
TUTORIAL
TEN
EXPLICIT INTEGRATION FOR DYNAMIC ANALYSIS
T10.1
Purpose
Over the past three decades explicit finite element analysis has proven the most robust method to handle large deformation dynamic crash and impact type events. It can, however, also be computationally efficient for relatively low velocity problems, especially if large areas of contact are involved. Car crashworthiness and metal stamping simulation are two notable fields of application. CalculiX does have explicit analysis capabilities, but these are rather basic compared to modern commercial FE codes that specialise on this, like LS-DYNA [74], PAM-CRASH [75] and Abaqus-explicit [76]. Personally I was not very successful with explicit analysis in CalculiX, at least for mechanical dynamics. Solutions are slow and require excessive memory. Consequently, in order to demonstrate this important area of finite element analysis this tutorial uses two explicit algorithms programmed in FreeMAT [61] for axial loading of a spring and bending of a beam. Although simple, these algorithms give an insight to the explicit analysis method and allow features like time step, damping, loading and inertia effects to be studied. A two bar example also highlights high frequency response from shock wave propagation. 327
Tutorial T10. Explicit integration for dynamic analysis
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with one tutorial and three exercises as follows. Description Tutorial T.T10a
Explicit analysis of an axially loaded bar element
Exercise E.T10a
Further exercises on Tutorial T.T10a
Exercise E.T10b
A two element version of Tutorial T.T10a
Exercise E.T10c
Explicit analysis for bending of a beam element
Units
System mm-N-s in tonne, mm, s, N, MPa
A simple explicit algorithm programmed in MATLAB script, but used in FreeMAT, is presented to analyse axial loading of a 1D bar element. This demonstrates basic features of the method, from which various suggestions to investigate parameters and examine their effect are made. This algorithm is then extended in Exercise E.T10b for 2 bar elements to study element interaction and effects like high frequency acceleration at nodes.
T10.2
Background information and theory
An introduction to FreeMAT, downloading the code and some suggestions on getting started are given in Section 7.7. For these computations the GNU Octave code can also be used, which arguably has better graphics. Theory on the explicit FE method is covered in Section 3.4.1. In the course of this tutorial it is necessary to retype the FreeMAT .m files provided. These are then executed to obtain graphical plots of results. Exercises will then modify these scripts and execute new analyses.
T10.3
Tutorial T.T10a: Explicit integration of a single bar element
The single bar element setup is shown in Figure T10.1. A constant compression load of 100000 N is applied to the free end with the lower end fixed. All other properties and dimensions for the steel bar are as shown. A flowchart of solution steps to explicitly integrate this 1D bar element is provided in Figure T10.2. Basically, geometry and property data are defined together with other information that is initialised. The solution steps repeat for n cycles at a time step ∆Tn until the chosen end time Tend is reached, with all data either computed or updated. In this explicit algorithm the fixed boundary 328
T10.3. Tutorial T.T10a: Explicit integration of a single bar element
condition at the base node (2) is neglected so that its acceleration, velocity and displacement are effectively taken to be zero. Pext=100000 N mass (M) = half bar mass plus added mass (0.01 tonne)
free end (1) length (Lo) = 200 mm
fixed end (2)
Fint modulus E = 210000 MPa area Ao = 100 mm2 density ρ = 7.8×10-09 tonne/mm3 Fint consistent units: tonne, mm, sec, N
Figure T10.1: 1D element geometry and properties for dynamic axial loading in units tonne, mm, s, N
set input data L =200, A =100, E = 210000, M =
L
+ added mass, Pext = 100000
initialisation of solution variables (n=1) loop n = 1, tend = 0.01, Fint = 0, L = L , u. 34/ = u = 0 solution loop for time = 0→ t ! " residual force F#!$ = P!%& − F(
&
timestep new acceleration update velocity
∆t = L / E/ρ u- = F#!$ /M u. /021 = u. 3021 + u- ∆t
update displacement
u
new bar length new bar strain new bar internal force update time update loop number n
L /4 = L + u /4 strain = u /4 /L Fint = E strain A time = time + ∆t n= n+1
/4
= u + u.
/021
∆t
output information e.g. time, node and element
Figure T10.2: Flowchart for explicit integration of the 1D bar element
Figure T10.3 gives the coding for this bar element programmed in FreeMAT, or GNU Octave. This is a so-called .m file for execution. I have added comment lines %... which detail the different steps (these do not have to be retyped). In this coding you will find small differences to the flow chart such as use of a constant integration time step size. 329
Tutorial T10. Explicit integration for dynamic analysis
Figure T10.3: FreeMAT code for analysis of the 1D bar element with applied force
Two result time history plots are shown in Figure T10.4 for end node displacement and internal bar force. These plot commands are given at the end of the code listing.
a)
b)
Figure T10.4: Time history plots for the 1D bar element with applied force. a) Free node displacement [mm] versus time [s]. b) Bar internal force [N] versus time [seconds]
As usual curves for this dynamic analysis show a typical oscillatory response to force loading. These oscillations could be damped by adding a velocity dependent 330
T10.4. Exercise E.T10a: Further exercises on Tutorial T.T10a
viscous damping, or by reducing inertia effects from applying load Pext gradually over a longer time interval (load-ramping). In this way an explicit code can approximate quasi-static loading and yield similar results to a static implicit solution. Equation 1.1 gives the static displacement as δ = Pext / (EAO /LO ) = 0.95 mm, which correctly corresponds to the mean of the oscillatory displacement time history curve in Figure T10.4a.
T10.4
Exercise E.T10a: Further exercises on Tutorial T.T10a
Some suggestions for exercises are: p 1. Time steps: Equation 3.41 gives the critical time step as ∆tcrit = L/ E/ρ for stable explicit integration. For ∆t < ∆tcrit essentially the same results are obtained albeit at greater computation cost, whereas a larger ∆t will become unstable. Check this by trying values (±10% − ±50%) either side of ∆tcrit . In explicit codes the smallest stable time step for all deformed elements is computed in the integration loop and used for the next time increment; it is not a constant as done here. You could also program the time step in each cycle as α∆tcrit so time step changes with element length. In explicit FE codes α is taken as 0.9→0.95 to be safe. Try α < 1 and α > 1 for stability. 2. Ramped loading: Apply load gradually over a time period, for instance 0 → tend /4 and then hold it constant. This will reduce inertia effects and thereby oscillations. 3. Velocity loading: Usually explicit analysis models have velocity loading, imposed displacements are not possible, except indirectly via imposed velocity. In impact and crash velocity has an initial value that changes with time as kinetic energy is converted to plastic deformation energy. The previous force loading code is easily modified to impose an initial velocity. Try an initial velocity 5000 mm/s with added nodal mass 10 kg, and removing the external load. This combination of mass and velocity is arbitrarily chosen so the free node enough inertia to produce similar displacements to the force loading case. 4. Viscous damping: A suitable damping force is c×velocity×∆t, where c = αEA/L and α is a damping coefficient between about 5 to 20 that controls rate of damping. This is added as an additional negative resisting force to the resultant nodal force at each cycle, so that nodal acceleration is modified with a velocity dependent force. Thereby velocity and displacement are also affected. 331
Tutorial T10. Explicit integration for dynamic analysis
Time history plots of nodal displacement for the force loaded, velocity loaded, velocity loading with damping and ramped loading are combined in Figure T10.5. All results are dynamic with natural frequencies that depend on mass and spring stiffness of the system. For the damping study it will converge to a static solution with more time, or a greater damping factor. Note the force loading cases oscillate about a mean displacement of 0.95 mm, while the velocity cases oscillate about zero displacement with greater amplitude due to larger inertia from the added mass.
Figure T10.5: Time history plots of displacement [mm] versus time [s] for the 1D bar element with different loading and damping
In the above damping exercise an additional viscous force was used to resist motion. In a similar manner contact between elements in a structure can be treated by adding a temporary inter-element penalty force to the resultant nodal force to modify movement and resist penetration. This will be studied in Tutorial T11.
T10.5
Exercise E.T10b: A two element version of Tutorial T.T10a
An interesting exercise is analysis of the setup in Figure T10.1, but using two in-series bar elements, each 100 mm long as shown in Figure T10.6a. Either force or velocity loading can be done; I have used the undamped velocity case. This helps show how forces are transferred between elements and certain behaviour at a node located between elements. For this exercise the code in Figure T10.3 is adapted. Basically one additional node and element must be added to the program structure. After initialisations, acceleration, velocity and displacement are updated for the two free unconstrained nodes. Then strains, stresses and internal forces for the two elements are com332
T10.5. Exercise E.T10b: A two element version of Tutorial T.T10a
puted. In each cycle internal element forces for one element become external applied forces for the adjacent element. In this way shock wave and mechanical forces are transmitted.
a)
b)
c) Figure T10.6: Time history plots for 2 elements in series with velocity loading. a) Setup and loading. b) Nodal displacements [mm] versus time [s]. c) Nodal accelerations [mm/s2 ] versus time [s]
Correct results will give the same displacement at the free end node as that obtained for the undamped velocity case in Figure T10.5, with the center node having half displacements as shown in Figure T10.6b. It will be seen that this center node has some noise that can be traced to acceleration values for this node which are plotted in Figure T10.6c. I obtained these plots by saving nodal acceleration information in an array similar to displacements. This behaviour is the natural high frequency axial response of a mass on a spring. An analytical solution for this has been derived in Equation 3.40 which gives the angular frequency ω, from which ordinary frequency is f = ω/2π Hz. These high frequencies are largely integrated out when computing velocities. If nodal acceleration information from an explicit analysis has to be compared with accelerometer test data it should be 333
Tutorial T10. Explicit integration for dynamic analysis
passed through an appropriate numerical filter. In this simple case the end node does not have a high frequency response due to the large added mass. Although only two elements are considered in this exercise, essentially the same steps are followed in an explicit analysis using a general purpose code with many elements of different types. Resultant nodal forces and masses are used to compute accelerations from which central different formulae are used at each cycle to compute forward velocities and displacements. Element strains are then obtained from nodal displacements (and rotations in bending elements), and stresses found from element strains and the chosen material law. Internal elements forces at nodes are obtained from these element stresses and used in the next cycle to compute updated nodal force resultants and new accelerations.
T10.6
Exercise E.T10c: Explicit analysis for bending of a beam element
Modify the FreeMAT coding in Figure T10.3 to analyse the cantilever beam in Tutorial T9 and shown in Figure T9.2. Verify that the explicit analysis does give the same linear deflection as predicted in Tutorial T.T9b, that is, for an end force of −1000 N it should oscillate about −15.2 mm. If you have difficulties the coding given in Tutorial T.T11a should be helpful. Also, try some studies modifying the beam density to confirm the trends that were discussed and presented in the schematic diagram in Figure T9.3b.
334
TUTORIAL
ELEVEN
CONTACT AND HYPERELASTICITY
T11.1
Purpose
Problems involving mechanical and thermal contact are tackled using explicit and implicit analysis. Opportunity is also taken in a heat analysis example to demonstrate a CalculiX hyperelastic material law for compression loading of a rubber sealing joint between two heated metal surfaces. Search algorithms to identify contact in explicit and implicit codes may be similar, but somewhat different ideas are used to resist penetration of contacting interfaces. For explicit analysis the simplified FreeMAT code example from Tutorial T10 is adapted to demonstrate basic principles of penalty force contact, which is used in explicit codes to treat problems like impact and crashworthiness. For implicit codes methods tend to setup fictitious inter-surface springs, which leads to a nonlinear problem, since contact locations and contact stiffness change with loading. If this is combined with other nonlinear effects like material behaviour and large deformations then solution convergence can quickly become very difficult. Essentially mechanical contact impose resistance forces to prevent penetration, while thermal contact involves transfer of heat energy between nodes and elements on contacting surfaces. 335
Tutorial T11. Contact and hyperelasticity
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with three tutorials and two exercises as follows. Description Tutorial T.T11a
Penalty contact in explicit analysis
Exercise E.T11a
Various exercises in explicit contact analysis
Tutorial T.T11b
Implicit contact analysis of a hyperelastic seal
Tutorial T.T11c
Seal analysis with contact heat transfer
Exercise E.T11b
Thermo-mechanical seal analysis for a quarter model
Units
System mm-N-s in tonne, mm, s, N, MPa
Tutorial T.T11a and exercises demonstrated basic features of penalty force contact in explicit analysis using a simple algorithm programmed in FreeMAT.Tutorials T.T11b, T.T11c and exercises then analyse a hyperelastic seal problem and show how typical mechanical and thermal contact is treated in an implicit code and how to try and overcome some of the numerical difficulties that can arise.
T11.2
Background information and theory
Mechanical and thermal contact Some general comments and terminology for contact modelling normally used in FE codes are described. For a brief introduction to theory for contact see Section 4.5 of this book, and for specific implementation and options in CalculiX see Sections 6.7.5 and 6.7.6 of the users manual [53]. In explicit and implicit codes contact interfaces are usually defined by ‘slave’ and ‘master’ surfaces as shown in Figure T11.1a, which must be specified in advance by the user. In Figure T11.1b a search algorithm will find new contact point(s), where a new fictitious ‘shadow’ node is positioned on the master element. Between each contact pair of node and shadow node an implicit algorithm will introduce a 1D spring element and an explicit code will apply penalty forces (which acts like a spring) to resist penetration. This contact force is directly applied to the slave node, while equilibrium forces are distributed via shape functions from the shadow node to attached nodes of the contact master element. Friction can be treated as follows. The resultant nodal force of a contact node can be transformed into normal and traction components relative to the contacting master surface. Friction force is computed as the normal contact force multiplied by Coulomb friction coefficient. Normal and friction contact forces are then added to the transformed nodal resultant forces so that normal force resists penetration and friction force resists interface sliding. Within these operations transformations are necessary to correctly convert contact forces back to the global frame and 336
T11.2. Background information and theory contact node
F fs
slave surface master surface
master
slave
master
fm fm shadow node
F
a)
b)
c)
Figure T11.1: Some contact definitions. a) Master-slave contact surfaces between bodies. b) Slave-to-master contact. c) Poor slave-to-master contact
balancing forces must be applied to the shadow node for equilibrium. In Figure T11.1c the role of slave and master surfaces are reversed to show that definitions can be important. In this case a slave to master search algorithm will not identify first contact, and only identify secondary contacts once slave nodes hit master surfaces. Usually options are provided to reverse the roles of slave and master surfaces so all potential slave-to-master and master-to-slave contacts are checked. In CalculiX these are termed node-to-face and face-to-face contacts. FreeCAD only allows the latter. In advanced explicit FE codes for crash applications there are so-called ‘selfcontact’ algorithms where one large volume of potential contact regions is defined and search operations are automated. One difficulty here is the magnitude of contact in a localised area cannot be found, so important post-processing information for the analyst is not available. It is possible in CalculiX the perform heat transfer across contacting interfaces using the option ‘Gap Conductance’ described in Section 7.60 of the manual [53]. Contact heat transfer hc quantifies the rate of heat transfer between two surfaces and is defined by the coefficient hc = Q/ (A ∆T ) where Q is the heat transfer rate in Joules/s, A is the surface area and ∆T is temperature difference in ➦C or ➦K between the two surfaces. The quantity Q/A is heat flux, and hc has the SI units [W/(m2 ➦K)]. This contact is used in Tutorial T.T11c for the seal analysis. Hyperelastic material In the seal study a hyperelastic material is used. Behaviour, testing and constitutive modelling of this material is covered in Section 6.4.1.
337
Tutorial T11. Contact and hyperelasticity
T11.3
Tutorial T.T11a: Penalty contact in explicit analysis
In explicit analysis solution time steps are small and contact is treated by identifying contact points and imposing penalty forces to slowly resist intrusion of the contacting surfaces over many time steps. These penalty forces depend on stiffness of the contacting materials and depth of penetration. During contact stored elastic and contact energy may become sufficient to overcome impact momentum causing a rebound and separation of the two bodies to occur. For this example the simple cantilever beam analysed in Exercise E.T10c is adapted by adding a contact plane at −30 mm below the beam axis in its undeformed position. Figure T11.2 shows this new setup. The code used to analyse Exercise E.T10c, including a modified contact penalty spring at the surface contact position is presented in Figure T11.3.
beam mass m = ½ × ρ × volume
force -5000 N or velocity -5000 mm/second undeformed
z 30 mm x
area = 10 mm × 10 mm mass (M) = half beam mass plus added mass (0.01 tonne) deformed without contact
200 mm
Figure T11.2: Geometry and force (or velocity) loading of a cantilever beam
Basically, the code in Figure T11.3 identifies the point of contact at −30 mm and computes a penalty spring contact force Pcont using √ Pcont = α × E × area × distance
√ where E is beam stiffness, area is thickness of the beam cross section and distance is contact penetration distance. Parameter α is a contact factor used in codes that is typically 0.1→0.01 so that, if necessary, the user has some control over contact force magnitude. This penalty force correctly has units of force and reflects material stiffness and section thickness, so it should be reasonably general. Result for nodal displacement is shown in Figure T11.4. This systems undergoes a continuous transfer from node potential energy to kinetic energy, that is then converted to contact spring internal energy. During rebound this energy converts to kinetic energy and then again to potential energy at the undeformed starting point. The system does not lose or gain energy, so energy is correctly conserved. During contact some penetration over several timesteps occurs at −30 mm. 338
T11.3. Tutorial T.T11a: Penalty contact in explicit analysis
Figure T11.3: FreeMAT code for bending analysis of the 1D beam with penalty contact
Figure T11.4: Displacement [mm] versus time [s] for the cantilever impact 339
Tutorial T11. Contact and hyperelasticity
T11.4
Exercise E.T11a: Various exercises in explicit contact analysis
Try modifying the code in Figure T11.3 for other loading cases and output information. Some suggestions are: 1. Use a velocity of −5000 mm/s instead of force loading to obtain the behaviour shown in Figure T11.5a with a peak rebound displacement +60 mm. 2. An important check for a valid explicit analysis is energy balance. This ensures total energy is constant (or changes are consistent with a known input energy source). Usually kinetic energy from mass and impact velocity is converted to material deformation energies and the total energy (kinetic plus internal) of the system must be constant throughout the analysis. A sudden increase, for instance, usually indicates some instability that should be checked and corrected. Try modifying the code to compute kinetic energy ( 21 mv 2 ) and internal spring energy ( 21 F d) due to the beam and contact spring, and check that the total energy is constant. You should get the plot in Figure T11.5b. 3. Add damping like that in Exercise E.T10a. For constant applied loading the results in Figure T11.4 will damp so that the deformed beam lays on the contact surface. For velocity loading the beam will damp to a deformed position at zero displacement. Try either or both.
a)
b)
Figure T11.5: Cantilever beam time history results. a) Velocity [mm/s] versus time [s]. b) Energies [N-mm] versus time [s]
Damping can be effective to stabilise a solution if a quasi-static result is sought. However, this is not usually so easy in large structures as many oscillations superimpose on each other and finding the right damping parameter for all oscillations and the necessary analysis duration to damp them all is difficult. Alternatively, ramped loading can be effective to reduce inertia effects and oscillations, but a long analysis duration may be necessary since the time step for conditional stability is small and fixed. Both methods can become computationally expensive. For 340
T11.5. Tutorial T.T11b: Implicit contact analysis of a hyperelastic seal
a static solution the implicit method used in the next tutorial is usually better but, as will be seen, convergence with the Newton-Raphson scheme used to handle this type of nonlinear problem can be difficult or even impossible.
T11.5
Tutorial T.T11b: Implicit contact analysis of a hyperelastic seal
A fairly challenging contact problem for implicit analysis is tackled involving a joint with rubber seal. The problem is simplified so that the main issues for such an analysis can be highlighted; these are to model multiple contact surfaces and constitutive modelling of the seal, which is treated as a hyperelastic material. Usually this type of seal uses an O-ring that may have special shape and may be held in place within a grove. In order to keep the geometry simple only a basic O-ring seal between two thick metal cylinders is modelled as shown in Figure T11.6a. Normally this geometry and loading would be tackled as an axisymmetric problem using CalculiX CAXx elements, but FreeCAD does not currently support these elements, consequently variations of 3D solid models are used. In preparing this tutorial I first tried the full 3D ring and had difficulties to convergence a solution within sensible computing times. So I stepped back and simplified the problem to the 2D geometry shown in Figure T11.6b. This is often advisable so that the best material models, contact and analysis options can be identified. We shall also start with this simple section representation. From lessons learned a symmetric quarter model of the seal will be tackled in Exercise E.T11b.
a)
b)
Figure T11.6: Seal models and dimensions [mm]. a) Full model. b) Section model
341
Tutorial T11. Contact and hyperelasticity
Building the section seal model 1. Open a new file and in workbench ‘Part’ create the two cubes with icon having dimensions 10 mm×10 mm×10 mm. The cylinder is created with icon with 8 mm diameter and 10 mm length. Dimensions and positions for each part can then be set in the ‘Data’ tab. 2. Meshing the new bodies is possible in the usual way, but this would create separated meshes for each part. I often find analysis convergence is better if there is a physical connection between the parts via common nodes. This also ensures the stiffness matrix is nonsingular and there are no rigid body modes for free bodies. The assembly must, as usual, have the necessary boundary conditions imposed. In the ‘Tree’ use icon to connect the parts. 3. Open an analysis container and mesh the connected body using the Netgen mesher . A maximum 3 mm element size should give a mesh like that shown below. Careful inspection shows the mesh is connected with common nodes between the three parts.
4. Define contacts between the cylinder and the cube surfaces using icon . This must be done four times since the cube and cylinder surfaces are split by the connection operation. It is advisable to set the cylinder as slave. Also set friction as zero. This is not strictly correct but does help convergence. 5. The remaining assignments are standard: Fix the ends of the cubes laterally and give each end a compression displacement of ±0.5 mm with icon . Assign CalculiX-Steel to the cubes and temporarily assign aluminium to the seal. This will be changed later to a hyperelastic material in the editor at runtime. Add a standard solver . Running the seal model 1. It is advisable to run this metal joint first to check performance and results. Simply run the solver as a ‘Static’ problem. This will automatically start an iterative Newton-Raphson nonlinear analysis due to contact. 2. Check the results to see if the contacts work correctly. 3. If satisfactory rerun the model, but in the editor at runtime replace aluminium for the seal with the hyperelastic Ogden material shown below and 342
T11.6. Tutorial T.T11c: Seal analysis with contact heat transfer
add geometric nonlinearity by changing *STEP to *STEP, NLGEOM. Save the changes and continue the analysis.
Expected results for deformation and maximum principal stress are shown below.
T11.6
Tutorial T.T11c: Seal analysis with contact heat transfer
The model from Tutorial T.T11b is extended for heat transfer analysis. Even for this simple structure a coupled thermo-mechanical analysis seems difficult and I found convergence not possible in CalculiX, either with Newton-Raphson or direct integration methods. Therefore thermal analysis is tackled as an uncoupled two step process. That is, a first analysis step does the mechanical contact, followed by a second thermal analysis step. Modifying the section seal model 1. Add thermal data to the model from Tutorial T.T11b. Set the body initial temerature to 293➦K with option , set the upper face to 400➦K with option and assign convective heat flux with icon to all outer and inner surfaces with environment temperature 293➦K and the default film coefficient. 2. Remaining changes for a two step analysis must be done in the editor at runtime. Start the analysis as ‘Thermo-mechanical’ with results files saved to a desired directory. Open the .inp file for editing: (a) The following information is added to appropriate places in the dataset. 343
Tutorial T11. Contact and hyperelasticity
(b) The complete block of information for the analysis step from *STEP to *END STEP is copied and pasted below the existing *END STEP card. (c) For the first analysis step only use *STEP, NLGEOM (delete any heat analysis controls). For the second step only control *HEAT TRANSFER is used. Do not worry that heat information appears in the static step and load information in the heat analysis; irrelevant information to a specific analysis type will be ignored. The two steps are:
Results for temperature have to be viewed in the CGX post-processor by opening the .frd results file as described in Tutorial T9. Figure T11.7 shows contour plots for vertical displacement and temperature obtained, respectively, from the first and second datasets in the CGX post-processor.
T11.7
Exercise E.T11b: Thermomechanical seal analysis for a quarter model
Prepare and analyse a one quarter model of the seal shown in Figure T11.6a. In the ‘Part’ workbench, for each steel ring, inner and outer cylinders are created with a height of 10 mm. For a quarter model set the rotation angle to 90➦ for each cylinder. A boolean operation with ‘Difference’ is then used to remove the inner quarter cylinder from from the outer. A 90➦ Toroid is created for the seal. Each of these parts is positioned so they lay above each other. The three parts are then connected as done in Tutorial T.T11b. 344
T11.7. Exercise E.T11b: Thermomechanical seal analysis for a quarter model
a)
b)
Figure T11.7: Simplified model results. a) Displacements [mm]. b) Temperature [➦K]
In the workbench ‘FEM’ an analysis container is opened and the connected model meshed. Standard loading, boundary conditions, contacts and materials are defined as done in Tutorial T.T11b. Again, first try an analysis with aluminium for the seal to check the model. This analysis will be nonlinear due to contact. It should prove straightforward and provide sensible results. Next try a new analysis replacing the aluminium seal with a hyperelastic model. This change is again done in the editor at runtime using the same Ogden material law used in the previous tutorial. You will probably find this now fails to converge and/or is computationally very expensive. Some possible options to try are: 1. Activate NLGEOM in the *STEP card (*STEP, NLGEOM) for a large deformation analysis. By default the *NLGEOM card will start an iterative Newton-Raphson solution. 2. You could also try *STATIC, DIRECT with a second card 0.1, 1.0 for a direct integration solution in time steps of 0.1 up to 1.0 second. 3. Using *STATIC, DIRECT, ALPHA = −0.3 adds some high frequency damping which seems to improve chances for a solution. You may conclude this analysis is unpredictable or even impossible. This is not uncommon with highly nonlinear implicit analyses. I have noticed using hyperelastic model for all parts does work reasonably well, even for larger displacements, suggesting the difficulty to get this model to run successfully is related to contact. Adjusting contact stiffness seems erratic, but reducing steel modulus to 10 GPa does give a stable solution with a *STEP, NLGEOM and *STATIC analysis. This would be reasonably valid since the metal parts are still far stiffer than the rubber seal. A two step uncoupled heat transfer analysis is possible following the same 345
Tutorial T11. Contact and hyperelasticity
method used in Tutorial T.T11c. This should give the example results shown in Figure T11.8 for principal strains and temperature.
Figure T11.8: Results for the quarter model. a) Principal strains. b) Temperature [➦K]
Some closing remarks Intentionally this problem has been tackled in stages. It is often helpful to resolve problems by using a small model before progressing to a larger scale. Even then difficulties can occur and some experimentation may be needed to get a robust solution that is computationally efficient. This example highlights that nonlinear implicit analysis can be challenging, but it should be mentioned that many of the problems encountered here may not necessarily occur with other codes, and especially commercial codes that are under continuous development. An analysis of contact and large deformation of the seal using an explicit code would be easier, but getting a true static solution would require careful loading, possibly combined with some damping. 346
TUTORIAL
TWELVE
STEADY STATE FLOW IN A HYDRAULIC PIPE NETWORK
T12.1
Purpose
This tutorial is taken from the CalculiX manual [53] and involves steady state hydraulic flow through a network of pipes. Although this is a civil engineering application hydraulic flow in pipe networks is a problem that occurs in many other areas of engineering. The network consists of a large upper reservoir that supplies a steady flow of water at constant pressure to a network of pipes of different diameter, with a bend, a valve and exits to another large reservoir. The aim is to predict pressure distribution and fluid flow rates throughout the network. Elementary theory for 1D linear steady state pipe flow analysis was presented in Section 1.8. In this tutorial more sophisticated pipe flow laws are described that include empirical coefficients to approximate friction flow loses and flow in partially filled pipes. This type of network analysis is nonlinear requiring a NewtonRaphson iterative solution. FreeCAD has some capabilities to post-process results, otherwise the CalculiX CGX post-processor must be used. 347
Tutorial T12. Steady state flow in a hydraulic pipe network
Tutorials and exercises: This tutorial is undertaken using mm-N-s units with one tutorial and one exercise as follows. Description Tutorial T.T12a
FE analysis of a hydraulic pipe network
Exercise E.T12a
Verification of the FE results
CalculiX units
System mm-N-s in tonne, mm, s, N, MPa
A network of line elements representing a system of pipes is created in FreeCAD for steady state flow analysis with CalculiX. An example then validates some results.
T12.2
Background information and theory
In Section 1.8 element formulation and a solution method for linear steady state fluid flow in pipes was described using the Hagen–Poiseuille law and 1D line elements. This assumes perfectly filled pipes with viscous fluid flow and, as part of the solution, continuity at nodes is enforced so that all pipes have the same mass flow rate. A useful exercise on this is given in Exercise 1 at the end of Chapter 5, which is recommended to review. This type of analysis is linear providing information on nodal pressure distribution from which pressure gradients and flow rates in each pipe can be found. Practical pipe analysis can, however, be more complicated. Pipes are generally only partially filled with friction losses due to surface roughness and lamina flow. Any bends, changes to pipe diameters or other obstacles like valves inhibit flow and cause system pressure loss or gain. These complications render the analysis nonlinear requiring an iterative solution. For this example CalculiX uses three node network elements (D-type) and dedicated models to represent various parts of the hydraulic pipe system. Some theory on these is given below, but the users manual [53] should be consulted for more information. FreeCAD can build the 1D network model and has built in functions to represent gravity and liquid self weight, atmospheric pressure and various pipes including parameters for friction losses in each of the pipe sections. Steady state problems have a continuous steady flow from a reservoir or pump to a steady outlet. If sudden changes occur, like a pump starting or a valve closing, dynamic surge effects may need to be modelled using a transient solution. Coupling to thermal analysis may be another requirement. These effects can be modelled in CalculiX but are not consider here.
T12.2.1
Three-node network element (D)
The CalculiX 1D three node line element for flow analysis has two end (corner) nodes and a mid-node with numbering being sequential along the length. Gmsh will automatically create this element type during meshing. At end nodes pressure 348
T12.2. Background information and theory
information is computed and at mid-nodes flow rate information is computed. A positive flow has direction from the first node number in the element list to the last node number, with negative flow being in the reverse direction. Boundary conditions for pressure are imposed at end nodes and fixed flow rates can only be imposed at mid-nodes. This 1D line element is used for all sections of the network listed in Table T12.1 by specifying different pipe types. A special feature for flow inlet and outlet elements, also referred to as dummy elements, is that the free end nodes are automatically redefined as zero. This identifies these elements as locations for mass flow entry and exit from the system. Dedicated material cards define fluid properties.
T12.2.2
Fluid section types: Liquids
CalculiX allows several fluid section types such as inlet, pipe Manning, bend, etc., many of which are used in this tutorial. In each section type empirical laws are used to estimate pressure (head) loss, or gain, as fluid passes through the pipe or obstacle. In each case head loss over element length L is denoted by ∆H. Hydraulic head has units of length, and is the pressure created by a vertical column of water, e.g. one atmospheric pressure (atm) = 101325 Pa is equivalent to a hydraulic head of water P/ρg = 101325 /( 1000 × 9.81) = 10.33 m. For flow in a pipe the Manning empirical formula is often used to estimate head loss given by ∆H =
n2 m ˙ 2 Lx ρ2 A2 R4/3
(T12.1)
where m ˙ is the mass flux in units [mass/time], Lx is the horizontal component of pipe length so that ∆H/Lx represents a gradient, ρ is liquid density, A is pipe section area and n is the Manning coefficient [time/length1/3 ] to account for friction loss. A typical value of n for steel pipes is 0.015 s/m1/3 , or in units millimetres 0.0015 s/mm1/3 . Fluid viscosity is not in the Manning law, but its effect could be included in n. R is the hydraulic radius which estimates the amount that the pipe is filled and is specified via the ratio of section area to wetted pipe length as depicted below.
/2
A R= PW
349
Tutorial T12. Steady state flow in a hydraulic pipe network
Other pipe sections all have a head loss governed by the general expression ∆H = ζ
m ˙2 2gρ2 A2
(T12.2)
where parameters are the same as Manning’s law and g is acceleration due to gravity. Depending on the pipe section type the empirical head loss coefficient ζ and pipe section area A differ. For an entrance pipe ζ depends on the ratio of entrance pipe area to exit pipe area. For a bend pipe it depends on bend angle and ratio of bend radius to pipe diameter. For a pipe enlargement or contraction ζ depends on ratio of entrance pipe diameter to exit pipe diameter, and finally for a valve it depends on ratio of opened dimension to pipe diameter.
T12.2.3
Solution
In the solution fluid mass at end nodes between elements must be conserved, that is, there can be no net increase or loss of mass flowing in or out of a node between two elements. Also, momentum within each element must be conserved, which, in an inclined pipe with an incompressible fluid is governed by Bernoulli’s principle. The conditions for conservation of mass (continuity) at a node are stated below m ˙ in = m ˙ out or ρvin Ain = ρvout Aout
where m ˙ is mass rate, v is velocity and A is area at the inflow and outflow from a node. The condition for conservation of momentum in an element is governed by Bernoulli’s law as shown below and expressed in Equation T12.3
ℎ
1 2 ρv + ρgz + p = constant . 2
(T12.3) 350
T12.2. Background information and theory
This relation states that dynamic pressure 12 ρv 2 , static pressure p and hydraulic head pressure ρgz at an elevation z = h is a constant. This requires that any change in one pressure type must be equilibrated by changes to the others. For example, dynamic pressure may increase with velocity but this must be balanced by lower hydraulic head and/or static pressure. The constant in Bernoulli’s equation can be normalised and a common approach is in terms of total head H H =z+
v2 p + ρg 2g 2
p
where z+ ρg is piezometric head or hydraulic head, and v2g is velocity head. In terms of a line element with end nodes i and j the momentum equation is expressed as zi +
m ˙ 2ij m ˙ 2ij pj pi + 2 2 = zj + + 2 2 + ∆Hij ρg 2ρ Ai g ρg 2ρ Aj g
(T12.4)
giving a flow-head relation where zi and zj are elevations of the end nodes, velocity is related to mass flow by v 2 = m ˙ 2 /ρ2 A2 and ∆Hij is relevant pipe head loss using the relations in Section T12.2.2. The position of head loss in Equation T12.4 assumes flow is moving from node i to node j. A finite element idealisation for flow in a pipe is obtained as follows. From Equation T12.1 the flow in a pipe depends on head loss and horizontal pipe length Lx in the flow direction m ˙2=
ρ2 A2 R4/3 ∆Hij . n2 L x
(T12.5)
From this flow rate q (flux) in units [length3 /time] is obtained using m ˙ = ρq as q2 =
A2 R4/3 ∆Hij n2 L x
or
AR2/3 q= √ n Lx
q ∆Hij
(T12.6)
where ∆Hij is difference in piezometric head between the two end nodes of the pipe. For a Manning pipe the finite element equations are (
qi qj
)
AR2/3 = √ n Lx
"
1 −1 −1 1
) #( √ Hi p Hj
or
(
qi qj
)
( √ ) Hi = [k] p . Hj
Similar equations for other pipe types are possible using Equations T12.2. 351
Tutorial T12. Steady state flow in a hydraulic pipe network
In a finite element analysis the element characteristic matrices [k] are assembled as usual to obtain a set of simultaneous equations for the network that are expressed in matrix form as √ [K] { H} = {qA }
(T12.7)
√ where {qA } is a vector of flow at nodes, [K] is a matrix of coefficients and { H} is a vector of piezometric heads at nodes. These relations enforce that the sum of pipe flows at nodes balance for mass conservation and is analogous to equilibrium of forces used for 1D bar analysis in Example 1-1 in Section 1.6. Also, all pipes connected to a common node have the same piezometric head, and the Manning pipe or other flow laws used in Equations T12.1 and T12.2 are applied. Note that assembly of element characteristic matrices does not require transformations to a common Cartesian frame, since flow and head vectors contain scalar quantities and element characteristic matrices do not change depend on direction. A difficulty of this method is that the flow versus head relationship in Equation T12.6 is nonlinear leading to set of nonlinear network governing Equations T12.7. The CalculiX manual [53] does not detail the nonlinear solution method used, but Collins [77, 78] and Mageid [79] outline a typical solution which assumes a linear relation for flow q = kh, where k is a linear coefficient. After assembly and inversion estimates of piezometric heads are made from {H} = [K]−1 {qA }. An iterative scheme then adjusts each element coefficient k leading to improved solutions for piezometric heads that converge to satisfy mass continuity, momentum conservation and the flow equations for each pipe. Also described in reference [78] is a technique to apply boundary conditions for possible imposed flow rates.
T12.3
Tutorial T.T12a: FE analysis of a hydraulic pipe network
The pipe network to be analysed is adapted from a CalculiX manual [53] example that is reproduced in Figure T12.1. Basically, continuous flow is provided by an upstream reservoir that passes through a series of pipes of various diameter. Pressure losses occur in all pipes due to friction, and at the inlet, bend and valve. The following minor changes are made to the original CalculiX model: 1. A mm-N-s unit system is used to be consistent with the output .inp file produced by FreeCAD. 2. The inlet (A-B) and outlet (M-N), also bend (D-E), expansion (F-G), contraction (H-I) and valve (J-K) all have a length of 200 mm so that meshing with Gmsh in FreeCAD is possible. In the original CalculiX dataset these have zero lengths. 352
T12.3. Tutorial T.T12a: FE analysis of a hydraulic pipe network
14500
100kPa atmospheric A B reservoir
∅200, L = 5000 bend ∅200, R = 300
10150
C
DE expansion
6500
∅200, L = 5000 F G
∅300, L = 5000
z
contraction
∅200, L = 2500 valve ∅150, L = 1560
x
208
0
5000
100kPa atmospheric
45° H I
N M J
reservoir K L 14942
Figure T12.1: Pipe network with sections and dimensions in millimetres
Table T12.1 specifies coordinates of key points, the type and function of each element, and properties used in the CalculiX model. Building the analysis model 1. Start FreeCAD and open a new file. 2. Points are now entered for the pipe network. Mistakes are easily made to save the operations. and you might want to open a dialog macro This is stopped with . The file created can be edited and rerun under Macro > Execute macro to invoke the steps stored. 3. Activate the workbench ‘Draft’. 4. Change the view from default x-y to x-z. The model is built with z vertical which is gravity direction. 5. From icon Dwire a new panel opens. Make sure the Relative (R) tab is deactivated, then enter in sequence all points A-N listed in Table T12.1. Use units in millimetres (mm), and ‘Enter point’ to save each point. New line elements are automatically added. 6. The final view should produce the following.
353
Tutorial T12. Steady state flow in a hydraulic pipe network
point A B C
x [mm] 0 0 0
y [mm] 0 0 0
z [mm] type/function 14700 14500 A-B: inlet 10150 B-C: entrance loss
D
4900
0
10150 C-D: pipe Manning
E
5100
0
10050 D-E: pipe bend
F
8435
0
6715
E-F: pipe Manning
G H
8635 0 11900 0
6515 3179
F-G: enlargement G-H: pipe Manning
I J
12100 0 13739 0
2979 1411
H-I: contraction I-J: pipe Manning
K L
13939 0 14942 0
1211 208
J-K: pipe valve K-L: pipe Manning
M N
14942 0 14942 0
6500 6700
L-M: enlargement M-N: outlet
properties atmospheric pressure 100 kPa Ain /Aout =0.8 (Ain >Aout ), Ain =31416 mm2 , Aout =25133 mm2 A=31416 mm2 , HR=50 mm, MC=0.0015 mm1/3 R/d=1.5, bend angle=45 deg, head loss=0.4 A=31416 mm2 , HR=50 mm, MC=0.0015 mm1/3 Ain =31416 mm2 , Aout =70686 mm2 A=70686 mm2 , HR=75 mm, MC=0.0015 mm1/3 Ain =70686 mm2 , Aout =17671 mm2 A=17671 mm2 , HR=37.5 mm, MC=0.0015 mm1/3 A=17671 mm2 , CC=0.5 A=17671 mm2 , HR=37.5 mm, MC=0.0015 mm1/3 Ain =17671 mm2 , Aout =1e10 mm2 atmospheric pressure 100 kPa
Table T12.1: Coordinates of points [mm], connections and functions for each component with notation A=pipe area (in and out are in the flow direction), MC=Manning coefficient, HR=hydraulic radius, R=bend radius, d=pipe diameter, CC=valve closing coefficient 354
T12.3. Tutorial T.T12a: FE analysis of a hydraulic pipe network
Running the network model 1. Change the workbench to FEM and open a new analysis container
.
2. The network is meshed with Gmsh. Activate icon then click on all lines with the mouse and key Strg pressed or Edit > Box to select all lines. Use a minimum element size 1000 m to force that only one element is created for each line. In the container click on FEMMesh and with the right mouse key ‘Display FEM mesh info’ should show that 27 nodes (A-N plus mid-line nodes) and 13 elements have been created.
3. Create a FEM fluid material with icon accept the default values.
. Select fluid type ‘Water’ and
4. Create a FEM constraint for self weight (gravity) with icon direction is negative z.
. The default
5. With icon each pipe type is selected. For Fluid Section Parameter choose ‘Liquid’ and for ‘Liquid Section Parameter’ the required pipe type is selected. This is repeated for each pipe section in Table T12.1 using the data given. Note that in FreeCAD Manning coefficients cannot be entered to three decimal places. A workaround is to use a dummy value and correct this later in the editor (see below). Or number of decimal places can be changed in FreeCAD settings. Analysis and results 1. A CalculiX analysis is started from icon
.
2. Select option ‘Thermo mechanical’, but before running enter the editor and replace Manning coefficients for pipes with 0.0015, for the five occurrences shown below. 355
Tutorial T12. Steady state flow in a hydraulic pipe network
3. Also, in the editor extra ASCII output at nodes for mass flow rates and pressures is possible if the following information is added to the .inp file.
4. Close the editor with
, save the changes and continue the analysis.
Examining results In FreeCAD contour plots of line elements are not available, but opening the contour results file does provide overall results for mass flow rates and network pressure.
In the .dat results file flow rates at all nodes are listed, together with pressure at element end nodes. These results are summarised in Figure T12.2. Mass flow rate 356
T12.3. Tutorial T.T12a: FE analysis of a hydraulic pipe network
at all nodes are the same, which is a requirement for mass continuity. Pressure is atmospheric at ends of the network and has a maximum at node 15 where one pipe contracts from a larger to a smaller diameter at location H-I shown in Figure T12.1. Only end nodes of the line elements have pressures computed.
Figure T12.2: Element end nodes and analysis results for mass flow and total head pressures
Alternatively, an easier option is to plot results from the .frd file with the CalculiX CGX post-processor to obtain the distributions for mass flow rates and pressure shown in Figure T12.3.
a)
b)
Figure T12.3: CGX post-processor results. a) Mass flow rate. b) Pressure 357
Tutorial T12. Steady state flow in a hydraulic pipe network
T12.4
Exercise E.T12a: Verification of the FE results
It is unrealistic to undertake this network analysis using hand calculations, but it is informative to verify some of the results. First, the general form of the flow-head equations can be constructed as follows
3 5 7 9 .. . 25
3 cbc −cbc 0 0 . ..
0
5 −cbc cbc + ccd −ccd 0 .. .
7 0 −ccd ccd + cde −cde .. .
9 0 0 −cde cde + cef .. .
··· ··· ··· ··· ··· .. .
0
0
0
−clm
25 0 0 0 0 .. .
+clm
H3 H5 H7 H9 .. . H25
q A3 q A5 qA 7 = q A. 9 . . qA25
where {qA } is a vector of pipe flows, {H} is a vector of piezometric heads obtained from the elevation z and pressure head p/ρg. Array [K] is the assembled element characteristic matrix which only uses line element end nodes. For each element in the network conservation of momentum using Equation T12.4 can be checked. This is most easily done for pipe elements where velocity 2 head v2g is constant and can be neglected in Equation T12.4. The computed mass flow in Manning pipes (89.5 kg/s) is also possible to confirm using Equation T12.5 with pressure results from Figure T12.2.
358
TUTORIAL
THIRTEEN
CFD: THEORY AND PROGRAMMING A CODE
T13.1
Purpose
In Tutorial T6 fluid flow based on a finite element representation of the Laplace partial differential equation from Chapter 5 was presented. This theory is only realistic for inviscid fluids or slow viscous flow that is laminar having velocities well below that that might create turbulence. Fast flow of a viscous gas or liquid may also be laminar, but it is likely separation, turbulence and eddies will occur in which case Computational Fluid Dynamics (CFD) based on the Navier-Stokes equations must be used. CalculiX does have rudimentary CFD capabilities, but options are limited and these are not integrated with FreeCAD. Therefore alternative open source CFD codes are introduced and applied. CFD is a highly specialised area of numerical simulation that is theoretically and computationally challenging and does require considerable practice to gain a level of expertise to safely perform analyses and interpret results. This tutorial provides basic theory for CFD analysis and undertakes programming of a simple Finite Difference (FD) code using FreeMAT to help elaborate some of the underlying concepts. In the next tutorial examples and exercises using the popular Finite Volume (FV) CFD code OpenFOAM [80] are presented, which is available as a so-called add-on to FreeCAD. 359
Tutorial T13. CFD: Theory and programming a code
Tutorials and exercises: This tutorial is undertaken with one exercise. Description Exercise E.T13a
Programming a simple CFD solver
Units
System (SI) m-N-s or any consistent set
A simple CFD solver based on finite differences is programmed in FreeMAT.
T13.2
Background information and theory
CFD analysis can treat fluids that may either be in a gaseous or liquid state. Generally liquids are considered incompressible and have a density that does not vary with pressure, whereas gases tend to be compressible with pressure dependent density. A second important property is viscosity which characterises shear resistance to flow. These properties are temperature dependent. In this example water is used with the following properties at 20➦C and 1 atm.
T13.2.1
fluid
density (kg/m3 )
dynamic viscosity (N·s/m2 )
water
1000
0.0025
Irrotational and rotational flow
In Chapter 5 theory relevant to ideal fluid flow is presented based on a potential function described by the second order quasi-harmonic differential Equation 5.4. Flow governed by this relation is often termed potential flow since it is driven only by gradients of the potential, which for fluids are gradients of pressure. A consequence of this assumption is that streamlines of flow have directions that intersect perpendicular with contours (isopotentials) of equal pressure, which also meet boundaries at right angles. Flow is therefore irrotational since fluid moves along streamlines without any rotation. This assumption is only reasonable for fluids that are either inviscid (zero viscosity) or viscous and moving at slow velocities. Figure T13.1a shows a population of streamlines to which several indicative pressure isopotentials are superimposed. For real viscous fluids moving at high velocities, shear forces cause rotation and complex flow paths to occur that may be laminar or involve separation, eddies and turbulence as depicted in Figure T13.1b. Computational fluid dynamics is a specialised discipline dedicated to numerical analysis of these types of flows.
360
T13.2. Background information and theory
a)
b)
Figure T13.1: Types of flow. a) Irrotational (potential) flow with streamlines and exemplary isopotentials of pressure. b) Rotational flow with separation and turbulence
T13.2.2
Introduction to CFD analysis
Many real world flow phenomena are suited to CFD simulation. Examples include modelling the weather and ocean currents, engine combustion, many problems involving fluid flow around obstacles and in pipe systems, airflow (aerodynamics) over aircraft, automotive and around buildings, heat exchangers, blood flow in a human body, amongst many others. Simulation of these events enables better understanding, or an opportunity to improve a design or confirm if it is safe. Rotational flow of a viscous fluid is governed by the Navier-Stokes equations which encompass three basic laws for mass, momentum and energy conservation. In these relations liquids are usually assumed incompressible, while gasses are compressible. Many problems may only require a steady state solution, whereas others may be transient, and sometimes it is necessary to account for temperature using an equation of state relating pressure, temperature and density at any instance of time. CFD undertakes numerical solution of these governing equations by utilising a discretization scheme with a weak form of the governing equations to find fluid velocity, pressure, density and temperature distribution over a network of points. Compared to deformation of solids a mathematical description of fluid flow is considerably more complex. In the following only a general introduction to the topic is possible to convey the essence and some basic laws behind CFD analysis. For a detailed explanation an excellent book by Anderson [81] is recommended.
T13.2.3
Descriptions for fluid flow
In Section T13.3 the Navier-Stokes equations for viscous fluid flow will be derived. In these derivations two different concepts can be used to characterise and quantify the time dependent behaviour of fluid flow. A brief explanation of these is necessary and discussed first. Consider a small Control Volume (CV) of fluid within a larger body of moving 361
Tutorial T13. CFD: Theory and programming a code
fluid as shown schematically in Figure T13.2. Either a ‘non-conservation’ approach is adopted in which basic laws are formulated assuming the CV moves with fluid flow, or a ‘conservation’ approach is used that assumes each CV is stationary and fluid passes through it. Often these two approaches are referred to as, respectively, having Eulerian and Lagrangian reference frames. It will be seen that derivation of flow equations in one form can be readily converted to the other.
y(v)
y(v)
V t2
(x, y,z)fixed
x(u)
t1
x(u)
z(w)
z(w)
a)
b)
Figure T13.2: Models for flow characterisation. a) Non-conservation (moving CV). b) Conservation (fixed CV)
The substantial (or total) derivative This is an important quantity in fluid mechanics that describes the time rate of change of a fluid property in a fluid CV as it passes through a given flow (velocity) field. In Figure T13.3 a CV of fluid has a position x1 , y1 , z1 at time → − t1 with a velocity vector V 1 , and moves with flow to a new position x2 , y2 , z2 → − at time t2 where it has a velocity vector V 2 . In fluid mechanics it is standard → − notation to denote a velocity vector V by velocities u, v, w in the x, y, z directions. This should not be confused with u, v, w used previously for displacements in mechanical analysis. y(v)
V
(x , y , z , t )
V z(w)
x(u) (x , y , z , t )
Figure T13.3: Movement of a fluid CV in a flow field during time t1 to t2 362
T13.3. Navier-Stokes equations for viscous flow
Consider, for instance, possible density change as this CV moves. If fluid density ρ varies with position x, y, z and time t we have ρ = f (x, y, z, t). Using the chain rule of differentiation this gives dρ =
∂ρ ∂ρ ∂ρ ∂ρ dx + dy + dz + dt ∂x ∂y ∂z ∂t
and dividing by dt yields dρ ∂ρ ∂ρ dx ∂ρ dy ∂ρ dz = + + + . dt ∂t ∂x dt ∂y dt ∂z dt dy dz Replacing dx dt , dt and dt by velocities u, v, w gives
− dρ ∂ρ ∂ρ ∂ρ ∂ρ ∂ρ → = +u +v +w = + V · ∇ρ dt ∂t ∂x ∂y ∂z ∂t
(T13.1)
→ − ∂ ∂ ∂ T where V is the velocity vector and operator ∇ is { ∂x ∂y ∂z } . → − ∂ρ In Equation T13.1 ∂t is called the ‘local derivative’ and V · ∇ρ are ‘convective derivatives’. These combine to give the total time rate of change which is denoted D Dt , so Equation T13.1 can be written as − ∂ρ → Dρ = + V · ∇ρ . Dt ∂t
(T13.2)
Thus the substantial, or total time derivative, comprises of a local variable time derivative that may, for example, depend on the constitutive law. Plus convective derivatives from spatial movements as fluid travels from one region to another. In this case density is the variable considered, but similar substantial derivatives also exist for other flow variables like pressure, temperature and velocities, and is an important relation used in derivation of the Navier-Stokes equations. Sometimes Equation T13.2 is referred to as the ‘substantial derivative operator’ and has the general form − D() ∂() → = + V · ∇() . Dt ∂t
T13.3
(T13.3)
Navier-Stokes equations for viscous flow
Viscous fluid flow is mathematically described by the three conservation laws that ensure continuity of mass, momentum and energy. Usually, the term ‘Navier363
Tutorial T13. CFD: Theory and programming a code
Stokes equations’ refers to all governing equations from these three laws, but sometimes it is reserved only for the momentum equations. These governing equations describe how velocity, pressure, density and temperature of a moving fluid are interrelated and vary with time and position. The choice of which equations apply and their form does depend on the fluid state, which may be incompressible or compressible and whether a problem is 2D or 3D, and isothermal or thermal. In summary, the four independent variables are time t and spatial coordinates x, y, z and the six possible dependent variables are velocities u, v, w, pressure p, density ρ and temperature T .
T13.3.1
Mass conservation
Flow mass conservation (continuity) has already been introduced in Section 5.2. This states that there can be no net gain or loss of mass during flow. For the CV shown in Figure 5.1, assuming unit volume dx = dy = dz = 1, continuity Equation 5.1 for an incompressible fluid can be expressed in an equivalent form in terms of velocities u, v, w as ∂u ∂v ∂w + + = 0. ∂x ∂y ∂z
(T13.4)
~ for velocities and operator ∇, Equation T13.4 can Using the abbreviated vector V be restated as ~ = 0. ∇·V
(T13.5)
For a compressible fluid density ρ can change with time t and velocities, but mass conservation must still apply and continuity for a unit volume is given by dρ ∂(ρu) ∂(ρv) ∂(ρw) + + + =0 dt ∂x ∂y ∂z
or
dρ ~)=0 + ∇ · (ρV dt
(T13.6)
dρ ~ ) is the net where dt is a local derivative for rate of change of mass and ∇·(ρV change in mass due to convective derivatives. The flow situation considered in Figure 5.1 to derive Equation T13.6 is conservation flow, where fluid flows through the CV and continuity states that rate of change of mass at a particular point is zero.
For mass conservation in non-conservation flow we enforce that rate of change of density in a CV as it moves through the flow field is zero so that Dρ ~ = 0. + ρ∇ · V Dt
(T13.7) 364
T13.3. Navier-Stokes equations for viscous flow Dρ
If the fluid is incompressible Dt = 0. Equation T13.7 is derived from Equations T13.2 and T13.6 and invoking the vector identity gives ~ ) ≡ (ρ∇ · V ~ ) + (V ~ · ∇ρ) . ∇ · (ρV
T13.3.2
(T13.8)
Momentum conservation
Figure T13.3 shows a CV moving within a flowing fluid. This CV will be subjected to surface forces from surrounding fluid and body forces, which are depicted in Figure T13.4 for the case of those acting only in the x-direction; similar forces will also act in the y and z directions. These surface forces are due to normal and shear stresses, and for both types of stress there will be stress gradients across the CV. Normal forces cause translation and extension, while shear stresses cause shear distortion and rotation. Other surface forces are caused by fluid pressure p in each normal direction and possible additional body forces could be effects like gravitational or centrifugal forces. The CV has a mass ρ dx dy dz. y(v)
𝑝dydz
τ dydz
z(w)
(τ +
dy)dxdz dy
τ dxdy
(τ +
(τ +
dz)dxdy
τ dxdz
(𝑝+
dz
dx)dydz dx)dydz
x(u)
dx
Figure T13.4: A moving fluid CV and surface stresses (x-direction only) caused by surrounding fluid
From Newton’s second law net forces acting on the CV must balance its inertial force, which equals mass times acceleration. For the x-direction this is Fx = max , or in terms of change in momentum Fx = m
Du Dt
(T13.9)
where Du is the change in velocity in direction x over time Dt. Resolving forces Fx in the x-direction from Figure T13.4 gives ∂p ∂τxx ∂τyx ∂τzx Fx = − + + + dx dy dz . ∂x ∂x ∂y ∂z 365
Tutorial T13. CFD: Theory and programming a code
Also, adding any body forces that may act in the x-direction and denoting these gx for contribution per unit mass gives Fx =
∂p ∂τxx ∂τyx ∂τzx + + + − ∂x ∂x ∂y ∂z
dx dy dz + ρgx dx dy dz .
(T13.10)
Combining Equations T13.9 and T13.10 and using mass m = ρ dx dy dz yields ρ
Du ∂p ∂τxx ∂τyx ∂τzx =− + + + + ρgx . Dt ∂x ∂x ∂y ∂z
(T13.11a)
In a similar manner momentum equations for y and z directions are obtained ρ
∂τyy ∂τzy ∂p ∂τxy Dv =− + + + + ρgy Dt ∂y ∂x ∂y ∂z
(T13.11b)
ρ
∂τyz ∂p ∂τxz ∂τzz Dw =− + + + + ρgz . Dt ∂z ∂x ∂y ∂z
(T13.11c)
Equations T13.11 are the x, y, x momentum equations in non-conservation form since they describe behaviour of a CV moving with fluid flow. Similar relations in conservation form can be obtained using the substantial derivative operator Equation T13.3 and vector identity Equation T13.8. A summary of these equations is provided in Reference [82]. Since most practical fluids are Newtonian shear stress is related to velocity gradient by τ = µ du dy , where µ is fluid shear dynamic viscosity. This allows a conservation form of the momentum equations to be formulated in terms of material constants and derivatives of velocities. In the literature abbreviated forms of these equations are found, for instance, for an incompressible viscous fluid we have
ρ
! → − → − → − → − ∂V + V · ∇ V = −∇p + µ∇2 V + ρg . ∂t
(T13.12)
The LH side of Equation T13.12 are mass and acceleration which comprises of local velocity and convective velocity derivatives and RH side are pressure, viscous and body forces. Rearranging and ignoring body forces gives the following expanded relations for this equation ∂u ∂u ∂u ∂u 1 ∂p +u +v +w =− +ν ∂t ∂x ∂y ∂z ρ ∂x 366
∂2u ∂2u ∂2u + 2 + 2 ∂x2 ∂y ∂z
(T13.13a)
T13.4. Solution of the Navier-Stokes equations
∂v ∂v ∂v 1 ∂p ∂v +u +v +w =− +ν ∂t ∂x ∂y ∂z ρ ∂y
∂w ∂w ∂w 1 ∂p ∂w +u +v +w =− +ν ∂t ∂x ∂y ∂z ρ ∂z
∂2v ∂2v ∂2v + 2+ 2 2 ∂x ∂y ∂z
∂2w ∂2w ∂2w + + ∂x2 ∂y 2 ∂z 2
(T13.13b)
.
(T13.13c)
µ
where ν is kinematic viscosity ρ . For a 2D geometry, as used in Section T13.5, these equations are reduced by ignoring Equation T13.13c and all z components.
T13.3.3
Energy conservation
For a compressible fluid or thermal analysis a further law to conserve energy must be enforced. This is basically the first law of thermodynamics, which states for a fluid CV moving with flow that E˙ gen = E˙ in + W˙ e
(T13.14)
where E˙ gen = rate of change of energy inside a fluid CV E˙ in = net flux of heat into the CV W˙ e = rate of work done by body and surface forces on the CV . Depending on the type of flow problem different expressions for Equation T13.14 are to be found in the literature. For the interested reader some derivations of these are to be found in Anderson [81] for both non-conservation and conservation flow.
T13.4
Solution of the Navier-Stokes equations
Navier-Stokes equations for mass, momentum and energy conservation give a set of time dependent coupled partial differential equations that must be solved for dependent variables over the domain. Further, any solution must satisfy all imposed velocity and pressure boundary conditions. An analytical solution is generally not feasible and therefore discretization and numerical methods must be employed using either a finite difference, finite element or finite volume method. For the last part of this tutorial the finite difference method is explained and applied, and in Tutorial T14 the finite volume method is briefly described and applied.
367
Tutorial T13. CFD: Theory and programming a code
T13.4.1
Poisson’s Pressure Equation for incompressible isothermal flow
For isothermal analysis with an incompressible fluid velocities u, v, w and pressure p have to be found from mass conservation using Equation T13.6 and momentum conservation using Equations T13.13. But a problem arises that pressure is not available for the three momentum equations. This is resolved by creating an alternative governing equation in the form of Poisson’s Pressure Equation (PPE) which couples pressure and velocities. It is obtained by taking divergence of the momentum equations, combining these and rearranging, and invoking mass conservation ~ = 0. For the case of 2D flow this gives ∇·V ∂2p ∂2p + = −ρ ∂x2 ∂y 2
∂u ∂x
2
+2
∂u ∂v ∂y ∂x
+
∂v ∂y
2 !
(T13.15)
so pressure is now a function of derivatives of velocities. Mass conservation is effectively enforced via this new law and density is made constant for an incompressible fluid. Equation T13.15 has the general form ∇2 p = −f which is of the Poisson’s type introduced in Equation 5.16. Equations T13.13 and T13.15 are now used for a solution as demonstrated in Exercise E.T13a.
T13.4.2
Compressible fluids and thermal analysis
For a compressible fluid or thermal analysis energy conservation must also be enforced using an additional relation based on the conditions in Equation T13.14 and an equation of state relating pressure, density and temperature to find the dependent variables u, v, w, p, ρ, T . For an isothermal analysis with a compressible gas the standard ideal gas equation (P V = nRT ) would be used.
T13.5
Finite difference discretization
Finite difference analysis is an early numerical method to predict fluid flow. It is not very popular today since it cannot easily handle complex geometries or irregular boundaries. But it can be effective for certain problems and is applied in Exercise E.T13a as a convenient method to demonstrate aspects of FD analysis and programming of a simple CFD code. Exercise E.T13a is based on reference [83] which can be downloaded. This gives details on the CFD theory used, finite difference equations and provides key sections of code for the computer program. To help understand the FD method the following describes a basic 1D solution scheme. From this extension to the 2D case used in the exercise can be stated, and if required extension to 3D should be clear. 368
T13.5. Finite difference discretization
In Figure T13.5 a continuous function having the main features of a 1D NavierStokes equation is shown. For a solution a discretization scheme is used to find approximate values of velocity u for the function at grid points m = 1→M . At any point m = i approximate central difference expressions based on surrounding values are ∂u ui+1 − ui−1 ui+1 − ui−1 ∂u so ui = = ui (T13.16a) ∂x i 2∆x ∂x i 2∆x also
∂2u ∂x2
i
1 = ∆x
ui+1 − ui ui − ui−1 − ∆x ∆x
+u
=
ui+1 − 2ui + ui−1 . ∆x2
(T13.16b)
=0 m=M
m=1
m=2 u
u
u
u
u
∆x Figure T13.5: 1D finite difference discretization
Therefore each discrete point i for the function is approximated by ui+1 − 2ui + ui−1 ui+1 − ui−1 + ui = 0. ∆x2 2∆x
(T13.17)
In matrix form this is or
1 ui − 2 ∆x 2∆x
ui−1 [k]i ui ui+1
=
n
−
2 ∆x2
0
o
ui−1 1 ui + ui ∆x2 2∆x ui+1
=
n
0
o
.
.
where matrix [k]i is for grid point i, attached to grid points i − 1, i and i + 1. 369
Tutorial T13. CFD: Theory and programming a code
For a solution [k]i matrices for every grid point are assembled and a standard implicit analysis is performed subject to boundary conditions. However, in this case a nonlinear solution becomes necessary since [k]i and therefore the global matrix are functions of velocities ui . Alternatively, an explicit finite difference solution can be done using Equation T13.17 with imposed boundary conditions to continuously update grid velocities until an acceptable convergence is reached. Exercise E.T13a undertakes an explicit analysis with finite difference discretisation using a 2D version of the Navier-Stokes momentum equations. In this scheme pressure is updated using the Poisson’s Pressure Equation T13.15 which also enforces mass conservation and a temporal discretization is necessary to account for time derivatives so that → − ~ n+1 − V ~n ∂V V 1 ~n. ~ n · ∇V ~ n + ν∇2 V = = − ∇pn+1 − V ∂t ∆t ρ For two dimensional analysis these velocities are 2 n ∂un ∂un ∂ 2 un ∂ u 1 + vn +ν + un+1 = un + ∆t − ∇pn+1 − un un ρ ∂x ∂y ∂x2 ∂y 2 2 n ∂v n ∂v n ∂ 2vn ∂ v 1 + vn +ν + v n+1 = v n + ∆t − ∇pn+1 − v n un ρ ∂x ∂y ∂x2 ∂y 2 where finite difference Equations T13.16 replace the derivatives, except these are now functions or grid point velocities in both the x and y directions. Explicit time integration with critical time step ∆t and cycles denoted n is used to advance the solution and find a steady state result.
T13.6
Exercise E.T13a: Programming a CFD solver
An excellent means to a better understand any numerical method is to program a solution algorithm, even if it is very simple compared to that used in a commercial code. This was done in Tutorials T10 and T11 to demonstrate explicit analysis and is now done to solve CFD governing equations. For this purpose a CFD code is programmed following the approach of Owkes [83], who used MATLAB for his work, but open source FreeMAT or GNU Octave have the same programming language and can also be used. Basically, finite difference equations discretize the 2D Navier-Stokes momentum and Poisson’s Pressure Equation over a regular fixed grid of the domain using equations in a conservation form. In reference [83] a solution method is described 370
T13.6. Exercise E.T13a: Programming a CFD solver
in which a predictor step estimates 2D velocities using the momentum equations without pressure, followed by a corrector step to adjust velocities using pressure from the pressure equation. Many iterations are repeated until convergence is achieved which could be checked, for instance, by change in norm of velocities. A brief introduction to the finite difference method used is outlined in Section T13.5. Owkes [83] also describes the CFD theory in some detail and gives key sections of code that can be directly imported into FreeMAT. But you will need to structure the code and setup an explicit time marching scheme that performs cycles with a critical time step ∆t < ∆x/u, so that a point-by-point analysis can be performed leading to a stable steady state solution. This is fairly straightforward, but some knowledge of programming (or enthusiasm to learn) will be helpful. In particular, carefully note the sizes of different arrays so each can be correctly initialised and make sure the stable time step conforms to the chosen grid size. Once programming is complete a standard test case [84] is suggested consisting of a 2D cavity full with water having impervious sides and base, with a lid that moves to impose a tangential (shear) velocity to the liquid. This is a standard benchmark that also appears in the CalculiX manual [53] where a finite volume solution is performed. For this analysis use the same setup as reference [53] with a unit sized cavity Lx = Ly = 1 m, fluid density 1000 kg/m3 , dynamic viscosity 0.0025 N·s/m2 and unit tangential velocity 1 m/s. For results the following two lines of code will, for example, plot pressure p [xx,yy] = meshgrid(xm(imin : imax), ym(jmin : jmax)); contour(xx, yy, p((imin : imax), (jmin : jmax)), 30) √ In Figure T13.6 contour plots are shown for pressure p, total velocity u2 + v 2 and a so-called ‘quiver’ plot of u and v velocities as vectors. You will find at least 500 cycles are necessary to obtain a steady state solution, with a finite difference grid of at least 30×30 required for reasonable resolution. Be careful that the critical time step is observed or the solution will diverge; this has been discussed in Section 3.4.1 and studied in Exercise E.T10a. It has to be said this is a simple solution method that is convenient for programming, but it is not the best for computational speed. Also, it highlights one reason the FD method is rarely used today, namely the structured grid of analysis points is not suited to treat complex geometries with irregular boundaries. For this the FE method, or FV method presented in the next tutorial are far better. Fortunately, this LID with a cavity geometry is ideally suited to this finite difference analysis.
371
Tutorial T13. CFD: Theory and programming a code
Figure T13.6: Cavity with a lid flow contours. a) Pressure. b) Total velocity. c) Vector plot of velocities
372
TUTORIAL
FOURTEEN
CFD: FV METHOD, OpenFOAM INSTALLATION AND EXAMPLES
T14.1
Purpose
This tutorial uses the open source solver OpenFOAM [80] to undertake various CFD simulations of liquid and air flow. Fundamental theory for fluid flow combined with CFD analysis has already been introduced and applied via the finite difference method in Tutorial T13. In principle, these techniques are also used in OpenFOAM, except now the Finite Volume (FV) discretization method is applied which, like the FE method, is far better to model complex geometries with irregular surfaces. OpenFOAM is a state-of-the-art general purpose CFD solver that can treat a wide range of flow problems covering lamina and turbulent flow, which can be coupled with phenomena like thermal, combustion and chemical reactions. Finite volumes are not restricted to fluids and the code can also perform basic continuum mechanics analysis. First, some brief comments on the FV technique are made followed by guidelines on installation of OpenFOAM in the FreeCAD environment. Tutorials and exercise then investigate laminar and turbulent flow of water in pipes and high velocity air flow over an aircraft airfoil. 373
Tutorial T14. CFD: FV method, OpenFOAM installation and examples
Tutorials and exercises: This tutorial undertakes one tutorial and three exercises as follows. Description Tutorial T.T14a
Turbulent fluid flow in a 2D ‘T’ tube joint
Exercise E.T14a
Laminar flow and 3D modelling of the ‘T’ tube joint
Exercise E.T14b
Additional exercises
Exercise E.T14c
2D high velocity flow over an airfoil
Units
System mm-N-s or as required by FreeCAD
The first tutorial and examples undertake laminar and turbulent flow of water in two connecting pipes. This is then followed by exercises on high velocity flow of air over an aircraft airfoil.
T14.2
Background information and theory
For these examples water and air are the two fluids used. The following table lists properties at 20➦C and 1 atm, which are reproduced from the FreeCAD database. fluid
density (kg/m3 )
dynamic viscosity (kg/m·s)
water
1000
0.001-0.00125
air
1.2
0.000018
An introduction to flow theory and its practical application in a finite difference code was given in Tutorial T13. Although OpenFOAM uses finite volumes for spatial discretisation many of the basic calculations used are similar to the previous finite difference method and therefore only a few brief additional comments and some background information are given.
T14.2.1
Basic theory for finite volume analysis
In the FV method a mesh of 2D or 3D elements are used that are now treated as cells, or control volumes, with a single central cell point where information is computed and stored. Cells can be triangular or quadrilateral for 2D problems, or hexahedral or tetrahedral for 3D problems. Each cell point acts like a grid point in the FD analysis of Tutorial T13, in which the Navier-Stokes equations are solved to compute dependent variables for velocities u, v, w, and pressure p whilst ensuring mass and momentum conservation. For a thermal or incompressible liquid this will include energy conservation for density ρ and temperature T . Conservation for the domain is satisfied since conservation at each cell is enforced. 374
T14.2. Background information and theory
Volume integrals for each cell are simplified using Greens theorem, which was introduced and applied in Section 5.5.3 for heat transfer. This leads to additional surface integrals that are surface fluxes which propagate flow between cells. Solution of the Navier-Stokes equations for each cell with mass conservation will ensure ~ = 0. Over a cell surface S this is given by flow continuity ∇·V Z
S
→ − → V ·− n dS = 0
− where → n are normals to the CV sides. Typical 2D and 3D cells are shown in Figure T14.1, together with cell center points where dependent variables are calculated − and normals → n i for surface integral calculations.
cell center
cell center
Figure T14.1: Example 2D and 3D control volumes
For a more detailed discussion on the FV method the literature often uses the general transport equation given by ∂(ρφ) ~ + V · ∇(ρφ) = ∇ · (Γ∇φ) + Sφ . ∂t
(T14.1)
Mathematically this equation describes transport of any fluid quantity like pres∂(ρφ)
sure or temperature, which is denoted arbitrarily here as φ. The term ∂t ~ ·∇(ρφ) is a convection term describes transient rate of change of φ in the cell, V of net flow of φ out of the cell, ∇·(Γ∇φ) is diffusion of φ and Sφ is a possible source term for φ. This equation can also represent transport of mass, momentum or energy in the Navier-Stokes conservation laws. For example, if φ is velocity ~ , property Γ is dynamic viscosity µ and Sφ is replaced by −∇p + ρg then vector V Equation T14.1 reduces to Equation T13.12 for momentum conservation. This general transport equation is therefore a valid basis to develop foundations for the finite volume discretization method. For the interested reader the textbooks by Patankar [85] and Versteegand and Malalasekera [86] are recommended, where a simplified form of Equation T14.1 375
Tutorial T14. CFD: FV method, OpenFOAM installation and examples
is used to represent the heat diffusion equation for time dependent heat transfer, from which the general FV technique is established. A further good description following the same approach and including a Matlab souce code is provided by Outhwaite [87]. Access to OpenFOAM documentation is not necessary for this tutorial, but references [88, 89] do give a good starting point for further information and specific details on capabilities and solution methods used in OpenFOAM.
T14.2.2
Installing the codes
OpenFOAM can be used as a stand-alone product or in combination with other meshing and post-processing products. Like most solvers it is developed on the Linux platform and most stand-alone installations are likely to be on Linux. Throughout this book I have deliberately preferred Windows to avoid another learning curve with Linux and have therefore installed OpenFOAM as an integrated addon to a Windows version of FreeCAD, with post processing via a Windows version of ParaView [90]. FreeCAD recommends installing an ESI version of OpenFOAM [88] based on Linux with a virtual box and so-called docker technology to provide communication between Linux and Windows. This is all downloaded automatically within FreeCAD once certain options are activated and lets a Linux version of OpenFOAM run in the background on a Windows machine. Unfortunately, I found this option does not work well, consequently the following uses a version of OpenFOAM provided by blueCAPE [91] that runs natively on Windows. The installation steps are: 1. Install the latest blueCAPE [91] 64 bit windows version of OpenFOAM on your computer using standard installation procedures. 2. Similarly install the latest version of ParaView [90]. If you are using an old PC it may not have OpenGL graphics, in which case install version V4.4. It is recommended to read a useful 2-page ‘Getting started’ guide that is provided in reference [90]. 3. It is advised to open FreeCAD in administrator mode for all read/write privileges. 4. New plot and OpenFOAM workbenches are added to FreeCAD. Under tabs Tools > Addon manager the workbenches Plot and CfdOF are added and installed (use update). After a restart (in administrator mode) these new workbenches should appear in the list of workbenches. 5. Using tabs Edit > Preferences the CfdOF panel opens to show the following template. At the top select locations for the OpenFOAM directory and ParaView executable. Other URL’s for software dependencies can be ignored 376
T14.3. Tutorial T.T14a: Turbulent fluid flow in a 2D ‘T’ tube joint
except, at the bottom, install cfMesh [92] and HiSA [93] using the given default panel options. These involve time consuming build processes that link to OpenFOAM, so wait patiently for the ‘Install completed’ prompt to appear.
6. Finally, in this panel check installation by running the ‘Run dependency checker’. It should show there are no missing dependencies.
T14.3
Tutorial T.T14a: Turbulent fluid flow in a 2D ‘T’ tube joint
Two intersecting pipes of 20 mm and 10 mm diameter are analysed for fluid flow. For simplicity only an approximate 2D slice of 1 mm thickness is modelled and analysed having the geometry and dimensions shown in Figure T14.2. Outlet has a pressure 0 Pa, with inlet flow velocity 500 mm/s for the larger pipe and 200 mm/s for the smaller pipe. For fluid properties FreeCAD recommended default values for water are used. Building the simplified ‘T’ tube joint model The following steps are done in FreeCAD to build the 2D model: 377
Tutorial T14. CFD: FV method, OpenFOAM installation and examples
Figure T14.2: Geometry and dimensions [mm] for the ‘T’ tube joint (2D model)
1. Open a new file in FreeCAD. Beware each time an analysis is run previous output results files are overwritten. If results must be stored then open the CfdOF panel via Edit > Preferences and specify a new temporary directory. It is probably easiest if the FreeCAD model dataset also resides in this directory so all datas are in one place. 2. Start the ‘Parts’ workbench and create two cubes
having:
length = 100 mm, width = 20 mm, height = 1 mm length = 10 mm, width = 30 mm, height = 1 mm. Each has an origin position 0, 0, 0. 3. Click on the second (smaller) cube in the tree and with the right mouse key activate option ‘Transform’ to obtain the triad positioning axis shown below. This allows rotations and translations by dragging dots or arrows with the mouse. Position the smaller cube to that shown in Figure T14.2. New positions are indicated in the Data panel. Finish with OK. Otherwise directly position this part via the Data tab.
4. Fuse the two parts with icon . This splits the surface between the two parts which is necessary later to define flow boundary surfaces. 378
T14.3. Tutorial T.T14a: Turbulent fluid flow in a 2D ‘T’ tube joint
5. Open the CFD workbench
CfdOF and start an analysis container
.
6. In physics model select options Steady (steady state), Single phase, Incompressible and Viscous with laminar turbulance. 7. In fluid properties
select material water.
to define each inlet and outlet. For the larger inlet use velocity 8. Use icon vx = 500 mm/s, for the smaller inlet use vy = 200 mm/s and for the outlet assume upstream flow pressure is 0 Pa. Thus three conditions are assigned each having ‘inlet’ or ‘outlet’ with appropriate properties and faces. to define all remaining outer faces as walls. Do this in two 9. Again use icon groups; one for section surfaces assuming frictionless ‘slip (inviscid)’ flow and one for all outer tube boundaries assuming friction ‘no-slip viscous’ flow. 10. The part is now meshed. Select the fused component in the tree and click icon . Activate mesh utility cfmesh and then ‘Write mesh case’ and ‘Run mesher’. It will try to mesh the problem, but may return an error (There are no cells in the mesh!). Try these two commands again with progressively smaller base element size until it works. By default cfmesh tries to have at least 3 elements in the thickness direction, so a size of 0.3 to 0.4 mm should work. Alternatively, it could be meshed with one element through the thickness and treated as a 2D analysis using a method shown in Exercise E.T14c. 11. The mesh is inspected with ‘Load surface mesh’ and if satisfactory accepted. CFD meshes are usually much finer than mechanical FE analysis models so phenomena like turbulence can be captured. 12. Finally, initial conditions must be set with icon Initialise field . Use potential flow for velocities and pressure at the outlet for pressures. Analysis and some results by activating ‘Write’ and then ‘Run’. Before 1. A problem is run with icon running you might want to change some analysis parameters in the Data tab like maximum iterations, number of processors, analysis sub-directory, etc. 2. Analysis progress is monitored by a plot of residuals that automatically opens and is continuously updated. The problem will stop if all residuals reduce to 379
Tutorial T14. CFD: FV method, OpenFOAM installation and examples
the default convergence limit 10−4 , but usually results are satisfactory once residuals have sufficiently reduced and are reasonably continuous.
3. Results of a running job can be inspected at any time by starting ParaView from the run panel in FreeCAD. Below are some key commands and a contour plot of velocity showing turbulent flow. selection of contout type and component
selection of states (time) and animation
viewing perspectives, otherwise done via mouse operations
to apply a view
max velocity viewing options
380
T14.4. Exercise E.T14b: Laminar flow and 3D modelling of the ‘T’ tube joint
4. Another useful plot option are flow streamlines with key operations shown below. A line, or better the sphere (point cloud) option is positioned at an area of interest, from which seeds are created and flow lines computed and plotted. Line lengths, intensity and contour type can be changed. plot streamlines
selected streamline section
new item to apply and view
options to select section for creation of streamlines and their intensity
T14.4
Exercise E.T14b: Laminar flow and 3D modelling of the ‘T’ tube joint
Flow in a pipe or any section can be either laminar or turbulent. Laminar flow passes smoothly in layers along surfaces with each fluid particle having a regular path, while turbulent flow involves eddies and lateral flow. Typically laminar flow occurs at low velocity with a transition to turbulent flow at higher velocities. The state of flow of a fluid can be quantified by Reynolds dimensionless number Re , which represents a ratio of fluid inertia to viscous forces given by the relation Re =
ρuDH µ
(T14.2)
where ρ is liquid density, u is flow velocity, DH is hydraulic diameter (e.g DH in a fully filled round pipe is its diameter) and µ is fluid dynamic viscosity. Generally flow is laminar for Re < 2300, transient for 2300 < Re < 4000 and turbulent for Re > 4000. This quantity is important since turbulent flow is inefficient and can potentially damage hydraulic systems. 381
Tutorial T14. CFD: FV method, OpenFOAM installation and examples
In this example maximum flow velocity at the junction of the two pipes can be estimated as sum of inlet velocities 0.5 m/s + 0.2 m/s giving Re ≈ 14000. Therefore in this region turbulent flow occurs. In reality flow where the two pipes merge is complex and a better estimate of velocity would be available from flow analysis. Two exercises are suggested: 1. Try tutorial T.T14a to create laminar flow at the ‘T’ joint. The easiest is to maintain the same setup and to reduce the fluid inertia (or increase its viscosity) to lower Re . Inertia can be reduced via velocity or mass. A convenient way that allows direct comparison with Tutorial T.T14a is to artificially reduce fluid density (mass) using 10 kg/m3 and/or 100 kg/m3 . Both should show laminar flow with the latter being close to turbulent. 2. Try redoing tutorial T.T14a as a 3D problem using intersecting solid cylinfor the pipes. The following are results after 1000 iterations showing ders streamlines with contours of maximum velocity. Streamlines are computed in ParaView using a seed type ‘Point cloud’ that creates a sphere that can be dragged to the area of interest. Sphere radius and number of points are then adjusted to obtain a desired view.
T14.5
Exercise E.T14b: Additional exercises
Several excellent tutorials using OpenFOAM in FreeCAD are provided in reference [94] which are recommended for further study. This reference provides pdf descriptions of model building, analysis and interpretation of results. Also, FreeCAD datasets for geometry and macros to create entities are provided, so only meshing operations are necessary for them to run. Based on these tutorials some further analyses to try are: 1. Set-up and run Tutorial 1 from reference [94]. This considers 2D flow of air around a bend (elbow) with an additional inflow pipe. Calculation of 382
T14.6. Exercise E.T14c: 2D high velocity flow over an airfoil
Reynolds number from Equation T14.2 and the simulation show flow is laminar. Try increasing the input velocities by 100 times to create turbulence.
2. Set-up and run Tutorial 3 from reference [94]. This demonstrates useful options for local mesh refinement, which can be important to help capture turbulence in critical flow regions.
T14.6
Exercise E.T14c: 2D high velocity flow over an airfoil
A 2D high velocity simulation of air flow over an airfoil is performed. Steady state (stationary) laminar flow is assumed, with the air treated as inviscid (which is strictly not correct) and compressible. For the interested reader this is similar to a study in the CalculiX manual [53]. This can be run using a windows based platform to run and post-process these models that is available from the download in reference [95] using the launcher.exe, with datasets in reference [52] under the link ‘large fluid test examples for the Finite Volume Method’. In the following OpenFOAM in FreeCAD is used since it is a far better choice for this type of analysis. The following very briefly describes steps to build and run an airfoil flow analysis: 1. Standardised airfoil geometries from the National Advisory Committee for Aeronautics (NACA) [96] are available and can be generated in reference [97]. From this reference the dat file for airfoil type NACA0012 can be cut and stored as a .dat file. This file is then edited to be continuous with only one text header line. 2. The airfoil data has a unit length of 1.0, which will be read into FreeCAD as 1 mm. This must be scaled using a macro available in the Addon manager. 383
Tutorial T14. CFD: FV method, OpenFOAM installation and examples
Start a new FreeCAD session and open the Addon manager. Load the macro airfoil import and scale. Use this to read in the .dat airfoil file using a scaling of 1000 and the B-spline option for a smooth line. You should obtain the following shape having a new length of 1000 mm.
3. In the Draft workbench draw a rectangle around the airfoil that is then sized in the Data tab to be 3000 mm × 3000 mm and positioned so the foil is roughly central. This will represent surrounding air. Make sure in the Data tab it is set to face. This region of air is small to limit problem size, usually it should be about ten times the part characteristic length to avoid interaction of boundary and part airflow. 4. In the Part workbench perform a boolean XOR operation remove the airfoil from the rectangle. 5. Extrude the new XOR surface 50 mm using
to separate and
to obtain a 3D geometry.
6. Open the CFD workbench CfdOF and start an analysis container . Use steady state analysis with compressible air. Accept all default material properties for 20➦C temperature and 1 atm pressure. Different properties would be used for different temperatures and altitudes. to set an inlet for the inflow face with velocity (e.g. 100 m/s) 7. Use icon and the three other faces to outlets with pressure 1 atm. The airfoil surface is defined as a frictionless (inviscid) wall. 8. The two section faces are defined separately as boundary type ‘Constraint’ and sub-type ‘2D bounding plane’; this allows 2D meshing of the problem in the next step. 9. Mesh using the cfmesh mesher with option for 2D and a 10−15 mm base element size. In ParaView a regular solid mesh with only one element through the thickness should be visible.
384
T14.6. Exercise E.T14c: 2D high velocity flow over an airfoil
10. Finally, initial conditions are set with icon Initialise field . Use potential flow for velocities and pressure at the outlet for pressures. 11. Analyses are straightforward to run and evaluate. Below are typical results of velocity for the standard airfoil and one having a 10➦ angle of attack. This incline is easily made by rotating the airfoil geometry 10➦ in the Data tab and remeshing. Unfortunately these analyses assumed incompressible air behaviour due to a possible bug in the OpenFOAM and FreeCAD version used for compressible fluids. In Tutorial 4 of reference [94] a far more exciting aeronautical flow problem is presented that also mentions how to compute lift and drag caused by airflow.
385
BIBLIOGRAPHY
[1] A finite element primer. NAFEMS, 2003. [2] B. A. Finlayson. The method of weighted residuals and variational principles. Academic Press, 1972. [3] M. Crouzeix and P.A. Raviart. Conforming and nonconforming finite element methods for solving the stationary stokes equations. RAIRO S´er. Rouge, 7, 1973. [4] M.J. Turner, R.W. Clough, H.C. Martin, and L.J. Topp. Siffness and deflection analysis of complex structures. J. Aero.Sci., 23(9):805–823, 1956. [5] J.H. Argyris. Some results on the free-free oscillations of aircraft type structures. In IUTAM Symposium on linear vibrations, Revue de la Societe Francaise de Mechanique, Paris, 1965. [6] O.C. Zienkiewicz. The finite element method in structural and continuum mechanics. McGraw-Hill, London, 1967. [7] O.C. Zienkiewicz, R. Taylor, and J.Z. Zhu. The Finite Element method: Its basis and fundamentals. Butterworth-Heinemann, Oxford, 2013. [8] G. Subramanian and C. Jeyachandra Bose. Convenient generation of stiffness matrices for the family of plane triangular elements. Computers & Structures, 15(1):85 – 89, 1982. [9] B.M. Irons and O. C. Zienkiewicz. The isoparametric finite element system – a new concept in finite element analysis. Proc. Conf. Recent Advances in Stress Analysis, Royal Aeronautical Society. London, 1968. [10] S.S. Rao. The finite element method in engineering. Pergamon Press, 1982. [11] S. Ahmad, B.M. Irons, and O.C. Zienkiewicz. Analysis of thick and thin shell structures by curved finite elements. Int. J. Numerical Methods in Engng, 2, 1970. [12] E.N. Dvorkin and K.J. Bathe. A continuum mechanics based four-node shell element for general nonlinear analysis. Eng. Comput., 1984. 386
Bibliography
[13] T. Belytschko, J.I. Lin, and C.S. Tsay. Explicit algorithms for the nonlinear dynamics of shells. Computer Methods in Applied Mechanics and Engineering, 42, 1983. [14] T. Belytschko and C.S. Tsay. A stabilization procedure for the quadrilateral plate element with one-point quadrature. International Journal for Numerical Methods in Engineering, 19, 1983. [15] R.D. Cook, D. S. Malkus, M. E. Plesha, and R. J. Witt. Concepts and applications of finite element analysis. John Wiley and Sons, Inc., 2002. [16] K.J. Bathe. Finite element procedures. Prentice Hall, India, 2007. [17] K.J. Bathe and E.L. Wilson. Stability and accuracy analysis of direct integration methods. Eartquake engineering and structural dynamics, 1:283–291, 1973. [18] Newmark-beta method. https://en.wikipedia.org/wiki/Newmark-beta_ method. [Online; accessed 17-April-2020]. [19] H. M. Hilber, T. J. R. Hughes, and R. L. Taylor. Improved numerical dissipation for time integration algorithms in structural dynamics. Earthquake Eng. and Struct. Dynamics, 5:283–292, 1977. [20] T.J.R. Hughes. Unconditionally stable algorithms for nonlinear heat conduction. Computer Methods in Applied Mechanics and Engineering, 10(2):135 – 139, 1977. [21] C. Lanczos. An iteration method for the solution of the eigenvalue problem of linear differential and integral operators. Journal of Research of the National Bureau of Standards, 45(4):255–282, 1950. [22] A.K. Pickett. Introduction to process and mechanical modelling of engineering composites: Part 1. Fundamentals. Author on Amazon KDP, 2nd edition, 2022. [23] D. J. Benson and J. O. Hallquist. A single surface contact algorithm for the postbuckling analysis of shell structures. Computer Methods in Applied Mechanics and Engineering, 78(2):141–163, 1990. [24] T. Belytschko and M.O. Neal. Contact-impact by the pinball algorithm with penalty and lagrangian methods. Int J Numer Methods Eng, 31(3):547–572, 1991. [25] N. G. Bourago and V. N. Kukudzhanov. A review of contact algorithms. The Institute for problems in mechanics of RAS, Moscow. http://ipmnet.ru/ ~burago/papers/cont-e.pdf, 2005. [26] R. W. Lewis, K. Morgan, H. R. Thomas, and K. N. Seetharamu. The finite element method in heat transfer analysis. Wiley, 1996. [27] Wikipedia. Finite strain theory, https://en.wikipedia.org/wiki/Finite_ strain_theory, [Online; accessed 30-January-2021]. 387
Bibliography
[28] R. S. Rivlin. Large elastic deformations of isotropic materials. IV. Further developments of the general theory. Philosophical Transactions of the Royal Society of London Series A, 241(835):379–397, October 1948. [29] O. H. Yeoh. Some forms of the strain energy function for rubber. Rubber Chemistry and Technology, 66(5):754–771, 1993. [30] R. W. Ogden. Large deformation isotropic elasticity - On the correlation of theory and experiment for incompressible rubberlike solids. Proceedings of the Royal Society of London Series A, 326(1567):565–584, February 1972. [31] Yeoh (hyperelastic model). https://en.wikipedia.org/wiki/Yeoh_ (hyperelastic_model). [Online; accessed 30-January-2021]. [32] M. Rackl. Curve fitting for Ogden, Yeoh and Polynomial models, ScilabTEC, 7th International Scilab Users Conference, Paris, France, 2015. [33] R. Hill. The mathematical theory of plasticity. Oxford University Press, 1950. [34] W. Prager. An introduction to plasticity. Addison-Wesley, Amsterdam, 1959. [35] W. Johnson and P.B. Mellor. Engineering plasticity. Ellis Horwood, 1973. [36] G. C. Nayak and O. C. Zienkiewicz. Elasto-plastic stress analysis. A generalization for various contitutive relations including strain softening. International Journal for Numerical Methods in Engineering, 1972. [37] K. Krabbenhøft. Basic computational plasticity. Department of Civil Engineering, Technical University of Denmark, http://homes.civil.aau.dk/ lda/Continuum/Plast.pdf, 2002. [38] Compaison of CAD codes. https://en.wikipedia.org/wiki/Comparison_ of_computer-aided_design_software. [Online; accessed 29-August-2020]. [39] FreeCAD GitHub. https://github.com/FreeCAD. [Online; accessed 30August-2020]. [40] FreeCAD homepage. http://www.freecadweb.org/. [Online; accessed 30August-2020]. [41] Salome homepage. https://www.salome-platform.org/. [Online; accessed 30-August-2020]. [42] Comparison of FE codes. https://feacompare.com/. [Online; accessed 09March-2020]. [43] Comparison of FE codes. https://en.wikipedia.org/wiki/List_of_ finite_element_software_packages. [Online; accessed 02-October-2020]. [44] Comparison of numerical analysis codes. https://en.wikipedia.org/ wiki/Comparison_of_numerical-analysis_software. [Online; accessed 02-October-2020]. [45] E. Coman, M.W. Brewster, S.K. Popuri, A.M. Raim, and M.K. Gobbert. A Comparative Evaluation of Matlab, Octave, FreeMat, Scilab, R, and IDL on Tara. http://profs.scienze.univr.it/~caliari/pdf/octave.pdf, 2015. [Online; accessed 02-October-2020]. 388
Bibliography
[46] GNU Octave. https://www.gnu.org/software/octave/index. [Online; accessed 24-December-2020]. [47] FreeCAD download. https://wiki.freecadweb.org/Download. [Online; accessed 07-October-2020]. [48] FreeCAD getting started. https://www.freecadweb.org/wiki/Getting_ started. [Online; accessed 30-August-2020]. [49] FreeCAD information, tutorials and videos. https://howtolearn.me/ getting-started-with-freecad/. [Online; accessed 30-August-2020]. [50] Gmsh website. http://gmsh.info/. [Online; accessed 30-August-2020]. [51] Netgen website. https://ngsolve.org/. [Online; accessed 30-August-2020]. [52] CalculiX website. http://www.dhondt.de/. [Online; accessed 30-August2020]. [53] G. Dhondt. CalculiX-CrunchiX user’s manual version 2.19, http://www. dhondt.de/ccx_2.19.pdf, December 2021. [54] CalculiX in FreeCAD. http://www.freecadweb.org/wiki/FEM_CalculiX. [Online; accessed 30-August-2020]. [55] FreeCAD commands for CalculiX. http://freecadweb.org/wiki/FEM_ Module. [Online; accessed 30-August-2020]. https://sourceforge.net/ [56] SourceForge website for CalculiX codes. projects/calculixforwin/. [Online; accessed 15-April-2020]. [57] bConverged website for CalculiX codes. http://www.bconverged.com/ download.php. [Online; accessed 15-April-2020]. [58] K. Wittig. CalculiX-GraphiX (CGX) user’s manual version 2.19, http:// www.dhondt.de/cgx_2.19.pdf, December 2021. [59] G. Schafer and T. Cyders. The Freemat 4.0 Primer. https://stuffle. website/references/FreematPrimerV4e1-1.pdf, August 2011. [60] A. Norman. FreeMAT tutorials, YouTube. https://www.youtube.com/ playlist?list=PL04PA2q0LfJI4kLcW0EKQcetWZd4q5bBP, 2020. [Online; accessed 24-April-2020]. [61] FreeMAT website. http://freemat.sourceforge.net/. [Online; accessed 21-April-2020]. [62] FreeMAT on Sourceforge. http://freemat.sourceforge.net/. [Online; accessed 30-August-2020]. [63] CalculiX: Periodic boundary conditions example. https://github.com/ mkraska/CalculiX-Examples/tree/master/RVE/Periodic/. [Online; accessed 03-April-2020]. [64] Aerospace Engineering. downloads/.
http://aerospaceengineeringblog.com/
389
Bibliography
[65] M. Goland and E. Reissner. The stresses in cemented joints. Journal of Applied Mechanics, 11:A–17–A–27, 1944. [66] Aluminium Alloy 7075-T6, Wikipedia, the free encyclopedia. https://en. wikipedia.org/wiki/7075_aluminium_alloy. [Online; accessed 05-March2020]. [67] T. Zhao and Y. Jiang. Fatigue of 7075-T651 aluminum alloy. International Journal of Fatigue, 30(5):834 – 849, 2008. [68] Department of Defense, US. Department of defense handbook, Metallic materials and elements for aerospace vehicle structures, MIL-HDBK-5J, 31 January 2003. [69] FreeCAD tutorial on a bimetallic strip (in German), YouTube. https://www. youtube.com/watch?v=Qbif13e2iyo. [Online; accessed 14-March-2020]. [70] Melamine tableware. http://www.plastiquarian.com/styr3n3/pqs/pq32. htm. [Online; accessed 16-March-2020]. [71] Liquid Injection Molding Simulation (LIMS). University of Delaware, https: //sites.udel.edu/lims/, 2019. [72] FreeCAD tutorial on using the workbench sketcher (in English), YouTube. www.youtube.com/watch?v=gbNg3mzm84s. [Online; accessed 28-March2020]. [73] S.P. Timoshenko and J.M. Gere. Theory of elastic stability. McGraw Hill, 1961. [74] LS-DYNA. Livermore Software Technology Corp, USA. [75] PAM-CRASH. ESI Group, Paris, France. [76] Abaqus-explicit. Simulia, Dassault Systems, France. [77] Anthony G. Collins and Robert L. Johnson. Finite-element method for water-distribution networks. Journal (American Water Works Association), 67(7):385–389, 1975. [78] Anthony G. Collins. Documentation of feaps - finite elements applied to pipe systems. Fritz Laboratory Reports, Paper 2096, June 1982. [79] Hassan Mageid, Abdel Hago, and Isam Abdel-Magid. Analysis of pipe networks by the finite element method. Water International - WATER INT, 16:96–99, 01 1991. [80] Wikipedia article to OpenFOAM. https://en.wikipedia.org/wiki/ OpenFOAM. [Online; accessed 01-December-2020]. [81] J.D. Anderson. Computational fluid dynamics. McGraw-Hill Education, 1995. [82] NASA 3D Navier-Stokes Equations. https://www.grc.nasa.gov/www/k12/airplane/nseqs.html. [Online; accessed 01-February-2022]. [83] M. Owkes. A guide to writing your first CFD solver, https://www.montana. edu/mowkes/research/source-codes/GuideToCFD.pdf, 2017. 390
Bibliography
[84] CFD online. https://www.cfd-online.com/Wiki/Lid-driven_cavity_ problem. [Online; accessed 01-February-2022]. [85] S.V. Patankar. Numerical heat transfer and fluid flow. CRC Press, 1980. [86] H. Versteegand and W. Malalasekera. An introduction to computational fluid dynamics: The finite volume method. Pearson, 2007. [87] O. Aaron. Numerical solutions for 1D conduction using the finite volume method. Published on Research Gate, 2017. [88] OpenFOAM: The open source CFD toolbox. https://www.openfoam.com/. [Online; accessed 02-December-2020]. [89] OpenFOAM users guide, Version 8. http://foam.sourceforge.net/docs/ Guides-a4/OpenFOAMUserGuide-A4.pdf, July 2020. [Online; accessed 28December-2020]. [90] ParaView download. https://www.paraview.org/download/. [Online; accessed 07-October-2020]. [91] blueCAPE: FS Dynamics. https://bluecfd.github.io/Core/Downloads/. [Online; accessed 02-February-2022]. [92] cfMesh: A Library for Automatic Mesh Generation. https://cfmesh.com/ cfmesh/. [Online; accessed 02-December-2020]. [93] J. Heyns, O. Oxtoby, and A. Steenkamp. Modelling high-speed flow using a matrix-free coupled solver. 9th OpenFOAM Workshop, Zagreb, Croatia, 23-26 June 2014. [94] OpenSim training tutorials for FreeCAD, CalculiX and OpenFOAM. https: //www.opensim.co.za/training.html. [Online; accessed 01-December2020]. [95] CalculiX download for Windows. https://sourceforge.net/projects/ calculixforwin/. [Online; accessed 09-December-2020]. [96] Wikipedia article to airfoil properties and design. https://en.wikipedia. org/wiki/NACA_airfoil. [Online; accessed 09-December-2020]. http:// [97] National Advisory Committee for Aeronautics (NACA). airfoiltools.com/airfoil/details?airfoil=n0012-il. [Online; accessed 09-December-2020].
391
INDEX
A Assembly: bandwidth, 33 of elements, 21, 31, 177 of loads, 134 B Boundary conditions: essential, 153 heat transfer, 153 mechanical, 21, 34, 138 natural, 153 rigid body modes, 34 Buckling analysis: theory, 119, 306 Tutorial T8, 305 C Codes: CalculiX, 217, 219 CalculiX GraphiX - CGX, 219 FreeCAD, 216, 218 FreeCAD/CalculiX file structure, 220 FreeMAT, 218, 222 Gmsh and Netgen, 219 GNU Octave, 222 MATLAB, 218 OpenFOAM, 373 ParaView, 376 Consistent mass matrix, 137 Constant strain triangle, 50 Contact: explicit codes, 143 general, 139 heat transfer across surfaces, 337 implicit codes, 140
Tutorial T11, 335 D Damping matrix, 131 Direct integration, 112 Dynamic analysis: direct integration, 112 explicit integration, 107 general, 105 Hilber-Hughes-Taylor (HHT), 114 implicit versus explicit, 106, 118 Newmark method, 113 Tutorial T9 - transient, 316 E Element integration: Gaussian quadrature, 74 hourglass modes, 76 locking, 76 Elements: 1D line: for current (voltage) flow, 30 for fluid flow, 30 for heat transfer, 29 general, 28 Tutorial T12 - pipe network, 347 bar: basic relations, 11 direct method stiffness [k], 10 isoparametric formulation, 67 shape function matrix [N ], 12 steady state 1D conduction, 155 steady state 1D heat transfer, 157 strain-displacement matrix [B], 12 beam, 42 gap elements for contact, 140
392
Index higher order, 57 isoparametric: 2D quadratic triangle, 72 2D quadrilateral, 69 3D linear solid, 73 general, 67 plate bending: element formulation, 81 general, 77 shell: general, 77 Tutorial T2, 243 simplex: 2D linear triangle, 60 2D quadratic triangle, 63 3D tetrahedra, 65 general, 58 solid: isoparametric 3D linear, 73 simplex 3D tetrahedra, 65 Tutorial T1 - 3D tetrahedra, 230 triangle: 2D constant strain, 50 2D heat transfer, 167 simplex 2D linear, 60 simplex 2D quadratic, 63 Explicit integration: critical time step, 109, 331, 371 theory, 107 Tutorial T10 - 1D elements, 327 Tutorial T11 - beam with contact, 335
general, 3, 4 guidelines: analysis, 227 general, 223 meshing, 224 modelling, 225 implicit method, 6 verification of results, 36 Finite volume method, 373 Frequency analysis: theory, 126, 297 Tutorial T7, 296 G Galerkin method: for bar element stiffness [k], 18 general, 13, 17 Gaussian quadrature, 74 Green’s theorem, 165 Green-Lagrange strains, 93
H Heat analysis: Tutorial T11 - including contact, 335 Tutorial T5 - thermomechanical, 275 Tutorial T9 - transient HHT, 316 Heat transfer: 3D FE heat transfer equations, 175 analysis: steady state, 176 transient, 176 basic equations, 149 conduction FE equations, 164 F convection FE equations, 170 Fatigue analysis, 264 finite element equations, 153 Field analysis: Galerkin for 2D continua, 164 continuity (conservation), 147 general, 149 general, 146 governing equations, 151 heat transfer, 149 heat capacity FE equations, 174 other possibilities, 180 Rayleigh-Ritz for a bar element, 157 Tutorial T6 - seepage and infusion, 287 Hilber-Hughes-Taylor method, 114 Field equations: Fourier, 152 K Laplace, 153 Kirchhoff plate bending theory, 77 Poisson, 153 Quasi-harmonic, 147 L Finite difference method, 359, 368 Loads: Finite element method: assembly, 134 assumptions, 36 types of mechanical loads, 134 element types, 7 Lumped mass matrix, 137 393
Index M Mass matrix, 137 Material laws: elasticity: anisotropic, 187 description, 187 isotropic, 190 orthotropic, 188 transformations, 190, 192, 193 transverse isotropic, 189 Tutorial T2 - shell analysis, 243 Tutorial T1 - solid analysis, 230 general, 184 hyperelasticity: common models, 196 description, 194 model calibration, 200 testing methods, 197 Tutorial T11, 335 plasticity: description, 203 elasto-plastic relations, 207 flow rules, 207 Tutorial T3, 255 von Mises law, 203 rheological models, 185 Mindlin plate bending theory, 77 N Navier-Stokes equations: energy conservation, 367 general, 363 mass conservation, 364 momentum conservation, 365 solution, 367 Newmark method, 113, 130 Newton-Raphson method, 104, 130 Nonlinearities: general, 90 geometric, 91 material, 194 Newton-Raphson method, 104 stress stiffness matrix [kσ ], 102 tangent stiffness [kT ], 102 Tutorial T3 - geometric/material, 255
S Shape function matrix [N ], 12 Strain-displacement matrix [B]: large displacement, 94 linear, 12 Strain-displacement relations: 1D continua, 11 2D continua, 41 3D continua, 41 T Transformations: 2D, 23 3D, 190 element stiffness, 24 material stiffness, 192 stress and strain, 190 Tutorials: getting started, 218 summary, 215, 216 T1 - 3D solid elastic, 230 T2 - 2D shell elastic, 243 T3 - nonlinear geometric/plastic, 255 T4 - fatigue analysis, 264 T5 - steady state heat transfer, 275 T6 - steady state fluid flow, 287 T7 - frequency analysis, 296 T8 - buckling analysis, 305 T9 - transient heat transfer, 316 T10 - explicit analysis, 327 T11 - hyperelasticity and contact, 335 T12 - hydraulic pipe network, 347 T13 - CFD theory and a FD code, 359 T14 - CFD OpenFOAM examples, 373 U Unit systems, 222 V Variational methods: for bar element stiffness [k], 15 Galerkin and Rayleigh-Ritz, 13 general, 13
P Poisson’s Pressure Equation, 368 394