Get Complete Project Material File(s) Now! »

## SFEMaNS possibilities

As this code has been developed throughout the years, the range of problems approximated has been extended and the computational cost was reduced. Enumerating all SFEMaNS possibilities, like taking into account periodic boundary conditions for infinite geometry along the symmetry axis, is not relevant here. However, we still decide to enhance the last three most important developments implemented before this PhD period.

### Parallelization

The code presents two layers of parallelization: one involving the Fourier decomposition and one involving a decomposition of the meridian domain where the finite element approximation is done. The Fourier decomposition allows to solve the problem independently, modulo nonlinear terms, for each Fourier mode so we can apply a parallelization in Fourier space using MPI (Message Passing Interface). The nonlinear terms, made explicit in time, are computed using a pseudo-spectral method and the fast Fourier transform subroutines from the FFTW3 package [25]. We note that the zero-padding technique (2/3-rule) is applied to prevent aliasing. On the other hand, the code is also parallelized in the meridian sections by using METIS [55] for the domain decomposition and PETSC (Portable, Extensible Toolkit for Scientific Computation) [6, 7, 8] for the parallel linear algebra. Eventually each computation is done by splitting the meridian domain in NS subdomains and regrouping the M Fourier modes in NF groups of same size. So the total number of processors N used by the simulation satisfies the relation: N = NFNS.

#### Magnetic permeability jumps in r and z

We end our description of SFEMaNS possibilities with the last development implemented before this PhD period: the implementation of magnetic permeability jumps in r and zdirections. This new method, implemented during the thesis period of F. Luddens [74], allows jumps in the electrical conductivity and magnetic permeability between the fluid domain c;f and the different conducting solid domains i c;s introduced in section 2.1.

The main difficulties of such problems are to satisfy continuity conditions across interfaces between c;f , i c;s, v and to impose a zero divergence on the induction field B = H. Indeed by denoting the interface between conducting domains and the interface between insulating domain with conducting domains, approximations need to satisfy: 8>>>>>< >>>>>: [jH ncj] = 0 on , [jcHc ncj] = 0 on .

**Extension to non axisymmetric geometry**

In this section we present a method, called pseudo-penalization and introduced by Pasquetti et al. [89], which we implemented in SFEMaNS to consider non axisymmetric geometry. Firstly we describe the method and give details on its use with prediction-correction scheme for the Navier-Stokes equations. Then we present various numerical tests involving manufactured solutions or physical problems so we can attest of the correct behavior of the method and enhance some of its properties.

**Pseudo-penalization method and prediction-correction scheme for the Navier-Stokes equations**

The goal of the following is to describe a technique which allows us to take into account a non axisymmetric domain that we split into a fluid domain, denoted by fluid , and a solid domain, denoted by obs. While we would like to approximate the solutions of the Navier-Stokes equations (1.3.5) in fluid, we also want to enforce the velocity field to be zero in the solid domain obs that represents an obstacle. To do so we plan to use a pseudo-penalization method that is described in the following for prediction-correction scheme. Eventually we give details on its implementation in the SFEMaNS code, while extending the method to solid obstacles with non zero velocity uobs. In the following the time step is denoted by , a function at time tn = n is denoted fn.

**Flow past a sphere and drag coefficient**

After checking the behavior of the pseudo-penalization method with manufactured solutions, we now use it to study the well known physical problem of a flow past a sphere. We consider a solid sphere of diameter dsp = 2 and of center (r; z) = (0; 0) and define the Reynolds number as follows: Re = Urefdsp ; (2.4.29).

where Uref is the reference velocity and the reference viscosity. Then we split our study into the approximation of the flow for a low Reynolds number and the study of the evolution of the drag coefficient with larger Reynolds numbers. Analytical Stokes flow with low Reynolds At low Reynolds numbers, the flow is known to be stationary and is referred to as Stokes flow. Moreover the analytical expression of the velocity and the pressure are known and can be found for example in a lecture note of Chiang C. Mei about Stokes flow past a sphere based on [1] and [65]. To approximate the solutions of this problem we consider a solid sphere of radius 1 so we define the penalty function as follows: (r; ; z; t) = 1r2+z21.

**Extension to MHD problems with variable fluid and solid properties**

During this PhD period we focused our investigations on three subjects: precession, VKS experiment and multiphase flow problems. While the precession only presents computational cost difficulties due to the Reynolds numbers involved, the other two problems involve the implementation of new approximation methods in the code. While the pseudopenalization method described in section 2.4 extends the range of SFEMaNS code to hydrodynamic problems with non axisymmetric geometry, it remains to take into account magnetic problems with a given time and (r; ; z) dependent magnetic permeability and hydrodynamic problems with variable density and viscosity.

In order to approximate such problems we have the choice to approximate the Maxwell equations either with the magnetic field H or the induction field B = H with the magnetic permeability. In the same way, the Navier-Stokes equations can either be approximated with the velocity field u or the momentum m = u with the density. A first study, done with D. Castanon-Quiroz during the first part of a one year stay at Texas A&M University (College Station, Texas) thanks to an invitation of J.-L. Guermond, draws us to focus on the following simplified equations: @t(u) rru = 0.

**Momentum based approximation for multiphase flow problems**

One of the main achievements of this PhD thesis has been to implement a new algorithm aiming at approximating multiphase flow problems with SFEMaNS code. This study is motivated by our group’s interest in Liquid Metal Batteries (LMB) and their possible role in future energy storage. The main difficulties we face are to follow the evolution of the interface between two fluids and to approximate the Navier-Stokes equations with a time independent algebra algorithm. As this algorithm is exhaustively described in chapter 5, we give a short description of the methods we use to approximate multiphase flows and refer to chapter 5 for completeness.

