Intro2CFD Lecture1 Pulliam Intro Slides
Intro2CFD Lecture1 Pulliam Intro Slides
T. H. Pulliam
1
Intro to Computational Fluid Dynamics (CFD)
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
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
6
Finite-Volume Methods
j-1/2 j+1/2
∆ x
7
c b
p 1
d l a
4 ∆
0
5
e f
8
Finite-Difference Schemes
t
Grid or
Node
Points
n+1
∆x
n
∆t
n-1
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
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
11
Time Advance Schemes
12
Examples for General O∆E’s are:
and
ũn+1 = un + hu0n
1
un+1 = [un + ũn+1 + hũ0n+1 ] P redictor Corrector
2
13
Stability
14
Ι(σ) Ι(σ)
λ h= 0 ωh= 0
R (σ) R (σ)
λ h= οο
i ωh
σ = e λ h , λh - oo σ = e , ωh oo
a) Dissipation b) Convection
15
CLASS GOALS
16
Linearized Biconvex Airfoil
17
Nonlinear Vortex Propagation
18
Homework Assignments
% 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