• Aucun résultat trouvé

MembersoftheJury :Prof.GérardDegrez(ULB,Belgium)Prof.BernardKnaepen(ULB,Belgium)Prof.DanieleCarati(ULB,Belgium)Prof.FrançoisDupret(UCL,Belgium)Prof.ThomasBoeck(TUIlmenau,Germany) September2014 DocteurenSciencesdel’Ingénieur Athesissubmittedforthedegreeof

N/A
N/A
Protected

Academic year: 2021

Partager "MembersoftheJury :Prof.GérardDegrez(ULB,Belgium)Prof.BernardKnaepen(ULB,Belgium)Prof.DanieleCarati(ULB,Belgium)Prof.FrançoisDupret(UCL,Belgium)Prof.ThomasBoeck(TUIlmenau,Germany) September2014 DocteurenSciencesdel’Ingénieur Athesissubmittedforthedegreeof "

Copied!
178
0
0

Texte intégral

(1)

Department of Aero-Thermo-Mechanics

Numerical simulation of incompressible

magnetohydrodynamic duct and channel flows by

a hybrid spectral / finite element solver

Xavier Dechamps

A thesis submitted for the degree of

Docteur en Sciences de l’Ingénieur

September 2014

Members of the Jury:

Prof. Gérard Degrez (ULB, Belgium)

Prof. Bernard Knaepen (ULB, Belgium)

Prof. Daniele Carati (ULB, Belgium)

Prof. François Dupret (UCL, Belgium)

(2)
(3)
(4)
(5)

In this dissertation, we are concerned with the numerical simulation for flows of electri-cally conducting fluids exposed to an external magnetic field (also known as magneto-hydrodynamics or in short MHD). The aim of the present dissertation is twofold. First, the in-house CFD hydrodynamic solver SFELES is extended to MHD problems. Second, MHD turbulence is studied in the simple configuration of a MHD pipe flow within an external transverse magnetic field. Chapter 2 of this dissertation aims at reminding the physical equations that govern incompressible MHD problems. Two equivalent formula-tions are put forward in the particular case of quasi-static MHD. Chapter 3 is devoted to the detailed development of the hybrid spectral / stabilized finite element methods for quasi-static MHD problems. The extension of SFELES is made for both Cartesian and axisymmetric systems of coordinates. The short chapter 4 follows to provide the perfor-mances of SFELES executed by several processes in a parallel environment. The addition of a parallel direct solver is studied in regards with the memory and time requirements. The extension of SFELES is then validated in chapter 5 with test cases of increasing complexity. For this purpose, laminar flows with an existing analytical/asymptotic solu-tion are considered. The subject of chapter 6 is the MHD turbulent pipe flow within an external transverse and uniform magnetic field. The results are partially compared with the corresponding hydrodynamic flow and with a few data available in the literature.

(6)

Cette brève intermède dans un document de thèse offre toujours à l’auteur une plus souple liberté dans sa rédaction. Cette partie est donc rédigée en différentes langues en raison du caractère international de l’environnement dans lequel mon travail s’est réalisé.

Mes premiers remerciements s’adressent à mon directeur de thèse, Professeur Gérard Degrez, pour ton suivi, tes conseils, tes formules écrites dans un coin de serviette de restaurant et ta passion de la musique. Par de nombreuses occasions, un problème qui me tracassait durant un long temps a été résolu en quelques minutes en passant par ton bureau pour y chercher réponse. C’est grâce à ton énorme bagage de connaissances en mécanique des fluides et méthodes numériques ainsi qu’à ta facilité à communiquer cette passion que cette thèse de doctorat a débuté.

Je voudrais également remercier les Professeurs Bernard Knaepen, Daniele Carati et François Dupret pour vos conseils avisés, votre disponibilité en tant que membres du comité d’accompagnement ainsi que votre participation en temps que membre du jury. Mein herzlichster Dank gilt auch Prof. Thomas Boeck für unsere Gespräche und für Ihre Teilnahme als Mitglied der Jury.

Le soutien financier de ce travail a été assuré par une bourse aspirant du Fonds National de la Recherche Scientifique (FNRS), à qui j’adresse mes remerciements. Sans leur soutien durant ces quatre années, il ne m’aurait pas été possible de réaliser les voyages à Vienne, Dresde, San Diego (CA) et Bad Honnef pour différentes conférences internationales.

This work utilized the Janus supercomputer, which is supported by the National Sci-ence Foundation (award number CNS-0821794) and the University of Colorado Boul-der. The Janus supercomputer is a joint effort of the University of Colorado Boulder, the University of Colorado Denver and the National Center for Atmospheric Research. Computational resources have also been provided by the supercomputing facilities of the Université catholique de Louvain (CISM/UCL) and the Consortium des Équipements de Calcul Intensif en Fédération Wallonie Bruxelles (CÉCI) funded by the Fonds National de la Recherche Scientifique (FRS-FNRS).

Now comes the turn of my colleagues in the ATM department. During these four years here, a great number of people arrived and left. I will try to not forget anyone. My first gratitude goes to Michel for your incredible availability despite the huge quantity of work you must face in your actual position. I also express my acknowledgements to Matthew, Valentina, Mariana and Rabea for creating a comfy environment. Of course, I also thank (in no particular order of importance) Tomoe (友恵), Kim, Thomas, Axel, Benjamin, Jean-Paul, Laurent, Shayan, Amélie, Diako, Christophe, François, Frank, Jo-han et Martin. Un tout grand merci également à nos deux sécrétaires Shirley et Anne

(7)

Last but not least comme on le dit si bien dans la langue de Shapespeare, la famille occupe la dernière place de ces remerciements afin que l’attention soit mise sur elle. Je vais tout simplement exprimer à vous, maman, papa, grand frère et sa deuxième moitié Maud, ma gratitude pour tout ce qui m’a mené, de fil en aiguille, à ce point-ci. Mein Dank geht ebenfalls an meine zweite Familie, Elvira, Raymond, Jerome und Vicky. Letztlich bist du an der Reihe, Jessica. Dir sage ich ganz einfach "Danke" für diese gemeinsame Erfahrung.

Xavier Dechamps Brussels, Belgium September 2014

(8)
(9)

Abstract i

Acknowledgements - Remerciements ii

List of Figures viii

List of Tables x

List of Symbols xi

1 Introduction 1

1.1 General context . . . 1

1.2 Objectives . . . 4

1.3 Structure of the report . . . 5

2 Governing equations 6 2.1 Governing equations of fluid mechanics . . . 6

2.2 Incompressible magnetohydrodynamics . . . 8

2.2.1 Physics of magnetohydrodynamical flows . . . 8

2.2.2 Lorentz force . . . 8

2.2.3 Theory of electromagnetism . . . 9

2.2.4 Transport equation for the magnetic field - Induction equation . . . 10

2.2.5 Incompressible MHD equations . . . 11

2.2.6 Nondimensional incompressible MHD equations . . . 12

2.3 Quasi-static MHD . . . 15

2.3.1 Quasi-static MHD - Magnetic field formulation . . . 15

2.3.2 Quasi-static MHD - Scalar potential formulation . . . 16

2.3.3 Boundary conditions . . . 17

2.3.4 Energy budget . . . 19

2.3.5 First comparison of the two quasi-static formulations . . . 21

3 3D flow solver 23 3.1 Introduction . . . 23

3.2 About the discretizations . . . 23

3.2.1 Finite element method . . . 23

3.2.2 Spectral method . . . 30

3.2.3 Time integration . . . 32

(10)

3.2.5 Final choice of the formulation . . . 37

3.2.6 Conservativeness of the Lorentz force . . . 37

3.3 Parallelization . . . 38

3.4 Sequence of operations . . . 40

3.5 Discretization in the Cartesian coordinate system . . . 41

3.5.1 FE/spectral discretization . . . 42

3.5.2 Nodal matrix equation . . . 46

3.5.3 Nodal nonlinear vector . . . 48

3.5.4 Analytical coefficients evaluation . . . 51

3.5.5 Time integration . . . 52

3.5.6 Boundary conditions . . . 52

3.6 Discretization in the cylindrical coordinate system . . . 55

3.6.1 FE/spectral discretization . . . 56

3.6.2 Nodal matrix equation . . . 60

3.6.3 Nodal nonlinear vector . . . 63

3.6.4 Analytical coefficients evaluation . . . 66

3.6.5 Time integration . . . 67

3.6.6 Boundary conditions . . . 67

3.7 Summary . . . 68

4 Effect of an additional level of parallelization on parallel efficiency 69 4.1 Introduction . . . 69

