me 485 introduction to cfd using finite volume method...

89
ME 485 Introduction to CFD using Finite Volume Method Chapter 1 Introduction These presentations are prepared by Dr. Cüneyt Sert Department of Mechanical Engineering Middle East Technical University Ankara, Turkey http://users.metu.edu.tr/csert , [email protected] Please ask for permission before using them to teach. You are not allowed to modify them or share them at another web site. 1-1

Upload: others

Post on 17-Mar-2020

43 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

ME 485 Introduction to CFDusing Finite Volume Method

Chapter 1

Introduction

These presentations are prepared by

Dr. Cüneyt Sert

Department of Mechanical Engineering

Middle East Technical University

Ankara, Turkey

http://users.metu.edu.tr/csert , [email protected]

Please ask for permission before using them to teach.

You are not allowed to modify them or share them at another web site.1-1

Page 2: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

What is CFD?

• CFD is the simulation of fluid flow and related phenomena using computers.

• Heat transfer

• Chemical reactions

• Combustion

• Fluid structure interaction

• Flow induced acoustics

• Electrokinetic effects

• Magnetic field effects

• Etc.

1-2

2D and 3D simulations of a baffled, turbulent reactor using COMSOL

(www.comsol.com)

Page 3: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Simulation of flow over a wind turbine using OpenFOAM(www.youtube.com/watch?v=KTH6yLzb4V0)

Sample CFD Solutions

1-3

Fluid machinery simulation using OpenFOAM(www.youtube.com/watch?v=jZwUA_xnces)

Pelton-wheel simulation using Flow-3D(www.youtube.com/watch?v=lb2xEbHmWKw)

Page 4: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Simulation of wind buffeting on a motorbike using OpenFOAM(www.youtube.com/watch?v=2JVRU1-E-kw)

Sample CFD Solutions (cont’d)

1-4

Simulation of the pilot seat ejection of an aircraft using XFlow(www.youtube.com/watch?v=T7A1cN5_DrM)

Flow over an aircraft landing gear using using Exa PowerFLOW(www.youtube.com/watch?v=-D5N_OnZ_Tg)

Page 5: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Sample CFD Solutions (cont’d)

1-5

Flood simulation using DualSPHysics(www.youtube.com/watch?v=EvSDFRfJToQ)

Simulation of a ship launch using XFlow(www.youtube.com/watch?v=xAMtABXjDmw)

Simulation of water flow around a maneuvering boat using OpenFOAM(www.youtube.com/watch?v=4v60htbd8yk)

Page 6: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-6

Sample CFD Solutions (cont’d)

Air escape through a hospital isolation room using ANSYS CFX(www.youtube.com/watch?v=qGOQ9UmjuYw)

Simulation of the dispersion of a tracer in a water treatment facility using Star-CCM+(www.youtube.com/watch?v=IUxX_ksQ9B4)

Simulation of interior air conditioning of a car using XFlow(www.youtube.com/watch?v=briCp4jotFc)

Page 7: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-7

Sample CFD Solutions (cont’d)

Simulation of electronics cooling using FloTHERM(www.youtube.com/watch?v=CYP_9TM-zjI)

Rocket nozzle startup using an in-house research code(www.youtube.com/watch?v=iO1qvnFR3Wo)

Simulation of air flow over a cyclist using OpenFOAM(www.youtube.com/watch?v=XagSFU7gMLY)

Page 8: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

What is CFD?

1-8

Numerical analysis

Mathematics

Computer science

CFD combines fluid mechanics and numerical analysis.

Engineering(Fluid mechanics & related stuff)

CFD

Page 9: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

What is CFD? (cont’d)

1-9

Fluid mechanics can be studied as …

1. Theoretical

• Helpful to understand the basics & get valuable insight.

• Cheap.

• Requires very strong fundamental knowledge.

• Cannot be applied to real life problems with complicated geometries and complicated physics

• Mostly used in academia, limited usage in the industry.

Page 10: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

2. Experimental

• Provides reliable results.

• Is a ‘‘must’’ in certain industries to finalize a design.

• Costly (initial setup, operation, maintenance, etc.)

• Long preparation time.

• Specialized facilities may not be accessible to everybody.

• Need to minimize experimental uncertainty.

• May have scaling issues.

• Not every problem can be studied experimentally.

What is CFD? (cont’d)

1-10

Fluid mechanics can be studied as …

Page 11: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

3. Numerical (Computational)

• Cheaper than experiments.

• Constantly developing (both hardware & software).

• Highly accessible to more people.

• Flow parameters are controlled easily.

• Non-intrusive.

• Generates huge amount of data.

• Encourages you to be more adventurous in design.

• Not all mathematical models are reliable/accurate.

• Easy to get wrong results. Difficult to estimate errors.

What is CFD? (cont’d)

Fluid mechanics can be studied as …

1-11

Page 12: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

What is CFD? (cont’d)

1-12

• CFD complements (not replaces) theoretical and experimental studies.

• CFD guides the design efforts. It tries to reduce the design & development effort, time and cost.

• In large projects, such as the design of a new aircraft or a hydraulic turbine, CFD is used to guide the experimentsand reduce their number.

• In smaller projects, such as the design of a new pump ora valve, CFD is used to evaluate alternative designs to aselect a final one before even producing and testing thefirst prototype.

Exercise: Read the article ‘‘30 years of Development and Application of CFD at Boeing Commercial Airplanes’’.

Read parts of the edited book ‘‘40 Years of Numerical Fluid Mechanics and Aerodynamics in Retrospect’’.

www.pointwise.com

www.altairhyperworks.com

Page 13: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-13

