0% found this document useful (0 votes)
108 views22 pages

Intro2CFD Lecture1 Pulliam Intro Slides

This document provides information about an introductory course on computational fluid dynamics (CFD) taught by Dr. Thomas H. Pulliam. The course will cover numerical techniques for solving partial differential equations governing fluid mechanics and heat transfer, including explicit and implicit time differencing methods and spatial differencing techniques. Students will use MATLAB to work on problems and exercises involving algorithms for the Euler and Navier-Stokes equations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views22 pages

Intro2CFD Lecture1 Pulliam Intro Slides

This document provides information about an introductory course on computational fluid dynamics (CFD) taught by Dr. Thomas H. Pulliam. The course will cover numerical techniques for solving partial differential equations governing fluid mechanics and heat transfer, including explicit and implicit time differencing methods and spatial differencing techniques. Students will use MATLAB to work on problems and exercises involving algorithms for the Euler and Navier-Stokes equations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Introduction

T. H. Pulliam

1
Intro to Computational Fluid Dynamics (CFD)

Instructor: Dr. Thomas H. Pulliam, (650)-604-6417


email: [email protected]
snailmail: MS 258-2 NASA Ames Research Center, Moffett Field,
CA, 94035
Prerequisites: Undergraduate course in Fluid Mechanics and
Thermodynamics, Compressible flow, Linear Algebra (or consent of
instructor).
Notes/Textbook: Fundamentals of Computational Fluid Dynamics
by Lomax, Pulliam and Zingg. Published by Springer-Verlag,
ISBN=3-540-41607-2 Available at Bookstore or any book website
Course Summary: To develop an understanding of Computational
Fluid Mechanics and provide an opportunity to practice numerical

2
solution techniques as applied to the equations governing Fluid
Mechanics and Heat Transfer. The mathematical structure is the
theory of linear algebra and the attendant eigenanalysis of linear
systems. The course will focus on the development, analysis and use
of numerical tools (as applied to stability, accuracy, and design
methods based in linear theory) to develop a basic understanding of
algorithms and methods of practical value (e.g. methods for the
Euler and Navier-Stokes equations). Topics include, explicit and
implicit time differencing methods, central, upwind and characteristic
spatial differencing techniques, classical relaxation, multigrid
methods and splitting/factoring methods. Practical examples and
real life lessons will be shared in the hope of developing a feel for
contemporary methods and codes. Extensive use of MATLAB for the
problems,exercises and project.

3
Computational Fluid Dynamics

• Numerical Solution of Partial Differential Eqs., PDE’s.


• Application to a Wide Variety of Physical Systems:
– Aerodynamics, Fluid Mechanics, Astronautics
– Heat Transfer, Combustion, Magnetohydrodynamics
– Astrophysics, Weather Prediction, Ocean Modeling
• Solve the PDE on a Discrete Lattice (Grid, Mesh, Tessellation).
• Convert PDE to a System of Semi-Discrete Eqs., ODE’s.
• Convert the Semi-Discrete ODE’s to Fully Discrete O∆E’s.
• Systematic Design, Analysis and Implementation of Methods.
• Accuracy, Consistency, Stability, Convergence, and Efficiency.

4
Navier-Stokes Equations

∂t Q + ∂x E + ∂y F = Re−1 (∂x Ev + ∂y Fv )

     
ρ ρu ρv
     
 ρu   ρu2 + p   ρuv 
Q= , E =  , F = ,
     
 ρv   ρuv   ρv 2 + p 
     
e u(e + p) v(e + p)
   
0 0
   
 τ   τ 
 xx   xy 
Ev =  , Fv =  
 τxy   τyy 
   
f4 g4

5
τxx = µ(4ux − 2vy )/3 τxy = µ(uy + vx ) τyy = µ(−2ux + 4vy )/3
f4 = uτxx + vτxy + µP r−1 (γ − 1)−1 ∂x a2
g4 = uτxy + vτyy + µP r−1 (γ − 1)−1 ∂y a2

Pressure is related to the conservative flow variables, Q, by the


equation of state
 
1
p = (γ − 1) e − ρ(u2 + v 2 )
2
where γ is the ratio of specific heats, generally taken as 1.4. The
speed of sound is a which for ideal fluids, a2 = γp/ρ. The dynamic
viscosity is µ and is typically made up of a constant plus a computed
turbulent eddy viscosity. The Reynolds number is Re and Prandtl
number P r.

6
Finite-Volume Methods

• Finite-volume methods are applied to the integral form of the


governing equations.
Z I Z
d
QdV + n.FdS = P dV
dt V (t) S(t) V (t)

j-1/2 j+1/2

∆ x

j-2 j-1 j j+1 j+2


L R L R

Figure 1: Control volume in one dimension.

7
c b

p 1

d l a
4 ∆

0
5

e f

Figure 2: Control volume in Unstructured Triangular Grid.

• Unstructured primitive can be any N-side polygons.

8
Finite-Difference Schemes

• Approximate Equations Discretely in Space and Time


(n+k)
x = xj = j∆x t = tn = n∆t = nh u(x + m∆x, t + kh) = uj+m

t
Grid or
Node
Points
n+1
∆x
n
∆t
n-1

j-2 j-1 j j+1 j+2 x

Figure 3: Space-time grid arrangement.