4.2 On the extension of SFELES to parallel direct solver . . . 70

4.3 Performance of the parallelization within SFELES . . . 74

4.4 Performance of the parallelization with MUMPS . . . 75

4.5 Summary . . . 79

5 Validation 81 5.1 Cartesian system of coordinates . . . 81

5.1.1 Channel flow . . . 81

5.1.2 Duct flow (square cross-section) . . . 84

5.1.3 Duct flow (circular cross-section) . . . 91

5.1.4 Stokes flow . . . 94

5.2 Cylindrical system of coordinates . . . 96

5.2.1 Annular channel (infinite length) . . . 97

5.2.2 Toroidal duct (square cross-section) . . . 99

5.2.3 Duct flow (circular cross-section) . . . 108

5.3 Summary . . . 109

6 Flow inside a pipe of circular cross-section 112 6.1 Introduction . . . 112

6.2 Computational parameters . . . 114

6.3 Some additional considerations . . . 115

6.4 Numerical results . . . 115

6.4.1 Appropriateness of the meshes . . . 115

6.4.2 Instantaneous solution . . . 116

6.4.3 Mean flow and turbulent fluctuations . . . 119

(11)

6.4.5 Two-point velocity correlations and spectra . . . 126

6.4.6 Friction coefficient . . . 127

6.4.7 Physical and numerical dissipations . . . 128

6.5 Summary . . . 130

7 Conclusions and Perspectives 133 Bibliography 138 A MHD laminar channel flow 149 B MHD laminar duct flows 153 B.1 Square cross-section with electrically insulated walls . . . 153

B.2 Square cross-section with perfectly conducting walls . . . 154

B.3 Square cross-section - Hunt flow . . . 154

B.4 Circular cross-section with electrically insulated wall . . . 155

C MHD laminar flow in an annular channel 156

(12)

3.1 One-dimensional FEM piecewise linear elements. . . 25

3.2 Two-dimensional FEM piecewise first order triangular elements. . . 26

3.3 Definition of the scaled inward normal vectors for a linear triangular element 28 3.4 Sequence of operations performed during each time step. . . 40

3.5 Coordinate transformation of the transverse magnetic field . . . 56

4.1 Structure of the parallel computation both in physical and Fourier space. Two Fourier modes are solved through four threads each. . . 70

4.2 Construction of the full matrices - Parallel solver . . . 72

4.3 Construction of the full right-hand sides - Parallel solver . . . 72

4.4 Distribution of the full right-hand sides - Parallel solver . . . 73

4.5 Weak-scaling of SFELES with MUMPS as a sequential solver . . . 75

4.6 Speed-up and memory reduction for 2 modes solved by up to 32 processors 76 4.7 The total time step and total memory as a function of the size of the mesh 78 4.8 Linear system evolution time and memory usage for multigrid preconditioners 78 4.9 Weak-scaling of SFELES with MUMPS running on 8 processes . . . 79

5.1 Channel flow - Geometry . . . 82

5.2 Channel flow - Error convergence and velocity profile . . . 84

5.3 Duct flow (square cross-section) - Geometry and mesh . . . 85

5.4 Duct flow (square cross-section) - Electrically insulated walls . . . 86

5.5 Duct flow (square cross-section) - Perfectly conducting walls . . . 88

5.6 Duct flow (square cross-section) - Insulated side wall and perfectly con-ducting perpendicular wall . . . 89

5.7 Duct flow (square cross-section) - Conducting side wall and perfectly con-ducting perpendicular wall . . . 90

5.8 Duct flow (circular cross-section) - Geometry and mesh . . . 91

5.9 Duct flow (circular cross-section) - Velocity profiles . . . 93

5.10 Duct flow (circular cross-section) - Patterns of the electric current . . . 94

5.11 Duct flow (circular cross-section) - Profiles of the scalar potential . . . 94

5.12 Stokes flow - L2 relative error norms . . . 96

5.13 Stokes flow - Average planar error as a function of the location in the z-direction . . . 96

5.14 Annular channel of infinite length - Geometry . . . 97

5.15 Annular channel of infinite length - Velocity and scalar potential profiles . 98 5.16 Annular channel of infinite length - Convergence of the L2 relative error norm . . . 99

(13)

5.18 Toroidal duct - Laminar velocity profiles . . . 102

5.19 Toroidal duct - Laminar patterns of the electric current and secondary flow 103 5.20 Toroidal duct - Radial velocity profile in the Hartmann layer . . . 104

5.21 Toroidal duct - Instantaneous turbulent velocity field in a transverse plane 105 5.22 Toroidal duct - Instantaneous turbulent patterns of the electric current and secondary flow . . . 106

5.23 Toroidal duct - Instantaneous turbulent structures . . . 107

5.24 Duct flow (circular cross-section) - Comparison between the meshes used for the Cartesian and cylindrical versions of SFELES . . . 109

5.25 Duct flow (circular cross-section) - Velocity profiles . . . 110

6.1 Turbulent pipe flow - Geometry of the domain and definition of the axes. . 113

6.2 Turbulent pipe flow - Appropriateness of the meshes . . . 116

6.3 Turbulent pipe flow - Reb = 8000 - Cuts in the instantaneous velocity field 117 6.4 Turbulent pipe flow - Instantaneous isosurfaces of Q-criterion . . . 118

6.5 Turbulent pipe flow - Intermittence of the vorticity field . . . 118

6.6 Turbulent pipe flow - Average axial component of the velocity field . . . 119

6.7 Turbulent pipe flow - Average axial component of the velocity field (semilog scale) . . . 120

6.8 Turbulent pipe flow - Reciprocal von Karman coefficients . . . 122

6.9 Turbulent pipe flow - Averaged velocity fluctuations . . . 124

6.10 Turbulent pipe flow - Patterns of the electric current . . . 125

6.11 Turbulent pipe flow - Two-point velocity correlation . . . 127

6.12 Turbulent pipe flow - Streamwise one-dimensional energy spectra . . . 128

6.13 Turbulent pipe flow - Friction coefficients . . . 129

6.14 Turbulent pipe flow - Physical and numerical dissipations . . . 131

A.1 Channel flow - Theoretical velocity profiles . . . 151

A.2 Channel flow - Dimensionless pressure drop . . . 152

(14)

3.1 4th order numerical integration: weights and points coordinates. . . 66 3.2 Regularity conditions on the axis (r = 0). . . 68 4.1 Weak-scaling with sequential MUMPS . . . 74 6.1 Turbulent pipe flow - Mean flow configurations for the numerical simulations.114

(15)

0 = 8.854 10−12[F/m] Electric permittivity in vacuum

µ [kg/m s] Dynamic viscosity

µ0 = 4π 10−7[T m/A] Magnetic permeability in vacuum

ν = µ/ρ [m2/s] Kinematic viscosity

νm = (µ0σ) −1

[m2/s] Magnetic diffusivity

φ [V ] Scalar potential

ρ [kg/m3] Density of the fluid

σ [S/m] Electrical conductivity

B [T ] Magnetic field

J [A/m2] Current density

u(x, t) [m/s] = u ex+ v ey+ w ez Three-dimensional velocity vector

= uzez + urer+ uθeθ

˜

u(x, t) [m/s] = u ex+ v ey Two-dimensional velocity vector

= uzez + urer

c Conductance ratio

Ha Hartmann number

N Magnetic interaction parameter

P [kg/m s2] Static pressure p(x, t) = P/ρ [m2/s2] Kinematic pressure

Re Hydrodynamic Reynolds number

Rem Magnetic Reynolds number

b = B/√ρµ0 Magnetic field in Alfén unit

(I)FFT (Inverse) Fast Fourier Transform

CFD Computational Fluid Dynamics

FE(M) Finite Element (Method)

MHD Magnetohydrodynamics

PSPG Pressure Stabilized Petrov-Galerkin

SUPG Streamline-Upwind Petrov-Galerkin

(16)
(17)

Introduction

1.1

General context

The subject of this thesis is at the crossing junction of the scientific domains of hy-drodynamics, electromagnetism and numerical simulation. More precisely, we are here interested in the numerical study of magnetohydrodynamical flows.

Magnetohydrodynamics (MHD) is the scientific branch which treats the study of flows of electrically conducting fluids subject to an external magnetic field. Magnetohydrody-namics, as clearly indicated in its name, is the coupling between two rather distinct topics which are fluid dynamics and electromagnetism.

