Quantitative techniques in fire safety engineering 5 U01620 710. Computational fluid dynamics CFD fo - PowerPoint PPT Presentation

1 / 60
About This Presentation
Title:

Quantitative techniques in fire safety engineering 5 U01620 710. Computational fluid dynamics CFD fo

Description:

Quantitative techniques in fire safety engineering 5 (U01620) ... Grids, co-ordinate systems. Interpolation. Numerical issues. Errors and stability. False Diffusion ... – PowerPoint PPT presentation

Number of Views:182
Avg rating:3.0/5.0
Slides: 61
Provided by: desktopser
Category:

less

Transcript and Presenter's Notes

Title: Quantitative techniques in fire safety engineering 5 U01620 710. Computational fluid dynamics CFD fo


1
Quantitative techniques in fire safety
engineering 5 (U01620) 7-10. Computational
fluid dynamics (CFD) for fire
  • Stephen Welch
  • S.Welch_at_ed.ac.uk
  • School of Engineering and Electronics
  • University of Edinburgh

2
CFD for fire lectures (L7-10)
  • Scope
  • L7 Introduction to CFD
  • L8 Introduction to Turbulence Modelling
  • L9 Introduction to Combustion Modelling
  • L10 Introduction to Radiation Modelling
  • General overview and familiarity with some of the
    terms
  • Covering CFD in general but with an eye on fire
    applications

3
Quantitative techniques in fire safety
engineering 5 (U01620) 7. Introduction to CFD
  • Stephen Welch
  • S.Welch_at_ed.ac.uk
  • School of Engineering and Electronics
  • University of Edinburgh

4
Introduction to CFD Scope (1)
  • Governing equations
  • Navier Stokes equations
  • Discretisation of transport equations
  • Finite Volume Methods (FVM)
  • Other methods (FDM, FEM)
  • Grids, co-ordinate systems
  • Interpolation
  • Numerical issues
  • Errors and stability
  • False Diffusion

5
Introduction to CFD Scope (2)
  • Pressure correction methods
  • Numerical solvers
  • Relaxation
  • Convergence
  • Boundary conditions
  • Static pressure boundaries
  • Guidance on use of methods
  • Example application

6
Objective
  • Introduction to terminology
  • Know where to look
  • Know what questions to ask!
  • Grid sensitivity
  • Interpolations schemes
  • Boundary treatments
  • Unstructured
  • Newtonian fluid

7
What is CFD?
  • Most general sense
  • All aspects of computer-based simulation of fluid
    flow phenomena
  • More specifically
  • Computer simulations solving fluid flow
    conservation equations
  • Using established numerical methods for
    second-order partial differential equations

8
Whats the trouble?
  • Partial differential equations
  • Non-linear in all real situations
  • Due to convective acceleration
  • Acceleration associated with change of velocity
    over position
  • Part of cause of turbulence
  • Hard to solve
  • Turbulence
  • Time-dependent chaotic behaviour
  • Effect of time dependent and convective
    acceleration
  • Due to inertia of fluid as a whole
  • Navier-Stokes equations model turbulence properly

9
What do we need it for?
10
What do we need it for?
11
What do we need it for?
12
Navier Stokes system of equations
  • Continuity
  • Momentum
  • Stress tensor
  • Energy
  • NB - repeated subscript implies summation

13
Navier Stokes system of equations
  • History
  • Claude-Louis Navier (1785-1836)
  • French engineer and physicist
  • George Gabriel Stokes (1819-1903)
  • Irish mathematician and physicist
  • 1822
  • Established by Navier

14
Continuity
  • Simple mass balance

? - density u, v, w - velocities
15
Momentum equations
  • Momentum
  • Viscous stress tensor
  • P pressure
  • D dilation term
  • ? viscosity

16
Energy equation
  • Energy
  • h enthalpy

17
Governing equations - Generalised
  • Generalised
  • ? general unknown
  • ? diffusion coefficient
  • s Schmidt/Prandtl number

18
Generalised transport equation
  • Unknown variable, ?
  • ? is a diffusion coefficient
  • S is a general source term
  • For continuity, ? 1, ? 0, S0
  • For momentum, ? u, v, w, ?f(µ), S
  • For energy, ? e (or h), ?k/cp, , Sradiation