Exercise: The following fire simulation is not easy to study experimentally. But simulating fire inside a computer is not dangerous. What other such problems, where performing experiments is difficult, risky or impossible, can you think of?

Exercise: For experimental studies such as the shown dam modeling, establishing full similarity (both the Reynolds and the Froude number similarities in this case) is not easy. This is called ‘’incomplete similarity’’. What other such problems can you think of? Do we have such difficulties in CFD?

Exercise: Wind tunnels and water channels have limitations such as the area of the test section or the maximum achievable fluid speed. What other similar limitations can you think of in doing experiments?

www.youtube.com/watch?v=ZpW9fF-LH9I

What is CFD? (cont’d)

www.youtube.com/watch?v=wXTvvKkSxpo

www.nasa.gov

Page 14: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Steps of a Typical CFD Study

1-14

Step 1. Initial setup

1a. Understand the problem physics and select proper mathematical models

1b. Define/draw the problem domain, choose the boundary conditions

1c. Generate a computational mesh (grid)

1d. Set material properties

Step 2. Solution

2a. Discretize the governing equations

2b. Solve, monitor the sollution, check convergence

Step 3. Post processing

3a. Visualize the generated data.

3b. Evaluate/criticize the results.

Polyhedral surface mesh detail(https://cfmesh.com)

Page 15: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-15

• Mathematical modeling is the translation of the flow physics into mathematical equations, usually differential equations (DE).

• Typically conservation equations for mass, linear momentum and energy are solved.

• These may need to be supported with extra models for things such as

• turbulence

• phase changes

• particulate or granular flows

• flows with chemical reactions, combustion

• fluid structure interaction (FSI)

• flows with magnetic/electric field effects

• flow induced acoustics

• etc.

Step 1a. Problem Physics & Mathematical Model

Ice accumulation on a wing’s leading edge(https://en.wikipedia.org)

FSI simulation of a tri-leaflet bioprosthetic heart valve

(www.youtube.com/watch?v=kWV2zASaeJU)

Page 16: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-16

Step 1a. Problem Physics & Mathematical Model (cont’d)

• In a typical CFD software, problem physics is set by turning proper settings on/off or making choices among the available alternatives.

• For example in ANSYS Fluent, we set up the problem physics using dialog boxes similar to the following ones.

Turbulence model selection

Combustion model selection

Multiphase model selection

Radiation model selection

• Important: We need to know these models in order make proper selections for our problem.

Page 17: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-17

• We need to read the available documentation of our CFD software to learn about different modeling capabilities.

Part of the Table of Contents of ANSYS Fluent 19.2 User’s Guide

We’ll talk about some of these capabilities

Step 1a. Problem Physics & Mathematical Model (cont’d)

More than 1000 pages

Page 18: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-18

Step 1a. Problem Physics & Mathematical Model (cont’d)

• At the least we need to answer the following questions

• Incompressible or compressible ?

• Steady or unsteady ?

• Laminar of visocus ?

• Is heat transfer important ?

• Incompressible or compressible ?

- Almost all liquid flows, and low Mach number gas flows are incompressible.

𝑀𝑎 =𝑉

𝑐< 0.3 → incompressible

Air flow inside an operating room can be studied as incompressible

www.machinedesign.com

Page 19: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-19

Step 1a. Problem Physics & Mathematical Model (cont’d)

• Incompressible or compressible ? (cont’d)

- High speed aerodynamic flows, flows inside compressors, etc. are compressible.

- Usually CFD software come with different flow solvers for incompressible & compressible flows and you need to make a selection.

- For example ANSYS Fluent comes with two solvers.The selection depends on mostly on compressibilityand the Mach number.

Flow over a rocket

http://mdx2.plm.automation.siemens.com

Flow inside a 3 stage transonic compressor

www.turbostream-cfd.com

Page 20: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-20

Step 1a. Problem Physics & Mathematical Model (cont’d)

• Steady or unsteady ?

- Most engineering devices work in a steady state manner.

- A flow that is unsteady in a certain referenceframe can be made steady by changing thereference frame.

- All turbulent flows have unsteady fluctuations, but the averaged flowin time may be steady.

Simulation of flow over a car and a caravanyoutube.com/watch?v=TXMPE5mtXcw

Flow inside a pump may be studied as steady when viewed from a rotating reference frame attached to the blades

(www.royalihc.com)

Page 21: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

• Steady or unsteady ? (cont’d)

- Large scale separation and vortex shedding can make a problem unsteady, which you may thought to be steady.

- Some problems are unsteady, but time periodic, i.e. the flow repeats itself at a certain frequency.

Simulation of pulsatile blood flow at a branch(www.youtube.com/watch?v=gd9vpwTVg9A)

1-21

Step 1a. Problem Physics & Mathematical Model (cont’d)

Simulation of vortex shedding from an airfoil at high angle of attack

(www.youtube.com/watch?v=6xvUFIxisbA)

Page 22: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1a. Problem Physics & Mathematical Model (cont’d)

1-22

• Inviscid or viscous ?

-Inviscid simulations are typically used to predict pressure forces over bodieswhere there is no (or little) flow separation.

-But if we are interested in boundary layer details, such as wall shear, wall heat flux, flow separation, etc., we need to solve the viscous Navier-Stokesequations.

Flow over a streamlined body predicted by inviscid Euler equations

(www.connorsousa.com)

For this attached flow, an inviscid solution can predict the lift force due to the pressure

distribution with acceptable accuracy

Page 23: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-23

Step 1a. Problem Physics & Mathematical Model (cont’d)

• Laminar or turbulent ?

- Almost all flows of engineering importance are turbulent.

- The important questions are

‘‘In what level of detail should we capture turbulence?’’

‘‘Do we have the necessary computational resources?’’

- In practice, the question is ‘‘Which turbulence model should we use?’’

Direct numerical simulation of flow over a square obstacle

(www.youtube.com/watch?v=c8zKWaxohng)

Experimental visualization of turbulent boundary layer over a flat plate

(www.youtube.com/watch?v=e1TbkLIDWys)

- Also, is the accurate prediction of laminar-to-turbulent transition, which is difficult in many cases, important in our problem?

Page 24: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

• Is heat transfer important ? Should the energy equation be solved ?

- For incompressible flows, energy equation canbe dropped if heat transfer is not important& we are not interested in temperatures.

- For compressible flows, energy equationalways needs to be solved even if theprimary concern is not the heat transfer.

Flow inside a pump can be treated as isothermal, i.e. no need to solve the

energy equation (www.royalihc.com)

Step 1a. Problem Physics & Mathematical Model (cont’d)

1-24

To simulate store separation from a fighter aircraft, energy equation needs to be solved

(www.youtube.com/watch?v=P6K5UeFigIU)

Page 25: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

• Is heat transfer important ? (cont’d)

- In conjugate heat transfer problems we need to solve the energy equation not only in the fluid domain but also inside the solid parts.

Step 1a. Problem Physics & Mathematical Model (cont’d)

1-25

Simulation of flow and heat transfer for a heat exchanger

(www.pretechnologies.com)

Simulation of flow and heat transfer for turbine blade cooling

(by Ma et al.)

Page 26: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & Boundary Conditions

1-26

• We can classify flows as internal and external.

• Flow of coolant fluid inside a multi-channel heat exchanger is internal.

• Flow of air around an automobile is external.

mechanixillustrated.technicacuriosa.com

Coolant in

Coolant out

Page 27: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & Boundary Conditions

1-27

• To do CFD, we need to pick a domain of interest, also called the problem domain.

• When we isolate the domain of interest from the rest, we introduce artificial boundaries.

• The important question is whether we have the necessary boundary condition information at these boundaries or not.

Domain of

iterest

Artificial boundaries

Page 28: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-28

• To study the pressure drop characteristics of a valve inside a pipe, we need to place artificial inlet and exit boundaries.

• Where whould we place them?

• What information do we know at the inlet and exit boundaries?

Simuliaton of flow over a swing check valvehttp://astarte-strategies.com

Page 29: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-29

• To study the aerodynamics of a car with CFD, we need to place it into anartificial box with air in it.

• How large should the outer box be?

• What information do we know at the artificial boundaries of the box?

Simulation of flow over a carwww.youtube.com/watch?v=xlMbzHLEG10

Page 30: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-30

Exercise: For the multi-channel heat exchanger problem, we want to know

a) what flow rate should be provided to keep the maximum temperature below a given 𝑇critical for a given amount of heating?

b) what will be the corresponding pressure drop of the coolant?

