3-1 ansys, inc. proprietary © 2009 ansys, inc. all rights reserved. april 28, 2009 inventory...

20
3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training Sharif University of Technology Lecturer: Ehsan Saadati [email protected]

Upload: aaliyah-forwood

Post on 16-Dec-2015

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

3-1ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Chapter 3

Solver Basics

Introductory FLUENT TrainingSharif University of TechnologyLecturer: Ehsan [email protected]

Page 2: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-2ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualFLUENT 12 GUI Navigation

• The FLUENT GUI is arranged such that the tasks are generally arranged from top to bottom in the project setup tree.

• Selecting an item in the tree opens the relevant input items in the center pane.

– General– Models– Materials– Boundary

Conditions– Solver Settings– Initialization and

Calculation– Postprocessing

Page 3: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-3ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualScaling the Mesh and Selecting Units• When FLUENT reads a mesh

file (.msh), all physical dimensions are assumed to be in units of meters.

– If your model was not built in meters, then it must be scaled.

– Verify that the Domain Extents are correct after scaling the mesh.

• When importing a mesh under Workbench, the mesh does not need to be scaled; however, the units are set to the default MKS system.

• Any “mixed” units system can be used if desired.

– By default, FLUENT uses the SI system of units (specifically, MKS system).

– Any units can be specified in the Set Units panel, accessed from the top menu.

Define Units…

Page 4: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-4ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualText User Interface• Most GUI commands

have a corresponding TUI command.

– Many advanced commands are only available through the TUI.

– Press the Enter key to display the command set at the current level.

– q moves up one level.

• FLUENT can be run in batch mode or scripted using a journal file (seeAppendix)

• A TUI user guide is available on the FLUENT User Services Centerwww.fluentusers.com

Page 5: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-5ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualMouse Functionality• Mouse button functionality depends on the chosen solver (2D / 3D)

and can be configured in the solver.• Default settings

– 2D Solver• Left button translates/pans (dolly)• Middle button zooms• Right button selects/probes

– 3D Solver• Left button rotates about 2 axes• Middle button zooms

– Middle click on point in screen centers point in window

• Right button selects/probes

• Retrieve detailed flow field information at point with Probe enabled.– Right-click on the graphics display.

• Mouse controls can be set to emulate those in Workbench!

Display Mouse Buttons…

Page 6: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-6ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualMaterial Properties• FLUENT provides a standard

database of materials and theability to create a customuser-defined database.

• Your choice of physical modelsmay require multiple materialsand dictate which materialproperties must be defined.

– Multiphase (multiple materials)– Combustion (multiple species)– Heat transfer (thermal

conductivity)– Radiation (emissivity and

absorptivity)

• Material properties can be directly customized as function of temperature/pressure

– Use of other solution variable(s) requires UDF.

Page 7: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-7ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualMaterials Databases

• FLUENT materials database– Provides access to a number

of pre-defined fluid, solid and mixture materials.

– Materials can be copied to the case file and edited if required.

• Custom material database: – Create a new custom database

of material properties and reaction mechanisms from materials in an existing case file for reuse in future cases.

– Custom databases can be created, accessed and modified from the standard materials panel in FLUENT.

Page 8: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-8ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualOperating Conditions

• The Operating Pressure with a Reference Pressure Location sets the reference value that is used in computing gauge pressures.