9
• Using Taylor Series Expansions
 2
 n
∂u 1 ∂ u 1 n ∂ u
   
uj+1 = uj + (∆x) + (∆x)2 . . . + (∆x) ...
∂x j 2 ∂x2 j
n! ∂x n
j

• Rearranging we get a finite-difference approximation to the 1st


Derivative, with truncation error ert
 2

uj+1 − uj ∂u 1 ∂ u
 
= + (∆x) + ···
∆x ∂x j 2 ∂x2 j
 
1 ∂2u
ert = − (∆x)
2 ∂x2 j

10
Finite-Difference Methods

∂Q ∂E ∂F
+ + =0
∂t ∂x ∂y

Qn+1 n
j,k − Qj,k (Ej+1,k − Ej−1,k )
n+1 n+1
(Fj,k+1 − Fj,k−1 )
+ + =0
∆t 2∆x 2∆y

Figure 4: Physical and computational spaces.

11
Time Advance Schemes

• Integrate Equations Forward in Time


• Time Accurate Schemes
– Accurately Follow Unsteady Time Scales
• Time Marching to Steady State
– Relaxation Schemes
– Time Like Marching
– Multi-grid
– Direct Methods
– Any Trick in the Book to Get Answer Efficiently

12
Examples for General O∆E’s are:

un+1 = un + hu0n Euler Explicit

un+1 = un + hu0n+1 Euler Implicit

and

ũn+1 = un + hu0n
1
un+1 = [un + ũn+1 + hũ0n+1 ] P redictor Corrector
2

13
Stability

• Characterize Stability in the ODE Sense:


– ODE → eλt where Real(λ) ≤ 0
– Characteristic eigenvalue of PDE to ODE transformation, λ
• Characterize O∆E Stability in terms of σ − λ Relation
– Amplification eigenvalue of ordinary difference equation: σ
– For example, σ is the root of the Characteristic Equation:
1. σ − 1 − λh = 0 Explicit Euler
2. σ 2 − 2λ hσ − 1 = 0 Leapfrog
3. σ 2 − (1 + 3 λ h)σ + 1 λh = 0 AB2
2 2
4. (
σ 1 − λ h) − 1 = 0 Implicit Euler
5. σ − 1 − λh − 1 λ2 h2 − 1 λ3 h3 − 1 λ4 h4 = 0 RK4
2 6 24

Table 1. Some λ − σ Relations

14
Ι(σ) Ι(σ)

λ h= 0 ωh= 0

R (σ) R (σ)
λ h= οο

i ωh
σ = e λ h , λh - oo σ = e , ωh oo

a) Dissipation b) Convection

Figure 5: Exact traces of σ-roots for model equations.

15
CLASS GOALS

• Apply design and analysis techniques to the Nonlinear Euler Eqs.


• Employ model equations to develop concepts
du d2 u
– Convection-Diffusion Eq. dt + a du
dx = µ dx2
• Truncation Error Analysis
– Classical Truncation Error O(∆xp )
– Modified Wave Number Analysis:
ik ∗ = isin(k∆x)/∆x = ik + O(∆xp ) ≈ ik
• Stability Analysis, Convergence Characteristics
• Multi-Dimensional Techniques
• Nonlinear Equation Techniques: Flux Vector Splitting
• Implementation Issues: Efficiency, Parallization

16
Linearized Biconvex Airfoil

17
Nonlinear Vortex Propagation

18
Homework Assignments

• Assignment 1, Lab 1: Stability Examples

% Lab Assignment #1
%
% Program the following Matlab code. The best way is to make a
% file (filename: Lab_HW1.m) of the commands as
% they are shown below.
% Startup matlab on your system and at the matlab prompt
% (typically >) type: Lab_HW1
% The program should start up and prompt you for input.
%
% The system you are solving is
% the linear wave equation:
%

19
% du/dt + du/dx = 0 for 0 <= x < = 2 pi
% with periodic boundary conditions u(0) = u(2 pi)
%
% using
%
% n+1 n n n n
% u = u - CFL(a u + b u + c u )
% j j j-1 j j+1
%
% u = u enforces the periodic BC
% jmax 1
%
% We have chosen a three point differencing in space and
% explicit Euler time differencing.
%
% Problem #1: For nmax = 10, CFL = 1.0, run the program with
% a) a = -0.5, b = 0.0, c = 0.5 and describe what happens.

20
% Short descriptions please.
% Hand sketch the 5th and 10th curve plot of u vrs x
% or if you have printer capability print the results.
% b) Repeat a) for a = -1, b = 1, c = 0
% c) Repeat a) for CFL = 0.7
% d) Repeat a) for CFL = 1.4
%
% Problem #2: For nmax = 10, a = -1, b = 1, c = 0
% run the program with
% a) CFL = 0.7 and describe what happens.
% Hand sketch the 5th and 10th curve plot of u vrs x
% or if you have printer capability print the results.
% b) Repeat a) CFL = 1.4
%
% Problem #3:
% For nmax = 10, CFL=1.0, run the program with
% a) a = -0.9, b = 0.8, c = 0.1 and describe what happens.

21
% Short descriptions please.
% Hand sketch the 5th and 10th curve plot of u vrs x
% or if you have printer capability print the results.
% b) Repeat a) for a = -0.99, b = 0.98, c = 0.01

22

You might also like