• Is it OK to study only the fluid flow and heat transfer in a single channel?

• Should we also include the channel walls in the problem domain?

• Should we also include the heat generating electronics part or the inlet/exit manifolds in the problem domain?

Step 1b. Problem Domain & BCs (cont’d)

Fluid channels

Heat generating electronics

Channel walls

Top view with extrainlet and exit manifolds

Page 31: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-31

• Problem domain selection is related to the BCs.

• If we consider only a single channel, do weknow the thermal BCs at its walls?

• If we do not consider the inlet manifold,how should we distribute the total flowrate to the individual channels? Equally?

• When we consider the channel walls, do we know the thermal BC on the outer surfaces? Or should we also include some amount of outer air?

Exercise: In a blood flow simulation how much of the circulatory system should we consider, i.e. where should we put theartificial inlet/exit boundaries?

• Do we know the velocity details at the inlet?

• What information do we have at the outlets?

• What is the boundary condition at the vesselwalls? Are they rigid or deforming? Should wealso include a bit of outside tissue?

Step 1b. Problem Domain & BCs (cont’d)

in

out

in

(asme.org)

Page 32: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-32

• How much geometric detail do we need toinclude, i.e. how much de-featuring is allowed?

• To simulate the flow over a car, should the sidemirrors, windshield wipers, etc. be included?

• Should we consider the rotation of the tires?

Exercise: Are the following car and helicopter models good enough to predict the aerodynamic performance accurately, or are they over simplified?

Actual details of a car front

http://mycfdarchive.blogspot.com http://stephanesanchi.ch

Page 33: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

Exercise: What geometrical details need to be included if we are interested in the heat transfer inside the whole chasis?

• Do we need to model the whole computer chassis to study the cooling performance of a new CPU heat sink?

• What should be our problem domain if we are designing a new computer chassis fan?

Complicated details inside a computer chassis

A CPU heat sink with a fan attached to it 1-33

Page 34: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-34

• Many times we simplify our 3D problems using

• two-dimensionality

• symmetry

• periodicity

• etc.mathieuhorsky.wordpress.com

www.symacpe.com

Exercise: Can the flow over a car bestudied as 2D ?

Exercise: What about considering one half of the car?

• What kind of a BC can we use at the symmetry plane?

Page 35: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-35

Exercise: We want to study the air conditioning inside a car.

• Is a 2D analysis enough?

• How much can the interior of the car be simplified?

theseus-fe.com

Page 36: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-36

• Some problems can be studied as 2D axisymmetric.

• To use a 2D axisymmetric domain, proper governing equations need to be used.

Exercise: Can the following domains be simplified as 2D axisymmetric? How?

3D converging diverging nozzle Simplified 2D axisymmetric domain