Fluid dynamics is concerned with the determination of the behaviour of a moving fluid. It has been known for a long time that two kinds of regime can appear depending on the conditions of the flow. In few cases, the flow remains laminar, presenting smooth characteristics in space and in time. On the other hand - and for most of the cases - the flow becomes turbulent with sharp variations of its characteristics in space and time. The transition between the smooth laminar regime and the turbulent state at a given char-acteristic non-dimensional number was first described by O. Reynolds [1] in a rigorous scientific approach. In practice, this number denoted as the Reynolds number covers a very broad range. Indeed the flight of an insect is characterized by a typical unitary order of magnitude for the Reynolds number whereas this number reaches orders of magnitude of 108 for a high capacity aircraft. Characterizing turbulence is a tedious task because of

the broad spectrum of spatial scales present in such flows. The mathematical equations which are specific to the motion of a fluid have been known for a long time. However, in the present state of our knowledge, it has been impossible so far to determine the general solution to a complex turbulent flow. The only situations where the general solutions are analytically established consist in very simplified problems of limited practical applica-tion. In order to circumvent this situation, experimental studies were set up to gradually increase our knowledge in complex situations. More recently, numerical computations have provided new tools to approximate physical problems at a much lower cost than the experimental benchmarks.

Electromagnetism is the scientific domain which focuses on the interaction between electric currents and magnetic fields. Its beginnings go back in 1820 when Ørstedt no-ticed this interaction during a lecture demonstration and published his observations in

(18)

a pamphlet. The principle of a circulating electric current through a wire generating a magnetic field is one of the four main effects resulting from this interaction. A few years later, Faraday demonstrated the opposite situation: a motion between a loop and a mag-netic field induces an electric current in the loop (which constitutes a second base effect). Other contributors are, among others, Ampère and Maxwell.

Magnetohydrodynamics is at the crossing junction between fluid dynamics and electro-magnetism. Applying an external magnetic field on the flow of an electrically conductive fluid generates an electric current inside the moving fluid (through an electromotive force). Then, this electric current is the source of an induced magnetic field. The interaction be-tween the electric current and the total magnetic field (external and induced) is the core of the Lorentz force that acts on the flow. The motion of the fluid is characterized by the Navier-Stokes equations with the influence of the magnetic field included by the volumet-ric Lorentz force. In a similar way as the Reynolds number plays a major role in fluid dynamics, one can define a set of dimensionless numbers specific to magnetohydrodynam-ics. One of them, the magnetic Reynolds number Rem, enables us to mark off different

kinds of MHD problems. Geophysics and astrophysics are characterized by Rem  1.

In this case, the induced magnetic field is of the same order of magnitude as the ex-ternal magnetic field. The combination of these two magnetic fields is instantaneously deformed by the velocity field so that they seem ’frozen’ in the flow, which is source of Alfvén waves [4, 5]. We have a two-way coupling between the total magnetic field and the velocity field. In the case of a zero mean magnetic field in a random velocity field, magnetic fluctuations are generated by the stretch-twist-fold mechanism (see [2, 3]). On the opposite, the case Rem  1 is characteristic to the flow of liquid metals (encountered

in metallurgy). In this case, the coupling between magnetic and velocity fields becomes a one-way process: the magnetic field alters the velocity field but the opposite is not verified any more.

(19)

the subject). These blankets convert the energy which is contained in the fast neutrons escaping the reaction into heat. Liquid metals are prime candidates as coolant materials because of their operability at high temperatures and their high thermal conductivity. As a consequence of the application of an intense magnetic field needed to confine the plasma, the flow inside the coolant media is also affected by an increasing pressure gradient needed to set the motion.

The domain of numerical simulation is concerned with the approximation and the numerical resolution of a set of equations representing the physics of a problem. For this purpose, a collection of techniques was developed step by step for a better representation of the physical solution. The first origin of numerical methods goes back to the 18th century thanks to the mathematical work of Newton. At that time, these discoveries remained at a level of innovative concepts due to lack of computational resources. The first trace of actual numerical resolution in the frame of fluid dynamics dates back to the first decades of the 20th century. In 1922, Richardson [7] achieved the very first modern weather forecast on the basis of a finite difference method, thanks to the collaboration of his students who performed handwritten calculations. In the 50s, the development of reliable computational resources allowed the implementation of several methods which had been staying at a theoretical level. Previously reserved for military applications, it was only in the 70s that numerical simulation took a fresh boost by the public-access to the computational resources. Then, new numerical methods were developed in specific scientific domains, with levels of complexity increasing with the hardware capacities. The choice of the numerical method is an important parameter. For historical reasons, the finite volume (FV) and finite difference (FD) methods were preferred in computational fluid dynamics (CFD) whereas the finite element (FE) method was more specialized in analysis of structural mechanics. The FE method was progressively experimented in CFD but up to now, the major CFD codes have remained based on the traditional FV and FD methods. However, truncated Fourier expansions coupled with a FE discretization in the meridian plane have already been the subject of previous research, including numerical analysis and simulation practice for the Stokes, Navier-Stokes and MHD equations (see [8– 10] and references therein).

(20)

which leads to operating costs of millions of dollars.

1.2

Objectives

The main goal of this dissertation consists in extending an in-house solver for hydrody-namical incompressible flows to the quasi-static approximation of the MHD equations. This solver, named SFELES (which stands for Spectral / Finite Element Large Eddy Simulation), was implemented as a joint effort of PhD students of the Université Libre de Bruxelles and the von Karmann Institute for Fluid Dynamics (in Rhode-Saint-Génèse). The basic assumption made in this solver is the presence of a direction of periodicity in the considered flow, which is legitimate for a non-negligible amount of physical flows. The implementation of this solver was made in successive waves. First, Deryl Snyder initiated a program for flows defined in a 3D Cartesian system of coordinates [11]. Then, the program was extended to cylindrical geometries by Yves Detandt [12]. The last major contribution came from Michel Rasquin [13] who added the possibility to use multigrid preconditioned iterative solvers to compute the solution and also implemented additional LES turbulence models.

The first objective of this dissertation is to provide the necessary knowledge for the im-plementation of a hybrid spectral / finite element solver for the quasi-static approximation of the MHD equations. Truncated Fourier expansions coupled with a FE discretization in the meridian plane have already been the subject of previous research, including numer-ical analysis and simulation practice for the Stokes, Navier-Stokes and MHD equations (see Belhachmi et al. [9], Canuto et al. [8], Guermond et al. [10] and references therein). In this context, our hybrid spectral / finite element solver relies on a new efficient im-plementation and parallelization that accelerates the time to solution and allows larger problems to be addressed.

The second purpose of this work aims at completing the knowledge of MHD turbulence inside circular pipes subject to an external transverse uniform magnetic field. Indeed, the study of duct flow for electrically conducting liquid metal fluids subject to an external applied magnetic field is known to be a good approach for a better understanding of fundamental properties of turbulence in the scientific domain of magnetohydrodynamics (MHD). This fundamental type of flow is omnipresent in industrial processes such as the casting/stirring of steel or the Czochralski process used to obtain single crystals of semiconductors [5, 14].

(21)

1.3

Structure of the report

The structure of the present dissertation is as follows. It is divided into 5 chapters. Chapter 2 is rather theoretical and is devoted to the development of the governing equa-tions. The general MHD equations are derived from the Navier-Stokes equations - which describe the incompressible motion of a fluid - and the set of equations that govern elec-tromagnetism. Herein, the contribution of the Lorentz force is split into two terms for which their respective action are then analysed. At this point, the induction equation for the magnetic field is also derived. Then, the quasi-static approximation is supposed in order to further simplify the set of equations then obtained. It will be shown that two major formulations of the quasi-static approximation are possible. An initial comparison of these two formulations is provided but the final choice is put back in the next chapter, when all the necessary data are at hand.

Chapter 3 is concerned with the numerical discretizations of the quasi-static MHD equations. At this point, the scalar potential formulation is chosen for reasons explained in a dedicated section. General information is provided to the reader concerning the dif-ferent steps of the discretizations to help ensure that the more advanced developments can be understood. Then, detailed information is provided for the finite element / spectral discretizations for the two majors subversions of SFELES (Cartesian and cylindrical sys-tems of coordinates). The purpose of this is to allow a novice "numericist" to implement with ease this kind of hybrid solver.

Chapter 4 will then provide the performances in memory consumption and time ac-celerations of the newly added direct solvers Umfpack and MUMPS. The reason of this not-really-a-MHD-matter-but-we-still-need-it is the following: the extension of SFELES to MHD will increase the RAM memory requirements on the processors. With the former direct solver, a serious limitation on the mesh size was encountered. This, linked with the fact that MHD problems needs finer meshes that purely hydrodynamical problems leads to a bottleneck situation. It was then required to add more efficient solvers and the chosen path was to use a parallel direct solver.

