20.07.2013 Views

Ecole doctorale de Physique de la région Parisienne (ED107)

Ecole doctorale de Physique de la région Parisienne (ED107)

Ecole doctorale de Physique de la région Parisienne (ED107)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendice B<br />

Spectral methods and vectorial<br />

equations<br />

Sommaire<br />

B.1 Spirit of the spectral methods . . . . . . . . . . . . . . . . . . . 177<br />

B.2 Solving Euler or Navier-Stokes equations . . . . . . . . . . . . 183<br />

The numerical algorithm adopted to solve the NSE (or the EE) is based on the spectral<br />

methods (SM) wi<strong>de</strong>ly used in hydro or MHD problems. Before exp<strong>la</strong>ining this algorithm<br />

in more <strong>de</strong>tails, in a first Appendix, we will begin with a short summary of the SM in<br />

or<strong>de</strong>r to make more evi<strong>de</strong>nt the peculiarity of the solving of vectorial equations like NSE.<br />

Then in a second Appendix, we <strong>de</strong>al explicitly with EE and aim at exp<strong>la</strong>ining the way<br />

we implemented the approximation done on the mass conservation equation.<br />

B.1 Spirit of the spectral methods<br />

Our group <strong>de</strong>veloped algorithms and routines library [Bonazzo<strong>la</strong> & Marck (1990),Bonazzo<strong>la</strong><br />

et al. (1999)] 1 allowing us to solve partial differential equations (PDE) in different<br />

geometries, mainly in domains diffeomorphic to a sphere. First, with an example of sca<strong>la</strong>r<br />

PDE, we will look at the singu<strong>la</strong>rities contained in operators expressed in spherical-like<br />

coordinates [see, for instance, the different components of the NSE : Equation (4.9)] and<br />

1 In 1980, one of us (S.B.) started to build a library of routines based on spectral methods to solve<br />

PDE in different geometries. Today, this library contains more than 700 routines written in FORTRAN<br />

70 and 90 <strong>la</strong>nguages. These routines have a strict hierarchy and allow us to assemble co<strong>de</strong>s in modu<strong>la</strong>r<br />

way. We call this library “Spectra”. A part of this library (the highest in the hierarchy) was written<br />

in C ++ <strong>la</strong>nguage by J.A. Marck and E. Gourgoulhon in or<strong>de</strong>r to allow the use of an object oriented<br />

<strong>la</strong>nguage. This library is called “Lorene”. The co<strong>de</strong> <strong>de</strong>scribed in this section uses the “Spectra” library<br />

and is written in FORTRAN 90 <strong>la</strong>nguage.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!