Professional Documents
Culture Documents
Introduction
1.1
What is CFD ?
CFD is a generic term used for tackling practical problems involving fluid
flow, heat transfer, mass transfer, combustion, etc., by means of computation;
Also referred to as Numerical Fluid Dynamics, Numerical Heat Transfer, etc.,
depending upon the application.
1.2
Why CFD ?
Limitations of CFD
Mathematical formulation of the problem (involves algebraic and ordinary/partial differential equations, initial and boundary conditions)
1
2.1
1 p
2u 2u
u
+
(u ) + (vu) =
+
+
g(T Tr )~g .i
t x
y
x
x2 y 2
v
1 p
2v 2v
+
(vu) + (v 2) =
+ 2 + 2 g(T Tr )~g .j
t x
y
y
x
y
cp
"
2T
2T
T
+
(uT ) + (vT ) =
+ 2 + Q v
t
x
y
x2
y
#
;
y
v=
v u
(continuity automatically satisfied); =
x
x y
T
2 2
+
(u) + (v) = 2 + 2 g ~g .j + g ~g .i
t x
y
x
y
x
y
y x y
"
#
v
2u
2
x y
y
2
u 2u
+
x2 y 2
2v 2v
Similarly
+
x2 y 2
"
=
y
=
y
=
x
=
Two velocity Poissons equations + one VTE equation in 2D; Three velocity Poissons equations and three VTEs in 3D. (Vorticity has a single
component in 2D but has three components in 3D).
~ V~ .
In 3D, the vorticity is defined as ~ =
~ ~ =
~ 2V
~ + (
~ .
~ V~ ) =
~ 2V~ since by continuity
Taking the curl,
~ V~ =0.
.
~ This is the set of three velocity Poissons
~ 2V~ =
~ .
In other words,
equations.
3
"
T
~ V~ T ) =
~ 2 T + Q v
+ .(
t
#
~ 2,
~ if a solenoidal constraint is placed on ,
~ i.e., .
~
~ = 0.
Types of meshes
Regular/structured (include staggered)
Block-structured (e.g., cartesian in one region, polar in another region)
Composite (combination of Lagrangian and Eulerian meshses)
Unstructured (similar to FE mesh)
dx
= x; t > 0; x = 1 when t = 0; x = 1 + c1 t + c2 t2 ;
dt
dx
R=
+ x = 1 + c1 (1 + t) + c2 (2t + t2 )
dt
Collocation: Choose two locations, say, t = 1/3 and t = 2/3; Set R(1/3) =
0 and R(2/3) = 0; Solve for c1 and c2 from the two equations.
Subdomain: Choose two subdomains, say 0 < t < 1/2 and 1/2 < t < 1;
R1
R1
R 1/2
R 1/2
Rdt/ 1/2
dt = 0; Solve for
Set average residuals 0 Rdt/ 0 dt = 0 and 1/2
c1 and c2 from the two equations.
Galerkin: Make the weighted averages of the residual over the desired
interval as zero:
Rb
a wf (t)dt
Rb
a wdt
= 0;
R1
0 tRdt
R1
0 tdt
= 0;
Rb 2
0 t Rdt
R1
2
0 t dt
= 0;
Solve for c1 and c2 using the two equations. Important: Weighting function
belongs to the trial function family; Recall: x = 1 + c1 t + c2 t2 .
Generally the Galerkin method has the highest accuracy in the MWR
family.
Least squares: Integral of the square of the residual over the desired interval is a minimum:
Z1 2
Z1 2
R dt = 0;
R dt = 0.
c1 0
c2 0
FEM involves solution of very large sets of simultaneous equations; this
requires special techniques like out-of-core sky-line procedure, frontal solution, etc.
FEM is well established for solid mechanics problems; not very well
established for fluid flow and convection problems.
~n
V~ n+1 V
~ V~ n ) = 1 p
~ n+1 +
~ 2V
~n
+ C(
t
V~ V~ n ~ ~ n
~ 2V
~n
+ C(V ) =
t
~ n+1 V~
V
1 ~ n+1
= p
t
~ V~ n+1 = 0:
Taking divergence and enforcing .
~ V~
.
2 n+1
~
p
=
t
The artificial compressibility method (Chorin, Yanenko)
~ V~ ) = 1 p
~ +
~ 2V~ where C(
~ V~ ) = .(
~ V~ V
~ ) or (V~ .)
~ V~ .
C(
Select a large value of c2 ; Note that SOLA-MAC (Hirt, Nichols and Romero)
builds this procedure into the system of unsteady equations.
MAC method (PPE method)
Explicit method employing PPE
~ p = D .(
~ V~ .
~V
~ ) + .
~
~ 2V~ .
t
"
~
~ 2V~ =
~ 2(.
~ V~ ). However, dropping this term may be
Note that .
detrimental due to growth of small oscillations. For additional forcing for
divergence free velocity field, we may write D/t = (D n+1 Dn )/t =
Dn /t.
SIMPLE and SIMPLEC
Originated from the explicit method SMAC in which the potential function
= p0 t, where p0 is the pressure correction of SIMPLE.
~n
V~ n+1 V
~ n+1 +
~ 2V
~ n+1
~ V~ n+1) = 1 p
+ C(
t
1~
V~ V~ n ~ ~
~ 2V~
+ C(V ) = p
+
t
V~ n+1 V~
1 ~ n+1
~ 2(V~ n+1 V
~ )
p ) +
(p
t
~ (V~
n+1
2
2
V~ )
(V~ n+1 V~ )
+
2
2
x
y
"
!#
(V~ n+1 V~ )
~ (p
n+1
1
p )
+ 2
+
2
t
x
y 2
"
!#
~ V~ )
(.
~
V
~ .
~ V~ ) +
~ 2V~ 1 (.
~ V~ ) = 1 (
~ V~ )V~
+ C(
t
2
The last term is added for numerical stability.
Equation solvers
Point-by-point GS/SOR/SUR
Line-by-line GS/SOR/SUR (generally along with TDMA)
SIP, MSIP
Conjugate Gradients, etc.
T
Ti Ti1
2Ti 2Ti1
= u
=u
x
x
2x
Ti+1 Ti1 Ti+1 + 2Ti Ti1
= u
2x
Ti+1 Ti1 ux Ti+1 + 2Ti Ti1
= u
2x
2
x2
2T
T
= u
(central) f alse 2
x
x
Commercial packages
10