Chapter 5 is then devoted to the validation of the extension of SFELES to MHD flows for both Cartesian and cylindrical systems of coordinates. Several cases are considered with an increasing level of difficulty, in order to isolate different contributions of the additional terms in the governing equations. As analytical solutions are needed, only laminar and steady flows are considered at this level.

Then, chapter 6 is particularized to the study of the MHD turbulence appearing in a straight pipe flow of circular cross-section subject to an external, constant in time, uniform in space, transverse magnetic field. As thoroughly explained in the introduction of this chapter, few studies have been made on this kind of flow in the past, in comparison with very similar problems. Thus, this particularity offers the possibility to validate turbulent results with the few ones available and to propose additional data to the scientific community.

(22)

Governing equations

This chapter develops the governing equations of incompressible hydrodynamical and magnetohydrodynamical isothermal flows. Magnetohydrodynamics (MHD) is the branch of physics that is concerned with the interaction between an electrically conducting but non-magnetic fluid in motion and an external magnetic field. Its name itself highlights the coupling between fluid dynamics, which studies the motion of a fluid under the influence of forces, and electromagnetism, which deals with the interaction between electricity and magnetic fields. The motion of an electrically conducting fluid in an external magnetic field induces electric currents in that fluid, which creates an additional volumetric Lorentz force that acts on the fluid and induces additional components to the magnetic field. This whole constitutes the interaction between the flow and the magnetic field.

As we are here interested in the motion of incompressible liquid-metal fluids, substan-tive simplifications can be applied on the MHD equations under given assumptions. This leads to two mathematical formulations for the MHD equations. Comparisons between the advantages/disadvantages of these two formulations will allow us to choose the final form of the MHD equations that will be used in this work.

2.1

Governing equations of fluid mechanics

The Navier-Stokes equations, which describe the general motion of a fluid, are based on principles of conservation of mass and momentum (and as well conservation of energy in case of non-isothermal problems, which is not the case in this work). The derivation of these equations is well explained in [15].

Mass conservation

A fundamental law in fluid mechanics is the conservation of mass inside a closed volume V. It is mathematically translated by the following scalar equation (also known as the continuity equation)

∂ρ

∂t + ∇ · (ρ u) = 0 (2.1)

(23)

where ρ(x, t) [kg/m3] is the density of the fluid and u(x, t) [m/s] are the three spatial

components of the velocity field. This equation states that the variation in density is related to the volumetric variation of the volume V.

Momentum conservation - Second law of Newton

Newton postulated that the increase in momentum of a closed system is equal to the sum of the volumetric and surface forces experienced by the fluid. It can be mathematically translated by the vectorial equations (written down in Einstein notation) (see [16])

∂ρui ∂t + ∂ρuiuj ∂xj = ρ fi+ ∂Tij ∂xj (2.2) where fi are the components of the volumetric force per unit mass (such as gravity, etc.)

and Tij = −P δij + σij the symmetric stress tensor for the surface forces which contains

the contributions of both static pressure P and viscous stresses σij. The contribution of

the viscous stresses can furthermore be developed if we suppose the Newton hypothesis (the viscous stress tensor is a linear and isotropic function of the shear stress tensor):

σij = 2µSij + λδijSkk (2.3)

where µ [kg/m s] is the dynamic viscosity, λ [kg/m s] is the second coefficient of viscosity (dilatational) and Sij is the symmetric part of the shear stress given by

Sij = 1 2  ∂ui ∂xj +∂uj ∂xi  (2.4) Note that Skk = ∇ · u is the divergence of the velocity field. The second coefficient of

viscosity can also be written down under the form of λ = µv − 2µ3 where µv is referred

to as the coefficient of bulk viscosity. However, this last coefficient plays no role for constant density flows and has little influence in many variable density flows. The Stokes assumption µv = 0 is thus used in the present work. The constitutive equation for the

complete stress tensor then becomes Tij = −  P + 2µ 3 Skk  δij + 2µSij (2.5)

This linear relation between Tij and Sij is consistent with Newton’s definition of

viscos-ity coefficient in a parallel flow u(y): τ = µ du/dy. Consequently, fluids obeying Eq. (2.5) are called Newtonian fluids.

The hypothesis of incompressible flow

(24)

the dynamic viscosity µ = µ(T ) can be taken outside the derivatives. We pack together Eqs. (2.1), (2.2) and (2.5) to obtain:

∇ · u = 0 ∂u ∂t + (u · ∇) u = −∇p + ν∇ 2 u + fb (2.6a) (2.6b) where p = P/ρ [m2/s2] is the kinematic pressure and ν = µ/ρ [m2/s] the kinematic

viscosity. This last is defined as the ratio between the dynamic viscosity µ and the density ρ.

It may be interesting to emphasize that the kinematic pressure p is not an independent variable. Indeed, by taking the divergence of the momentum equations (2.6b) and by taking into account Eq. (2.6a), the Poisson equation (2.7) appears.

∇2p = −∇ · [(u · ∇) u] + ∇ · f

b (2.7)

Thus, the satisfaction of this Poisson equation is a necessary and sufficient condition for a solenoidal velocity field to remain solenoidal [17]. For incompressible flows, a thermo-dynamic state equation is not needed any more. Furthermore, pressure appears in the momentum equations (2.6b) through its gradient only, so that the flow is not affected by any constant pressure.

2.2

Incompressible magnetohydrodynamics

2.2.1

Physics of magnetohydrodynamical flows

Magnetohydrodynamics is concerned with flows of electrically conducting and non-magnetic fluids in regions where an external magnetic field is applied [5]. The details are reported in the following sections but it is worth taking a look at the interaction between the flow (whose velocity components are denoted by u) and an external magnetic field (denoted by B [T ]) in order to provide a global visualization of the problem.

This interaction can be split in three parts. First, an electromotive force (of order of magnitude |u × B|) is generated because of the relative motion of the electrically conducting fluid inside an external magnetic field, according to Faraday’s law of induction. This electromotive force is source of electric currents of order σ (u × B) where σ [S/m] is the electrical conductivity of the fluid. Then, according to Ampère’s law, these induced currents produce a second, induced magnetic field, which adds to the original magnetic field. The combined magnetic field (external and induced) interacts with the induced current density J [A/m2], to give rise to a volumetric Lorentz force proportional to J × B.

Generally, the Lorentz force tends to inhibit the relative movement of the magnetic field and the fluid.

2.2.2

Lorentz force

(25)

the charge of the particle. The first contribution to the Lorentz force is the electrostatic force (or Coulomb force) which arises from the mutual attraction/repulsion of charges. The second contribution is the Lorentz force, which comes from the relative motion of the charge in the magnetic field.

f = q (E + u × B) (2.8)

At a macroscopic level, this force f can be simplified. Indeed, if we sum up the contribution of all the particles, we obtain Eq. (2.9) where ρe is the charge density.

F =Xf = ρeE + J × B (2.9)

As demonstrated in [5], the contribution of the global Coulomb force is negligible by comparison with the Lorentz force. The explanation is that the contribution of the global Coulomb force can be manipulated to provide the following relation

ρeE ∼

uτe

l J B (2.10)

Since τe = 0/σ ∼ 10−18s (also called the charge relaxation time) in most practical

situations, the Lorentz force completely dominates Eq. (2.9) so that we can simplify this last equation into

F = J × B (2.11)

The last hypothesis is called quasi-neutrality [4, 5, 18] and does not imply a disap-pearance of the electrostatic field as it will be shown in the next section. Physically, tiny charge imbalances generate an electric field that would quickly spread out electric charges and reach a neutral state. At this point, it is not possible to determine the motion of the fluid with the actual definition of the Lorentz force in Eq. (2.11). Indeed, the current density J is a function of the magnetic field and the velocity. We need closure equations and these are provided by the theory of electromagnetism.

2.2.3

Theory of electromagnetism

Up to now, the combination of the Navier-Stokes equations in Eqs. (2.6) and the Lorentz force in Eq. (2.11) is not sufficient to determine the characteristics of the fluid. The theory of electromagnetism provides the set of equations (2.12a)-(2.12d) to completely describe the electric E and magnetic B fields.

∇ · B = 0 Maxwell’s law (2.12a)

∂B ∂t = −∇ × E Faraday’s law (2.12b) ∇ × B = µ  J + 0 ∂E ∂t  Ampère’s law (2.12c) ∇ · E = ρe  Gauss’ law (2.12d)

