4.2. Mass Transport Example Problem

This example problem demonstrates the use of the Streamline Upwind Petrov-Galerkin (SUPG) Formulation and additional discontinuity capturing (DC) terms to simulate heat transfer by mass transport in a flow field with high Peclet number.

The example problem is illustrated in Figure 4.3: Geometry, Flow Field, and Boundary Conditions. It is a unit square with a unidirectional constant flow at an oblique angle of 30 degrees. The temperature is fixed at the inlet and presents a discontinuity. The diffusion flux is assumed to be zero at the outlet. This example problem serves as a test case to demonstrate how the SUPG formulation and DC1, DC2, and DC3 reduce the oscillations triggered by the temperature discontinuity.

Figure 4.3: Geometry, Flow Field, and Boundary Conditions

Geometry, Flow Field, and Boundary Conditions


The square domain is meshed by the 2D lower order thermal element PLANE292 with 10 divisions per edge. The total flux (Tflux) formulation is used (KEYOPT(8) = 2). The Neumann boundary condition on the outlet is imposed as a convection boundary condition utilizing the 2D surface effect element SURF151. Conductivity is very small compared to the convective term, resulting in a high Peclet number (Pe = 10E6, see Equation 4–1), so the problem is effectively pure convection. Due to presence of discontinuities, the standard Galerkin method produces spurious oscillations that prevent convergence to a solution. The Streamline Upwind Petrov-Galerkin (SUPG) Formulation and the three discontinuity capturing terms are used to suppress the oscillations and obtain a smooth solution. The solution is obtained from a first run using just the SUPG formulation, followed by three successive runs that add crosswind diffusion using the three discontinuity capturing (DC) terms: DC1, DC2, and DC3 (see Streamline Upwind Petrov-Galerkin (SUPG) Formulation).

4.2.1. Command Listing

The command listing below demonstrates the problem input. Text prefaced by an exclamation point (!) is a comment.

/batch,list
/title, 292-tflux-supg-dc123
/nopr

l = 1.          ! Domain size         
h = .1          ! Element size
u = 1.          ! Velocity
angle = 30      ! Orientation of velocity
cond = 1.e-6    ! Thermal conductivity  
rho = 1.        ! Density
spheat = 1.     ! specific heat

*afun,deg
ux = u*cos(angle)
uy = u*sin(angle)

peclet = (rho*spheat*u*l)/cond
/com,
/com, peclet number: %peclet%
/com,

! Macro for evaluation of reaction heat
*create,rfsum
i=ndnext(0)
htot=0
*dowhile,i
        *get,h1,node,i,rf,heat
        htot=htot+h1
        i=ndnext(i)
*enddo
*end

/com,
/com, *****************************
/com, ***      TFLUX, SUPG      ***
/com, *****************************
/com,
/prep7
et,1,292
keyopt,1,8,2   ! Tflux
r,1,,1.,,,0,0  ! SUPG
rmore,0
rect,,L,,L 
esize,h
mshape,0,2d
amesh,1

mp,kxx,1,cond
mp,c,1, spheat
mp,dens,1,rho

!inflow bc
nsel,s,loc,y,0
d,all,temp,0
nsel,s,loc,x,0
nsel,r,loc,y,0,.2*L
d,all,temp,0
nsel,s,loc,x,0
nsel,r,loc,y,.2*L,L
d,all,temp,1

!outflow neumann
et,2,151
keyopt,2,4,1
keyopt,2,5,0
keyopt,2,8,2
type,2
real,2
nsel,s,loc,y,L
esurf
et,3,151
keyopt,3,4,1
keyopt,3,5,0
keyopt,3,8,2
type,3
real,3
nsel,s,loc,x,L
esurf
allsel
esel,s,type,,2
sfe,all,1,conv,1,rho*spheat*uy
sfe,all,1,conv,2,0              
esel,s,type,,3
sfe,all,1,conv,1,rho*spheat*ux
sfe,all,1,conv,2,0              
allsel

bf,all,velo,ux,uy,0
fini
save

/solu 
allse
nsub,1
neqit,10
solve
fini

/post1
set,last
/show,png,rev,,8,plnsol-supg
plnsol,temp
/show,close

