Você está na página 1de 17

SPECTRAL METHODS

Solution of a lid driven cavity problem using


Chebyshev Collocation method

Abhishek Sinha
Sourabh Sahoo
Arun Kumar Suthar
Introduction
The Lid Driven Cavity
The lid driven cavity flow is most probably one of the most studied fluid problems in computational
fluid dynamics field. The problem deals with a square cavity consisting of three rigid walls with no-
slip conditions and a lid moving with a tangential unit velocity. The simplicity of the geometry of
the cavity flow makes the problem easy to code and apply boundary conditions and etc. Even though
the problem looks simple in many ways, the flow in a cavity retains all the flow physics with counter
rotating vortices appear at the corners of the cavity. Driven cavity flow serve as a benchmark
problem for numerical methods in terms of accuracy, numerical efficiency and etc. Both
Experimental and Numerical Solutions available.

Fig.1. The Geometry of the Lid Driven Cavity


Experiments done by Taneda are published in the Gallery of fluid motion by Van Dyke. Some
experimental results are shown below.

Fig.2.1 Creeping flow over a rectangular cavity, streamlines are shown by aluminum dust in glycerin.

Fig. 2.2 b/h = 3


Fig. 2.3 b/h = 2

Fig. 2.3 b/h = 0.5


SPECTRAL METHODS
Spectral methods are a class of spatial discretizations for which approximations are defined in
terms of a truncated series expansion. The key components for their formulation are the trial
functions (also called the expansion or approximating functions) and the test functions (also
known as weight functions).
The trial functions, which are linear combinations of suitable trial basis functions, are used to
provide the approximate representation of the solution.
The test functions are used to ensure that the differential equation and perhaps some boundary
conditions are satisfied as closely as possible by the truncated series expansion.
The function () can be expanded as the truncated series.

() = () , (, )
=

where the trial (or basis) functions () are given and the expansion coefficients must be
determined.

In spectral methods the chosen trial functions are orthogonal with respect to some weight such
that the scalar product


( , ) = =

where = constant and is the Kronecker delta.

The Residual which should be made equal to zero is

If () is an approximate solution to the differential equation

=
then the residual
() =

The requirement of spectral methods is that the residual , satisfy a suitable orthogonality
condition with respect to each of the test function by making the scalar product


( , ) = =

where are the test functions, and the weight is associated with the method and trial
function.

Various Spectral Methods


Classification according to the test function .

1. Galerkin method: Test functions = trial functions and each satisfy the boundary
condition.

= =

Therefore, the residue


= = ()
=
is made zero in mean according to

( , ) = ( ()) =
=

where i = 0,1, ......, N.

Here we get + 1 Galerkin equations to determine the + 1 coefficients.


Now by using the orthogonality property.

2. Tau method: Test functions = trial functions but does not satisfy the boundary
condition, the latter are enforced by an additional set of equations.

The equations determining the N+1 coefficients , are obtained by considering the Galerkin
equations as above with
= , = , = and
= 0,1, . . . . , 2.

( , ) = (, ) , = , , . ,
=

The remaining 2 equations are completed with the boundary conditions.


() = () =

3. Collocation or Psuedospectral method: Test functions = Dirac delta function at special


points called the collocation points .

= ( ) =

The collocation points are selected on [, ] and by using the property of Dirac delta function


()( ) = ( )


( , ) = ( ) =

( ) =

i.e. the residue is zero at all the collocation points.

( ) = ( )
=

This gives an algebraic system to determine the + 1 coefficients , = 0, . . . , .

Choice of trial functions

For Periodic problem : = Trigonometric polynomials (Fourier series)

For Non-periodic problem = orthogonal polynomials (for example : Legendre and


Chebyshev Polynomials)

The Fourier method is appropriate for periodic problems, but is not adapted to non periodic
problems because of the existence of the Gibbs phenomenon at the boundaries according to
which the partial sum of the Fourier series has large oscillations near the jump, which might
increase the maximum of the partial sum above that of the function itself. The overshoot does not
die out as n increases, but approaches a finite limit.
Figure showing the oscillations near the boundaries

Chebyshev Polynomials
The Chebyshev polynomial of the first kind () is the polynomial of degree k defined for
[1, 1] by

() = ( ) , k = 0,1,2 ...

therefore, . By setting = ,

from which it is easy to deduce the expressions of first Chebyshev polynomials

= , = , = ,

using the trigonometric formula,

( + ) + ( ) =

we get the recurrence relation,


+ + =

which allows us, in particular, to deduce the expression of the polynomials, , from the
knowledge of and

The Chebyshev polynomials are orthogonal on [-1,1] with the weight

= ( )/
Let the scalar product be

(, ) =

so that the orthogonality property is



( , ) = =

Truncated Chebyshev series


The Chebyshev approximation of the function u(x) defined for [1,1]:

() = ()
=

The expansion coefficients are determined by following


the Galerkin-type technique described in Section 1.2.1. The residual = made zero as.

( , ) = , = , , ,

( ) =

using orthogonality property, we arrive at Chebyshev expansion coefficients




= , = , ,

Chebyshev Differentiation Matrices


Let us consider the Chebyshev approximation of the function u(x) defined for x [-1, 1] :

() = () , (, )
=

Using the properties of Chebyshev Polynomials we can write



()
() = ()
=
Or in matrix form

() =

Where D is the Differentiation matrix

() () ()
= ( , , , ), () = ( , , , ),

Similarly

()
() = ()
=

Or in matrix form

() = ()

Where () is the 2nd order Differentiation matrix

() () ()
= ( , , , ), () = ( , , , )

So () = () ()

1. We use these matrices and this formulation to simplify the Differential equation into a set of
algebraic equation which can be solved easily.
2. We use the Gauss Lobatto points as the collocation points and find the values of vorticity,
velocity pressure etc. at those Points.
Governing equations and vorticity stream function formulation
We use the vorticity stream function formulation of The Navier Stokes Equation.

1. The Vorticity Equation

2. The Stream Function Equation



+ =

3. The u and v velocities



= , =

The Boundary Conditions

Figure Showing the Boundary Conditions at the walls


Development of the coding Algorithm
The coding algorithm is illustrated with a block diagram. The code can be seen directly
following the block diagram. The block diagram illustrates a short synopsis of how the code is
employed to solve the vorticity equation.
Results
The Lid Driven Cavity problem was solved for Reynolds number = 1000
Following parameters were used:

1. N = 50 (The number of Gauss Lobatto Points in x and y directions)

Time step = 2 103

Flow Visualisation

Stream Function Contours for Re = 1000


Streamlines for Re = 1000
Comparison of Results
The Results were compared with previously published data of Ghia and Bottela.
1. The u velocity on the vertical bisector was compared.
2. The v velocity on the horizontal bisector was compared

U velocity on vertical bisector


v velocity on the horizontal bisector

Conclusions

1. Flow in a lid driven cavity was discussed in details

2. Boundary Conditions and governing equation for the same were realized

3. Basic of FFT DFT and other collocations methods were worked on

4. Chebyshev Polynomial was discussed in details

5. Spectral method using Chebyshev Polynomial was used

6. The results matched very closely with that of Bottela and Ghia thus the code was validated.
References
1. Pyret (2002) Spectral methods for incompressible viscous flows.
2. Chebyshev and Fourier Spectral Methods, John P. Boyd.
3. Spectral Methods Fundamentals in Single Domains, C. Canuto , A. Quarteroni, M. Y. Hussaini, T. A.
Zang
4. Lloyd N. Trefethen, Spectral Methods in MATLAB.
5.An album of fluid motion by Van Dyke.

Você também pode gostar