Você está na página 1de 41

TMMV08

Computational fluid dynamics


Jonas Lantz
jonas.lantz@liu.se

Organization
Lectures
Computer sessions
Assignments:
Intro to CFD (CFX)
Forward-facing step (CFX)
1D convection-diffusion transport (Matlab)
RANS derivation
Flow around simplified car model (CFX)

Personnel

Jonas Lantz: examiner, lecturer, labs


Matts Karlsson: lecturer
Magnus Andersson: course assistant
Anna Wahlund: administration
Invited Guests

Literature
An introduction to Computational Fluid
Dynamics The Finite Volume Method, HK
Versteeg & W Malalasekera,
PEARSON/PRENTICE HALL, 2nd Edition, 2007
ISBN: 978-0-13-127498-3
Journal papers
Assignment descriptions
Tutorials, ANSYS material.

Course web page


http://www.iei.liu.se/mvs/utbildning/avancerade-kurser/tmmv08?l=en

Or google: TMMV08, first hit

Contains: assignments, tutorials, additional material, this lecture, etc

Assignments
Assignment Name

Available from

Due

Points

Intro to CFX

Now

27/1

PASS/FAIL

Forward-facing step

30/1

10/2

1,2

1D convection- diffusion

6/2

24/2

1,2

RANS derivation

20/2

3/3

PASS/FAIL

Ahmed car model

20/2

22/3*

3,6,9
Points

Grade

0-4

FAIL

Time budget:

5-7

Lectures 30 h + labs 56 h + own time = 160 h (6 ECTS credits)

8-9

10-13

*mandatory lecture 13/3 13.15-17.00

Day
Tue
21/1
Wed
22/1
Thu
23/1
Mon
27/1
Tue
28/1
Wed
29/1
Thu
30/1
Thu
30/1
Mon
3/2
Thu
6/2
Thu
6/2
Mon
10/2
Wed
12/2
Thu
13/2
Thu
13/2
Mon
17/2
Tue
18/2
Thu
20/2
Thu
20/2
Mon
24/2

Type,
Time
Lecture
10-12
Lecture
08-10
Lab
17-21
Lab
17-21
Lecture
10-12
Lecture
8-10
Lecture
13-17
Lab
17-21
Lab
17-21
Lecture
13-17
Lab
17-21
Lab
17-21
Lecture
8-10
Lecture
13-17
Lab
17-21
Lab
17-21
Lecture
10-12
Lecture
13-17
Lab
17-21
Lab
17-21

Teacher,
Room
JL
A33
MK
A33
JL
VALHALL
JL
VALHALL
MK
A33
JL
A34
JL
A33
JL/MA
VALHALL
JL/MA
VALHALL
JL
A34
JL/MA
VALHALL
JL/MA
VALHALL
JL
A33
JL
BL32
JL/MA
ALFHEIM
JL/MA
ALFHEIM
JL
A33
JL
A33
JL/MA
BIFROST
JL/MA
ALFHEIM

Content
Course intro, assignments, etc., Intro to CFX, assignment 1,
Classification of physical behaviors, chapter 1 and 2.6
Governing equations, continuity, chapter 2
Assignment 1: introduction to CFX, tutorials
Assignment 1: introduction to CFX, tutorials
Governing Equations, momentum, chapter 2
CFD: best practice, verification and validation
tips and tricks, chapter 10
CFD: Live demo, how-to
Introduction to Assignment 2
Assignment 2: Forward-facing step (CFX)
Assignment 2: Forward-facing step (CFX)
Transport eqn. Basic numerics, Discretization schemes,
Diffusion + Convection/Diffusion, assignment 3, chapter 4 and 5
Assignment 2: Forward-facing step (CFX)
Assignment 3: 1D-CD (Matlab)
Discretization schemes, Diffusion + Convection/Diffusion
Finite volumes , chapter 4 and 5
Turbulence, intro and modeling, RANS eqns. Tensor notation, chapter 3

Tue
25/2
Wed
26/2

