cfd modeling using ansys fluent - learncax · pdf filecfd modeling using ansys fluent course...

20
[email protected] +91 20 4009 8382 www.LearnCAx.com CFD Modeling Using ANSYS FLUENT Course Notes Not for sale. Strictly for private circulation. Published 2015 Inspire, Educate and Mentor engineers globally

Upload: nguyenphuc

Post on 05-Feb-2018

315 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

[email protected] +91 20 4009 8382

www.LearnCAx.com

CFD Modeling Using ANSYS FLUENT

Course Notes Not for sale. Strictly for private circulation. Published 2015

Inspire, Educate and Mentor

engineers globally

Page 2: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

Inspire | Educate | Mentor

www.LearnCAx.com

Lesson 02

Before First Simulation

Page 3: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• The following background knowledge is expected from the candidates:– Familiarity with the UI of ANSYS FLUENT

– CFD numerics and methodology

• By the end of the lecture, you should be able to answer:– What and how to prepare before doing a simulation?

– What can ANSYS FLUENT be employed for?

Across the Table!!

42

© LearnCAx.com : Inspire | Educate | Mentor

• Precision and dimension

• File handling

• Units and geometry scale

• Mesh modifications

• Mesh nomenclature

• Available features

• Support options

Overview

43

Page 4: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

ANSYS FLUENT Launcher

44

© LearnCAx.com : Inspire | Educate | Mentor

• For most cases single precision solvers are sufficiently accurate

• Certain kind of problems need double precision

– If your geometry has features of very disparate length scales

– Mean pressure level is high but pressure driving the flow is small

– For conjugate heat transfer problems involving high thermal-conductivity ratios and/or high-aspect-ratio grids

2d (2D single precision )

2ddp ( 2D double precision)

3d (3D single precision)

3ddp (3D double precision)

Single and double precision solver

45

Page 5: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

File I/O in ANSYS FLUENT

46

© LearnCAx.com : Inspire | Educate | Mentor

Data handling in ANSYS FLUENT

MESH file DATA fileCASE file

U

• Uns. mesh info• Coordinates• Names of nodes/cells

• Uns. mesh info• Problem set-up• Numerical set-up• Display settings

• Dependent variables’values at locationsspecified in the CASE file

• u, v, w, p• T• Yi, k, e, …

47

Page 6: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Reading– Fluent can read files compressed using compress or gzip

– If you select a file with .gz, it invokes gunzip

– If you select file with .Z extension, it invokes zcat

– On Windows, files with only .gz extension can be read

• Writing – To compress the file, append .Z or .gz extension to the file name

– Fluent invokes the appropriate compression tool and gives following message in case you have added .gz• Writing "| gzip -cfv > flow.cas.gz"...

– On Windows, compression can be performed only with gzip. • .gz extension can compress the file

• .Z does not compress the file

Compressed Files

48

© LearnCAx.com : Inspire | Educate | Mentor

• You can include special characters in file name

• Provides shortcut for numbering the files based on various parameters (iteration no., time step etc.)– E.g. : For unsteady calculations, saving file that reflect the time step at

which file is saved

• contours-%t.ps : contours-0001.ps

– E.g. : File name which reflect the number of iteration

• airfoil-%i : airfoil-005.cas

Automatic Numbering

49

Page 7: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

Automatic Saving of Case & Data

50

© LearnCAx.com : Inspire | Educate | Mentor

• Case & Data file can be saved automatically at specified interval during calculation– Useful for time-dependent solution– Useful to see how solution has progressed for steady solution– Case file may or may not be written every time– If Case file undergoes a change, it will always be saved along with the

updated Data file

• To Autosave– File → Write → Autosave

• Frequency for saving case and data– For steady flow number of iterations– For unsteady flow number of time steps

• In case of limited disc space– Use Overwrite Existing File option– Specifies how many maximum files can be written– After saving specified number of files, earliest existing file will be

overwritten

Automatic Saving of Case & Data

51

Page 8: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Specify the root name of file– .cas or .dat will be added automatically– If .gz or .Z is given, files will be written in compressed format– Iteration number/time-step/flow-time automatically appended to the