/com incoming heat
nsel,s,loc,y,0
nsel,a,loc,x,0
*use,rfsum
iheat_supg=htot
nsel,all

/com outgoing heat
esel,s,ename,,151
etab,tt,smisc,2
ssum
*get,oheat_supg,ssum,0,item,tt
esel,all
fini

/com,
/com, *****************************
/com, ***    TFLUX, SUPG+DC1    ***
/com, *****************************
/com,
parsav
/clear,nostart
resume
parres

/prep7
r,1,,1.,,,1.,0.,  ! SUPG+DC1
rmore,0. 
fini

/solu 
allse
nsub,1
neqit,10
solve
fini

/post1
set,last
/show,png,rev,,8,plnsol-supg-dc1
plnsol,temp
/show,close

/com incoming heat
nsel,s,loc,y,0
nsel,a,loc,x,0
*use,rfsum
iheat_dc1=htot
nsel,all

/com outgoing heat
esel,s,ename,,151
etab,tt,smisc,2
ssum
*get,oheat_dc1,ssum,0,item,tt
esel,all
fini

/com,
/com, *****************************
/com, ***    TFLUX, SUPG+DC2    ***
/com, *****************************
/com,
parsav
/clear,nostart
resume
parres

/prep7
r,1,,1.,,,0.,1.,   ! SUPG+DC2
rmore,0. 
fini

/solu 
allse
nsub,1
neqit,10
solve
fini

/post1
set,last
/show,png,rev,,8,plnsol-supg-dc2
plnsol,temp
/show,close

/com incoming heat
nsel,s,loc,y,0
nsel,a,loc,x,0
*use,rfsum
iheat_dc2=htot
nsel,all

/com outgoing heat
esel,s,ename,,151
etab,tt,smisc,2
ssum
*get,oheat_dc2,ssum,0,item,tt
esel,all
fini

/com,
/com, *****************************
/com, ***    TFLUX, SUPG+DC3    ***
/com, *****************************
/com,
parsav
/clear,nostart
resume
parres

/prep7
r,1,,1.,,,0.,0.,   ! SUPG+DC3
rmore,1. 
fini

/solu 
allse
nsub,1
neqit,10
solve
fini

/post1
set,last
/show,png,rev,,8,plnsol-supg-dc3
plnsol,temp
/show,close

/com incoming heat
nsel,s,loc,y,0
nsel,a,loc,x,0
*use,rfsum
iheat_dc3=htot
nsel,all

/com outgoing heat
esel,s,ename,,151
etab,tt,smisc,2
ssum
*get,oheat_dc3,ssum,0,item,tt
esel,all
fini

/com,
/com, **********************************************
/com,
/com,             incoming heat   outgoing heat  
*vwrite,'supg',iheat_supg,oheat_supg
(2X,A4,4X,2(4X,E12.5))
*vwrite,'supg','-dc1',iheat_dc1,oheat_dc1
(2X,A4,A4,2(4X,E12.5))
*vwrite,'supg','-dc2',iheat_dc2,oheat_dc2
(2X,A4,A4,2(4X,E12.5))
*vwrite,'supg','-dc3',iheat_dc3,oheat_dc3
(2X,A4,A4,2(4X,E12.5))
/com,

/exit,nosa

4.2.2. Results

The figures below show the resulting temperature distribution that is swept across the unit square domain obtained as a result of mass transport. Results are plotted from the four separate solutions: the SUPG formulation alone, SUPG+DC1, SUPG+DC2, and SUPG+DC3. All four solutions effectively suppress the numerical oscillations that arise from the discontinuity of the inlet conditions in a high Pe flow.

A measure of overshooting due to numerical oscillations is in the maximum temperature of the temperature distributions, which is slightly higher than the unit inlet temperature. The results show that this overshoot is insignificant (more than an order of magnitude smaller than the inlet temperature) even in the SUPG only results, and the additional DC terms reduce it even further by more than 4 orders of magnitude in the case of SUPG+DC3.

Figure 4.4: Temperature Distributions Calculated Using the SUPG Formulation Alone and With Each of the DC Terms.

Temperature Distributions Calculated Using the SUPG Formulation Alone and With Each of the DC Terms.