You are on page 1of 44

Face reconstruction

Treatment of misalignment for NVD schemes


Computation of gradients in a cell

A generalized unstructured finite volume


discretisation - Part 2
Michel VISONNEAU
LHEEA - CNRS UMR 6598
Ecole Centrale de Nantes, Nantes, FRANCE

CFD in ship hydrodynamics - Kul.24-Z course


November - December, 2013

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Outline of lecture 5

Centered face reconstruction


Upwinded face reconstruction
Computations of gradients within a cell

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Outline of lecture 5

Centered face reconstruction


Upwinded face reconstruction
Computations of gradients within a cell

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Outline of lecture 5

Centered face reconstruction


Upwinded face reconstruction
Computations of gradients within a cell

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Centered face reconstruction

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Except terms intervening in convective and mass fluxes, quantities


located at the face center are rebuilt with the help of centered
approximations based on linear interpolation between cell and face
centers.
This part of the lecture is devoted to centered reconstruction of a
generic quantity Q and its normal-to-the face gradient needed for
diffusive terms.
R
r
n
L

l
f

ECN-CNRS

f+

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Quantity Qf may be written from its values and its gradient in the
adjacent cells L and R, by using a linear interpolation. Two
reconstructions can be considered, indicated by the subscripts + and
:


QL ' Qf Lf Qf
QR ' Qf + fR Qf
(1)
A decomposition of the normal-to-the-face gradient can be introduced

to use the normalized vectors l and r , for segments [Lf] and [fR] :



Qf
n = + Qf r + e + Qf

Qf
n = Qf l + e Qf

ECN-CNRS

si : e + , n + r
(2)
si : e , n l
(3)

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Coefficients are chosen to fullfill conditions e n = 0 and

e n = 0. Let us note that vectors e vanish in case of orthogonal


grids. Reconstructions 1 yield by introducing this decomposition :

QL = Qf h Qf n Qf e

QR = Qf + h+ Qf n Qf e +

(4a)

with distances h :

and h+ ,
fR n

h , Lf n

ECN-CNRS

(4b)

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

A second-order reconstruction can then be obtained by :


Qf =

h+
h

QL +

h
h

QR +

h+ h
h

Qf (
e + e )

(5a)

with the distance h defined by :

h , h+ + h = ( Lf + fR ) n = LR n

(5b)

First two terms of relation (5a) yield a first order reconstruction which is
used to evaluate the value of gradient at the face from values at
adjacents cells :

Qf =

h+
h

QL +

h
h

QR +

!  +

h
h

QL +
QR

h H + h+ H
h

(6)
ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

with :





, h
e = Lf n n Lf





H , h+ e + = fR n n fR

(7)

It is worth emphasizing that the boxed term in (6) vanishes in case of


orthogonal grids. Since it contains gradients of Q in the neighboring
cells, it will be treated explicitly during the resolution.

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Viscous diffusion fluxes

To rebuild at the face center the normal-to-the face gradient, one uses
a similar formula :

QR QL

Q
n |f =
+
h

!  +

LR
h
h


h QL + h QR
LR n
(8)

The boxed term, which vanishes in case of orthogonal grids, will be


treated explicitly during the resolution.

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Upwinded face reconstruction

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Non-centered reconstructions

In order to reinforce the stability of numerical scheme and avoid


unphysical oscillations, it is necessary to introduce more sophisticated
upwinded reconstructions for convective fluxes.

The order of accuracy of these reconstructions is comprised between


1 and 2 and cannot be a priori specified since it depends on the used
grid and the physical problem.

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Two upwind discretisation schemes will be described:


1

Hybrid scheme

GDS scheme

AVLSMART scheme

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Hybrid scheme

This scheme implemented in ISIS-CFD is based on a weighting


between values linearly interpolated from neighboring cells. Contrary
to classical approaches, the weighting coefficient is not uniform but
depends on the Peclet number evaluated on the face:
.

Pef =

mf kLR k
2S Q

(9)

The accuracy of this reconstruction is not necessarily uniform but is


locally adapted to local flow physics.

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

Hybrid scheme

Moreover, the relative orientation between the face and the velocity is
taken into account. The weighting factor d is computed with the help of
an exponential scheme, which ensures a smooth transition :

Qf = dL QL + dR QR + dL Lf Q |L +dR Rf Q |R

(10)

d = exp(Pef )/(1 + exp(Pef )) dL , 1 dR


Once again, the boxed term is treated explicitly.

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

