Governing equations Flashcards
Newton vs non-Newtonian
Newtonian - shear stress is directly proportional to rate of shear
non-Newtoninan - viscosity is a function of shear rate
What is CFD?
Combo of applied maths, computer science & fluid mechanics
CFD pros & cons
A: relatively cheap, detailed & consistent results, for complex problems
D: assumptions, needs validation, approximation
Approaches to analysing a fluid problem
Analytically (pure theory) - simple problem
Experimentally - validates analytical & simulation
Simulation (CFD) - complex problem
Physical principles that govern any fluid flow & what isn’t considered
- Conservation of mass (continuity)
- Conservation of momentum (F=ma)
- Conservation of energy (1st law of thermodynamics, Bernoulli)
- Governed by Navier-Stokes equations (mathematical model)
- Not considering mass diffusion due to concentration gradients/chemically reacting flows
CFD analysis steps
1) Understand physics
2) Mathematical model (equations, BCs, turbulence modelling, near wall models)
3) Numerical model - geometry, mesh generation, FVM, fluid properties
4) Solution - set numerical parameters, solve discretised equations (matrix inversion/iteratively)
5) Post-processing - verify, validate (experiment)
Models of flow
Eulerian (conservation) - CV or element in fixed space
Lagrangian (non-conservation) - CV or element moves such that fluid particles are same (velocity - local velocity)
Body/volume force
act on element at a distance e.g. gravitational, electric, magnetic
Surface force
act on surface of element e.g. pressure (particle collision - thermodynamic pressure) & viscous (shear/normal, friction)
Momentum equation
L4 p22
Transient/unsteady
Convection (transport of fluid in space)
Source/sink (pressure gradient)
Diffusion (transport of fluid due to viscosity)
Body force
Continuity equation in conservation & non-conservation form in different notations
See workbook, L3 p18
Different derivatives & meanings
- substantial/total (net temperature difference due to change in space & time)
- local (temperature change due to change in time at a fixed location)
- convective (temperature change due to movement in space)
Stokes relationship
expresses viscosity in relation to strain
relationship between viscous stresses & velocity gradients
Energy equation
Flow model: fluid element moving with fluid (Langrangian - non-conservation)
rate of change of energy = net heat flux + work done on element
U = Q + W
Laminar vs turbulent
Laminar - viscous dominant over inertial, parabolic curve, NS can be solved numerically
Turbulent - NS only solved for low-Re simple geometry flows
Influenced by Re, surface roughness, geometry, pressure gradients, ambient disturbances (vibrations)
Turbulence flow characteristics
- Irregular fluctuation (but not statistically random, a few % around mean value)
- Enhanced diffusivity (mixing, larger rate of transport of mass, heat, momentum)
- rotational vortex tubes (of different sizes & scales superimposed on each other)
- energy dissipation (viscous shear stress converts kinetic energy of turbulence into internal energy of fluid)
Large vs small eddies
Large - length comparable to flow field e.g. pipe radius, boundary layer thickness
Small - several orders of magnitude smaller than largest eddy but much larger than molecular mean free path, most energy dissipation occurs in smallest eddies
Methods of numerical solution for turbulent flows
- Direct Numerical Solution (DNS) - solves exact N-S eq.s, mesh must be small enough for smallest dissipative scales - for research & low-Re flows (less eddies otherwise need too many cells)
- Large eddy simulations (LES) - solves filtered N-S eq.s, models small scale turbulence (mesh <=resolved turbulence scales) & resolves large turbulence scales by low-pass filtering to remove small-scale info - next generation engineering tools
- Reynolds Averaged Navier Stokes equations (RANS) - empirical turbulence models where instantaneous velocity decomposed into time-averaged (mesh resolves mean flow) & fluctuating component - widely used, CFD solves RANS not NS
Turbulent boundary layer
1) Free stream
2) Viscous region (outer layer, fully-turbulent region/log-layer, buffer layer, viscous sublayer)
3) Wall
Universal velocity profile (law of the wall)
No matter fluid type/boundary layer, velocity profile is universal on graph (close to wall so not as affected by geometry)
How to obtain time-averaged momentum equations
1) Reynolds decomposition - split instantaneous velocity & pressure into mean + fluctuation components
2) Take time averaging
Where do Reynolds/turbulence stresses come from & what are they?
From non-linear convection terms
They’re normal & shear stresses due to turbulence
Why CFD needs validation
- doesn’t solve from 1st principles but from turbulence
- many assumptions
- set up of mesh not physically accurate
- uses discretised equations
What’s the closure problem?
From RANS equations 4 eq.s, 10 unknowns including 6 turbulence stresses (normal & shear stresses)
Transport equations can be derived for Reynolds stresses but more unknowns will appear
Solution: develop empirical turbulent models to approximate turbulence stresses
What is the eddy viscosity concept?
Analogy between viscous & turbulent stresses - both mixing & friction
Viscosity is fluid property
Turbulent viscosity is not, but depends on flow (much greater than viscosity in turbulent flow)
Most turbulence models are based on this concept incl. k-epsilon model & on Prandtl hypothesis
Prandtl hypothesis
Based on dimensional analysis
Turbulent/eddy viscosity can be approximated as characteristic turbulence velocity*turbulence length scale
Different ways of defining turbulence velocity & length scale lead to different turbulence models
How are the model constants obtained in the k-epsilon turbulence model?
Tuned using simple flows & experimental data e.g. near wall flow in local equilibrium/grid generated turbulence
Story of the k-epsilon turbulence model
1) RANS
2) Eddy viscosity concept (Boussinesq hypothesis)
3) Turbulent/eddy visocisty
4) transport equations for k & e
5) model constants
time variation & convection = production - dissipation + diffusion (molecular & turbulent)
Classification of turbulence models
1) Eddy viscosity models - linear/non-linear (add function of strain rate & omega & is bridge between linear & RSMs)
2) Reynolds stress turbulence models (RSMs) - linear/quadratic pressure-strain RSM models (directly solves turbulence stress)
Qualities of a good model
accuracy, simplicity, robustness (numerically), breadth of applications, economic to run, aligns to physics of flow
Why is the physics of flow important when choosing a CFD model?
most models are based on linear eddy viscosity & are developed & calibrated for simple wall shears so some physics of round jet might not be captured by these models - there are additional corrections to models to account for these
Standard k-epsilon vs K-omega SST vs RSM
Epsilon - very robust & economic, most widely used but not most accurate (free stream turbulence not dominating flow behaviour)
Omega - becoming popular as deals with complex flows but more expensive & less robust
RSM - for specific complex flows but very expensive & not robust (difficult to converge) (flow dominated by swirl)
0 equation/algebraic
A: easy to implement, fast calculation, good predictions for simple flows where experimental correlations for the mixing length exist, used as part of some higher-order models
D: incapable of describing flows where turbulent length scale varies (separation/recirculation), only calculates mean flow properties & turbulent shear stress, can’t switch from 1 type of region to another, history effects of turbulence not considered
Usage: derives analytical expressions for turbulent flows, for simple external aero flows, ignored in commercial CFD programs
1-equation model
A: attached wall-bounded flows, flows with mild separation & recirculation, for unstructured codes in aero, in aeronautics for computing flow around plane wings
D: massively separated flows, free shear flows, decaying turbulence, complex internal flows. Can’t rapidly accommodate changes in length scale
Models: Spalart-Allmaras, k-model, Baldwin-Barth
Standard k-epsilon model
A: simple, robust, widely applicable, easy convergence
D: poor for swirling/strong separation/jets/unconfined flows/non-circular ducts. Insensitive to adverse pressure gradient, predicting delayed separation
Usage: only valid for fully turbulent flows, requires wall function implementation, for internal flows, overpredicts production of turbulence in highly strained flows
RNG k-epsilon
Derived with statistics (renormalisation group method) to instantaneous N-S eq.s
Improved predictions for curvature, strain rate, transitional & separated flows, wall heat & mass transfer, vortex shedding but NOT spreading of a round jet
Realizable k-epsilon
satisfies certain maths constraints on Reynolds stresses, consistent with physics of turbulent flows
A: avoids -ve normal stresses & violation of Schwarz inequality for shear stresses, improved e equation, variable c_viscosity
Improved performance for jet spreading, boundary layers, separation, pressure gradient, rotation, recirculation, strong streamline curvature
k-omega
A: better for transitional flows & flows with adverse pressure gradients & separation, numerically very stable, low-Re version more economical
D: not very consistent, sensitive to free-stream boundary conditions
SST k-omega
Combines k-omega (inner boundary layer) & k-epsilon (outer regions), limits shear stress in adverse pressure gradient regions
Avoids freestream sensitivity
Is a wall resolved model so does not need a wall function
Widely used for aerodynamic flows
non-linear turbulence model
- accounts for effects such as
streamwise curvature, impinging jet, anisotropy
not widely used in practice
RSM
- avoids isotropic eddy viscosity assumption
- accurately predicts complex flows by accounting for streamline curvature, swirl, rotation & high strain rates
- includes turbulent pressure-strain interactions & rotation
6 PDEs for each of the 6 independent Reynolds stresses - more expensive & difficult to converge
Near-wall modelling strategies
1) wall-function/standard/high-Re turbulence models - bridges wall & outer region (30<yp+<300) - standard wall function/non-equilibrium wall function
2) wall-resolved turbulence model - directly solves near-wall flow (yp+<1), considers viscous, high strain rate & wall effects - low-Re model/2-layer zonal model (high-Re in ouer & low-Re near wall)
3) Enhanced wall treatment - combines 2-layer zonal model with advanced wall function (1<yp+<30)
Standard wall function
A: economical, robust, reasonably accurate for many applications, widely used
D: adverse pressure gradients, flow separation, strong body force, strong 3D effects near wall region, pervasive low Re e.g. flow through small gap, highly viscous, low velocity flow
Non-equilibrium wall function
- 2 layer-based concept computes k & e
A: log-law of wall made to sensitise pressure-gradient or improved predictions of separation, reattachment, impingement
D: poor for low-Re effects, massive transpiration (blowing, suction), sever pressure gradient, strong body forces, highly 3D flows
low-Re model
not for low-Re flows but for wall-resolved modelling (local Re is low)
A: damping functions to consider viscous effect, high strain rate, wall
D: fine mesh & expensive
2 layer zonal model
Inner: 1-equation low-Re model
Outer layer: high-Re model of choice
- Does not rely on wall functions
- Zones defined by wall-distance-based turbulent Reynolds number
- Flow within boundary layer calculated explicitly
- k-equation solved in viscosity-affected region
- epsilon computed using a correlation for turbulent length scale
- zoning may be dynamic & solution adaptive
D: fine mesh & expensive
Enhanced wall treatment
epsilon-equation
only if mesh too coarse to resolve viscous sublayer
- in fully turbulent region (Re>200) - high-Re mode
- in viscosity affected near-wall region (Re<200) - 1-eq model of Wolfstein
1<yp+<30 but if high accuracy required e.g. heat transfer use y+<1 or y>30
Numerical solution process
Numerical solutions for RANS which are PDEs
1) meshing - divide domain into a grid with nodes
2) discretisation - approximate PDEs using algebraic equations for nodal values of velocity, pressure etc.
3) Solution - solve linearised algebraic equations iteratively
Finite difference method
Taylor series to discretise PDEs
A: can have higher orders of accuracy schemes, easy to apply for simple flow geometry using a structured mesh
D: not straightforward to apply to complex geometry, conservation not guaranteed due to truncation errors
Used in DNS CFD but not commericial CFD
Finite volume method
1) flow domain divided into CVs
2) PDEs integrated over CVs
3) PDEs discretised
4) Obtain set of linear algebraic equations
5) Apply to each CV
6) Solve algebraic equations
A: for complex geometries with structured/unstructured mesh, ensures conservation
D: difficult to apply higher order schemes
Used in commercial research CFD
FVM - how to evaluate source terms
evaluate at cell centre & multiply by volume of cell
FVM - how to evaluate diffusion fluxes
Evaluate gradient at cell faces using central difference based on linear
2nd order & numerically stable
FVM - how to evaluate convection fluxes
mass fluxes through east & west faces
Interpolate nodal values to get values of variable at the cell faces
Scheme to interpolate affects stability & accuracy
Central difference scheme
linear interpolation between phi P & phi E to approximate phi e
phi P & phi E to approximate phi w
L12 & 13 p171
For convection schemes 2nd order but produces oscillatory solutions
First-order upwind scheme
A: always bounded & stable
D: 1st order accuracy so fine grid needed for sufficient accuracy
Second-order upwind scheme
2nd order accurate
not bounded - produces undershoots & overshoots in regions of steep gradients
QUICK
quadratic upwind interpolation for convection kinetics
parabola of 3 points
3rd order accurate
not bounded
Properties of interpolation schemes
- accuracy - truncation errors
- conservativeness - global conservation of fluid property must be ensured (particularly energy & mass)
- boundedness - values predicted should be within realistic/physical bounds
- transportiveness - scheme should reflect process e.g. convection follows flow direction so upstream influence dominates, diffusion works in all directions so upstream & downstream influence diffusion equally
Mesh refinement & higher order scheme minimises false diffusion & improves accuracy
Error in upwind scheme is equivalent to increasing diffusivity - stable but inaccurate
- accuracy requires numerical diffusion «_space;physical diffusion
Difference between space & time coordinates
forcing affects all spatial directions - elliptical
forcing on affects future - parabolic (solutions march in time)
Explicit Euler method
approximate f at initial time
A: cheap
D: 1st order accurate, instable
Courant/CFL number
- requirement for achieving a stability solution
- ratio of time step to time required for flow info to be convected across cell
- time step must be sufficiently small so a fluid element cannot travel more than 1 grid cell length in each time step
- Smaller time step required when mesh is refined
Fully implicit method
- approximate integral using value of f at final time
A: unconditionally stable (may still be unstable if time step too big)
D: first order accurate, requires iterative procedure, must solve large coupled system of equations at each time step, more expensive
Crank-Nicolson scheme
- approximate integral using weighted average of initial & final values of f using trapezium rule
A: 2nd order accurate, larger time steps can be taken whilst retaining acceptable temporal accuracy
D: implicit scheme so requires iterative procedure - Von-Neumann analysis shows it’s unconditionally stable but in practice becomes unstable for very large time steps
Solution methods
1) Pressure-based solvers (U, V, W, P) - incompressible flows - segregated/coupled
2) Density-based solvers (U, V, W, density) - compressible flows - coupled algorithm
What is the pressure-velocity coupling problem?
don’t explicitly have an equation for pressure
Pressure-based solver - segregated - types
SIMPLE (semi-implicit method for pressure-linked equations)
SIMPLER (revised - default but more computational effort)
SIMPLEC (consistent - more computational effort)
PISO (pressure implicit with splitting of operators - initially developed for unsteady flows, involves 2 correction stages)
Solution procedure for pressure-based segregated solver
1) guess a pressure field
2) solve momentum equations for velocity fields (u, v, w) sequentially using this P
3) solve pressure-correction (continuity) equation (mass conservation)
4) calculate correction for velocities
5) update/correct pressure, velocities & mass flux
6) sequentially solve energy, species, turbulence & other scalar equations
7) repeat until convergence
- long solution time (due to pressure correction algorithm) but moderate memory required
How does a density-based solver work?
1) equation of state P = (density, T) links P and density
2) density treated as primary variable & solved from continuity equation
3) P calculated from equation of state
4) solve continuity, momentum, energy & species equations simultaneously
5) solve turbulence & other scalar equations sequentially
6) repeat until convergence
- density appears in continuity equation
- energy equation also needs to be solved for T
- compressible flow when M>0.3
- efficient for compressible flow, especially shock waves
- large memory & computing power but solution time less dependent on mesh density
Solution procedure for pressure-based coupled solver
1) Simultaneously solve system of momentum & pressure-based continuity equations
2) Update mass flux
3) Sequentially solve energy, species, turbulence & other scalar equations
4) Repeat till converged
- more memory but potentially converges faster
Solution of linear algebraic equations
RANS equations are non-linear & coupled
- Direct method - solve all equations at all nodes simultaneously (huge computer resources) - Cramer’s rule matrix inversion, Gaussian elimination (N^3 operations for N equations, store N^2 coefficients)
- Iterative method - solve equations at 1 node, then march through all nodes in solution domain (huge no. of iterations) - Jacobi, Gauss-Seidel (simultaneous storage of only non-zero equations coefficients)
Gauss-Seidel/Jacobi
Gauss-Seidel - latest values of neighbour nodes
Jacobi - previous iteration
- repeat iteration until 2 successive iterations are smaller than convergence criterion/small residuals in equations
- slow convergence with large mesh (global errors reduce slower (low residual reduction) when mesh is fine (large no. of nodes)) > multigrid scheme accelerates convergence
- Gauss-Seidel rapidly removes local (high-frequency errors)
Multigrid scheme
sequence of successively coarser meshes - iterate between solutions on coarse/fine meshes
- global errors reduce faster (less cells in coarse mesh) & less computing resources required, does NOT affect accuracy
Under-relaxation factor
moderate changes in phi to avoid unstable iterations (slow convergence/divergence) due to non-linearity of equations. Use alpha% of phi, otherwise solution may not converge
- small value of alpha ensures convergence but costs more iterations
- no general rules for optimum value of alpha
- different variables require different values of alpha
- Relaxation 1st thing to look at if iteration diverged
Geometry generation
- top-down (cylinders, bricks, spheres)
- bottom-up (create faces & volumes)
- import geometry from CAD/graphics
mesh affects…, mesh is affected by ….
- rate of convergence
- solution accuracy
- CPU time required
- topology
- density
- quality
- boundary layer mesh
- refinement
mesh topology
- triangle/tetrahedron
- quadrilateral/hexahedron/prism
- structured
- unstructured (memory, CPU overhead, more diffusive losing accuracy)
mesh quality
- skewness - angles between edges/faces
- aspect ratio - longest edge length : shortest edge length (<=5:1)
- smoothness (<1.2)
- resolution
- flow alignment (reduces truncation error)
mesh for boundary layer
- laminar - 5 cells
- turbulent wall-function - 30<yp+<300
- viscous sub-layer resolved - yp+=1 & viscous sublayer contains 5 cells, boundary layer has 10-20 cells
mesh resolution
to capture geometry, use finer mesh in regions of shear, swirling flow
- min 5 cells across shear layers
- concentrate mesh around vortex cores
- ensure mesh resolution is sufficient upstream of region of interest
- at least 3 nodes between 2 walls
Why refine mesh?
- improve resolution of flow features
- should not invalidate turbulence model/alter solution
- mesh dependence study
non-conformal mesh
neighbouring cells are not 1 to 1
- for large/moving mesh problems
- interface must be sufficient distanced from region of interest
What is a residual?
error in solving conservation equations
- absolute residual
- scaled residual (relative error) - relative to local value of phi
- normalised error - divide current residual by residual at step N to calculate how it’s reduced relative to previous steps
- global scaled residual - compare with all cells in domain
Residuals monitor - what do you look at?
- convergence for scaled/normalised residual
- monitor changes in value of phi with iterations at critical points in flow
Flow parameter monitoring
- choose parameter at critical point/point of interest in flow field e.g. coefficient of friction
Convergence problems
- check problem setup (BCs, direction of gravity, physical model)
- poor mesh quality, y+ values
- poor initialisation values, especially T/density
- strong coupling of flow & scalar variables e.g. combustion
- solve complex multi-physics problems in stages
- reduce relaxation factors/time step
- use simpler model for initial guess to complex model
Verification
- solve equations right (accuracy of CFD model & implementation/setup)
- machine round-off error (double precision)
- iterative convergence error (truncation error, 1st or 2nd order, convergence criteria)
- discretisation error (mesh dependence study)
Validation
- solve right equations
- input uncertainty - sensitivity analysis (different BCs)
- model uncertainty - turbulence model, compare with experimental results
- qualitative validation - inspect basic flow physics