to which we add Ohm’s law in Eq. (2.13), which has been modified to take into account the motion of the fluid. In these last equations, µ [T m/A] and  [F/m] are the magnetic permeability and the electric permittivity of the medium.

(26)

One can derive an additional equation by taking the divergence of Ampère’s law and using Gauss’ law to obtain

∇ · J = −∂ρe

∂t (2.14)

which expresses the conservation of charge. A simplification can be provided in the case of MHD: the last term in Ampère’s law in Eq. (2.12c) (referred to as the displacement current) can be neglected. Indeed, we have

∂E ∂t ∼  σ ∂J ∂t ∼ τe ∂J ∂t

where we already mentioned that the charge relaxation time τeis minute so that ∂E/∂t 

J. We can rewrite Ampère’s law under the form

∇ × B = µJ (2.15)

This last simplification is consistent with the assumption of ρe ≈ 0 since the divergence

of Eq. (2.15) yields

∇ · J = 0 (2.16)

which is equivalent to Eq. (2.14) if we neglect ρe.

The theoretical equations of electromagnetism in the particular case of MHD can be written under the form of

∇ · B = 0 (2.17a)

∂B

∂t = −∇ × E (2.17b)

∇ × B = µJ (2.17c)

J = σ (E + u × B) (2.17d)

2.2.4

Transport equation for the magnetic field - Induction

equa-tion

In Eqs. (2.17), too many equations intervene to have a simple way to determine the electric E and magnetic B fields. One way to simplify the situation is by writing down the electric field under the form of

E = J

σ − u × B =

∇ × B

σµ − u × B

which is injected in Faraday’s law (2.17b) to get an equation for the magnetic field: ∂B

∂t = −∇ ×

 ∇ × B

σµ − u × B 

(27)

∇ × (u × B) = u (∇ · B) + (B · ∇) u − B (∇ · u) − (u · ∇) B

as well as the solenoidal nature of the velocity (Eq. (2.6a)) and magnetic (Eq. (2.17a)) fields to finally obtain:

∂B

∂t + (u · ∇) B = νm∇

2B + (B · ∇) u (2.18)

with νm = (µσ) −1

[m2/s] the magnetic diffusivity. Eq. (2.18) is called the induction equation but a more descriptive name would be the advection-diffusion equation for the magnetic field. We observe the similarity of this vectorial equation with the momentum equations (2.6b). In this last relation, one can interpret the physical meaning of the different terms:

• in the left-hand side, an advection term for the magnetic field • in the right-hand side, a diffusive term for the magnetic field

• in the right-hand side, a source term whose origin is the deformation of the magnetic field by a velocity gradient.

2.2.5

Incompressible MHD equations

The induction equation (2.18) for the magnetic field is added to the Navier-Stokes equa-tions (2.6), taking into account the volumetric Lorentz force defined in Eq. (2.11):

∇ · u = 0 (2.19a) ∂u ∂t + (u · ∇) u = −∇p + ν∇ 2u + J × B ρ (2.19b) ∂B ∂t + (u · ∇) B = νm∇ 2 B + (B · ∇) u (2.19c)

The Lorentz force in Eq. (2.19b) is then developed, using Ampère’s law in Eq. (2.17c) and some mathematical manipulations:

J × B = ∇ × B µ  × B = (B · ∇) B µ − (∇B) · B µ = (B · ∇) B µ − ∇  B2 2µ  (2.20) Under the assumption of a solenoidal magnetic field, the component i of the Lorentz force can thus be replaced by the divergence ∂Tij/∂xj where

Tij =

BiBj

µ −

(28)

is the Maxwell stress tensor. The utility of these stresses lies in the fact that we can represent the integrated effect of the distributed Lorentz force by surface stresses only. However, numerical algorithms that fail to respect ∇ · B = 0 are subject to a fictitious force proportional to Bi∂Bj/∂xj along the magnetic field. This additional force amplifies

the instability of the solution even for a linear wave. Thus, computational MHD schemes must keep the divergence of the magnetic field within round-off error.

The two terms in Eq. (2.20) possess an important physical meaning [4, 5]:

• The second term is similar to the gradient of pressure in the momentum equa-tions (2.19b). It is usual to define this term as the magnetic pressure. This term is source of force when B2 depends on the location. Most of the time, this term is of

no dynamical significance.

• The first term represents the effect of a magnetic tension parallel to the magnetic field. This term is source of restoring force when the magnetic field lines are curved. The contribution of this term is particularly important in plasma physics.

The decomposition of the Lorentz force in Eq. (2.20) can now be inserted in the momentum equations (2.19b) to obtain the incompressible MHD equations (2.21) where b = B/√ρµ expresses the magnetic field in Alfén unit.

∇ · u = 0 ∂u ∂t + (u · ∇) u = −∇  p + b 2 2  + ν∇2u + (b · ∇) b ∂b ∂t + (u · ∇) b = νm∇ 2b + (b · ∇) u (2.21a) (2.21b) (2.21c)

In a similar way as for the hydrodynamical Navier-Stokes equations, it is possible to extract an equation for pressure by taking the divergence of Eq. (2.21b) and taking into account of Eq. (2.21a):

∇2  p + b 2 2  = −∇ · h (u · ∇) u − (b · ∇) b i (2.22) where we can define the total pressure as being the sum of the kinematic pressure p and the magnetic pressure b2/2 [19].

2.2.6

Nondimensional incompressible MHD equations

It is customary in (magneto)fluid dynamics to nondimensionalize the physical equations in order to bring out nondimensional parameters which characterize the flow. There are several ways to proceed but we chose the one explained in [20]. Let us define U , L and B0 typical values for the velocity (e.g. the maximum value of velocity, the average

(29)

magnetic field, ...). The nondimensionalization is achieved by performing the following substitutions: u = U u∗ t = L U−1t∗ ∇ = L−1∇∗ ∇2 = L−2∇∗2 p = σ U B02L p∗ B = B0B∗ J = σ U B0J∗

where all the variables marked with an asterisk are nondimensional. These substitutions are introduced in Eqs. (2.19) and we finally obtain the nondimensionalized incompressible MHD equations: ∇∗· u∗ = 0 (2.23a) ∂u∗ ∂t∗ + (u ∗· ∇∗ ) u∗ = −N ∇∗p∗+ 1 Re∇ ∗2 u∗+ N J∗× B∗ (2.23b) ∂B∗ ∂t∗ + (u ∗· ∇∗ ) B∗ = 1 Rem ∇∗2B∗+ (B∗· ∇∗) u∗ (2.23c) where we defined Re = U L ν Reynolds number N = σ L B 2 0

ρ U Magnetic interaction parameter Rem =

U L νm

Magnetic Reynolds number

(2.24a) (2.24b) (2.24c) The system of 4 equations (2.23) for the 7 reduced variables (u∗, p∗, B∗) contains only 3 parameters Re, N and Rem which depend on the parameters of the flow. The flow is thus

completely defined by the combination of values taken by the dimensionless parameters defined in Eqs. (2.24), which gather the characteristics L, U , ν, σ, B0 and νm. The

physical meanings of these nondimensional parameters are discussed below. • Reynolds number Re

Re = Inertial forces Viscous forces =

U L

ν (2.25)

The hydrodynamic Reynolds number is considered as being the ratio between the in-ertial forces (u · ∇) u and the viscous forces ν∇2u in the momentum equations (2.19b). The Reynolds number is of great importance to characterize the laminar / turbulent nature of the flow.

(a) In the case where Re  1, viscous effect is dominant by smoothing out all small-scale inhomogeneities. The flow is called laminar and is not subject to high-frequency fluctuations in time or space.

(30)

• Magnetic Reynolds number Rem

Rem =

Advection of the magnetic field Diffusion of the magnetic field =

U L νm

= µ0σ U L (2.26)

The magnetic Reynolds number compares the advection ((u · ∇) B) and diffusion (νm∇2B) of the magnetic field in the induction equation (2.19c).

(a) Rem  1 is characteristic for the liquid-metal MHD: magnetic diffusion

pre-vents the intensification of the magnetic field through the motion of the fluid. The order of magnitude of the magnetic field inside the flow is fixed by the external applied magnetic field B0 because the induced magnetic field |b| ≈

Rem|B0| (see [21]). The coupling between the flow and the magnetic field is

thus a one-way process: the magnetic field influences the flow through the Lorentz force but the flow does not affect in a significant way the magnetic field. Mathematically, the induction equation (2.23c) is independent from the momentum equations (2.23b).