19
Notations
  • Cartesian
  • Cylindrical

20
Notations
  • Vector notation
  • Tensor notation

21
Newtonian fluids
  • Stress-strain curve linear and goes through O
  • e.g. water
  • flows, irrespective of forces on it
  • Viscosity f(p,T) only!
  • cf. Non-Newtonian
  • Sand
  • Non-drip paints
  • Oobleck (starch-water mix solid if you squeeze
    it)
  • Glurch (starch-glue-colouring polymerizes)

22
Special forms
  • For low Mach numbers, pressure-density coupling
    can be neglected
  • Incompressible
  • Density varies with temperature only
  • Pressure effects tiny by comparison, of order
    0.01
  • Boussinesq approximation
  • Euler equations
  • Remove viscosity terms
  • Not relevant to fire flows

23
Finite volume method (FVM)
  • Integrate the generalised transport equation
  • Volume, ?
  • Surface, S
  • Foundation of the method
  • Everything that goes in must come out!
  • Conservation properties guaranteed
  • Complex geometries are easily accommodated

24
Other methods Finite Difference
  • Finite difference method (FDM)
  • Easy to formulate
  • Mesh must be structured, i.e. regular
  • Curved meshes transformed to orthogonal
  • Gradient boundary conditions can only be
    approximated, not enforced
  • FVM is an integral version of the FDM
  • Chung (2002) shows how FVM can be formulated from
    FDM

25
Other methods Finite Element
  • Finite element method (FEM)
  • Formulation requires mathematical rigor
  • Complex geometries can be easily accommodated
  • Unstructured meshes allowed
  • No need to transform curved meshes
  • Gradient boundary conditions enforced exactly
  • FVM is a special case of FEM weighted residuals
  • weighting function 1 within cell volume, 0
    elsewhere
  • Chung (2002) shows how FVM can be formulated from
    FEM

26
Discretisation
  • To solve the integral form of generalised
    transport equations first represent field by
    discrete values
  • Nodes in a computational grid
  • Assemble algebraic equations which can be solved
    for the nodal values
  • Other values are undefined and if needed have to
    be obtained by interpolation

27
Discretisation - Example
  • For example, continuity (2D steady-state)
  • In finite difference form

28
Discretisation - Cell location
  • Two principal cell definition methods
  • Grid based (staggered)
  • Nodal value stored at intersection of grid lines
  • Control volume surfaces defined midway between
    grid lines
  • Cell centred (co-located)
  • Construct control volumes and assign central
    nodes
  • Intuitively consistent with integral approach
  • Assume hereafter

j
29
Discretisation Grid structure
  • Structured
  • Unstructured

30
Discretisation Grid structure
  • Two types of grid structure
  • Structured
  • Physical geometry mapped to a regular
    computational space
  • Typically accessed via conventional array indices
    representing physical coordinates
  • Less general, but assume hereafter for simplicity
  • Unstructured
  • Individual cells may be arbitrarily subdivided
  • Control volumes related to each other using an
    array of neighbour pointers
  • Well suited to complex geometries
  • Accuracy of spatial derivatives can be diminished
  • Program data structure complex, not easy to
    vectorise

31
Discretisation Coordinate system
  • Two structured grid coordinate systems
  • Curvilinear
  • Most general
  • Can deal with more complex geometries
  • Equations far more complex and can be
    non-conservative
  • Computational cost of additional terms
  • Hard to make the mesh!
  • Cartesian
  • Mutually orthogonal unit vectors
  • Easier to understand

32
Discretisation Transport Equation
  • Cartesian coordinates
  • A is cell face area
  • V is cell volume
  • Assumes variables are functions of normal
    direction only, for surface integrals
  • Assumes variables are constant in cells, for
    volume integrals
  • Remaining unknowns found by interpolation

33
Interpolation
  • Need a method of approximating the convective and
    diffusive fluxes at cell faces
  • An interpolation technique relates value to nodes
  • At first sight would seem best to use linear
    interpolation, i.e. central differencing
  • Stable for 2nd derivatives (diffusion terms)
  • May be unstable for 1st derivatives (convection
    terms)
  • Particular problem at high Reynolds numbers

34
Interpolation Example
  • Considering 1D convection/diffusion equation
  • Where
  • G mass flow
  • D diffusive flow
  • E, P, W are nodal values