Pipe with a bend Pipe flow, with an extra inlet

Page 37: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-37

• Some domains can be simplified using periodicity.

2D flow over a tube bundle(only a few of many tubes

are shown)

Periodic & symmetric flow over a tube bundle.https://www.asotech.com

Symmetry BCPeriodic BC

Page 38: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-38

• Some domains, especially for turbomachines,can be simplified using rotational periodicity.

• Such domains can be simplified consideringperiodicity with a single stator-rotor pair.This one is for a compressor.

Periodic flow patterns for the flow through stator and rotor blades of a turbine

www.youtube.com/watch?v=AeY7g5O3zaM

N. Aldi et al., ‘‘An Innovative Method for the Evaluation of Particle Deposition Accounting for Rotor/Stator

Interaction’’ J. Eng. Gas Turbine Power, 139(5), 2016. Inlet duct

Outlet duct

StatorbladeRotor

blade

Page 39: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-39

Exercise: Simplify the following geometries in any possible proper way.

Multi-channel heat exchanger

Darrieus type wind turbinewww.lmagency.biz/contents/en-uk/p45.html

Page 40: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-40

• Some parts of the domains can have very tiny geometrical details.

• This creates a problem both in drawing the geometry and later in meshing it.

• Instead of including these in our model, their effects on fluid flow can be modeled.

• Typical example is flow through porous media.

Metal foams are used in heat exchangers to increase heat transfer rates.

www.bine.info/en

Catalytic converter of an exhaust systemcan be modeled as porous media.

www.simscale.com

Page 41: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-41

• Another simplification is the use of zero thickness walls (virtual walls).

• These are thin walls and when modeled as they are, they result in excessive cell counts with possibly poor quality elements when we create a mesh.

• Instead, we replace them with interfaces of zero thickness in our CAD model.

• This does not alter the flow field considerably, but ease the meshing process.

Duct with a thin baffle plate with many holes in it

www.simutechgroup.com

A duct with a turning vanewww.simutechgroup.com

Page 42: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1b. Problem Domain & BCs (cont’d)

1-42

• Some problems have moving or deforming boundaries.

• Sometimes we have a pre-defined (known) motion of the boundaries.

• In 6-DOF (degree of freedom) simulationsmotion of solid bodies are unknown andneed to be calculated using the forcesacting by the fluid.

Closing butterfly valve(www.youtube.com/watch?v=14acpD8ECtA)

Tank stirring(www.youtube.com/watch?v=qOSMrpi6vMQ)

Separation of compartment lid from a space recovery vehicle

(www.youtube.com/watch?v=4j1-SufQ8Hk)

Page 43: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (Grid)

1-43

• Generate a computational mesh.

• Divide the problem domain into small volumes called cells or elements.

Surface mesh of a variable area duct(www.kjetilbm.net)

Typical 2D cells

Triangle Quadrilateral(Quad)

Polygon

Typical 3D cells

Hexahedron (Brick)

Tetrahedron Pyramid Triangular prism(Wedge)

Polyhedron

Page 44: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

• Structured grids are identified by regular connectivity of cells.

• They use quadrilateral cells in 2D and hexahedra in 3D.

• Each cell can be associated with a unique (𝑖, 𝑗) pair numbering.

• Structured grids can be stretched & mapped to a uniform grid on the (𝑖, 𝑗) plane.

• For cell (𝑖, 𝑗), North neighbor is (𝑖, 𝑗 + 1), West neighbor is (𝑖 − 1, 𝑗), etc.

1 2 3 . . . . . . . 16

Step 1c. Mesh (cont’d)

1-44

𝑖

𝑗

1

2

3

4

Cell (𝑖, 𝑗) = (9,3)

2D structured grid of 16 x 4 = 64 cells

Mapping

𝑗

𝑖

Page 45: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (cont’d)

1-45

• Unstructured grids are identified by irregular connectivity of cells.

Exercise: Can you hand sketch structured grids on the above domains?

http://yzhao.weebly.com www.nas.nasa.gov

Page 46: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (cont’d)

1-46

Exercise: What type of cells are used in the following2D grid? Is this grid structured?

Exercise: What type of cells are used in the following 3D grids? Are they structured or not?

yzhao.weebly.com

Page 47: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (cont’d)

1-47

• Multi-block structured grids use separate structured grids on different parts of the problem domain.

Exercise: Can you fit a single block structured grid to this domain?

• Following is a 3D multi-block structured grid.

truegrid.com

Structured grids (single or multi-block) can be preferred because

- They simply fit nicely to some geometries.

- Some grid generators only generate them.

- Some flow solvers (usually research codes) only support them.

- etc.

Two blocks

Page 48: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (cont’d)

1-48

Exercise: Mesh the following domains using multi-block structured grids. Sketch roughly by hand.

Simplified turbomachinery cascade of 2 blades

Bending duct with a secondary inlet for mixing

Page 49: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (cont’d)

1-49

• It is possible to combine structured and unstructured grids (hybrid grids).

• Usually structured mesh is used in regions close to solid bodies (boundary layer mesh).

http://adl.stanford.edu/docs

www.computationalfluiddynamics.com.au

Page 50: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (cont’d)

1-50

• We need to place smaller cells in regions where the changes are rapid (high gradient regions).

• Usually meshes are non-uniform in cell size.

• In external flows, we put finer cells close tosolid bodies, where we have high gradients,and we use coarser cells away from them.

www.rocscience.com

Uniform meshes have similar sized cells everywhere

Non uniform meshes have small and large cells

www.afs.enea.it/funel/CFD/OpenFOAM3DCar