The hybrid scheme does not guarantee the bounded character of the
reconstruction. This property is important for multifluid flows for which
concentration should remain between 0 and 1, for instance. The
(Gamma Differencing Scheme) scheme is due to Jasak (1996).
This scheme is based on an analysis using the normalized variable
diagram introduced by Leonard (1988). One supposes that the values
of the generic quantity Q are available in three points, U, C et D
located along the convection direction.

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme
One wants to rebuild the quantity at a face located between C and D
(F IG . 7). One defines the normalized variable by :

=
Q

Q QU

(11)

QD QU
QD

Flow direction

(CD)

QU

QC

Qf
(UD)

Variation of Q in the flow direction


ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

The GDS scheme is based on a reconstruction using these three


points :
f = f (QC )
Q
(12)
To avoid any unphysical oscillation, it is necessary that QC be bounded
between the values Min{QU , QD } and Max {QU , QD }. Written in terms
of normalized variables, this condition reads :

C 6 1
06Q

ECN-CNRS

(13)

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

To preserve boundedness characteristics on the face, GDS scheme


should satisfy the following constraints :

C < 0, Q
f = Q
C
for Q
C 6 1, Q
f is bounded by Q
f > Q
C and by unity
for 0 6 Q
C > 1, Q
f = Q
C
for Q

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

These conditions are fullfilled in the gray area of the following


figure 11. One observes that the first order upwind scheme (UDS)
fullfills all these conditions, when the centered scheme (CDS) does not
C ] , 0[ ]1, +[.
respect these criteria in the interval Q

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

Monotonicity criteria in terms of normalized variables

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme
To use this strategy within an unstructured multi-dimensional
framework, some modifications should be performed. The point U
being unknown, the quantity QU is evaluated by projecting the gradient

along the direction CD (figure 12) :

QU = QC CU Q |C

with CU , CD

(14)

Definition of the fictitious point U

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

By considering this new definition, the normalized variable at C is


provided by :
QD QC
C = 1
Q
(15)

2 Q |C CD

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

This definition being ill-posed when Q is uniform in the domain, one


specifies :

C = 0.5
Q

si

|QD QC | 6 106 ou | Q |C CD | 6 106

(16)

The GDS scheme establishes a continuous transition between a first


C < 1. For
order upwind and a centered schemes in the interval 0 < Q
C , it is necessary to recover the gap between the
lower values of Q
centered and upwind schemes. This transition is performed in the
interval [0, m ] and m takes usually the value 1/6.

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

C = 0
Q

= 0 Schma UDS

C = m
Q

= 1 Schma CDS

The GDS scheme retains finally a linear variation for the transition
coefficient, which leads to the following reconstruction described in
figure 17 :
1
C
=
Q
(17)

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme
Finally, the characteristics of this scheme are summarized in this table

k fD k
kCD k

including the interpolation factor fx =

C
Q

f
Q

Qf

Note

] , 0]

C
Q

QC