name, dependent on the choice

Automatic Saving of Case & Data

In case oflimited disk spacePath for

saving

Frequency for file saving

52

© LearnCAx.com : Inspire | Educate | Mentor

• Fluent allows to work in any unit system, including inconsistent unit systems

– You may work in British units with heat input in Watts (SI) OR you may work in SI units with length defined in inches

• This is accomplished by using appropriate conversion factors

• Fluent uses these conversion factors for input and output, internally storing all parameters and performing all calculations in SI units

• Units can be changed during problem setup or after calculation

– If you have completed simulation in SI units but would like to see reports in any other units

– Fluent converts all parameters in specified units and displays results

Unit Systems

Fluent always works in SI units internally and stores all results in SI units

To be considered while generating Profile files, Journal files, UDFs, etc.

53

Page 9: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Four built in unit systems– British, SI, CGS, and

"default''

– You can convert all units from one system to another

– Define → Units

Built-In Unit Systems in FLUENT

Clicking on any system will immediately change all units in selected system

Default is same as SI, but uses degrees instead of radians for angles

All future inputs will be in selected system

54

© LearnCAx.com : Inspire | Educate | Mentor

• Used in case of mixed unit systems– Select quantity, select unit from available list or specify your own

conversion factor

• Before changing any unit, you can list the units of all quantities that are currently used– Press List button in Set Unit form

Customizing Units

55

Page 10: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Some grid generators allow to define set of units for the mesh dimensions

• But when mesh is read into Fluent, it always assumes unit of length as meters

• You can change the unit of grid using

– Mesh → Scale

Geometry/Mesh scaling

56

© LearnCAx.com : Inspire | Educate | Mentor

• To create new unit for selected quantity– Select the quantity in list– Click New to open Define Unit

panel– Set the name of new unit in Unit

field– Conversion factor in Factor field– Offset in Offset field– Click OK

Defining a New Unit

E.g. To use hour as unit of Time : Select Time, Select New, Enter Name as hour, Enter 3600 for factor

57

Page 11: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

Mesh modifications in ANSYS FLUENT

58

© LearnCAx.com : Inspire | Educate | Mentor

• Fluent can import different types of gird

• Operations on grid– Modify the grid by translating or scaling node coordinates

– Partitioning the cells for parallel processing

– Reordering the cells in the domain to decrease bandwidth

– Merging or separating zones

– Adapt grid as per solution

– Diagnostic information on the grid

• Memory usage

• Simplex, topological, and domain information

• Number of nodes, faces, and cells in the grid

• Determine the minimum and maximum cell volumes in the domain

• Check for the proper number of nodes and faces per cell

Operations on Grid

59

Page 12: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Fluent is an unstructured solver – It can accept

• 2D tri and quad

• 3D hex, tet, pyramid, and wedge

• Single and multi-block structured grid

• Hybrid grid

• Grid with hanging nodes

Grid Topology

Hanging Node

60

© LearnCAx.com : Inspire | Educate | Mentor

• When choosing the mesh type, consider the following issues– Setup time – Computational expense

• Setup Time– Creation of structured grid for complex geometries is time consuming if

not impossible• Gives advantage to unstructured mesh

– If geometry is simple, setup time is almost same• Computational Expense

– Mesh generated using unstructured algorithm usually has a very high cell count

• Mesh Quality– Plays an important role in accuracy and stability of the numerical

computation – Attributes associated with mesh quality are

• Node point distribution • Smoothness • Skewness

Choosing the Appropriate Grid Type

61

Page 13: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Why go the hard way: structured mesh?– Grid aligned along the flow direction

• Least numerical diffusion – accurate flow prediction

– Great control over the mesh quality and cell count• Boundary layer capturing

• Why go the easy way: unstructured mesh?– Can capture complex geometry with minimum user intervention– If flow is rapidly changing direction, grid alignment along the flow not possible to

maintain– Fast computational power available

Choosing the Appropriate Grid Type

62

© LearnCAx.com : Inspire | Educate | Mentor

Choosing the Appropriate Grid Type

L-grid type Multi-block Structured Mesh for flow through a Sector