Page 51: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-51www.symscape.com/blog

Step 1c. Mesh (cont’d)

• Polyhedral meshes are getting popular in commercial CFD software.

• They include fewer cells and usually have high quality.

Page 52: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-52

ANSYS Fluent Documentation

Step 1c. Mesh (cont’d)

Triangular surface mesh Polyhedral surface mesh

Page 53: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (cont’d)

1-53

• Cartesian meshes are special. They have only square (or cube in 3D) cells.

• Close to boundaries there can be cut cells.

• They are easy to generate for any given geometry and have no quality issue.

https://blogs.mentor.com

Page 54: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1c. Mesh (cont’d)

1-54

• Overset meshes have multiple overlapping meshes.

• They are easier to generate for complicated geometries, especially when there are moving bodies.

• But the information need to be transformed back and forth between meshes.

Use of overset mesh for simulating rocket booster separation

www.youtube.com/watch?v=YBePumd_XHk

Use of overset mesh for the simulation of a maneuvering boatwww.youtube.com/watch?v=4v60htbd8yk

Page 55: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-55

Step 1c. Mesh (cont’d)

• Adaptive mesh refinement (AMR) is to modify the mesh by looking at a present solution of a problem and re-solve the problem with the new mesh.

• It tries to generate a proper mesh for a given problem in an automated way.

• It is very effective to resolve critical high gradient regions.

• Becomes even more effective if those regions are changing in time.

Automatically adapted mesh for flow over a supersonic bullet

(www.bakker.org/dartmouth06/engs150)

Paddle wheel simulation with automatically adapting cartesian mesh

www.youtube.com/watch?v=YD5buZ_Vv7k

Page 56: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-56

Step 1c. Mesh (cont’d)

• In a non-conformal mesh there are interfaces where the neighboring elements have non-matching (hanging) nodes.

• This happens when

• different parts of the problem domain aremeshed using different strategies.

• adaptive mesh refinement is applied.

• sliding mesh approach is used.

Non-conformal interface of a sliding mesh simulationwww.youtube.com/watch?v=88jAjp-BiOc

www.bakker.org

Non-conformal interfaces

Page 57: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Aspect Ratio (AR)

1-57

Step 1c. Mesh (cont’d)

• Mesh quality is related to the shapes of the cells.

• Higher quality meshes result in faster convergence and more accurate results.

• There are various quality measures, such as the following.

Skewness

Low AR

Orthogonality

High AR

Low skewness

Cell centroids

Low orthogonality

High orthogonality

High skewness

Facemidpoint

Page 58: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-58

Step 1c. Mesh (cont’d)

• Boundary layer (BL) meshes have high aspect ratio cells.

• This is not a major concern due to mainly unidirectional flow inside a BL.

• But sudden changes in the mesh density is not desired.

• The first cell height, number of cells inside the BL and the growth ratio of the cells are the key parameters to create a good BL mesh with smooth transition.

Transition between the BL mesh and the outside mesh is not smooth