35
Interpolation Central Differencing
  • Using linear interpolation for convective terms
  • Assuming uniform mesh spacing

36
Interpolation Central Differencing
  • Algebraic equations can be solved if coefficient
    matrix is diagonally dominant
  • All coefficients need to be same sign (i.e.
    positive)
  • AP must be greater than neighbour coefficients
  • Diffusion coefficients unconditionally positive
  • Mass flux terms may be negative if
  • Peclet number is a grid Reynolds number
  • Only satisfied if ?x small

37
Interpolation Upwind Differencing
  • Allow flow to be influenced only by conditions
    upstream (pig pen theorem)
  • All coefficients unconditionally positive
  • Diagonal dominance
  • Unconditionally stable

38
Interpolation Hybrid Differencing
  • Upwind is stable but can be inaccurate for
    non-convection dominated flows
  • Use Central up to Peclet number limit and Upwind
    thereafter
  • Good choice for low speed flows

39
Errors and stability
  • Two sources of numerical error
  • Computer round-off
  • Truncation errors
  • If not limited, solution may be
  • Unstable
  • Spurious oscillations

40
Perturbation analysis
  • Convection-diffusion equation
  • AP lumps all terms related to nodal variable,
  • S is for neighbours
  • For stability errors must decay
  • AP lt 0
  • Implies negative feedback
  • For diffusion term
  • For convection term
  • Hence no damping, and errors can arise

41
False diffusion
  • First-order upwind schemes have a second-order
    truncation error
  • Substituting back into convection term truncation
    error contributes additional diffusion
    coefficient of
  • Need to be sure this term is ltlt real diffusion
  • Very dependent on bulk flow direction
  • Errors worst when grid lines at 45o to bulk
    convective flow
  • Take care in setting up problem

42
Interpolation higher order
  • Higher-order schemes reduce truncation error
  • Expanding the second-order truncation error
  • Problems
  • Not conservative in FVM
  • Can be unstable (no damping effect from
    truncation term!)
  • TVD flux-limited second-order scheme (Van Leers)
  • Third-order scheme, QUICK
  • Conservative, but more cumbersome and may be
    unstable

43
Interpolation higher order
  • Higher-order schemes inherently
  • More unstable
  • Overshoot where there are steep gradients
  • Fitting a curve with a polynomial of finite order
  • Impossible to get an exact match at corners
  • Can mitigate by adjusting diffusion
  • Introducing artificial diffusion
  • Problem is in knowing how much to add!
  • Combining higher and lower order schemes
  • Using a blending factor
  • Shown to work but at additional computational cost

44
Interpolation summary
  • Define normalised variables
  • Where
  • C is downstream node
  • D is upstream node
  • U is next upstream node
  • Hence Giving

45
Discretisation Scalar Transport
  • Expand into form suitable for numerical solution
  • Each cell face term substituted from appropriate
    differencing scheme
  • Mass flux linear
  • Diffusion central
  • Convection - upwind

46
Discretisation Scalar Transport
  • Algebraic equation for steady-state flow
  • Coefficients, A, contain contributions from
  • Convection terms
  • Diffusion terms
  • Transported source term, S, may be non-linear
  • Chemical rates
  • Radiative loss (?T4)
  • Hence requires special attention linearisation
  • Time splitting (or lagging)
  • Newton-Raphson

47
Discretisation Momentum
  • Analogous procedure to scalar transport equation
  • Equations are all non-linear and closely coupled
  • Discretisation of pressure derivative term gives
    rise to unique problem
  • Pressure decoupling
  • pi,j cancels so there is no link to nodal value
  • Chequer boarding
  • Two solutions
  • Staggered grid
  • Momentum interpolation

48
Staggered Grid
  • Exploits fact that there is no need to use same
    control volumes for all variables
  • Store velocities on faces
  • More complex code
  • especially for boundary conditions!

49
Colocated Grid
  • Exploits efficiencies in storing all variables at
    same place (cell centre)
  • Can use same code routines for all variables
  • Consistent with curvilinear grids
  • Relies on an interpolation procedure
  • Velocity terms modified by a third-order
    derivative of pressure (Rhie Chow, 1982)
  • Artificial damping thereby introduced