We overcome the first difficulty by assuming the fluid is composed of two separate and immiscible phases and we use a level set technique to represent the evolution of the density distribution. This method consists in introducing a level set taking value in [0; 1] and solution of: @t + u r = 0 (2.5.7).

where the interface of the two fluids is localized in 1(1=2) and equal to 0 in the first phase and 1 in the other. This level set is then used to reconstruct the density and the viscosity that unlike the magnetic permeability of the previous section are not given and need to be approximated. After reconstructing the density and the viscosity, the Navier-Stokes equations are formulated as in (1.3.8) and approximated with the variable m = u. Unlike the technique developed for the Maxwell equations with variable magnetic permeability that was of order 2 in time, the scheme developed for the Navier-Stokes equations is of order 1 in time. As a consequence the time derivative is approximated with a BDF1 formula and the nonlinear terms are made explicit with first time order extrapolation. To get a time independent algebra, the diffusive term is treated in a similar way as in the previous section by introducing the constant = and rewriting the diffusive term: r((m)) + r((m) (u)): (2.5.8).

We note that a stabilization method involving the entropy viscosity, introduced in the following chapter, is used to stabilize both the momentum and the level set equations. This method is validated with many tests described in chapter 5 and allows to get preliminary results of LMB instabilities published in [46].

**Table of contents :**

**1 Introduction **

1.1 Context and motivations

1.2 Thesis outline

1.3 Magnetohydrodynamic equations

1.3.1 Navier-Stokes Equations

1.3.2 Maxwell Equations

1.3.3 Magnetohydrodynamic Equations

**2 SFEMaNS MHD-code **

2.1 Framework

2.2 Numerical approximation

2.2.1 Fourier discretization

2.2.2 Finite Element representation

2.3 SFEMaNS possibilities

2.3.1 Parallelization

2.3.2 Heat Equation

2.3.3 Magnetic permeability jumps in r and z

2.4 Extension to non axisymmetric geometry

2.4.1 Pseudo-penalization method and prediction-correction scheme for the Navier-Stokes equations

2.4.2 Numerical test with manufactured solutions

2.4.3 Flow past a sphere and drag coefficient

2.5 Extension to MHD problems with variable fluid and solid properties

2.5.1 Magnetic field based approximation for azimuthal dependent magnetic permeability

2.5.2 Momentum based approximation for multiphase flow problems

2.6 Outlook

**3 Nonlinear stabilization method: entropy viscosity **

3.1 Context and method

3.1.1 On the need of models

3.1.2 Large Eddy Simulation models

3.1.3 Entropy viscosity as LES method

3.2 Entropy viscosity and SFEMaNS code

3.2.1 Numerical Implementation

3.2.2 Numerical tests

3.2.3 Outlook

**4 Large Eddy Simulation with entropy viscosity **

4.1 Hydrodynamic study of a Von Kármán Sodium set-up

4.1.1 Experimental set-up

4.1.2 Numerical approximation

4.1.3 Hydrodynamic regimes for Re 2500

4.1.4 Numerical results with entropy viscosity method

4.1.5 Conclusion

4.2 Two spinning ways for precession dynamo

4.2.1 Introduction

4.2.2 Numerical settings

4.2.3 Hydrodynamic study

4.2.4 Dynamo action

4.2.5 Conclusion

4.2.6 Appendix: Stabilization method

**5 Momentum-based approximation of incompressible multiphase fluid flows **

5.1 Introduction

5.2 The model problem

5.2.1 The Navier-Stokes system

5.2.2 Level-set representation

5.3 Semi-discretization in time

5.3.1 Constant matrix diffusion on a model problem

5.3.2 Pressure splitting

5.4 Full discretization and stabilization

5.4.1 Space discretization

5.4.2 Stabilization by entropy viscosity

5.4.3 Compression technique for the level-set

5.4.4 Extension of the algorithm to the MHD setting

5.4.5 Finite elements/Fourier expansion

5.5 Analytical tests

5.5.1 Manufactured solution

5.5.2 Gravity waves

5.6 Newton’s bucket

5.6.1 Physical setting

5.6.2 Influence of Strain rate tensor

5.6.3 Influence of the surface tension

5.7 Free surface flow in an open cylinder

5.7.1 Physical setting

5.7.2 Numerics vs. experiment

5.8 Bubbles

5.8.1 Rising bubbles

5.8.2 Oscillating bubbles

5.9 Liquid metal droplet falling in a vertical magnetic field

5.9.1 Physical configuration

5.9.2 Falling droplet under gravity

5.9.3 Lorentz force as an external force

5.9.4 Full MHD setting

5.10 Conclusion

**6 Conclusion and prospects **

6.1 Outcome

6.2 Outlook

**7 Résumé en français **

7.1 Introduction

7.1.1 Contexte et motivations

7.1.2 Rappel des équations adimensionnées de la MHD

7.2 Le code SFEMaNS

7.2.1 Description du code

7.2.2 Développements récents

7.3 Viscosité entropique

7.3.1 Nécessité de modélisation

7.3.2 La viscosité entropique comme modèle LES

7.3.3 La viscosité entropique dans SFEMaNS

7.4 Application aux Simulations des Grandes Echelles (LES)

7.4.1 Application à des écoulements de Von Kármán

7.4.2 Application à des récipients cylindriques en précession

7.5 Approximation d’écoulements multiphasique avec la quantité de mouvement

7.5.1 Approximation numérique

7.5.2 Récapitulatif de quelques test numériques

7.6 Conclusion

7.6.1 Résultats

7.6.2 Perspectives

**Bibliography **