• The Operating Temperature sets the reference temperature(used when computing buoyancy forces.

• Specified Operating Density sets the reference value for flows with widely varying density.

Page 9: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-9ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualParallel Processing• Parallel processing can be used to run

FLUENT on multiple processors to decrease turnaround time and increase simulation efficiency.

– Critical for cases involving large meshes and/or complex physics.

– FLUENT is fully parallelized and capable of running across most hardware and software configurations, such as compute clusters or multi-processor machines.

• Parallel FLUENT can be launched either using the system command prompt or using the FLUENT Launcher panel.

– For example, to launch an n-CPU parallel session, use the commandfluent 3d –tn

• The mesh can be partitioned either manually or automatically using a number of different methods.

– Non-conformal meshes, sliding mesh interfaces and shell conduction zones require partitioning in serial.

• A web-based lecture is available on the FLUENT User Services Center.

Page 10: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-10ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualSummary

• This lecture has presented many basic tasks that are often performed during a CFD simulation setup.

• Parallel processing can be used to reduce calculation time. This is advantageous only on large meshes.

• A later lecture contains material related to the setup and solution of time-dependent problems.

• Other topics not discussed (see Appendix for information).– Mesh heirarchy and relationships.– Reordering and modifying the mesh in the solver.– Polyhedral mesh conversion.– Solution-based mesh adaption.

Page 11: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

3-11ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Appendix

Page 12: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-12ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualFLUENT Journals• FLUENT can be run in batch mode using

journal files.• A journal file is a text file which contains

TUI commands which FLUENT will execute sequentially.

• The FLUENT TUI accepts abbreviations of the commands; for example,

– ls Lists the files in the working folder

– rcd Reads case and data files – wcd Writes case and data files – rc/wc Reads/writes case file– rd/wd Reads/writes data file– it Iterate

• TUI commands in a batch file can be used to automate operations in a non-interactive mode.

– The TUI commands file/read-bc and file/write-bc can be used for reading and writing the settings for a FLUENT session to and from a file, respectively.

– A web-based training module is available which explains this process

; Read case filerc example.cas.gz; Initialize the solution/solve/initialize/initialize-flow; Calculate 50 iterationsit 50; Write data filewd example50.dat.gz; Calculate another 50 iterationsit 50; Write another data filewd example100.dat.gz; Exit FLUENTexityes

Sample Journal File

Page 13: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-13ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualReading the Mesh – Zones

• In this example, there are two cell zones (fluid-upstream and fluid-downstream).

• Because of this, FLUENT splits the exterior wall zone into two zones (wall and wall:001). This is because an external boundary cannot span multiple cell zones.

• FLUENT also splits the orifice plate into two walls also (plate and plate-shadow) since the plate zone is an internal wall.

inlet

outlet

wall

plateplate-shadow

fluid (cell zone)

Default-interior zone(s)can always be ignored.

Page 14: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-14ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualMesh Information and Hierarchy• All mesh information is stored in the mesh file.

– Node coordinates– Connectivity– Zone definition

• Similar to the way geometry is defined, mesh entities obey a hierarchy:

– Node Edge intersection / grid point– Edge Boundary of a face (defined by

two nodes– Face The boundaries of cells, defined by

a collection of edges– Cell The control volumes into which the

domain is discretized.– Zone A collection of nodes, edges, faces

or cells.• The computational domain is defined by all

members of the hierarchy– For fluid flow simulation only, the domain consists

only of the fluid region.– For conjugate heat transfer or fluid-structure

interaction problems, the domain needs to include any solid parts that are present.

• Boundary data is assigned to face zones.• Material data and source terms are assigned to

cell zones.

Simple 3D mesh

Simple 2D Mesh

Node

BoundaryFace

Cell

CellCenter

Cell Face

Node

BoundaryFace

Cell

Edge

Page 15: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-15ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualReordering and Modifying the Grid• The grid can be reordered so that neighboring cells are near each

other in the zones and in memory– Improves efficiency of memory access and reduces the bandwidth of the

computation– Reordering can be performed for the entire domain or specific cell

zones.

– The bandwidth of each partition in the grid can be printed for reference.

• The face/cell zones can also be modified by the following operations in the Grid menu:

– Separation and merge of zones– Fusing of cell zones with merge of duplicate faces and nodes– Translate, rotate, reflect face or cell zones– Extrusion of face zones to extend the domain– Replace a cell zone with another or delete it– Activate and Deactivate cell zones

Grid Reorder ZonesGrid Reorder Domain

Grid Reorder Print Bandwidth

Page 16: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-16ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualPolyhedral Mesh Conversion• A tetrahedral or hybrid grid can be

converted to polyhedra in the FLUENT GUI (not in the preprocessor).

– Generate a tetrahedral mesh then convert inside FLUENT.

– Advantages • Improved mesh quality.• Can reduce cell count significantly.• User has control of the conversion process.

– Disadvantages: • Cannot be adapted or converted again.• Cannot use tools such as smooth, swap, merge

and extrude to modify the mesh.

• Two conversion options are available in the Grid menu:

– Convert all cells in the domain (except hex cells) to polyhedra

• Cannot convert meshes with hanging nodes• HexCore mesh can be converted using the tpoly

standalone utility.– Convert only highly skewed cells to

polyhedra

Grid Polyhedra Convert Skewed Cells

Grid Polyhedra Convert Domain

Tet/Hybrid Mesh

Polyhedral Mesh

Page 17: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-17ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualProfile Data and Solution Data Interpolation• FLUENT allows interpolation of selected

variable data on both face zones and cell zones by using profile files and data interpolation files, respectively.

– For example, a velocity profile from experimental data or previous FLUENT run at an inlet, or a solution interpolated from a coarse mesh to fine mesh.

• Profile files are data files which contain point data for selected variables on particular face zones, and can be both written and read in a FLUENT session.

• Similarly, Interpolation data files contain discrete data for selected field variables on particular cell zones to be written and read into FLUENT.

File Profile…Write

File Profile…Read

File Interpolate…

Page 18: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-18ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualMesh Adaption• Mesh adaption refers to refinement

and/or coarsening cells where needed to resolve the flow field without returning to the preprocessor.

– Mark cells satisfying the adaption criteria and store them in a “register.”

– Display and modify the register if desired.

– Click Adapt to adapt the cells listed in the register.

• Registers can be defined based on:– Gradients or isovalues of all variables– All cells on a boundary – All cells in a region with a defined

shape– Cell volumes or volume changes– y+ in cells adjacent to walls

• To assist adaption process, you can:– Combine adaption registers– Draw contours of adaption function– Display cells marked for adaption– Limit adaption based on cell size

and number of cells

Refine Threshold should be set to 10% of the value reported in the Max field.

Page 19: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-19ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualAdaption Example – Supersonic Projectile

• Adapt grid in regions of large pressure gradient to better resolve the sudden pressure rise across the shock.

Initial Mesh (Generated by Preprocessor) Pressure Contours on Initial Mesh

Large pressure gradient indicating a shock (poor resolution on coarse mesh)

Page 20: 3-1 ANSYS, Inc. Proprietary © 2009 ANSYS, Inc. All rights reserved. April 28, 2009 Inventory #002600 Chapter 3 Solver Basics Introductory FLUENT Training

Solver Basics

3-20ANSYS, Inc. Proprietary© 2009 ANSYS, Inc. All rights reserved.

April 28, 2009Inventory #002600

Training ManualAdaption Example – Supersonic Projectile

• Solution-based mesh adaption allows better resolution of the bow shock and expansion wave.

Mesh adaption yields much better resolution

of the bow shock.Adapted cells in locations of large pressure gradients

Adapted Mesh (Multiple AdaptionsBased on Gradients of Pressure)

Pressure Contours on Adapted Mesh