(b) When Rem ≥ 1, the magnetic field is subject to advection from the flow. The

coupling between the flow and the magnetic field is now a two-way process: the flow is slowed down by the magnetic field whereas velocity induces oscillations in the magnetic field (also known as the Alfvén waves). This is the range of geophysics and astrophysics, which are out of the scope of the present work. • Magnetic Interaction parameter (Stuart number) N

N = Lorentz force Inertial forces =

σLB02

ρU (2.27)

This nondimensional number is assimilated to the ratio of the Lorentz force (J×B)/ρ and the inertial forces (u · ∇) u in the momentum equations (2.19b). The magnetic interaction parameter can also be interpreted as the ratio of the characteristic times for the inertial process (τu = L/U ) and for the Joule damping (τJ = ρ/σB02).

(a) When N  1, the advective nonlinear terms dominate the Lorentz force. The magnetic field does not affect the fluid dynamic in a significant way.

(b) When N  1, the role played by the Lorentz force is more significant than the inertial forces. • Hartmann number Ha Ha2 = Lorentz force Viscous forces = σB02L2 ρν (2.28)

(31)

2.3

Quasi-static MHD

As previously mentioned, we will only consider the range of MHD flow characteristic of liquid-metals. This kind of flows is, in general, characterized by low magnetic Reynolds numbers Rem so that we can bring further simplifications in the incompressible MHD

equations (2.21) [5, 22, 23]. We commonly give the name of quasi-static form of MHD to the then simplified set of obtained equations. Hereunder, two different formulations are built. These two formulations are equivalent but using either of them offers some advantages/disadvantages as it will be shown. Note that the quasi-static MHD equations are also referred as the inductionless MHD equations in the literature. B. Knaepen [24] showed that the quasi-static approximation is valid up to Rem ≤ 1 but the quality of the

solution rapidly deteriorates as the magnetic Reynolds numbers is increased beyond 1. The quasi-linear formulation should be considered for 1. Rem . 20 whereas the full set

of MHD equations (2.21) should be solved for higher magnetic Reynolds numbers.

2.3.1

Quasi-static MHD - Magnetic field formulation

The quasi-static hypothesis is based on the assumption of low magnetic Reynolds number Rem  1. In the incompressible MHD equations (2.21), the total magnetic field b

(in Alfvén unit) is composed of the external applied magnetic field b0 and the induced

magnetic field b0 so that b = b0 + b0. Note here that we suppose a homogeneous and

constant applied magnetic field. The quasi-static hypothesis is based on the difference of scale orders between these two components: |b0| ≈ Rem|b0|  |b0| (as shown hereunder

and in [21]). This difference is at the origin of the following simplifications:

• Simplification of the induction equation for the magnetic field (2.21c), taking into account that the applied magnetic field is constant over time and homogeneous.

∂(b0+ b0) ∂t + (u · ∇) (b0+ b 0 ) = νm∇2(b0+ b0) + ((b0+ b0) · ∇) u =⇒ ∂b 0 ∂t + (u · ∇) b 0 = νm∇2b0+ ((b0+ b0) · ∇) u

Furthermore, additional terms can be dropped off when comparing the order of mag-nitude of advection term for the magnetic field and the source term by comparison with the diffusion term for the magnetic field. If we assume b0 as being the typical order of magnitude of the induced magnetic field, then:

(u · ∇) b0 ∼ U b 0 L (b 0· ∇) u ∼ U b0 L νm∇ 2b0 νmb0 L2 =⇒ (u · ∇) b 0 νm∇2b0 = (b 0· ∇) u νm∇2b0 ∼ U L νm = Rem  1

Finally, the time derivative of the induced magnetic field is neglected because of the difference in order of magnitude between the advective time scale of the flow τu and

the diffusive time scale for the the magnetic field τm:

(32)

This difference in order of magnitude between the two time scales implies that the velocity field evolves much more slowly than the induced magnetic field. Another way to formulate is that the induced magnetic field instantaneously adapts to the velocity field. The induction equation is thus simplified to the following form:

νm∇2b0 = − (b0 · ∇) u

and a order-of-magnitude estimate of this last equation shows that |b0| ≈ Rem|b0|

(see also [25]), which is used in the next simplification.

• Simplification of the Lorentz force in Eq. (2.21) by taking into account of the ho-mogeneity of the external applied field b0 and if neglecting the second order terms

of the induced magnetic field b0: Lorentz force =h(b0+ b0) · ∇ i (b0+ b0) − ∇  (b0+ b0) · (b0+ b0) 2  ' (b0· ∇) b0− ∇ (b0· b0)

The incompressible quasi-static MHD equation for the magnetic field are thus expressed by the following relations:

∇ · u = 0 ∂u ∂t + (u · ∇) u = −∇ (p + b0· b 0 ) + ν∇2u + (b0· ∇) b0 νm∇2b0 = − (b0· ∇) u (2.29a) (2.29b) (2.29c)

2.3.2

Quasi-static MHD - Scalar potential formulation

The essence is this alternative formulation is the difference in orders of magnitude |b0| ≈ Rem|b0|  |b0|. One situation which commonly arises in physical problem is the case

where the external magnetic field is static, the flow is forced through some external agent and friction keeps u to a modest level, in the sense that |u|  νm/L (where L is a

characteristic length of the flow) [5]. This formulation is based on the decomposition of the electromagnetic field (E, J, B) into their values (E0, J0, B0) in the case of a static flow

(u = 0) and their infinitesimal fluctuations (E0, J0, B0) in the presence of an increasingly smaller velocity field. These quantities are governed by

∇ × E0 = 0 J0 = σE0 ∇ × E0 = −∂B 0 ∂t J 0 = σ (E0+ u × B0)

where the second order term u×B0 has been neglected in the Ohm’s law for the fluctuating part of the current density J0. Furthermore, Faraday’s law gives E0 ∼ uB0, which is negligible in comparison with u × B0. Finally, considering that E0 is irrotational, the

electric field may be written under the form E0 = −∇φ where φ [V ] is the scalar potential

or electric potential (indeed the mathematical property ∇ × ∇φ = 0 is always respected). Ohm’s law can now be rewritten under the form

(33)

The leading order term in the Lorentz force is J × B0, which, with Eq. (2.30) is sufficient

to determine the Lorentz force in the momentum equations. Finally, the conservation of charge in Eq. (2.16) and Ohm’s law in Eq. (2.30) provide a Poisson equation that links the scalar potential φ to the velocity and magnetic fields:

∇2φ = ∇ · (u × B

0) (2.31)

The incompressible quasi-static MHD equations in the scalar potential formulation are thus expressed by the following relations:

∇ · u = 0 ∂u ∂t + (u · ∇) u = −∇p + ν∇ 2u + σ ρ (−∇φ + u × B0) × B0 ∇2φ = ∇ · (u × B 0) (2.32a) (2.32b) (2.32c) Note that no direct relation exists between φ and b0. However, the computationally expensive Biot-Savart law

B(r) = B0(r) + b0(r) = µ 4π Z V J(r0) × (r − r0) |r − r0|3 dV (r 0 ) (2.33)

could be used as a post-processing tool to derive the induced magnetic field from the electric current, which derives from the effectively computed scalar potential and velocity field in Eq. (2.30).

2.3.3

Boundary conditions

So far, the solutions to the set of equations (2.29) and. (2.32) are not computable because the system matrix is singular. One needs to specify particular values of the variables along the boundaries of the physical domain. These particular values, called boundary conditions, close the system of equations and make them solvable. We specify below general boundary conditions for the most common boundaries that we can meet.

• Velocity field

For time-dependent problems, we must provide initial and boundary conditions on the velocity field. Depending on the nature of the boundary, several types of boundary conditions may be imposed. For a no-slip wall of normal n which moves at a given velocity uwall, we impose the impermeability condition (u − uwall) · n = 0

and the no-slip condition (u − uwall) − ((u − uwall) · n)n = 0 to finally obtain

u = uwall (2.34)

In the case of an inlet boundary where a given amount of massflow is penetrating the domain, we need to provide a value for each component of the velocity:

u = uinlet(x, t) (2.35)

(34)

• Kinematic pressure

Imposing boundary conditions on the kinematic pressure are the less constricting of all the boundary conditions. Indeed, no particular treatment is needed for pressure on walls or inlets. In the case where an outlet is present in the domain, a fixed pressure is imposed on this boundary. On the contrary, in the case where no outlet is present in the domain, a fixed pressure is imposed at an arbitrary location in order to avoid the pressure field from diverging. Indeed, we saw that, in the momentum equations, pressure appears through its gradient only: the flow is not perturbed by the addition of a constant pressure. Imposing pressure at an arbitrary location allows to have a pressure varying in the domain around the imposed value.