Lecture
10-12
Lecture
8-10

<extra>

Thu
27/2
Thu
27/2
Mon
3/3
Tue
4/3
Wed
5/3
Thu
6/3
Thu
6/3
Mon
10/3

Lecture
13-17
Lab
17-21
Lab
17-21
Lecture
10-12
Lecture
8-10
Lecture
13-17
Lab
17-21
Lab
17-21

Tue
11/3

Lecture
10-12

<extra>

Wed
12/3

Lecture
8-10

<extra>

Thu
13/3

Lecture
13-17

<extra>
<extra>
BL32
JL/MA
BIFROST
JL/MA
ALFHEIM

Assignment 5: Ahmed (CFX)


Assignment 5: Ahmed (CFX)
<extra>
<extra>
<extra>

A35
JL/MA
BIFROST
JL/MA
ALFHEIM

JL
A33

Assignment 5: Ahmed (CFX)


Assignment 5: Ahmed (CFX)

ANSYS Presentation + other companies


Poster presentation Ahmed, closing

Assignment 3: 1D-CD (Matlab)


Assignment 3: 1D-CD (Matlab)
Turbulence, RANS
Law-of-the-wall, chapter 3
Turbulence, RANS, Law-of-the-wall , chapter 3
Intro to Assignment 4 and 5
Assignment 3: 1D-CD (Matlab)
Assignment 5: Ahmed (CFX)

Note: lectures with content <extra> will not be given,


unless stated otherwise.

Assignment 1, intro to CFX

Intro to programs
Tutorials
Easy questions

Assignment 2, Forward-facing step


First real simulation
Compare with measurements
Report
1p: perform simulations,
discuss results
2p: above + excellent
discussion and convincing
arguments that your
simulations are accurate.

Assignment 3, Convection-diffusion

Your own implementation


Follow example in course book
Numerical schemes
Report
1p: working code and discussion
on numerical schemes
2p: above + quantification of
accuracy

Assignment 4, RANS derivation (in x)

No scheduled time, do it at home


Hand in derivation

Assignment 5: vehicle aerodynamics


Ahmed Body simplified car model

Assignment 5: vehicle aerodynamics

Compare with wind tunnel data


Design challenge - spoiler
Present own poster for
invited guests + report
3p: basic simulation + spoiler
6,9p: dig deeper into a
topic of your
own choice.

So.
Lets start!
(with a brief introduction to CFD)

Recap: Fluid flow characteristics

Stationary / Transient
Laminar / Turbulent
Compressible / Incompressible
Subsonic / Supersonic
Inviscid / Viscous
Internal / External
Heat transfer
Conduction
Convection
Radiation

Recap: Fluid Mechanics (more in next lecture)


Conservation of mass and momentum:

The Navier-Stokes equations

(stationary, incompressible,)

CFD:
trying to solve the Navier-Stokes equations
Wikipedia:
CFD is a branch of fluid mechanics that uses numerical methods and
algorithms to solve and analyze problems that involve fluid flows.

No known analytical solution exist (?)


Resort to numerical methods to solve the PDEs:

Finite differences
Finite elements
Finite volumes
Approximations of the governing equations

CFD - ColorFul Display?

Space shuttle re-entry

Turbulent
blood flow
in the
human body

Weather
prediction

Jonas Lantz

18

CFD - ColorFul Display?

Jonas Lantz

19

Limitations of CFD

Physical models
CFD solutions rely upon physical models of real world processes
(turbulence, compressibility, chemistry, multiphase flow, etc.).
The CFD solutions can only be as accurate as the physical models
on they are based

Boundary conditions
The accuracy of the CFD solution is only as good as the initial/boundary
conditions provided to the numerical model (type/value)

Numerical errors
Discretization errors due to approximations in the numerical models.
(goes to zero as the grid is refined)
Convergence errors
Round off errors
User Errors
You! Knowledge of CFD and
fluid mechanics is very important
in order to get an accurate simulation.

Jonas Lantz

20