UDS

]0, m [

C2 +
21m Q


C
+ 1 + 21m Q

(1 (1 fx ))QC

transition

[m , 1[
[1, +[

1
2

C
+ 12 Q
C
Q

+(1 fx )QD
fx QC + (1 fx )QD

CDS

QC

UDS

GDS scheme reconstruction


ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

GDS scheme

~
Qf
UDS





CDS







1/2 











1

UDS

~
QC

GDS scheme in terms of normalized variables

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

AVLSMART scheme
Implementation in ISIS
If the base scheme for the Gamma scheme is the 2nd order CDS,
the base scheme for AVLSMART is the 3rd order QUICK scheme
(Leonard 79).
~
Qf
UDS





CDS







1/2 











1

UDS

~
QC

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Centered reconstruction
Non-centered reconstruction

AVLSMART scheme
Implementation in ISIS
C
Q

f
Q

Qf = CD QD + (1 CD )QC

Note

] , 0]

C
Q

CD = 0

UDS

]0, 1/4[

9
2 QC

CD =

C
Q
5
C
2 (1 fx ) 1Q

UDS->QUICK

CD =

C
32Q
1
C
4 (1 fx ) 1Q

QUICK

3
4 QC

[1/4, 3/4[

3
8

[3/4, 1[

3
4

C
+ 41 Q

[1, +[

CD = 32 (1 fx )

C
Q

CD = 0

QUICK->UDS
UDS

The interpolation factor fx , that accounts for non-uniform grids (1D), is defined as the

k fD k
kCD k

ratio: fx = .

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Misalignment with face centre


Objective
Qf = f (QU 0 , QC 0 , QD 0 ) to assume local 1D (aligned) configuration.

Points U, C and D are aligned with the face centre.


ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Misalignment with face centre


Correction (1/4)

Step 1: Project C and D on axis (f, n ):

C f = (Cf . n ) n = h n

fD = ( fD . n ) n = h+ n

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Misalignment with face centre


Correction (2/4)
Step 2: Extrapolate C and D:

QC 0 = QC + CC 0 . QC

QD 0 = QD + DC 0 . QD

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Misalignment with face centre


Correction (3/4)
Step 3: combine with what is known ...

QC 0 = Qf h QC . n ,

with

Qf = QC + Cf . QC

with

Qf + = QD fD . QD

QD 0 = Qf + + h+ QD . n ,

... to get the corrections


QC 0 = QC +
QD 0 = QD

.
QC

.
QD

Cf h n
fD h+ n

No need to store the locations of C and D.


ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Misalignment with face centre

Correction (4/4)

C0 .
Step 4: last trick to build Q
C0 =
Instead of using the definition Q

QC 0 QU 0
QD 0 QU 0

replace QU 0 with QC 0 C 0 U 0 Q |C .

Since C 0 D 0 = (h + h+ ) n = h n , and C 0 U 0 = C 0 D 0 it comes:


C0 = 1
Q

ECN-CNRS

QD 0 QC 0

2h Q |C . n

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Computation of a gradient in a cell

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Two discretisation schemes will be described:


1

Weighted least-square method

Gauss method

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Weighted least-square method

For the sake of simplicity, this method is presented for 2D flows. One

considers a control volume C0 with its center of gravity X0 = (x0 , y0 ).


One supposes that the quantity q varies linearly within this cell.

Consequently, the value at each point X belonging to C0 is given by :

q ( X ) = qC0 + X0 X ( q )C0

(18)

In 2D, this relation reads :


q (x , y ) = q (x0 , y0 ) + (x x0 )qx + (y y0 )qy

ECN-CNRS

(19)

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Weighted least-square method

Cell C0 and its neighborhood

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Weighted least-square method


The evaluation of the gradient of q on cell C0 makes use of n points
which provide centers of neighbouring cells (Ci )i =1,...,n as illustrated
by figure F IG . 2. Since there are more available points than needed,
we get an over-determined linear system defined by n relations :
qi = q0 + (xi x0 )qx + (yi y0 )qy

i [1, n]

(20)

This problem is solved in the mean-square sense by minimizing the


functional En (qx , qy ) :
n

En (qx , qy ) =

nh

i o2

q0 + (xi x0 )qx + (yi y0 )qy qi Di

(21)

i =1

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Weighted least-square method

Quantity Di corresponds to the weight given to a point Ci over the


whole set of data. It makes possible to give an increased importance
to the points Ci which are located in the vicinity of the recontructed
point C0 . This weighting by distance is crucial to treat high-aspect
ratios mesh encountered in the vicinity of walls. The weight Di of a cell
Ci is defined as the inverse of its distance to the point C0 :

Di = (||X0 Xi ||)1

ECN-CNRS

i [1, n]

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Weighted least-square method

En
En
= 0 and
= 0, leads to the gradient
qx
qy
 

 
1
qx
Syy
Sxy
Sxq
=
(22a)
qy
Sxx
Syq
S Sxy

Minimizing the functional


of q :

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Weighted least-square method


with :
n

Sxx =
Sxy =

h
i2
i2
n h
(
x

x
)
D
S
=
(
y

y
)
D
i
0
i
yy
i
0
i

i =1
n h

i =1

(xi x0 )(yi y0 )Di2

(23a)

S = Sxx Syy Sxy

i =1

and :
n

Sxq =
Syq =

h
i
2
(
x

x
)(
q

q
)
D
i 0 i 0 i

i =1
n h

(23b)

(yi y0 )(qi q0 )Di2

i =1

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

Face reconstruction
Treatment of misalignment for NVD schemes
Computation of gradients in a cell

Weighted least-square method


Gauss method

Gauss method
A second more classical is to use Gauss theorem: For a volume V
bounded by a surface S , one gets :
Z
Z

qdv = q
n dS
(24)
S

Consequently, the gradient over the cell may be evaluated by


discretising the previous relation :


1
q =
C

qf S f n f

VC

(25)

The values of the quantity on the faces are rebuilt by using 2nd order
reconstructions presented previously.

ECN-CNRS

A generalized unstructured finite volume discretisation - Part 2

You might also like