• Magnetic field

The magnetic-field MHD formulation defined in Eq. (2.29) requires boundary condi-tions to be imposed on the induced magnetic field b0. These conditions are strongly dependent on the nature of the wall and of the fluid [22]. Let us consider the case where the magnetic and electrical properties are subject to a discontinuity between two regions of normal n. We must take into account this discontinuity on the mag-netic field on both side of the boundary:

B1 µ1 × n = B2 µ2 × n (2.36a) B1· n = B2· n (2.36b)

where subscripts (1) and (2) refer to the two regions and n1 and n2 are the external

normals for their respective domain. In the case of an infinite domain, the magnetic field has to tend toward zero Binf → 0.

• Scalar potential

At an inlet/outlet, a general boundary condition is J · n = constant. Generally, in the case of duct/pipe flows, one imposes no entry/exit of electric current so that the constant is fixed to zero. Furthermore, as exploited in the present work, the imposition of a magnetic field transverse to the flow leads to (u × B0) · n = 0 so

that the boundary condition on the scalar potential reads ∂φ∂n = 0.

For a wall, the imposition of a boundary condition on the scalar potential is linked to the current density, which must respect

J1· n = J2· n

across a boundary of normal n. The boundary condition on the scalar potential is now dependent on the electric properties of the wall (that is to say, on its electrical conductivity σw), as explained below.

– Electrically insulated wall: in the case where σw = 0, the normal component of

current density must be equal to zero because no current is able to penetrate the wall: J · n = 0. By expressing Ohm’s law on the wall, we can translate this to a condition on the scalar potential φ

∂φ

(35)

If furthermore the wall is stationary, we have: ∂φ

∂n = 0 (2.38)

– Perfectly conducting wall : in the case where σw = ∞, the current density

must remain at a finite value. It is achieved when

∇φ = u × B0 (2.39)

When the wall is stationary, we can simplify this condition to

φ = constant (2.40)

where the constant is arbitrary.

– In the case of a finite electrical conductivity 0 < σw < ∞, the situation is

more complicated than in both previous cases. Indeed, the current flowing inside the wall has to be determined by a electromagnetic coupling with the flow. This can be simplified under the condition that the thickness of the wall tw is much smaller than the characteristic length L of the domain [26].

Under this condition, we can suppose that the electric current entering the wall is discharged into the thin wall in a quasi two-dimensional way, so that we obtain:

∂φ

∂n = ∇Γ· (c ∇Γφ) with c = σwtw

σL (2.41)

In this relation, Γ denotes the components tangential to the wall and c is the wall conductance ratio.

2.3.4

Energy budget

This section is devoted to the study of the energy budget at the continuous level, as a function of the flow parameters. In what follows, it is supposed that the domain is periodic in all the directions and that the external applied magnetic field B0 is uniform.

The main interest here is to demonstrate the stability of the quasi-static MHD equations with respect to the intern kinetic energy. To ease the reading, we use the Einstein notation for the following mathematical developments.

• Quasi-static MHD - Magnetic field formulation

(36)

Then, if we suppose that the kinematic viscosity ν and magnetic diffusivity νm are

uniform in the domain, we can develop the second derivative terms: νui ∂2u i ∂x2 jj = ∂ ∂xj  νui ∂ui ∂xj  − ν∂ui ∂xj ∂ui ∂xj νmb0i ∂2b0i ∂x2 jj = ∂ ∂xj  νmb0i ∂b0i ∂xj  − νm ∂b0i ∂xj ∂b0i ∂xj

Furthermore, the solenoidal nature of the velocity (∇·u = 0) and magnetic (∇·b0 = 0) fields are used, so that

uib0j ∂b0i ∂xj + b0ib0j ∂ui ∂xj = ∂(b0juib 0 i) ∂xj uiuj ∂ui ∂xj = 1 2 ∂(ujuiui) ∂xj ui ∂ ∂xi p + b0jb0j = ∂ p + b0jb0j ui ∂xi

The final step consists in the integration over the domain V of the equation of conservation of energy, taking into account the previously given mathematical ma-nipulations. The gradient terms gives rise to boundary integrals over the boundary S of the domain V , thanks to Gauss’ integral theorem.

∂ ∂t Z V uiui 2 dV | {z } e + I S uiui 2  ujnjdS | {z } =0 + I S p + b0jb0j uinidS | {z } =0 − I S νui ∂ui ∂xj njdS | {z } =0 + Z V ν∂ui ∂xj ∂ui ∂xj dV | {z } ν − I S b0jnjuib0idS | {z } =0 − I S νmb0i ∂b0i ∂xj njdS | {z } =0 + Z V νm ∂b0i ∂xj ∂b0i ∂xj dV | {z } m = 0

We see here that assuming periodic boundaries for the domain allow us to get rid of all the boundary integrals. The only remaining terms are linked to the variation of the density of kinetic energy e, the viscous dissipation ν ≥ 0 and the magnetic

dissipation m ≥ 0. For vanishing kinematic viscosity and magnetic diffusivity, the

total kinematic energy is conserved in the domain. ∂e

∂t = −ν− m (2.42)

• Quasi-static MHD - Scalar potential formulation

Again, the equation expressing the conservation of kinetic energy is the result of the multiplication of momentum equations (2.32b) by the velocity field u. A first step consists in the simplification of the scalar product between the velocity field u and the Lorentz force, taking into account the conservation of charge in Eq. (2.16):

(37)

= −σ ρ  Ji σ   Ji σ + ∂φ ∂xi  = −1 ρ  JiJi σ + ∂Jiφ ∂xi  (2.43) As the conservation of charge is taken into account in the previous development, there is no need to add the contribution of Eq. (2.32c) in the global equation for the conservation of energy, as opposed to what has been done for the magnetic field formulation. We integrate over the domain V the scalar product between the velocity field u and the momentum equations (2.32b). The gradient terms become boundary integrals over the boundary S of the domain V , thanks to Gauss’ integral theorem. ∂ ∂t Z uiui 2 dV | {z } e + I uiui 2  ujnjdS | {z } =0 + I puinidS | {z } =0 − I νui ∂ui ∂xj njdS | {z } =0 + Z ν∂ui ∂xj ∂ui ∂xj dV | {z } ν + Z J iJi ρσ dV | {z } J + I J iniφ ρ dS | {z } ext = 0 = 0

The J ≥ 0 term is the Joule dissipation linked with the circulation of electric current

in the domain V . The boundary term ext is null in case of periodic boundaries.

This term has an interesting physical meaning. This term is equal to zero in case of electrically insulated wall (because of Eq. (2.37)) and perfectly conducting wall (because of Eq. (2.40) in the case where the constant is chosen equal to zero). In the case of a finite wall conductivity, an electric current flows out of the domain in the wall of the container. This current experiences Ohmic losses, which are denoted by the ext term, corresponding to energy leaving the domain.

∂e

∂t = −ν − J − ext (2.44)

2.3.5

First comparison of the two quasi-static formulations

The two formulations on the induced magnetic field Eq. (2.29) and on the scalar potential Eq. (2.32) for the quasi-static MHD represent the same physical situation. However, some mathematical differences are to be noted:

• The induction equation (2.29c) and the conservation of charge in Eq. (2.32c) added to the Navier-Stokes equations are linear, as well as the Lorentz force.

• The induction equations (2.29c) aim at determining the three components of the induced magnetic field. The conservation of charge in Eq. (2.32c) is scalar, which is a considerable advantage in comparison with the other formulation because of the computational gain induced by the reduction of the problem size.

(38)

• As shown in section 2.3.3, the boundary conditions on the scalar potential are far more simple to implement than those for the induced magnetic field. In the case of the induced magnetic field formulation, we have to couple the flow parameters with the electromagnetic parameters outside the domain in order to assure that the Som-merfeld’s radiation condition b0inf → 0 [27] is respected. In a general context, the scalar potential is preferred in the case of wall-bounded flow whereas the magnetic field formulation is preferred in the case of infinite domain.

• The Lorentz force terms in the scalar potential formulation (2.32b) are more com-plicated to implement that those in the magnetic field formulation (2.29b) because of the double vector product.

(39)

3D flow solver

3.1

Introduction