Grid aligned along the flow direction

Unstructured Mesh for flow through a Sector (Octree algorithm)

Grid not aligned along the flow direction

63

Page 14: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• In FLUENT it is possible to use a grid composed of cell zones with non-conformal boundaries

• What is non-conformality ?– Grid node locations are not identical at the boundaries where two sub-

domains meet

Non-Conformal Grids

Completely Overlapping Grid Interface Intersection

Partially Overlapping Grid Interface Intersection

64

© LearnCAx.com : Inspire | Educate | Mentor

• The grid checking capability in FLUENT provides – Domain extents

– Volume statistics

– Grid topology

– Periodic boundary information

– Verification of simplex counters, and (for axisymmetric cases) node position verification with respect to the axis

– Accessible through

• Grid → Check

– It is generally a good idea to check your grid right after reading it into the solver, in order to detect any grid trouble before you get started with the problem setup

Checking the Grid

65

Page 15: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Cell center and Node

• Edge

• Face

• Cell

• Zone or Thread– Collection of faces – Face zone

– Collection of volumetric cells – Cell zone

Mesh terminology in ANSYS FLUENT

66

© LearnCAx.com : Inspire | Educate | Mentor

• 2D planar, 2D axi-symmetric, 2D axi-symmetric with swirl (rotationally

symmetric), and 3D flows

• Quadrilateral, triangular, hexahedral (brick), tetrahedral, prism (wedge), pyramid,

and mixed element meshes with non-conformal interface

• Steady-state or transient flows

• Incompressible or compressible flows, including all speed regimes (low subsonic,

transonic, supersonic, and hypersonic flows)

• Inviscid, laminar, and turbulent flows

• Heat transfer, including forced, natural, and mixed convection, conjugate

(solid/fluid) heat transfer

• Multi-species and User-defined scalar/Additional variable simulation

Basic Modeling capabilities in ANSYS FLUENT

67

Page 16: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Radiation heat transfer modeling, Solar Load Model

• Multiple reference frame (MRF) and sliding mesh options for modeling multiple

moving frames

• Mixing-plane model for modeling rotor-stator interactions, torque converters, and

similar turbo-machinery applications with options for mass conservation and swirl

conservation

• Dynamic mesh model for modeling domains with moving and deforming mesh (IC

Engine simulations, reciprocating pumps, flow induced rotations, etc.)

• Volumetric sources of mass, momentum, heat

• Multiphase flow modeling

• Reacting flow modeling – Kinetics and PDF based combustion models

• Material property database

Advanced Modeling capabilities in ANSYS FLUENT

68

© LearnCAx.com : Inspire | Educate | Mentor

Embedded HELP in ANSYS FLUENT

69

Page 17: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

Content HELP in ANSYS FLUENT

70

© LearnCAx.com : Inspire | Educate | Mentor

Control Panel HELP in ANSYS FLUENT

71

Page 18: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

Model User Guide HELP in ANSYS FLUENT

72

© LearnCAx.com : Inspire | Educate | Mentor

Theory HELP in ANSYS FLUENT

73

Page 19: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

© LearnCAx.com : Inspire | Educate | Mentor

• Required Mesh and related files are available from the ANSYS Customer Portal

Tutorial HELP in ANSYS FLUENT

www1.ansys.com/customer

74

© LearnCAx.com : Inspire | Educate | Mentor

• Familiarity with file formats necessary to start with simulations

• FLUENT processes all data internally in SI unit system

• Appropriate mesh choice necessary for efficient and accurate simulations

• Mesh modifications possible in ANSYS FLUENT to some extent only

• ANSYS FLUENT offers on the fly HELP on theory and software specific topics

Summary

75

Page 20: CFD Modeling Using ANSYS FLUENT - LearnCAx · PDF fileCFD Modeling Using ANSYS FLUENT Course Notes ... Reacting flow modeling Kinetics and PDF based combustion models ... Advanced

[email protected] +91 20 4009 8382

www.LearnCAx.com

Inspire | Educate | Mentor

www.facebook.com/LearnCAx

in.linkedin.com/company/learncax

twitter.com/info_learncax