FALL 2015 Esra Sorgüven Öner ME 333 Fluid Mech. Lab. FALL 2015 Esra Sorgüven Öner
Contents Summary of what we did so far: You have learned how to generate a CFD mesh and execute a CFD analysis with a CFD code. What are we going to do now: Learn what is actually going on inside the code. Learn how to choose the models, discretisation schemes… Estimate the errors involved in your CFD analyses.
Steps in CFD The actual physical phenomena Modeling Discretising Solving Modeling error Discretisation error Numerical error Does the CFD solution really represent the actual phenomena?
Contents 1. Modeling 2. Discretising 3. Solving What is happening in the actual flow? Is the flow compressible? Is the flow turbulent? If so how “turbulent”? Is there only one phase or more? (for example, flow in a condenser) How many chemical species are there? Is there a chemical reaction (like combustion?) 2. Discretising What discretisation method should I choose? FDM, FEM, FVM? Discretisation scheme? UDS, CDS? Order of discretisation? 1st, 2nd, … How should I prepare mesh? Structured, unstructured? How can one judge about the “quality” of a CFD mesh? 3. Solving What kind of a solver should I choose? If iterative, than what is the under relaxation factor?
1. Modeling
The governing equations for a Newtonian fluid with constant r and m in cartesian coordinate system: in cylindrical coordinate system:
Different forms of NS equations Compressible Incompressible Reynolds-Averaged NS (RANS) (for turbulence modeling) With Chemical Reactions Multiphase flows
Compressible NS in integral form
Compressible NS in differential form
Incompressible NS in differential form
Reynolds averaged NS (RANS)
RANS with chemical reactions
RANS for multiphase flows
General form of Governing Equations Mass: Momentum: Energy: Accumulation Convection Diffusion Source
2. Discretization
How can we solve these equations numerically? We have to solve a set of partial differential equations. Equations involve: DISCRETISATION Accumulation Convection Diffusion Source
Example of discretization
Discretization methods Finite Difference Finite Element Finite Volume Nodes Differential form of NS is solved. Derivatives are approximated as differences FEM results in ODE’s Volumes Integral form of NS Fluxes are calculated Inherently conservative Results in algebraic equations
Discretization 1D 2D
Finite Difference 1st order: Backward Forward Central
Backward difference 1st order accuracy Higher order approximations: Backward difference 1st order accuracy Forward difference 1st order accuracy Central difference 2nd ord. Backward diff. 3rd ord. Forward diff. 3rd ord. Central diff. 4th ord.
Discretising 2nd order Derivatives For equidistant grids (ie. Dx remains constant through the whole flow domain) Central 2nd ord. Central 4th ord. Discretising Diffusionterms with central differences:
Example 1D Diffusion – convection problem: Discretize the 1D diffusion-convection equation. In this equation only variable is f. r, u, G are real numbers. Make a grid of 8 points and write the discretized equation for each grid point. How many equations do you have? How many unknowns do you have? How many solutions can you have for this equation set?
Finite Volume Method Steady NS equations in integral form:
Fluxes in FVM
Solver: FVM Mimics the underlying physical conservation principle Rate of change of in the CV = Convection Flux of into CV + Diffusion Flux of into the CV + Rate of Source Creation of in the CV
Algebraic Equations
CFD Mesh
CFD Mesh Components Components are defined in preprocessor Cell = control volume into which domain is broken up computational domain is defined by mesh that represents the fluid and solid regions of interest. Face = boundary of a cell Edge = boundary of a face Node = grid point Zone = group of nodes, faces, and/or cells Boundary data assigned to face zones. Material data and source terms assigned to cell zones. 2D mesh node face cell cell center face cell node edge 3D mesh
Grid Types Unstructured adaptive mesh Small control volume where equations are applied Structured H-mesh inlet periodic Unstructured adaptive mesh exit exit inlet
3. Iterative Solver