In the present dissertation, we extend the SFELES solver to incompressible MHD flows for Cartesian and cylindrical coordinate systems. The original hydrodynamic flow solver was first developed by D. Snyder [11] for the Cartesian problems and then by Y. Detandt [12] for the cylindrical problems. The main feature of the solver SFELES (an acronym that stands for Spectral/Finite Element Large Eddy Simulation) is the result of the hybridiza-tion of a spectral and a finite element methods to represent the full three-dimensional solution.

The first section of this chapter summarizes the main characteristics of the spectral and finite element discretizations as well as the time integration with a particular preference over what is used in SFELES. Then, the principles of the different levels of parallelism present in SFELES are discussed. Although the two versions of SFELES are based on the same original discretization, basic differences exist in the final form of the discretized equations. In order not to completely confuse the reader, the full discretization in space and time for the two versions are presented in two different sections.

3.2

About the discretizations

3.2.1

Finite element method

This section is concerned with a basic description of the finite element method (FEM) used in Computational Fluid Dynamics (CFD). We are not interested in a extensive description but rather in a global overview of the methodology, the different formulations and the main problems arising in the case of incompressible flows.

3.2.1.1 The basic formulations

For the purpose of understanding the finite element method, let us consider a simpler problem than the Navier-Stokes equations. Let us consider the following one-dimensional

(40)

differential equation (linear boundary value problem) in the domain Ω and its correspond-ing boundary conditions on the edge Γ of the domain:

L(u(x)) = f (x) for x ∈ Ω (3.1a)

u = u on Γdu (3.1b)

λdu

dx = q on Γnu (3.1c)

where the boundary Γ is split into two parts Γ = Γdu + Γnu. A Dirichlet boundary

condition is applied on Γdu and a Neumann boundary condition is applied on Γnu.

The first step in using the FEM is to define a finite-dimensional space Hh to which

the numerical solution will belong. An approximation uh(x) to the independent variable u(x) is written as a sum of known shape functions Nj(x) and unknown variables uj, so

that we can write:

u(x) ≈ uh(x) =

n

X

j=1

ujNj(x) (3.2)

The unknown variables uj of the discrete problem are the degrees of freedom. The shape

functions Nj(x) are finite-order polynomials. The limitation of the sum to n terms leads to

a non-satisfaction of Eq. (3.2) in all points of the domain Ω. However, the basis functions are chosen such that they form a complete set: the approximation in Eq. (3.2) improves when n increases. The approximation of the solution leads to a residual of the boundary value equation at the discrete level:

rh = L(uh(x)) − f (x) for x ∈ Ω (3.3) Several ways exist to obtain the approximate solution defined in Eq. (3.2) but they all tend to minimize the residual (3.3) over the domain. This is well summarized in [28].

The least square formulation minimizes the square of the residual over the domain. The following quantity

J (uh) = Z Ω (rh)2dΩ (3.4) is minimized by calculating ∂J (uh) ∂ui = Z Ω 2∂r h ∂ui rhdΩ = 0 for i = 1, ..., n (3.5) and we note that the equations which we obtained are integrals of the residual over the domain weighted by the functions wLS

i = 2∂rh/∂ui.

The weighted residual methods are a generalisation of the least square formulation. The first step is to transform the continuum problem (3.1) into its weak form (also known as the integral form) [28, 29]. Several methods exist under the denomination of weighted residual method but they all are based on the weighted integral form of the problem:

Z

wi(x)rhdΩ = 0 (3.6)

The weight functions wi(x) are arbitrary but must respect two rules: their number must

(41)

• The point collocation with wi(x) = δ(x − xi) where δ is the Dirac delta function.

This procedure is equivalent to making the residual zero at the n points: rh(xi) = 0

which is equivalent to a finite difference method.

• The subdomain collocation with wi(x) = I so that we have

R

Ωr

hdΩ = 0 which is

equivalent to a finite volume method.

• The Galerkin method with wi(x) = Ni(x). This formulation of the weighted

func-tions is the most used in the FEM. Only one set of funcfunc-tions is used and integrafunc-tions by parts on the differential operator allows the use of lower order basis functions and low continuity order functions. A main drawback is the need to evaluate possibly complex integrals.

Other finite element formulations are based on variational principles or on global physical statements but are not discussed here.

In this work, we will concentrate on the Galerkin FEM. The computational domain Ωh

is divided into a set of non-overlapping partitions Ωe (Ω ∼ Ωh = ∪Ωe) known as elements

as shown in Fig. 3.1. In this figure, two elements surrounds the point xj: the element

of size AΩe in the interval xj−1 ≤ x ≤ xj and the element of size BΩe in the interval

xj ≤ x ≤ xj+1. A set of nodes is associated to each element. The number of nodes fixes

the order of the polynomial for the shape functions in each element. A shape function

Figure 3.1: One-dimensional FEM piecewise linear elements.

Ni(x) is associated to each node locally within the element. This shape function is locally

defined as

Ni(xj) = δij with the Kronecker delta δij =

 0 if i 6= j

1 if i = j (3.7) As a consequence of the nature of this shape function, the degree of freedom uj is the value

of the numerical function uh at node j: uj = uh(xj). The pattern of the shape functions

induces a local influence of node j over the neighbouring nodes j −1 and j +1 and provides a compact support: the discretized equations couple only a few neighbouring node values. In Fig. 3.1, we see that the global shape function Nj for node j is a combination of the

two local shape functions AN

j and BNj.

(42)

Figure 3.2: Two-dimensional FEM piecewise first order triangular elements.

Now, let us put into practice the previously introduced theoretical notions. Consider the two-dimensional Stokes flow defined by Eqs. (3.8) which is a simplification of the hydrodynamic Navier-Stokes equations for a Reynolds number Re → 0.

ν∇2u − ∇p = 0 in Ω (3.8a)

∇ · u = 0 in Ω (3.8b)

u = ud on Γd (3.8c)

(−p[I] + ν∇u) · n = q on Γn (3.8d)

The first step of the FEM is to prescribe a representation of the solution of the kind uh =X j ujNj(x, y) (3.9a) vh =X j vjNj(x, y) (3.9b) ph =X j pjNj(x, y) (3.9c)

where we took the same shape functions to represent the velocity and pressure fields (first order triangular elements). The weighted residual formulation is thus expressed by

Z Ω uw i " ν ∂ 2uh ∂x2 + ∂2uh ∂y2  − ∂p h ∂x # dΩ + Z Ω vw i " ν ∂ 2vh ∂x2 + ∂2vh ∂y2  − ∂p h ∂y # dΩ + Z Ω p wi  ∂uh ∂x + ∂vh ∂y  dΩ = 0 (3.10) where uw

i, vwi and pwi are respectively the weight functions for the x-y components of

momentum equations (3.8a) and for the continuity equation (3.8b). Using the Galerkin FEM means that we choose particular function for the weight function: (uw

i,vwi,pwi) =

(Ni, 0, 0), (0, Ni, 0) and (0, 0, Ni) in Eq. (3.10). As the weight functions are chosen equal

to the shape functions, they are local to each element, so that we can re-write the integral over the domain as a sum of integrals over the elements Ωe:

Références

Documents relatifs

The effect of temperature and composition on most major properties affecting the potential stress development has already been discussed (autogenous and

Au travers de quelques exemples de recherche en raisonnement spatial qualitatif et en ontologies spatiales, j’ai voulu montrer que la formalisation de concepts spatiaux

A partir d’un plan d'échantillonnage similaire, où les paramètres du descripteur sont mesurés le plus souvent dans plusieurs stations à plusieurs reprises, l’écologue recherche

Après le géoréférencement des deux cartes géologiques (feuille Erg Tihoudaine et In Sakane), puis le découpage de ces deux dernières, la vectorisation de

Les prélèvements de résidus miniers issus de l’ancienne mine abandonnée de SIDI-KAMBER a permis de prélever les échantillons référencés : DSK1, DSK2, DSK3 G, DSK3, DSK4, SK

Au Nord de Sidi Nâamane, une faille chevauchante mettrait en contact le socle avec les marnes langhiennes leur permettant une alimentation en éléments de socle,

2 ىلإ ةللا دلا ءاممع أجل ىنعملا ديدحت يف ةبكع صلا هذى ؿيلذت ؿجأ فم دامتعلاا ىمع ؿقحلا كأ يللا دلا ؿقحلاب ينعنك ،&#34;ةيللا دلا ؿكقحلا ةيرظن&#34;

Figure V.13 : Microstructure obtenues par microscopie optique de l’échantillon ayant subi une compression uni-axiale de 2 kN après sept jours d’immersion dans une solution de.