Upload
cordelia-boyd
View
216
Download
1
Embed Size (px)
Citation preview
ME 595M J.Murthy 1
ME 595M: Computational Methods for Nanoscale Thermal Transport
Lecture 9: Introduction to the Finite Volume Method for the Gray
BTEJ. Murthy
Purdue University
ME 595M J.Murthy 2
Gray Phonon BTE• Recall gray phonon BTE: • e” is energy per unit volume per unit solid angle and depends on
direction vector s. So there are as many pde’s as there are s directions. In each direction, e” varies in space and time
• The e” values in different directions are related to each other because of e0 in the scattering term:
• Notice that
• This implies that there is no net energy source – scattering only shifts energy from one direction to another
• How would you add an net energy source to the gray BTE?
0
geff
e e ev e
t
s
0 1 1( , ) sin
4 4e t e d e d d
r
0
4
0eff
e ed
ME 595M J.Murthy 3
Overview of Finite Volume Method• Divide spatial domain into control volumes of extent xy• Divide angular domain into control angles of extent
• Divide time into steps of t - but will only do steady here for simplicity• Consider gray BTE in direction s. Integrate gray BTE over control
volume and corresponding control angle. Get energy conservation statement for that direction for each spatial control volume
• Do the same for all directions.• Solve each direction sequentially and iteratively• Back out “temperature” from e0 upon convergence using
s
04 ref
eT T
C
ME 595M J.Murthy 4
Discretization• Divide domain into rectangular control volumes of extent x and y.
Assume 2D, so that depth into page (z) is one unit.
• Divide angular domain of 4 in NxN control angles per octant. Centroid of each control angle is (i , i), extents are (, ). For each control angle i:
• Important: The directions s are 3D even though we are considering 2D
x
y
y
x
z
s
i sin sin sin cos cosi i i i i s i + j+ k
ME 595M J.Murthy 5
Discretization (cont’d)• Control angle extent is
• In 2D, only directions in the “front” hemisphere are necessary. Thus ranges from 0-/2 and =0-2
• Thus, increase control angle extent to:
• Define for future use:
/ 2 / 2
/ 2 / 2sin 2sin sin 0.5
i i
i iid d
/ 2 / 2
/ 2 / 22* sin
_ *2sin sin 0.5
_ 2 for 2D
i i
i i
i
d d
Weight Factor
Weight Factor
/ 2 / 2
/ 2 / 2
i i
i i
d d
sS
ME 595M J.Murthy 6
Formula for S
sin sin 0.5 cos 2 sin
_ cos sin 0.5 cos 2 sin
0.5 sin 2 sin
i i
i j
i
Weight Factor
i
+ j
+ k
S
ME 595M J.Murthy 7
Spatial Discretization
P E
N
W
S
y
x
ew
n
s
e” stored at cell centroids
ME 595M J.Murthy 8
Control Volume Balance• Integrate governing equation over control volume and
control angle:
0 "
i
, ,
" "
"
"
Look at LHS. Apply Divergence Theorem:
=
i ig
effV V
g i i g i i
A A
g i
A
g i
e ev e dVd dVd
v e dA d v e dA d
v e dA
v e
s
s n n s
n iS
"
" " " " =
g if ffacesA
g ie xi g iw xi g in yi g is yi
dA v e A
v e y v e y v e x v e x
fn ni iS = S
S S S S
faces f
n
s
w e
P
s
ME 595M J.Murthy 9
Control Volume Balance (cont’d)• Now look at RHS
• Collecting terms:
• Control volume balance says that net rate of energy entering the CV in direction si must be balanced by net in-scattering to the direction i in the CV
0 " 0 "
2
,
i i iP iP
eff effV
e e e edVd V O x
" " " "
0 ", ,
g ie xi g iw xi g in yi g is yi
i P i P
eff
v e y v e y v e x v e x
e eV
S S S S
ME 595M J.Murthy 10
Upwinding
• e” is stored at cell centroids, but we need it on the CV faces• Need to interpolate from cell centroid to face• Can use a variety of schemes to perform interpolation
Central difference scheme
• Second-order accurate, but wiggles in spatial solution Upwind difference scheme
Computationally convenient to write
P EWe
0.5 on uniform meshe P E
x
x
if >= 0
if < 0e P
E
S
S
xi xi xi Max( ,0) + Max(- ,0) /e P E S S S
ME 595M J.Murthy 11
Discussion• Upwinding, as shown, is only a first-order accurate scheme
Guaranteed smooth, bounded solutions False diffusion
• In CFD, a variety of higher-order upwind-weighted schemes have been developed which typically involve other upwind points (P, W for face e)
• Will go with first-order upwind scheme for now.
P EWe
ME 595M J.Murthy 12
Discrete Equation• Using upwinding and collecting terms, we obtain an
algebraic equation:
• We obtain one such equation for each grid point P for each direction i
• The b term contains e0iP
• Once we have boundary conditions discretized, we can solve the set
" ", , , , ,
Here, nb are the spatial neighbors E,W,N,S.
i P i P i nb i nb i Pnb
a e a e b
ME 595M J.Murthy 13
A Closer Look• Consider a direction si with sx >0, sy>0
" ", , , , ,
,
,
,
,
, , , , ,
0,
0 ",
0
0
1
4
i P i P i nb i nb i Pnb
i E
i W g x
i N
i S g y
i P i E i W i N i S
i
eff
ii P P
eff
P j P jj
a e a e b
a
a v S y
a
a v S x
a a a a a
x y
x yb e
e e
Point p only connected to points south and west of it
Influence of other directions in b term
Influence of b term increases as acoustic thickness L/(vgeff )increases
Diagonally dominant
Other directions appear here
ME 595M J.Murthy 14
Coefficient Structure
P E
N
W
S
ew
n
s
ME 595M J.Murthy 15
Discussion• Prefer to solve iteratively and if possible, sequentially to
keep memory requirements low• For upwind scheme, diagonal dominance is guaranteed,
making it possible to use iterative schemes• Conservation of energy is guaranteed regardless of spatial
and angular discretization Confirm that sum of all scattering source terms at a point is zero
regardless of discretization
• Any linear solver can be used – will use line-by-line tri-diagonal matrix algorithm (LBL-TDMA) for now.
ME 595M J.Murthy 16
Overall Solution Algorithm1. Initialize all e”
i values for all cell centroids and directions
2. Find e0P for each point P from current e” values.
3. Start with direction i=1
4. For direction i: Find discretized equations for direction i, assuming e0
temporarily known Solve for e”
i at all grid points using LBL-TDMA
Increment I as i=i+1
5. If (i.le.4*N*N) go to 4
6. If (i>4*N*N) check for convergence. If converged, stop. Else, go to 2.
ME 595M J.Murthy 17
Conclusions• In this lecture, we discretized the gray BTE.• The discretization is guaranteed to give energy conservation
regardless of the fineness of the spatial or angular discretization
• The discretization guarantees diagonal dominance and is hence suitable for iterative solvers such as the LBL TDMA.
• The next time, we will talk briefly of boundary conditions, and start looking at a finite volume code to solve the BTE.