50
Pressure equation
  • Pressure is derived from an equation of state
  • Variations are small, but still important in
    driving flow
  • Fundamental problem in solving discretized
    equations
  • Velocity and pressure in momentum equation
    interact
  • equations are very tightly coupled!
  • Concept of pressure correction
  • Most popular for incompressible flows

51
Pressure correction
  • Iterative procedure for solving momentum
    transport equations
  • Guess a pressure field
  • Solve momentum equations to obtain approximate
    velocity field
  • Correct the approximate velocity and pressure
    fields such that continuity is satisfied
  • SIMPLE (Patankar Spalding)
  • Correction to velocities obtained by subtracting
    approximate and exact pressure equations, i.e.
    determining pressure correction terms

52
Pressure correction
  • Improved methods
  • SIMPLEC (SIMPLE Consistent)
  • Faster convergence
  • Many other variants (subject of a lot of
    research)
  • Time-dependent algorithms
  • SIMPLER (SIMPLE Revised)
  • PISO (Pressure Implicit Split Operator)

53
Numerical solvers
  • Direct solution of full matrix of solution
    variables is computationally intractable, so
  • Segregate solution variables and solve each in
    turn
  • Subdivide computational space
  • Coefficient matrix has a diagonal structure
  • Due to each node referencing only a small number
    of neighbours
  • Allows some memory savings

54
Relaxation and convergence
  • Equations need to be under-relaxed
  • Solution would diverge
  • Not too much, or solution may freeze!
  • Convergence assessed by examining residuals
  • Normalised numerical errors
  • Generally require progressive reduction in
    errors, stability of values and achieving certain
    minimum error (e.g. 0.1 mass imbalance)

55
Boundary conditions
  • Require values on all boundaries for solution
  • Fixed values at inlets
  • Dirichlet boundary conditions
  • Gradients elsewhere
  • Neumann boundary conditions
  • To avoid over constraining a problem
  • Mirror symmetry boundaries
  • Used to reduce size of simulation domain
  • Half
  • Quarter

56
Guidance on use of codes
  • Cox Kumar (2003)
  • Resist temptation to do 2D simulations
  • Choose mesh appropriate to main features of flow
  • Keep cell aspect ratio lt50
  • Demonstrate insensitivity to mesh resolution
  • Try to use higher order schemes to improve
    accuracy
  • Demonstrate insensitivity to numerical timestep
  • Solved variable residuals lt1
  • Residuals progressively decreasing (may
    oscillate)
  • Solved variable values at monitoring points
    stable
  • Global heat and mass balance should be gt99

57
Advanced fire applications
  • Distributed burning
  • Fires are often ventilation controlled and
    combustible volatiles may finally oxidise well
    outside an enclosure
  • Heat source models are poor representations
  • Smoke concentrations
  • Strong coupling of smoke production, radiative
    heating and combustion
  • Temperature-dependent material properties
  • Extending up to fire temperatures!
  • Moisture/intumescent effects

58
Pros and cons of CFD
  • Pros
  • Fine detail
  • High accuracy
  • Versatile
  • Less assumptions
  • Complex geometries
  • Transient phenomena
  • Fully coupled
  • Cons
  • Problem setup mesh
  • Long simulation times
  • Hardware requirement
  • Expertise requirement
  • Post-processing burden

59
References
  • Chung, T.J. Computational Fluid Dynamics,
    Cambridge University Press, 2002
  • Cox, G. Combustion Fundamentals of Fire,
    Academic Press, 1995 (chapters 1, 6)
  • Moss, J.B. Turbulent diffusion flames, chapter
    4 in above, 1995
  • Cox, G. Kumar, S. Modelling enclosure fires
    using CFD, in SFPE Handbook 3rd edition, 2003
  • http//www.cfd-online.com/Wiki/

60
Codes
  • CFD codes list
  • http//www.fges.demon.co.uk/cfd/CFD_codes.html
  • Fire codes
  • http//www.firemodelsurvey.com/
  • SOFIE RANS code
  • http//www.hull.ac.uk/php/331346/sofie.htm
  • NIST Fire Dynamics Simulator (FDS) LES code
  • http//fire.nist.gov/fds/
Write a Comment
User Comments (0)
About PowerShow.com