Words of wisdom
Theoretical Fluid dynamics
The foundation. Everyone HAS to learn it
Experimental Fluid dynamics (XFD)
Usually, everyone believes it except the person that
conducted the experiment
Computational Fluid dynamics (CFD)
Usually, no one believes it except the person that
performed the calculations
As an engineer you should know the pros and cons of all
three methods, and should be in a position to assess which
one is best under the circumstances.

Jonas Lantz

21

Words of wisdom (2)

Jonas Lantz

22

CFD requires:

Knowledge

CFD requires:

Knowledge, skill

CFD requires:

Knowledge, skill and gut feeling

CFD in Practice

How to
Drawing/CAD

Create geometry

Already know?

Mesh

CFD

Solver settings:
Boundary conditions
Numerical accuracy
Flow models
Fluid

Run the simulation

Post-process results
Jonas Lantz

Report
27

Mesh
Fill the computational domain with mesh cells, where the governing
equations are solved. The mesh represents the spatial resolution of the
simulation

Jonas Lantz

28
http://www.bakker.org/

Mesh terminology

Jonas Lantz

29
http://www.bakker.org/

Tetrahedrons

Polyhedrons

Running the simulation

Convergence criteria,
accuracy tolerance
(here 1e-4)

The lines represent the solution of


conservation of mass (1 eqn) and
conservation of momentum (3 eqns)

Jonas Lantz

31

Running the simulation (2)


Simulation time:
15 min on a laptop - several weeks (months) on > 1000 CPUs
Advanced fluid models (turbulence/chemical) require more
CPU & memory compared to simpler models (laminar flow).

Normally have to make a tradeoff between the spatial and


temporal accuracy (mesh and time step) with available
computational resources (and license cost (!))

CPU Power Resolution

Jonas Lantz

http://www.nsc.liu.se

32

Post-processing
Obtained directly:
Stream lines
Path lines
Velocity vectors
Pressure contours
Wall shear stress
Forces on/in walls
Wall motion
Concentration
Shock waves
Temperature

Derived parameters:
pressure drop
loss coefficients
turbulent quantities
Cd, Cl, Cm,

Animations

Jonas Lantz

33

How to (2)
Drawing/CAD

Create geometry

Mesh

Mesh independency study

Solver settings:
Boundary conditions
Numerical accuracy
Flow models
Fluid

Run the simulation


Verification: Do the
results make sense? Are
the trends right? Does it
agree with previous
calculations on similar
configurations?

Post-process results
Jonas Lantz

Validation: Does
the result agree
with theory or
experiment?
Report
34

Mesh independency study


Must always be done in order to ensure that the
spatial resolution is sufficient.
Evaluate parameter of interest on each mesh
(e.g. drag coefficient of car, Cd)
Never compare with experimental data until you
have a mesh independent result

Mesh 1
Cd = 0.40

Mesh 2
Cd = 0.32

Mesh 3
Cd = 0.31

20% difference (!?)


3 % difference (ok?)

35

Fluid-structure interaction (FSI)


Simulations commonly assumes rigid walls valid assumption?

start

Fluid solver

Results

convergence
advance in time

Normal CFD simulation


with rigid walls

Jonas Lantz

36

Fluid-structure interaction (FSI)

Multiphysics!
Require both solid and
fluid mechanics

Simulations commonly assumes rigid walls valid assumption?


In FSI simulations, the wall motion due to flow motion and pressure is computed.
Obtains both motion and strain/stress in the wall
Need two solvers: one for fluid simulation and one for solid (wall) simulation

start

Fluid solver

Solid solver

convergence

convergence

Results

combined convergence
advance in time

FSI simulation

Jonas Lantz

Adds approx. 10-100x


more simulation time
( = weeks!)
37

With CFD we can finally compute


things that have troubled mankind for
centuries

What is the drag coefficient Cd


of a T-Rex dinosaur ?

http://www.bakker.org/

http://www.bakker.org/

http://www.bakker.org/

http://www.bakker.org/

Você também pode gostar