A more smooth transition(http://www.salome-platform.org)

Page 59: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-59

Step 1c. Mesh (cont’d)

• Mesh is almost always the most important user input that affects the accuracy of a CFD solution.

• The million dollar question in CFD is

Is my mesh good enough ?

• We need to make sure that our CFD solution is mesh independent.

• To achieve this, we solve our problem using a number of succesively refined meshes until the solution is no longer changing with further refinement.

Simulation of flow through a baffle valve(https://www.youtube.com/watch?v=yEloolmIvDw)

105 106 107

Number of cells

Pre

ssu

re d

rop

[b

ar]

0.26

0.24

0.22

0.20

0.18

0.16

0.14

Page 60: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 1d. Material Properties

1-60

• CFD software come with large databases of fluids.

• Still, we need to answer certain questions, such as

- For gases, is the ideal gas relation valid or do we need a more advanced model?

- For flows with heat transfer do we need to consider temperature depedency of viscosity and thermal conductivity?

- For flows with buoyancy, how do we model 𝜌(𝑇)?

- If the fluid is non-Newtonian, which non-Newtonian modelis appropriate?

Flow of toothpaste(www.youtube.com/watch?v=Se4v-QRWtYA)

Natural convection simulation(www.youtube.com/watch?v=5T2kZqlyF2Y)

Page 61: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 2a. Discretize the Governing Equations

• Governing equations, usually in the form of nonlinear DEs, need to be converted into linear algebraic equations.

• Integrals and derivatives need to be approximately discretized into four algebraic operations (+, −, ×, /) that computers can handle efficiently.

• Classical techniques are

• Finite Difference Method (FDM)

- Simple mathematics.

- Limited to simple geometries & structured grids.

- Suitable to perform detailed analyses for convergence, stability, etc.

- Easy to make high order accurate.

• Finite Volume Method (FVM)

- Uses integral formulation to guarantee local and global conservation.

- Based on flux calculation on cell faces.

- Can handle complicated geometries, but with issues.

- Difficult to make high order accurate.

www.ctcms.nist.gov/fipy1-61

Page 62: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 2a. Discretize the Governing Equations (cont’d)

1-62

• Finite Element Method (FEM)

- Harder mathematics.

- Easy to make high order accurate.

- Naturally suitable to unstructured grids & complicatedgeometries.

- More tolerant for poor quality mesh.

• Most commercial CFD software are either FVM or FEM based.

• FDM based ones are usually research codes used in academia.

• Non-classical techniques (incomplete list)

- Spectral Method (SM) and Spectral Element Method (SEM)

- Boundary Element Method (BEM)

- Lattice Boltzman Method (LBM)

- Immersed Boundary Method (IBM)

- etc.

http://hplgit.github.io

BEM only needs mesh points at the boundaries

Page 63: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 2a. Discretize the Governing Equations (cont’d)

1-63

• Most of the techniques are Eulerian based, but Lagrangian (particle) based simulations are also possible.

• Smoothed Particle Hydrodynamics (SPH) is a meshless, particle based technique. There are others too.

• Following are particle based SPH simulations.

Aquaplaning of a tire(www.youtube.com/watch?v=xd0L03Wn7X0)

Interaction of large wave with harbor(www.youtube.com/watch?v=o6_iPdIQmyc)

Page 64: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 2b. Solve, Check Convergence & Watch Monitors

1-64

• Solution of a 2D problem usually finishes in minutes.

• Large 3D problems with many million cells may take several days/weeks to complete.

• Unsteadiness increases solution times.

• It may be necessary to solve a single problem several times with different meshes, different turbulence models, different solver settings, etc.

• Parallel computations utilize multiple cores of multiple CPUs for speed-up.

A multi-core, multi-CPU motherboard for workstations

(www.asus.com)

Mesh around an airfoil, partitioned for parallel processing

(https://nutscfd.wordpress.com)

Page 65: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 2b. Solve, Check Convergence & Watch Monitors (cont’d)

1-65

• During the solution, a residual plot showing the errors of the solved system of equations is generated.

• It is a fundamental measure of an iterative solution’s convergence.

• Iterations stop when a user set tolerance is achieved.

A typical residual plot. Each curve is for one of the many DEs being solved. (www.symscape.com)

0 100 200 300 400 500

Iteration

Res

idu

als

1

10-1

10-2

10-3

10-4

10-5

10-6

If the user set tolerance is 10-3, convergence is achieved after about 470 iterations.

Page 66: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

1-66

• Extra monitor plots need to be generated to understand what happens during a solution and to judge when to stop it.

• Monitor points are selected as the critical points in a flow field and their variables such as velocity, pressure or temperature are monitored.

• Integrated monitors such as drag/lift coefficients or mass/heat flow rates can also be generated.

Vortex shedding over a cylinderwww.youtube.com/watch?v=IDeGDFZSYo8

Step 2b. Solve, Check Convergence & Watch Monitors (cont’d)

Drag force monitor for the time periodic unsteady flow over a cylinder(www.symscape.com)

0 1 2 3 4 5 6 7

Time [s]

Forc

e [N

]

-0.1

0.1

-0.06

0.06

-0.02

0.02

Drag

Lift

Page 67: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 3a. Visualize the Generated Data

1-67

• A CFD solution generates millions of numbers.

• It is not possible to make sense of them without proper visualization.

• Typically we generate

- Streamline plots

- Contour plots

- Vector plots

- Animations

- Etc.

Streamlines and temperature contours for the simulation of a fan cooled computer cabinet

(www.ansys.com/products/electronics/ansys-icepak)

A combined surface contour & streamline plot for a propeller simulation(www.move-csc.de)

Page 68: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 3a. Visualize the Generated Data (cont’d)

1-68

• Although 3D plots look nice, it is good to reduce data (3D → 2D → 1D) for ease of understanding and comparison with other solutions.

Normal velocity variation along the radial line AA of 𝜃 = 90° plane

0.0

2.6

5.2

7.8

10.4

13.0

Speed contours [m/s] and velocity vectors at the 𝜃 = 90° plane

A A

Normal velocity [m/s]

6 7 8 9 10 11 12 13

Rad

ial C

oo

rdin

ate

[mm

] 90

60

30

0

Flow in a bending duct with square cross section(www.azorecfd.com/validation)

𝜃A A

Page 69: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 3a. Visualize the Generated Data (cont’d)

1-69

• Following reduced data visualizations are for the popular Ahmed body test case.

Velocity profiles along various vertical lines on the central plane

https://grabcad.com

cfd.mace.manchester.ac.uk

Non-dimensional pressure distribution on the top boundary of the central plane

0 0.2 0.4 0.6 0.8 1

𝐶𝑝

1

0.5

0

-0.5

-1

-1.5

Page 70: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 3b. Evaluate/Criticize the Results

1-70

• It can be very difficult to judge the correctness of a CFD result.

• Especially a concern if you are not familiar with the problem at hand.

• Trust, confidence and credibility is still a major problem in CFD, because it is quite easy to generate wrong results.

• Errors and uncertainties in a CFD solution are due to

1. Physical/Mathematical modeling errors and uncertainties:

• Our understanding of the flow physics or how we model it mathematically is incomplete or not correct.

• e.g. we want to simulate the heat transfer inside thin film coatings of highly reflectivemirrors used in military optics applications.

- coating thicknesses are in nanometer levels and material properties at that level are notknown accurately.

- impurities between coating layers is animportant laser damage mechanism, but it is hard to model their thermal behavior.

Page 71: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 3b. Evaluate/Criticize the Results

1-71

• e.g. we want to predict the point of laminar-to-turbulent transition, but most turbulence models are incapableof doing it.

• e.g. we are not sure about the boundary conditions that we need to use.

• e.g. flow over a car is simulated as 2D due to the lack of computational resources, but 3D effects are critical for accurate drag estimation.

• e.g. conjugate heat transfer (including solids) exist in a problem, but we modeled only the fluid domain.

• e.g. in simulating the blood flow inside an artery, we considered the vessel to be rigid, whereas in real life it expands and contracts.

• e.g. in the same blood flow simulation we performed a steady state analysis with an average flow rate, whereas in real life the flow is pulsatile.

Exercise: What other examples can you think of?

Page 72: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 3b. Evaluate/Criticize the Results (cont’d)

1-72

2. Discretization errors:

• Due to the discretization of the domain, i.e. the mesh, and the discretization of the derivatives & the integrals.

- e.g. we do not have small enough elements in high gradient regions.

- e.g. there are low quality cells in the flow domain.

- e.g. the discretization scheme used is low order.

3. Iteration errors:

• Is convergence achieved whilesolving the problem iteratively?

4. Programming errors:

• Computer codes have bugs, even the most well tested ones.

A typical residual plot showing convergence difficulty

(www.symscape.com)

0 20 40 60 80 100 120

1

10-1

10-2

10-3

10-4

Page 73: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 3b. Evaluate/Criticize the Results (cont’d)

1-73

• Verification and validation procedures are important for the credibility of CFD.

• Warning: A nice looking result plot is not necessarily a sign of an accurate solution.

• Follow best practice guides. Learn common causes and cures of errors.

Verification

• Are we solving the equations right?

• Concerns about discretization, iteration and programming errors.

• Discretization errors are due to the numerical approximations, the mesh and the time step size.

• At least mesh independence and time step independence (for unsteady flows) studies need to be done, and proper convergence need to be shown.

Validation

• Are we solving the right equations?

• Concerns about how good a mathematical/physical model represents the real world.

• We need to compare the CFD results with high quality experiments.

• Often, experimental result of the actual studied case is not available, but that of a close one is.

Page 74: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Step 3b. Evaluate/Criticize the Results (cont’d)

1-74

• Today, the credibility of CFD is not as high as it should be, e.g. not as high as that of Finite Element Analysis (FEA) performed for structural mechanics.

• This is because people do not follow validation and especially verification practices as strictly as they should.

• Also the trend in new CFD software is to be user friendly, but unfortunately they can be too user friendly.

• They perform most of the selections and decisions for you and generate nice colorful plots.

• But if you do not follow validation and verification practices, what you do is, unfortunately, called

Colorful Fluid Dynamics (CFD)

• Do not let people call your CFD work ‘‘colorful’’. That is an insult.

Page 75: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Hardware Requirements for CFD

1-75

Hardware

• Many engineers working in the industry do CFD on typical workstations with

- a fast multicore CPU (double CPU preferred)

- 16 - 64 GB RAM

- better than average graphics card

Entry Level Workstation- Intel Xeon CPU (4 cores)- 16 GB RAM- $2000

High End Workstation- 2 x Intel Xeon CPU (2x14=28 cores)- 32 GB RAM- $15000

Page 76: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Hardware (cont’d)

1-76

• Some companies, universities and research institutions have clusters of connected computers to serve for a larger user base and to solve more demanding problems.

- Cheap solution : Ordinary computers connected to each other

- Expensive solution : Computers specially designed for number crunching

Juno cluster @ Lawrence Livermore National Lab, USA

Has 18432 cores

Page 77: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Hardware (cont’d)

1-77

• Government agencies and research institutions may have custom designed and built supercomputers.

- Can have millions of cores

- Also may use GPUs (graphics cards) for number crunching

- See www.top500.org/lists for the most powerful ones

Sunway TaihuLight at China is the 2nd

fastest one as of July 2018.

Has more than 10 million cores and more than 1 million GB of RAM.

Its power consumption is 15 MW.

It costed $273 million.

Page 78: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Software Requirements for CFD

1-78

Results of a CFD User Surveywww.resolvedanalytics.com/theflux/comparing-popular-cfd-software-packages

ANSYSFluent

Star-CCM+

OpenFOAM

COMSOL

ANSYS CFX

Autodesk CFD

Altair AcuSolve

CONVERGE

SolidWorks

XFlow CFD

Fine/Marine

FloTHERM

SimScale

HELYX

simFlow

6SigmaET

EXA

EXN/Areo

0 10 20 30 40 50 60 70 80

(free student version)

(free student version)

(free student version, FEM based)

(free and open source)

(free but closed source, FEM based)

(FEM based)

(Cloud based CFD service)

(OpenFOAM based)

(OpenFOAM based)

(Lattice Boltzman Method based)

Page 79: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Software Requirements for CFD

1-79

• Commercial ones are preferred by engineering companies due to

- good documentation

- good customer support

- large user base

• Free and open source ones are getting popular due to

- cost

- possibility of modifying the code, adding new features

• Examples are

- OpenFOAM (it is the 3rd on the popularity list)

- SU2

- Palabos

- (and more . . .)

• Free, but closed source ones

- Autodesk CFD (it is the 6th on the popularity list)

Page 80: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Software (cont’d)

1-80

• Specialized CFD software for certain applications

- FloTHERM : Electronics cooling

- ANSYS Icepak : Electronics cooling

- 6SigmaET : Electronics cooling

- Star CD : Internal combustion engines

- Turbostream : Turbomachinery

(and more . . .)

• Research codes are mostly developed and used by universities, research institutions and government facilities.

• Examples are

- NEK5000 (by Argonne National Lab., USA)

- OVERFLOW (by NASA, USA)

- elsA (by ONERA, France)

- COOLFluiD (by von Karman Institute, Belgium)

- (and more . . .)

Page 81: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Software (cont’d)

1-81

• There are also third party mesh generators.

- Pointwise

- Trelis

- GridPro (free)

- Engrid (free)

- GMSH (free)

- SALOME (free)

- TETGEN (free)

- (and more ...)

• And also third party post processors, i.e. visualization software.

- Tecplot

- FieldView

- Paraview (free)

- Visit (free)

- (and more ...)

Page 82: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Software (cont’d)

1-82

CFD on the Cloud:

• Today there are many Computer Aided Engineering (CAE) service providers.

• You set up and solve your own problem, but using their software and hardware with remote access.

• Advantages are

- It is demand based. You only pay for the CPU core-hour that you use.

- No initial or maintenance costs for resources and staff.

- Always cutting edge, powerful hardware.

- Always latest versions of software.

• Examples are

- cpu-24-7.com (ANSYS, Star CCM+, NUMECA, COMSOL, OpenFOAM, etc.)

- theubercloud.com (ANSYS, Star CCM+, NUMECA, COMSOL, OpenFOAM, etc.)

- cfd.direct/cloud (OpenFOAM)

- simscale.com (OpenFOAM)

- (and more . . .)

Page 83: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Incomplete Historical Perspective

1-83

1922 L. F. Richardson developed the first numerical weather prediction system.

Predicted weather for an 8 hour period took 6 weeks, but the result was a failure.

To handle the huge number of calculations he proposed the “forecast factory” with 64,000 people filling a stadium. Each would have a mechanical calculator performing a part of the calculation. A leader in the center, using colored signal lights and telegraph communication would act as a coordinator.

1928 Courant, Friedrichs and Lewy (CFL) published their fundamental theoretical paper on the solution of physical problems using finite differences. They presented the famous CFL condition.

1933 Earliest known published viscous flow solution by A. Thom. Solved N-S equations for flow past circular cylinders at low speeds.

1946 ENIAC is one of the earliest electronic general purpose computers. Used to calculate artillery firing tables. Calculated trajectories 2400 times faster than a human (20 h → 30 s).

Page 84: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Incomplete Historical Perspective (cont’d)

1-84

1953 M. Kawaguti solved N-S equations over a circular cylinder at 𝑅𝑒 = 40 using a mechanical calculator. Worked 20 hours per week for 18 months.

1954 First commercial transistor, the key component in all modern electronic devices.

1957 FORTRAN, the first general purpose scientific programming language.

Subsonic potential flow simulations over airfoils by Douglas Aircraft.

1960 The popular Lax-Wendroff scheme for solving flows with shocks.

1960s Various CFD ideas and techniques (e.g. PIC, MAC and vorticity-stream function formulations for incompressible flows) were developed at Los Alamos National Lab., USA (where the first atomic bomb was also developed).

1965 CDC 6600, the first supercomputer used at CERN.

Moore’s Law: (founder of Intel) Processor complexity (number of transistors) will double every year.

Page 85: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Incomplete Historical Perspective (cont’d)

1-85

1969 The popular MacCormack scheme for solving compressible flows.

1970s B. Spalding @ Imperial College, London developed many CFD ideas & techniques (e.g. SIMPLE method for incompressible flows) that are still in use today.

1972 First DNS simulation at National Center for Atmospheric Research, USA.

1973 An estimated 100-200 potential flow simulations were made at Boeing.

1974 Launder and Spalding popularized the 𝑘 − 𝜀 turbulence model.

van Leer’s papers about constructing high-order schemes.

1975 Altair 8800, the first personal computer.

Modified Moore’s law: processor complexity will double every two years.

1980 S. Patankar published one of the most influential CFD books.

Roe’s popular flux difference splitting idea for compressible flows.

1983 Harten published on Total Variation Diminishing (TVD) schemes.

Page 86: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Incomplete Historical Perspective (cont’d)

1-86

1980s - 1990s Commercialization of CFD software.

1995 Use of CFD in non-aero businesses such as automotive (GM and Ford).

2002 More than 20,000 CFD cases were run at Boeing.

2004 Initial release of OpenFOAM; popular free & open source CFD software.

2010s Cloud computing services for CFD.

Page 87: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Flow over a globe valve using Solidworks Flow Simulation

www.youtube.com/watch?v=Nt7W_ImwFbw

Electronics cooling using Solidworks Flow Simulation

www.youtube.com/watch?v=d6T-dvi2znk

Watch How People Perform CFD

1-87

• Warning: Internet is full of CFD videos with wrong and misleading practices.

• Frequently, companies demonstrate how easy it is to use their software, but they follow bad practices in doing so.

• Also advices given in online CFD forums can be wrong.

• Be careul ! Do not make internet your one and only knowledge resource.

• Some of the following videos start with company or product advertisements. You can skip those parts.

Page 88: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Watch How People Perform CFD (cont’d)

1-88

Flow inside a centrifugal pump using Altair AcuSolve

www.youtube.com/watch?v=wwqRtwKknyo

Aerodynamics of a car using Altair Virtual Wind Tunnel

www.youtube.com/watch?v=cGamZkXt2UYwww.youtube.com/watch?v=qm6hvDxjJN8

Electronic box design using SimScalewww.youtube.com/watch?v=zbG9Dfy49Js

Flow inside a shell and tube heat exchanger using COMSOL

www.youtube.com/watch?v=7U5ue03K7gQ

Page 89: ME 485 Introduction to CFD using Finite Volume Method ...courses.me.metu.edu.tr/courses/me485/files/ME 485 Chapter 1.pdf · •For example in ANSYS Fluent, we set up the problem physics

Watch How People Perform CFD (cont’d)

1-89

6 DOF solid motion & dynamic mesh using ANSYS Fluent

www.youtube.com/watch?v=8NIOC8Nl91E

Flow inside an exhaust manifold using ANSYS Fluent

www.youtube.com/watch?v=f08w6aKjPbE

Electronics cooling with FloTHERMwww.youtube.com/watch?v=n4mUilxPiow

Parametric optimization using FloEFDwww.youtube.com/watch?v=gh_I0iiXZOA