Professional Documents
Culture Documents
Report_SIMaP_MagjetoThermoHydronamics_compressedimages.pdf
Report_SIMaP_MagjetoThermoHydronamics_compressedimages.pdf
Final Project
Simulation of magneto-thermoelectric
hydrodynamics around a grain with
multi-mesh finite element method
from 15/02/18 to 18/07/18
Materials Engineering
2017/2018
Résumé
Les forces magnéto-thermoélectriques sont issues de l’interaction entre un champ magnétique
superposé et les courants électriques générés par des effets thermoélectriques au voisinage d’une
interface solide-liquide dans un gradient thermique donné (effet Thomson-Seebeck). Ces phénomènes
de forces sont observés comme des mouvements de grains lors d’une solidification directionnelle en
présence d’un champ magnétique statique [1].
Notre groupe de recherche au EPM - SIMAP travaille sur une meilleure compréhension des forces
et de l’hydrodynamique magnéto-thermoélectriques par la simulation numérique et la modélisation
mathématique. Pour ce faire, nous travaillons avec notre logivciel, Aequatio, pour la résolution
d’équations différentielles partielles basées sur la méthode des éléments finis avec la technique de
multi-maillage. La technique multi-maillage est très pratique pour traiter des problèmes à large
extension d’échelle, tels que le domaine de la solidification. Pour le présent projet, nous proposons
de prendre en compte un modèle avec les équations de Navier-Stokes couplées avec la force magnéto-
thermoélectrique; l’équation de continuité pour les courants électriques, en considérant les courants
thermoélectriques et les courants induits par le mouvement du liquide et par le champ magnétique,
ainsi que l’équation de transfert de chaleur. Les simulations sont basées sur un domaine d’alliage
liquide (Al-10 % wtCu) avec la présence d’un seul grain micrométrique, dans un gradient thermique
de 20K/cm et sous un champ magnétique statique imposé de 0, 08T . Les deux mailles interpolées
sont: une pour le domaine liquide et une plus fine pour le grain et son environnement.
i
Acknowledgments
I am deeply thankful to my parents, Mary and Gerson, for having encouraged me to understand
things before judge them. Also, I want to express my admiration for professor Yves for all the
patience and kindness during this whole period I have been learning from him. I would like to thank
the Brazilian program CAPES who enabled this amazing exchange and all the open-hearted people
who warmly received me here, in France. And by last but not least, I thank all my crazy and saint
friends who remind me that normality is a barren illusion.
Remerciements
J’adresse mon profond remerciement à mes parents, Mary et Gerson, de m’avoir encouragé à
comprendre les choses avant de les juger. Je veux également exprimer mon admiration pour le
professeur Yves pour la patience et la gentillesse pendant toute cette période que j’ai apprise de lui.
De plus, je tiens à remercier le programme brésilien CAPES qui a permis cet échange extraordinaire
et tous les gens de grand coeur qui m’ont chaleureusement accueilli ici, en France. Enfin, je remercie
tous mes amis fous et saints qui me rappellent que la normalité est une illusion stérile.
iii
Contents
Abstract i
Acknowledgments iii
List of Figures vi
List of Tables vi
1 Introduction 1
1.1 Laboratory presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Project motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2.1 Sustainable development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Magneto-Thermoelectric Effect 4
2.1 History and concept introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Governing equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5 2-Dimensional Results 27
5.1 Equation apply and organization of essays . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2 Benchmark and other tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.3 Coupled tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6 Conclusion 35
A Gantt diagram 37
v
List of Figures
1 Microstructure of a Al-4.5wt%Cu alloy directionally solidified without and with a
10T magnetic field (a,b); Microstructure of a Zn-2,0%Zn alloy directionally solidified
without and with a 10T magnetic field (c,d); Microstructure of a Al-12%Ni alloy
directionally solidified without and with a 4T magnetic field (e,f). [5] . . . . . . . . 4
2 Four successive superposed radiographs of a grain under magneto-thermoelectric effect[1] 6
3 Successive radiographs showing an equiaxial solidification experiment of Al-10wt%Cu
under a static magnetic field of 0.08T at different temperature gradients. The trajec-
tories of some grains are represented by yellow arrows. [1] . . . . . . . . . . . . . . . 6
4 Visualization of 3D results on Paraview software of a grain motion due to magneto-
thermoelectric effect, temperature scales in Kelvin. . . . . . . . . . . . . . . . . . . . 18
5 Simple 2D configuration of a multi-mesh system for the thermoelectric problem. . . . 19
6 Simple 1D configuration of mesh interpolation. . . . . . . . . . . . . . . . . . . . . . 19
7 Method of element search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
8 Algorithm to search an element to a point . . . . . . . . . . . . . . . . . . . . . . . . 21
9 Main code structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
10 Diagram for the functioning of the code PREPARE . . . . . . . . . . . . . . . . . . . 22
11 Diagram for the functioning of the code ALGORITHM . . . . . . . . . . . . . . . . . 25
12 Benchmark test 6 and 7 with velocity vectors results in m/s. . . . . . . . . . . . . . 28
13 Benchmark test 6 and 7, zoomed to the 2nd mesh, with velocity vectors results in m/s. 28
14 Convergence of results from benchmark test 7 through 22 non-linear iterations. . . . 29
15 Hydrodynamics box test with imposed velocity at the top border, scale in m/s. . . . 29
16 Same test as figure 15 zoomed to the grain mesh, velocity vectors in m/s. . . . . . . 30
17 Velocity vector field in the Domaine and velocity magnitudes, in m/s, plotted from
the results over the horizontal white line. . . . . . . . . . . . . . . . . . . . . . . . . . 31
18 Velocity vector field near the grain, velocity scale in m/s. . . . . . . . . . . . . . . . . 32
19 Convergence of results from the coupled test through 28 non-linear iterations. . . . . 32
20 Velocity vectors in the grain domain, velocity scale in m/s and pressure scale in Pa. . 33
21 Pressure results near the Boite domain in Pa with isobaric lines, in white for the
coarser mesh and red for the finer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
22 Thermoelectric force vector field near the grain, logarithmic scale in N. . . . . . . . . 34
23 Thermoelectric density of current vector field near the grain, logarithmic scale in A/m2 . 34
24 Vector field of velocity in half-planes (xy) and (yz) and on a spherical surface of radius
60µm for B = 0.5T and Hartmann number Ha ≈ 0.3 [4] . . . . . . . . . . . . . . . . 35
List of Tables
1 Appendix A: Gantt diagram for the activities realized in the internship. . . . . . . . 37
2 Appendix B: Materials properties from Al-10wt%Cu alloy . . . . . . . . . . . . . . . 38
3 Appendix B: Matrix of integrals for Domaine in a simplified 3D configuration . . . . 39
4 Appendix C: Simulation essays from early versions of the code . . . . . . . . . . . . . 40
vi
1 Introduction
1
1 Introduction
simulations of solidification under the same effects, for those future simulation projects there are
plenty of experimental data for the numerical validation.
As a previous work in this project, we have the master project of Mr. Zhou, who developed and
validated the 2 dimensional hydrodynamics part in Aequatio for simple geometries, for example,
circle and pseudo-dendrites [7]. We also have already developed and validated in our software the
3 dimensional movement of a grain due to internal magneto-thermoelectric forces, for this work I
developed the rotation of the grain in its movement during my 3 months summer internship here
at EPM-SIMAP. For this 3 dimensional movement we estimated an approximated formula for its
dragging force linked to the grain velocity, but one thing which is mostly unknown in this field of
research is the liquid movement behaviour around the particle caused by the magneto-thermoelectric
phenomenon associated to the solid-liquid interface and therefore to the geometry of the particle.
So, for this present work, we propose to couple the magneto-thermoelectric forces into the hydro-
dynamics of the fluid around the particle. As a first step we will extend the work of Zhou coupling in
2 dimensions at Aequatio his hydrodynamics development with the magneto-thermoelectric effect. A
detailed calendar of activities done in this internship is described on appendix A as a Gantt diagram.
2
1 Introduction
Chapter summary
At the end of each chapter we propose to summarize the discussed topics of the section.
As an introduction of our 6 months project we presented the laboratory where it took place and
the motivations of our work. Also we presented the final goal of this internship project: to build a
numerical model in our homemade software, Aequatio, to simulate with the multi-mesh technique in
finite element method the magneto-thermoelectric hydrodynamics around a grain, that is submerged
in its own liquid alloy, submitted to an imposed thermal gradient and an imposed static magnetic
field, which, beside the magnetic field, is a common configuration in the subject of solidification.
This goal and its further development could lead humanity into a better comprehension of the
hydrodynamics coupled with physical problems like thermal, electric and magnetic phenomena as
well as their interaction between them.
Résumé du chapitre
À la fin de chaque chapitre, nous proposons de résumer les sujets abordés dans la section.
Dans l’introduction de notre projet de 6 mois, nous avons présenté le laboratoire où il s’est déroulé
et les motivations de notre travail. Nous avons également présenté l’objectif final de ce projet de
stage: construire un modèle numérique dans notre logiciel, Aequatio, pour simuler avec la technique
multi-maillage en méthode des éléments finis l’hydrodynamique magnéto-thermoélectrique autour
d’un grain submergé dans son alliage liquide, soumis à un gradient thermique imposé et aussi à un
champ magnétique statique imposé, qui est une configuration habituelle au sujet de la solidification.
Cet objectif et son développement ultérieur pourraient conduire l’humanité à une meilleure com-
préhension de l’hydrodynamique couplée à des problèmes physiques tels que les phénomènes ther-
miques, électriques et magnétiques ainsi que leur interaction entre eux.
3
2 Magneto-Thermoelectric Effect
Figure 1: Microstructure of a Al-4.5wt%Cu alloy directionally solidified without and with a 10T
magnetic field (a,b); Microstructure of a Zn-2,0%Zn alloy directionally solidified without and with
a 10T magnetic field (c,d); Microstructure of a Al-12%Ni alloy directionally solidified without and
with a 4T magnetic field (e,f). [5]
Alternatively, a static magnetic field can be used to damp a perpendicular convection, for exam-
ple during solidification, due to the Lorentz force, generated by the interaction between the induced
electrical current and the applied magnetic field. It is well recognized that electromagnetic braking
can reduce inclusions and improve the compositional consistency of mechanical properties. In addi-
tion, Shercliff [3] pointed out that a static magnetic field can produce fluxes in the melt during the
metallurgical process caused by the interaction of the magnetic field with variations of the Seebeck
4
2 Magneto-Thermoelectric Effect
coefficients at the solid-liquid interface. Such flows have been well studied in the case of solidification
of metal alloys and in the context of pumping or stirring liquids in a nuclear reactor.
F~te = ~j × B
~ (1)
Where F~ represents the density of magneto-thermoelectric force, ~j the density of electric current
and B~ the applied static magnetic induction. The thermoelectric currents in each phase are generated
by a temperature gradient along the solid-liquid interface and according to the difference of Seebeck
coefficients of solid and liquid phase (Sl and Ss ) and the temperature gradient G~ = ∇T~ . Then, the
density of electric current in each phase can be written as follows:
~ + Si ∇T
~ = −σi (∇V
jte,i ~ ), i: liquid or solid (2)
In the equation 2, V denotes the electric scalar potential and σ the electrical conductivity of the
solid or liquid phase. On the second part of the right-hand side, the Seebeck constant represents the
contribution of the thermoelectric current via the thermoelectric power Si of the materials [1].
Thus, a coupled problem of magneto-thermoelectricity in a Ω domain (with solid and liquid)
is formulated by the stationary equations of electrical continuity (3) and thermal diffusion and
convection (5). Pointing out at (3) that only the thermoelectric current will be present in the solid
and by the other hand, in the liquid, an induced current will be created by the magnetic field on
the liquid movement (U ~ ), as it follows at (4).
∇.J~ = 0 (3)
J~ = −σl (∇V
~ + Sl ∇T
~ ) + σl (U
~ × B)
~ at Ωliquid (4)
~
ρi Cp,i (U.∇)T ~ ) = Q at Ω
− ∇.(λi ∇T (5)
Where U ~ , the velocity field in the liquid (zero in the solid), can be coupled to our system by
the Navier-Stokes equation. ρ, Cp and λ are, respectively, the density, heat capacity, and thermal
conductivity of the material [4]. Q is the internal source of heat energy in the Ω domain.
The equation 3 gives us a relationship between the thermal gradient and the density of elec-
trical current created, thus, the higher the gradient, the greater the electric current intensity will
be, and therefore, with a static magnetic field, the greater will be the magneto-thermoelectric force.
Throughout equation 2 and 3 is also possible to deduce the predominant direction of the thermoelec-
tric force, i.e. in a 2 dimensional picture with thermal gradient placed on the Y axis, thermoelectric
5
2 Magneto-Thermoelectric Effect
currents inside the particle will also be predominant on the Y direction, considering a static mag-
netic field perpendicular to the picture (Z axis) the cross product direction of the force will appear
predominantly on the X axis. Salloum et al. shows us this phenomenon in the figure 2 and 3 with
the variation of the magneto-thermoelectric force, relative to vertical forces (balance between gravity
and buoyancy), as a function of the thermal gradient. [1]
For a better validation of our system, we also use the Al-10wt%Cu alloy, numerically 2 different
materials are described in the code as the solid and liquid alloy. All materials properties values are
reported in the appendix B, table 2.
6
2 Magneto-Thermoelectric Effect
Chapter summary
The thermoelectric phenomena, which is a difference of electric potential caused by a thermal
gradient, appears in the field of solidification in the vicinity of the interface solid-liquid, for exam-
ple after grain nucleation, at given temperature gradient and it highly depends on the difference
of thermoelectric power (Sb ) between the 2 materials in contact, this phenomenon is refereed as
Thompson-Seebeck effect or Peltier-Seebeck effect.
The magneto-thermoelectric phenomena appears with the superposition of a magnetic field on
this system where the thermoelectric phenomena take place, the well known Lorentz forces will
appear through the interaction betweenn the themoelectric currents and the magnetic induction,
provoking grain and liquid motions during a solidification process where a magnetic field is applied.
Résumé du chapitre
Le phénomène thermoélectrique, qui est une différence de potentiel électrique provoquée par
un gradient thermique, apparaît dans le domaine de la solidification au voisinage de l’interface
solide-liquide, par exemple après nucléation des grains, dans un gradient thérmique donné et dépend
fortement de la différence du pouvoir thermoélectrique (Sb ) entre les 2 matériaux en contact, ce
phénomène est référé comme l’effet Thompson-Seebeck ou l’effet Peltier-Seebeck.
Les phénomènes magnéto-thermoélectriques apparaissent avec la superposition d’un champ mag-
nétique sur ce système où se produisent les phénomènes thermoélectriques, les bien connues forces de
Lorentz apparaîtront à travers l’interaction entre les courants themoélectriques et l’induction mag-
nétique, provoquant des mouvements de grains et de liquides lors d’une solidification où un champ
magnétique est appliqué.
7
3 Mathematical Development on Finite Element Method
For this section we introduce the mathematical development for our model of 4 equations in 3
dimensional finite elements. As simplifications for the model, we propose that all intrinsic material
properties are constants in our span of work temperature, an incompressible fluid, an unidirectional
static magnetic induction and no source of heating beside the thermal gradient imposed as boundary
conditions.
Although this current work studies only the convergence of steady flow, we found important to
describe mathematically the time variant terms since one of the future goals of the project is the
simulation of a grain movement under magneto-thermoelectric phenomena. However, we highlight
that time variant terms in equations 8, 11 and 12 are not currently described in our code.
Thermoelectric Equation:
~ + Si .∇T
j~i = −σi (∇V ~ ) in Ωi , i = liquid or solid (6)
~ × B)
where: J~l = j~l + σl (U ~ in Ωliquid
Navier-Stokes Equation:
~
∂U
ρl . ~ U
+ ρl (U.∇) ~ = −ρl .~g + F~ + ∇.Σ in Ωliquid (8)
∂t
∂Ui ∂Uj
where: (Σ)ij = −P.δij + µl ( + ) with: 1 ≤ i, j ≤ 3 (9)
∂xj ∂xi
and: F~ = [ j~l + σl (U
~ × B)
~ ]×B
~ (10)
Heat Equation:
∂T ~ ~ ) = 0 in Ωi , i = liquid or solid
ρi .Cp,i + (U.∇)T − ∇.(λi .∇T (12)
∂t
8
3 Mathematical Development on Finite Element Method
~
∂U
ρ. ~ U
+ ρ(U.∇) ~ − σ[ (U
~ × B)
~ − (∇V
~ + S.∇T
~ ) ]×B
~ − ∇.Σ = ρ.~g (13)
∂t
Where Σ is a tensor of tensions described in 9, being the only term linked with the variable
pressure.
We multiply the equation by W , a diagonal matrix of our test functions α, and we integrate it
through the whole volume Ωliquid :
α 0 0
W = 0 α 0
0 0 α
˚ ~ ˚ ˚
∂U ~ ~ ~ × B)
~ × B.dv
~
Wρ .dv + W ρ(U.∇)U .dv − W σ(U +
∂t
˚
Ω Ω ˚ Ω ˚
+ W σ(∇V~ + S.∇T
~ ) × B.dv
~ − W ∇.Σ.dv = W ρ.~g .dv
Ω Ω Ω
˚ ~ ˚ ˚
∂U ~ ~ ~ × B)
~ × B.dv
~
Wρ W ρ(U.∇)U .dv −
.dv + W σ(U +
∂t
˚ Ω Ω ˚ Ω‹ ˚
+ ~ + S.∇T
W σ(∇V ~ ) × B.dv
~ + Σ.∇.W.dv − W Σ.n~ext .ds = W ρ.~g .dv
Ω Ω ∂Ω Ω
For the boundary conditions, we impose the value of unknowns at the borders of our geometric
system which is also known as Dirichlet boundary conditions, all of our geometric domains uses
this type of condition and it will be detailed in the multi-mesh section of chapter 4. The imposed
values in the N-S equation for the domain of simulation are null flux of velocity at all borders and
one single point with a reference for pressure (0P a), since we work with incompressible flow the
exact value of pressure is meaningless to discuss. Therefore, the surface integral from the divergence
theorem results only with the pressure term, since we cannot assure the symmetry of this unknown
throughout the borders of the system.
9
3 Mathematical Development on Finite Element Method
From now on, we will formulate the detailed system projecting the vectors onto the Cartesian
system of coordinates, in this way, matrix systems like the tensor from equation 9 will be projected
to its line vector.
The weak form of the coupled Navier-Stokes equation along the X axis and with B ~ constant:
˚ ˚ ˚ ˚
∂Ux ∂Ux ∂Ux ∂Ux
αρ .dv + αρUx .dv + αρUy .dv + αρUz .dv +
∂t ∂x ∂y ∂z
˚
Ω Ω ˚ Ω ˚ Ω
Numerically, we can say that between a temporal iteration n and its previous iteration n − 1 we
have a time shift of ∆t:
˚ ˚
∂Ux (Ux,n − Ux,n−1 )
αρ .dv = αρ .dv
Ω ∂t Ω ∆t
Thus, using the Garlekin method, the unknowns are defined as an interpolation among the npi
points of integration with the same α function (used as test function) for the Gauss weights.
For the following equations we have the examples for the velocity along X and its derivative.
An exceptional unknown is the pressure, since it has not an equation for its own resolution and it
is solved concomitantly with the velocity vector through de N-S equation and the equation for the
mass transfer continuity, so the pressure needs a lower order of function for its weight compared
to the α function from the velocity, basically, it means that for the convergence of the non-linear
system we must have less unknowns for pressure than for velocity during the resolution of the
global system. In the following formulation we call this alternative weight function β, in our code
Aequatio although we use the same function for all variables, the pressure is worked on a different
mesh that has identical geometric properties but it is an order below compared to all other variables.
10
3 Mathematical Development on Finite Element Method
Therefore, we can say the strong formulation for the coupled Navier-Stokes equation along the
X axis is:
npi ˚ npi ˚
XX ρ XX ∂αj
ααj .dv .Ux,j,n + ρ(Ux,j,n−1 ) α .dv .Ux,j,n +
∆t Ω,el Ω,el ∂x
el j el j
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ ρ(Uy,j,n−1 ) α .dv .Ux,j,n + ρ(Uz,j,n−1 ) α .dv .Ux,j,n +
Ω,el ∂y Ω,el ∂z
el j el j
npi
XX ˚ npi
XX ˚
+ σBz2 ααj .dv .Ux,j,n − σBx Bz ααj .dv .Uz,j,n +
el j Ω,el el j Ω,el
npi
XX ˚ npi
XX ˚
2
+ σBy ααj .dv .Ux,j,n − σBx By ααj .dv .Uy,j,n +
el j Ω,el el j Ω,el
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ σBz α .dv .Vj,n − σBy α .dv .Vj,n +
Ω,el ∂y Ω,el ∂z
el j el j
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ σSBz α .dv .Tj,n − σSBy α .dv .Tj,n +
Ω,el ∂y Ω,el ∂z
el j el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ 2η . .dv .Ux,j,n + η . .dv .Ux,j,n +
Ω,el ∂x ∂x Ω,el ∂y ∂y
el j el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ η . .dv .Ux,j,n + η . .dv .Uz,j,n +
Ω,el ∂z ∂z Ω,el ∂z ∂x
el j el j
npi ˚ X˚
X npi∗
XX ∂α ∂αj ∂α
+ η . .dv .Uy,j,n − βj .dv .Pj,n +
Ω,el ∂y ∂x Ω,el ∂x
el j el j
npi∗
X ¨ npi ˚
X XX ρ
+ nx αβj .dv .Pj,n = ααj .dv .Ux,j,n−1
∂Ω,el ∆t Ω,el
el, surf j el j
(15)
11
3 Mathematical Development on Finite Element Method
Similarly, we have the Navier-Stokes equation and its strong formulation along Y:
˚ ˚ ˚ ˚
∂Uy ∂Uy ∂Uy ∂Uy
αρ .dv + αρUx .dv + αρUy .dv + αρUz .dv +
∂t ∂x ∂y ∂z
˚
Ω Ω ˚ Ω ˚ Ω
npi ˚ npi ˚
XX ρ XX ∂αj
ααj .dv .Uy,j,n + ρ(Ux,j,n−1 ) α .dv .Uy,j,n +
∆t Ω,el Ω,el ∂x
el j el j
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ ρ(Uy,j,n−1 ) α .dv .Uy,j,n + ρ(Uz,j,n−1 ) α .dv .Uy,j,n +
Ω,el ∂y Ω,el ∂z
el j el j
npi
XX ˚ npi
XX ˚
2
+ σBz ααj .dv .Uy,j,n − σBy Bx ααj .dv .Ux,j,n +
el j Ω,el el j Ω,el
npi
XX ˚ npi
XX ˚
2
+ σBx ααj .dv .Uy,j,n − σBy Bz ααj .dv .Uz,j,n +
el j Ω,el el j Ω,el
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ σBx α .dv .Vj,n − σBz α .dv .Vj,n +
Ω,el ∂z Ω,el ∂x
el j el j
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ σSBx α .dv .Tj,n − σSBz α .dv .Tj,n +
Ω,el ∂z Ω,el ∂x
el j el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ 2η . .dv .Uy,j,n + η . .dv .Uy,j,n +
Ω,el ∂y ∂y Ω,el ∂x ∂x
el j el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ η . .dv .Uy,j,n + η . .dv .Uz,j,n +
Ω,el ∂z ∂z Ω,el ∂z ∂y
el j el j
npi ˚ X˚
X npi∗
XX ∂α ∂αj ∂α
+ η . .dv .Ux,j,n − βj .dv .Pj,n +
Ω,el ∂x ∂y Ω,el ∂y
el j el j
npi∗
X ¨ npi ˚ X ˚
X XX ρ
+ ny αβj .dv .Pj,n = ααj .dv .Uy,j,n−1 − ρg α.dv
∂Ω,el ∆t Ω,el Ω,el
el, surf j el j el
(16)
12
3 Mathematical Development on Finite Element Method
Similarly, we have the Navier-Stokes equation and its strong formulation along Z:
˚ ˚ ˚ ˚
∂Uz ∂Uz ∂Uz ∂Uz
αρ .dv + αρUx .dv + αρUy .dv + αρUz .dv +
∂t ∂x ∂y ∂z
˚
Ω Ω ˚ Ω ˚ Ω
npi ˚ npi ˚
XX ρ XX ∂αj
ααj .dv .Uz,j,n + ρ(Ux,j,n−1 ) α .dv .Uz,j,n +
∆t Ω,el Ω,el ∂x
el j el j
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ ρ(Uy,j,n−1 ) α .dv .Uz,j,n + ρ(Uz,j,n−1 ) α .dv .Uz,j,n +
Ω,el ∂y Ω,el ∂z
el j el j
npi
XX ˚ npi
XX ˚
+ σBx2 ααj .dv .Uz,j,n − σBz Bx ααj .dv .Ux,j,n +
el j Ω,el el j Ω,el
npi
XX ˚ npi
XX ˚
+ σBy2 ααj .dv .Uz,j,n − σBz By ααj .dv .Uy,j,n +
el j Ω,el el j Ω,el
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ σBy α .dv .Vj,n − σBx α .dv .Vj,n +
Ω,el ∂x Ω,el ∂y
el j el j
˚ ˚ (17)
npi npi
XX ∂αj XX ∂αj
+ σSBy α .dv .Tj,n − σSBx α .dv .Tj,n +
Ω,el ∂x Ω,el ∂y
el j el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ 2η . .dv .Uz,j,n + η . .dv .Uz,j,n +
Ω,el ∂z ∂z Ω,el ∂x ∂x
el j el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ η . .dv .Uz,j,n + η . .dv .Ux,j,n +
Ω,el ∂y ∂y Ω,el ∂x ∂z
el j el j
npi ˚ X˚
X npi∗
XX ∂α ∂αj ∂α
+ η . .dv .Uy,j,n − βj .dv .Pj,n +
Ω,el ∂y ∂z Ω,el ∂z
el j el j
npi∗
X ¨ npi ˚
X XX ρ
+ nz αβj .dv .Pj,n = ααj .dv .Uz,j,n−1
∂Ω,el ∆t Ω,el
el, surf j el j
13
3 Mathematical Development on Finite Element Method
We remind here the divergence theorem with the boundary condition of none heat flux at the
borders:
˚ ‹ ˚
~ ).dv =
α∇.(λ∇T ~ .n~ext .ds −
αλ∇T ~ .∇α.dv
λ∇T ~
Ω ∂Ω Ω
14
3 Mathematical Development on Finite Element Method
˚
Tn
αρCp .dv +
∆t
˚
Ω
˚ ˚
∂T ∂T ∂T
+ αρCp (Ux,n−1 ) .dv + αρCp (Uy,n−1 ) .dv + αρCp (Uz,n−1 ) .dv +
∂x ∂y ∂z
˚ Ω
˚ Ω
˚ Ω
∂T ∂α ∂T ∂α ∂T ∂α
+ λ . .dv + λ . .dv + λ . .dv =
Ω˚ ∂x ∂x ∂y ∂y ∂z ∂z
˚ Ω Ω
Tn−1
= αQ.dv + αρ.Cp .dv
Ω Ω ∆t
npi ˚ npi ˚
XX ρCp XX ∂αj
ααj .dv .Tj,n + ρCp (Ux,n−1 ) α .dv .Tj,n +
∆t Ω,el Ω,el ∂x
el j el j
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ ρCp (Uy,n−1 ) α .dv .Tj,n + ρCp (Uz,n−1 ) α .dv .Tj,n +
Ω,el ∂y Ω,el ∂z
el j el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ λ . .dv .Tj,n + λ . .dv .Tj,n + (21)
Ω,el ∂x ∂x Ω,el ∂y ∂y
el j el j
npi ˚
XX ∂α ∂αj
+ λ . .dv .Tj,n =
Ω,el ∂z ∂z
el j
X˚ npi
XX ρCp
˚
= αQ.dv + ααj .dv .Tj,n−1
Ω,el ∆t Ω,el
el el j
˚ ‹ ˚
~ ~
ασ∇.(U × B).dv − ~
ασ ∇V .n~ext .ds − ~ ~
σ ∇α.∇V .dv +
Ω ∂Ω
‹ ˚ Ω
− ~ .n~ext .ds −
ασS ∇T ~ ∇T
σS ∇α. ~ .dv = 0
∂Ω Ω
15
3 Mathematical Development on Finite Element Method
We simplify the surface integrals with the following boundary conditions that describes zero heat
or electric flux at the borders:
~ .n~ext = 0
∇T and ~ .n~ext = 0 in ∂Ωliquid
∇V
After those simplification, we open dot products and the divergent of the cross product, we
obtain:
˚
∂Uy ∂Uz ∂Uz ∂Ux ∂Ux ∂Uy
ασ Bz − By + Bx − Bz + By − Bx .dv +
∂x ∂x ∂y ∂y ∂z ∂z
Ω
˚ ˚ ˚
∂α ∂V ∂α ∂V ∂α ∂V
+ σ . .dv + σ . .dv + σ . .dv +
∂x ∂x ∂y ∂y ∂z ∂z
˚Ω ˚Ω ˚Ω
∂α ∂T ∂α ∂T ∂α ∂T
+ σS . .dv + σS . .dv + σS . .dv = 0
Ω ∂x ∂x Ω ∂y ∂y Ω ∂z ∂z
npi ˚ npi ˚
XX ∂αj XX ∂αj
σBz α .dv .Uy,j,n − σBy α .dv .Uz,j,n +
Ω,el ∂x Ω,el ∂x
el j el j
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ σBx α .dv .Uz,j,n − σBz α .dv .Ux,j,n +
Ω,el ∂y Ω,el ∂y
el j el j
npi ˚ npi ˚
XX ∂αj XX ∂αj
+ σBy α .dv .Ux,j,n − σBx α .dv .Uy,j,n +
Ω,el ∂z Ω,el ∂z
el j el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ σ . .dv .Vj,n + σ . .dv .Vj,n + (23)
Ω,el ∂x ∂x Ω,el ∂y ∂y
el j el j
npi ˚
XX ∂α ∂αj
+ σ . .dv .Vj,n +
Ω,el ∂z ∂z
el j
npi ˚ npi ˚
XX ∂α ∂αj XX ∂α ∂αj
+ σS . .dv .Tj,n + σS . .dv .Tj,n +
Ω,el ∂x ∂x Ω,el ∂y ∂y
el j el j
npi ˚
XX ∂α ∂αj
+ σS . .dv .Tj,n = 0
Ω,el ∂z ∂z
el j
16
3 Mathematical Development on Finite Element Method
Chapter summary
For this chapter summary we propose to highlight all the simplifications made for our model
during the finite element method formulation and moreover during the description of our model in
the code Aequatio.
For the mathematical formulation we propose that all material properties are constants for each
material (considering the liquid alloy a different material from its solid state), thus with a constant
density we have an incompressible fluid to simplify the Navier-Stokes equation, we also neglect the
thermo-convection and so on with the other properties. We also propose to use only static and
unidirectional magnetic field and no source of heating inside our system.
During the application of our model into the code more simplifications were made, a final system
of equation for a 3D case can be seen in appendix B table 3 as an matrix equation. The most
important disregarding is about time terms, our code converges a solution for stationary problems.
Also a unidirectional static magnetic field was simplified to a static magnetic field only in the Z
axis direction, the surface integrals of pressure from the Navier-Stokes equation were also neglected
as well as the gravity term. Like any numerical problem that treats a physical problem, all those
simplifications can and will be rewritten as soon as the simplified model is validated.
Résumé du chapitre
Pour ce résumé du chapitre, nous proposons de mettre en évidence toutes les simplifications
apportées à notre modèle lors de la formulation en méthode des éléments finis et de plus lors de la
description de notre modèle dans le code Aequatio.
Pour la formulation mathématique nous proposons que toutes les propriétés des matériaux sont
des constantes pour chaque matériau (considérant l’alliage liquide comme un matériau différent de
son état solide), donc avec une densité constante nous avons un fluide incompressible pour simplifier
l’équation de Navier-Stokes, nous négligeons aussi la thermo-convection et ainsi de suite avec les
autres propriétés. Nous proposons également d’utiliser uniquement un champ magnétique statique
et unidirectionnel et aucune source de chauffage à l’intérieur de notre système.
Lors de l’application de notre modèle dans le code, plus de simplifications ont été faites, un sys-
tème d’équation final pour un cas 3D peut être vu dans l’appendice B table 3 comme une équation
matricielle. La négligence la plus importante concerne les termes temporels, notre code converge
vers une solution pour les problèmes stationnaires. De plus, un champ magnétique statique unidi-
rectionnel a été simplifié en un champ magnétique statique uniquement dans la direction de l’axe
Z, les intégrales de surface de la pression de l’équation de Navier-Stokes ont également été négligées
ainsi que le terme de gravité. Comme tout problème numérique qui traite un problème physique,
toutes ces simplifications peuvent et seront réécrites dès la validation du modèle simplifié.
17
4 The Aequatio Code
(a) Domain of simulation (5x5x5cm, first mesh) with (b) Second and finer mesh, box containing micro-
box, second mesh, in the middle. metric grain.
Among other programs, we use codes written on the MATLAB platform, mainly to use meshing
libraries, for example ISO2MESH, to transform tomographies into 3-dimensional geometries, we also
use the open source software ImageJ for image treatment of radiographs, for 2 dimension simulations
and after the simulation using Aequatio, we use the open source software Paraview as a visualization
toolkit for data post-treatment.
18
4 The Aequatio Code
A direct coupling is performed between both grids. The temperature on the boundary nodes of
the finer mesh is calculated from the coarser, through a localization technique, and the temperature
of the nodes which are under the fine mesh and belongs to the coarser mesh are calculated from the
finer mesh. Figure 6 illustrates the process in a 1D example.
19
4 The Aequatio Code
More analytically, the method following here is based on the localization of the element of the
mesh 1 which is connected with corresponding boundary node of the mesh 2. Then the temperature
on the boundary node is calculated according with the Garlekin method as:
n=m
X
T = αn (ξ, η)Tn
n=1
where T is the temperature that we want to calculate and belongs to the boundary of mesh 2,
m is the number of elements degrees of freedom, αi is the interpolation function and Tn are the
temperature values in each node of the corresponding element of mesh 1. For the calculation of
the temperature values of mesh 2 which are under the finer mesh the exactly opposite procedure is
followed.
Since the beginning of using a multi-mesh technique in a finite element based platform for
solving coupled phenomena problems, our team has made several improvements and developments
in the algorithms, one example is the interpolation of non-conformal meshes with different geometric
elements and/or orders. Another example developed during this internship by Mr. Du Terrail was
a more efficient search engine for localizing points between meshes.
Instead of looking randomly in all elements until find the one in which the point is inserted, the
new search engine starts from a given element and travels in the direction of the searched point.
This is possible with the concept of "seeing", one face of an element "sees" the searched point if the
triangle made by them is not superposed to the element, in the 3D case we analyze the tetrahedron
formed by 3 points of a face and the searched point, this condition means mathematically that the
determinant of the following matrix is negative:
2D matrix:
!
Xn − X0 Yn − Y0
Xn+1 − X0 Yn+1 − Y0
3D matrix:
Xn − X0 Yn − Y0 Zn − Z0
Xn+1 − X0 Yn+1 − Y0 Zn+1 − Z0
where n is the numbering of points in a element, which is a geometrical property of the element.
The algorithm scans all the faces until find a face that "sees" the point, then it passes to the next
element which shares this face restarting the process, when all edges from an element do not "see"
the searched point it means the point is inside it and the wanted element has been found. The 2D
case is illustrated in figure 7 and figure 8 diagrams the algorithm of search.
20
4 The Aequatio Code
Next element
f ace = 1
then
else
else
Element found if f ace < f acemax
Those same techniques are used on 3D meshes for the interpolation of temperature, electric po-
tential, velocity components and pressure.
21
4 The Aequatio Code
In a overall view, the code PREPARE will initialize and build the base of our system of sim-
ulation, it will create the geometric domains as known as meshes, it will declare and define all
equations and each of its coefficients as well as create the association between each geometric do-
main and equation. ALGORITHM instead, will work solving the non-linear problem and analyzing
the convergence, calculating the integrals, assembling the matrix, passing through iterations non-
linear coefficients as well as calculating and analyzing errors.
The code PREPARE starts building the 4 geometric domains applied in the multi-mesh simu-
lation of hydrodynamics, its architecture is diagrammed in figure 10. The one called Boite is the
smaller and finer mesh, Domaine is the whole domain of simulation and has a coarser mesh and as
explained in chapter 3, each one of these domains must be done both in order 1 (for the pressure
variable) and order 2 (for the other variables). The creation of Boite, in the 2D case, includes
the lecture of the grain boundary and the code meshes both the grain and its surrounding box of
intermediate liquid. The grain boundary meshing process uses a mathematical method called spline
which smooths the boundary geometry. The 3D case receives the set grain/box already meshed and
smoothed from our MATLAB code that analyzes the grain tomography.
PREPARE
Creation of
Declaration
Boite
of materials
order 1 and 2
Declaration Creation of
of polynomials Domaine
Physical order 1 and 2
proprerties
System
initialization
22
4 The Aequatio Code
To write the equations formulated in chapter 3 and listed in appendix B, coefficients and polyno-
mials must be declared beforehand. The polynomials are described in a way read to be used in the
formulation, which means, in combinations of αi , αj , their derivatives relative to the cardinal system
of reference, the jacobian matrix for the system transformation, the determinant of the jacobian and
the Gauss weights.
The coefficients are classified as mathematical constants defined by the equation (zero, minus),
coefficients defined by region (gravity, magnetic induction), materials constants defined by the region
(heat capacity, dynamic viscosity, thermal conductivity, thermoelectric power, electrical conductivity
and density) and non-linear coefficients defined by the previous iteration (velocity components). In
our thermoelectric problem only 2 materials are described, Al-10wt%Cu alloy in liquid state and
solid state, and their materials constants are shown in appendix B table 2.
Therefore, we describe all equations with coefficients and polynomials, and classify their integrals
by the unknown which the integral is related to. The classification is given as names for the submatrix
of each set of integrals that are going to be multiplied to the related unknown in each node, for
example, M 11 is the set of integrals from equation 1 (Navier-Stokes along the X axis) that is going
to be multiplied to the first variable (velocity along the X axis). Considering the 3D case, we
have 4 equations and 4 variables, decomposing the velocity vector along the axis as formulated in
chapter 3 we get 6 equations and 6 variables, finally for 2 different geometrical domains (Boite and
Domaine) we arrive to a final system of 12 global equations and 12 variables. The final system of
linear equations to be solved in each non-linear iteration will be composed by a 12x12 matrix of
submatrix, where each submatrix will be composed by a set of integrals that co-relates a specific
equation with a specific unknown in each node of the mesh.
Appendix B, table 3 shows the matrix system used in our 3D tests for the Domaine geometric
domain, so it is a 6x6 matrix (the Boite part is analytically identical and the terms M 77 to M 1212
have no coupling with Domaine). The formulation shown in table 3 is simplified with unidirec-
tional magnetic induction (only Bz ) and it neglects the non-linear terms from the heat equation and
the gravity effect, the linear system to be solved in this case is represented by the following equation.
[M 11] [M 12] [M 13] [M 14] [M 15] [M 16] [Ux ] [0]∗
∗
[M 21] [M 22] [M 23] [M 24] [M 25] [M 26] [Uy ] [0]
[M 31] [M 32] [M 33] [0] [0] [M 36] [Uz ] ∗
[0]
× = (24)
∗
[0] [0] [0] [M 44] [0] [0] [T ] [0]
[M 51] [M 52] [0] [M 54] [M 55] [0] [V ] ∗
[0]
[M 61] [M 62] [M 63] [0] [0] [0] [P ] [0]∗
After describing equations and geometric domains, the code creates the physical domains which
associates each equation to a geometric domain. In the 3D case, the global equations 1 to 5 (equations
15, 16, 17, 21 and 23 respectively from the formulation) are associated to the first geometric domain,
Domaine of second order mesh, to solve velocity, temperature and electric potential variables, the
6th global equation (equation 19 from the formulation) is related to solve the pressure variable and
23
4 The Aequatio Code
it is associated to the second geometric domain, Domaine of first order mesh, and has less unknowns
to be solved. Thus, for the Boite geometric domain the association is similar and with the same
equations, so global equations 7 to 11 for the second order mesh and the 12th global equation for
the first order mesh.
To finalize the PREPARE code, we impose the known physical properties, for example all bound-
ary conditions, pre-stablished for Domaine as parameters of the simulation and for the borders of
Boite, interpolated values from those elements of Domaine that are overlaid to the borders nodes
of Boite. In our linear system of equations, the imposed values on those few nodes are described in
the second hand term of the matrix equation 24, for those nodes, they have an 1 as coefficient in its
position of the left hand matrix and the rest of its line is filled with zeros. So although most of the
second hand term in the matrix equation is composed by zeros, some few of them has values that
represents the boundary condition.
After the preparation of the magneto-thermoelectric hydrodynamics problem, our code will enter
in the loop for solving the non-linear system of equations, which means that from a given initial
value for the non-linear coefficients it will solve the linear system and repeat the process, transfer-
ring at each iteration the non-linear coefficients, until a convergence of results is found. The code
ALGORITHM is diagrammed in figure 11.
Entering the loop, ALGORITHM builds the system of equations from the matrix described in
the previous section and uses MUMPS (MUltifrontal Massively Parallel sparse direct Solver) to
solve it. MUMPS is a software application for the solution of large sparse systems of linear algebraic
equations on distributed memory parallel computers and it has been sucessfully implemented during
this internship. The software was developed in the European project PARASOL (1996–1999) and
it implements the multifrontal method, which is a version of Gaussian elimination for large sparse
systems of equations, especially those arising from the finite element method. It is written in
Fortran 90 with parallelism by MPI and it uses BLAS and ScaLAPACK kernels for dense matrix
computations [9].
The code analyzes the greatest error for each variable value solved from the system in comparison
with its previous value, the equation for the total relative error is described in equation 25. The loops
finds convergence when the greatest total relative error goes under a pre-defined ξ, usually 10−5 , or
when it reaches maximum number of iterations from which we understand it will not converge into
a plausible result or it has already converged but with an error greater than ξ, usually 30 iterations.
v
u nodes
(value − valueprevious )2
u P
u
T otal relative error = t nodes
(25)
value2
P
24
4 The Aequatio Code
ALGORITHM
Variables
initialization
iter=1
Integration and
matrix assembly
MUMPS
resolution
Do while
Error
error > ξ and
calculation
iter < itermax
Transfer of
non-linear coefficients
iter = iter+1
Analyse
The final step of ALGORITHM is a sub-program called analyze that builds and calculates from
the variable results the thermoelectric vector fields (density of force and density of electric current).
For optimization, we create a superposed grid over the mesh with less nodes to calculate those vectors,
afterwards, like all results, they are written into a file readable by the software PARAVIEW.
We needed the analyze program inside the loop because during the development process, while
debugging and creating the code, most of our results do not converge, but for a future development
I propose, for optimization, the transposition of this sub-program to outside the loop.
25
4 The Aequatio Code
Chapter summary
The Aequatio code is a platform for solving multiple differential equations based on a multi-mesh
technique for finite element method. The multi-mesh technique, superimpose a finer and smaller
mesh into a bigger and coarser mesh, which is interesting for configurations that needs special
attention for specific places inside it, for example a grain during solidification. A direct coupling is
performed between both grids through localization techniques and interpolation methods.
For our application, the code architecture is divide in 2 main programs: PREPARE that initial-
izes our system describing our problem (the equations, the materials, the geometric domains and all
their associations), ALGORITHM will build the algebraic linear system to be solved by the software
MUMPS, it will also analyze the error and restart the process transferring the non-linear coefficients
until converges into a solution.
Résumé du chapitre
Le code Aequatio est une plate-forme pour la résolution de plusieurs équations différentielles
basée sur la technique de multi-maillage pour la méthode des éléments finis. La technique multi-
maillage, superpose une maille plus fin et plus petit dans une autre plus grosse et plus grossier, ce qui
est intéressant pour les configurations qui nécessitent une attention particulière pour des endroits
spécifiques à l’intérieur, par exemple un grain pendant la solidification. Un couplage direct est
effectué entre les deux grilles grâce à des techniques de localisation et des méthodes d’interpolation.
Pour notre application, l’architecture de code est divisée en 2 programmes principaux:
PREPARE qui initialise notre système décrivant notre problème (les équations, les matériaux, les
domaines géométriques et toutes leurs associations), ALGORITHM construira le système linéaire
algébrique à résoudre par le logiciel MUMPS, il analysera également l’erreur et relancera le processus
avec de transfert des coefficients non-linéaires jusqu’à converger vers une solution.
26
5 2-Dimensional Results
5.1 Equation apply and organization of essays
The development of the code was made comparing small simulations with already well known
data, firstly analyzing decoupled simulations (only hydrodynamics or only thermoelectrics) and
then adding the coupling terms. A useful test for this development was the benchmark simulation,
validate by Mr. Zhou for simple geometries but not for a true grain geometry, also a benchmark
test, with an imposed velocity profile, is perfect to validate the magnetic dragging force linked to
the fluid velocity.
The same methods for development was used both in the 2D cases and in the 3D cases, al-
though our 3D simulations arose different and more problems the 2D application can be considered
accomplished. One of our method was trying to understand errors with simplified configurations
of simulation, if the error was carried on we continue with more simplifications until the error was
found. Another method was the application of isolated terms from the formulation or a simplified
configuration of equations to analyze their interference on the results.
Between development, searching and solving errors, we organized our essays of simulation through
the updated versions of our code and some configurations of simulation. Those considerations are
important even if earlier versions of the code have problems, some configurations can be reused,
non-false results can be saved for future reanalysis and nevertheless it is a backup system for the
development. An early version of our table of essays is represented as an example in appendix C,
table C.
For the following section, we highlight that the linear system to solve the 2D problem is slightly
different than the one presented in appendix B, the 2D case does not have any Z component
beside the superimposed magnetic induction. However, we will continue to refer to the same name
classification for the set of integrals, only we will not have the row M 3∗ or the column M ∗3 anymore.
27
5 2-Dimensional Results
Figure 12: Benchmark test 6 and 7 with velocity vectors results in m/s.
Figure 13: Benchmark test 6 and 7, zoomed to the 2nd mesh, with velocity vectors results in m/s.
28
5 2-Dimensional Results
Figure 14: Convergence of results from benchmark test 7 through 22 non-linear iterations.
Another interesting 2D test we used as an essay to validate the hydrodynamics of a similar 3D
case was a box simulation with imposed horizontal velocity (0.01m/s) on the top border (in the
positive direction of X axis). The results for the velocity field after convergence are displayed in
figures 15 and 16, where the box has 5mm sidelong and the grain 100µm of diameter.
Figure 15: Hydrodynamics box test with imposed velocity at the top border, scale in m/s.
29
5 2-Dimensional Results
Figure 16: Same test as figure 15 zoomed to the grain mesh, velocity vectors in m/s.
Those kind of tests were done for some other terms to evaluate its physical concordance, always
paying attention for the convergence of errors throughout non-linear iterations. The higher the
number of coupled terms, higher was the difficulty of convergence, to solve it we developed finer
meshes with special attention to areas of higher instability, which are close to the grain (so the
second mesh), walls and corners (we applied hyperbolic meshes that gets finer when closer to the
walls).
30
5 2-Dimensional Results
Figure 17: Velocity vector field in the Domaine and velocity magnitudes, in m/s, plotted from the
results over the horizontal white line.
31
5 2-Dimensional Results
Figure 18: Velocity vector field near the grain, velocity scale in m/s.
Figure 19: Convergence of results from the coupled test through 28 non-linear iterations.
32
5 2-Dimensional Results
Figure 20: Velocity vectors in the grain domain, velocity scale in m/s and pressure scale in Pa.
Figure 21: Pressure results near the Boite domain in Pa with isobaric lines, in white for the coarser
mesh and red for the finer.
33
5 2-Dimensional Results
Figure 22: Thermoelectric force vector field near the grain, logarithmic scale in N.
Figure 23: Thermoelectric density of current vector field near the grain, logarithmic scale in A/m2 .
34
6 Conclusion
Figure 19 shows that although the hydrodynamics results converge (velocity and pressure) they
are some orders above the convergence for the thermoelectric results (temeperature and electric
potential), also they present some instabilities compared with figure 14. Thus we conclude that, as
reported by Bernabeu et al. there is a 3 dimensional effect for the hydrodynamics around a spherical
grain as shown in the simulation of figure 24[4], therefore any 2D result for this phenomena is
unrealistic, which would explain the discordance of convergence of errors between the thermoelectric
results and the hydrodynamics results.
However, since the thermoelectric phenomena will mostly occur in the direction of the thermal
gradient (Y axis) the 2D result for the vector field of magneto-thermoelectric force presented in figure
22 is realistic and plausible, because it will mostly occur in the orthogonal plane to the directions
of both the magnetic field and the thermoelectric phenomena. Also, these force magnitudes were
validated with the values from the density of currents (figure 23) which in turn have been validated
by the analytic results for a spheroidal grain, with the same average diameter, done by Budenkova
et al. [6].
Nevertheless, in a real 3 dimensional case the liquid motion will follow the force field, which is
impossible to happen in our 2D case since they converge to a singlepoint with no way out. Our
2D case can be extrapolated to a 3D case as a box domain that goes infinitely in the Z axis, which
also includes the configuration of the solid phase, so the grain would also be infinitely long, thus
the hydrodynamics simulation results converge into a global but unrealistic motion of the liquid
around this infinitely long grain. Furthermore we found that the change of simple parameters of the
simulation, for example the grain orientation, can change the global motion to a clockwise motion,
which makes sense, a 3D configuration would probably not rotate globally the liquid domain, but in
a 2D case (or 3D with an infinite length of domain) the force that moves the liquid competes into a
final configuration of rotation.
Figure 24: Vector field of velocity in half-planes (xy) and (yz) and on a spherical surface of radius
60µm for B = 0.5T and Hartmann number Ha ≈ 0.3 [4]
Sadly, our 3D simulations has not been successfully developed until the end of this internship,
although the code has been finished the results are false, we still have errors to be found and fixed.
35
6 Conclusion
Conclusion
La figure 19 montre que même que les résultats hydrodynamiques convergent (vitesse et pression)
ils sont quelques ordres au-dessus de la convergence pour les résultats thermoélectriques (temperature
et potentiel électrique), ils présentent aussi quelques instabilités par rapport à la figure 14. Ainsi
nous concluons que, tel que rapporté par Bernabeu et al. il y a un effet tridimensionnel pour
l’hydrodynamique autour d’un grain sphérique comme montré dans la simulation de la figure 24[4],
donc tout résultat 2D pour ce phénomène est irréaliste, ce qui expliquerait la discordance de la
convergence des erreurs entre les résultats thermoélectriques et les résultats hydrodynamiques.
Cependant, puisque les phénomènes thermoélectriques se produiront principalement dans la di-
rection du gradient thermique (axe Y), le résultat 2D pour le champ vectoriel de force magnéto-
thermoélectrique présenté dans la figure 22 est réaliste et plausible, car il se produira principalement
dans le plan orthogonal aux directions du champ magnétique et des phénomènes thermoélectriques.
De plus, ces valeurs de force ont été validées avec les valeurs de la densité de courants (figure 23)
validées par les résultats analytiques pour un grain sphéroïdal, de même diamètre moyen, effectué
par Budenkova et al. [6].
Néanmoins, dans un cas tridimensionnel réel, le mouvement de liquide suivra le champ de force,
ce qui est impossible à réaliser dans notre cas 2D car ils convergent vers un point unique sans sortie.
Notre cas 2D peut être extrapolé à un cas 3D comme un domaine de boîte qui va infiniment dans
l’axe Z, qui inclut également la configuration de la phase solide, donc le grain serait également
infiniment long, ainsi les résultats de simulation hydrodynamique convergent dans un mouvement
global mais irréaliste du liquide autour de ce grain infiniment long. En outre, nous avons constaté
que le changement de paramètres simples pour la simulation, par exemple l’orientation du grain,
peut changer le mouvement global en un mouvement horaire, ce qui a du sens, une configuration 3D
probablement ne tournerait pas globalement le domaine liquide, mais dans un cas 2D (ou 3D avec
une longueur infinie de domaine) la force qui déplace le liquide rivalise dans une configuration finale
de rotation.
Malheureusement, nos simulations 3D n’ont pas été développées avec succès jusqu’à la fin de ce
stage, bien que le code soit fini les résultats sont faux, nous avons encore des erreurs à trouver et à
corriger.
36
A Gantt diagram
Table 1: Appendix A: Gantt diagram for the activities realized in the internship.
37
B Table of materials properties and integrals
38
B Table of materials properties and integrals
∂α
ραi ∂xj Uxprec +
∂α
+ραi ∂yj Uyprec +
∂α
+ραi ∂zj Uzprec +
i ∂αj
∂αj ∂αj ∂αj ∂αj
M1* +2η ∂α
∂x ∂x +
η ∂α
∂y
i
∂x η ∂α
∂z
i
∂x σSb Bz αi ∂y σBz αi ∂y −1 ∂α
∂x αj
i
i ∂αj
+η ∂α
∂y ∂y +
∂α
+η ∂α j
∂z ∂z +
i
+σBz2 αi αj
∂α
ραi ∂xj Uxprec +
∂α
+ραi ∂yj Uyprec +
∂α
+ραi ∂zj Uzprec +
∂αj i ∂αj
∂αj ∂αj ∂αj
M2* η ∂α
∂x
i
∂y +2η ∂α
∂y ∂y +
η ∂α
∂z
i
∂y −1σSb Bz αi ∂x −1σBz αi ∂x −1 ∂α
∂y αj
i
∂α
+η ∂α
∂x ∂x +
i j
∂α
+η ∂α
∂z ∂z +
i j
+σBz2 αi αj
∂α
ραi ∂xj Uxprec +
∂α
+ραi ∂yj Uyprec +
∂α
+ραi ∂zj Uzprec +
∂αj ∂αj i ∂αj
M3* η ∂α
∂x
i
∂z η ∂α
∂y
i
∂z +2η ∂α
∂z ∂z +
−1 ∂α
∂z αj
i
i ∂αj
+η ∂α
∂x ∂x +
i ∂αj
+η ∂α
∂y ∂y +
∂α
λ ∂α
∂x ∂x +
i j
i ∂αj
M4* +λ ∂α
∂y ∂y +
∂αj
+λ ∂α
∂z
i
∂z
∂α ∂α
σSb ∂α
∂x ∂x +
i j
σ ∂α
∂x ∂x +
i j
39
C Table of simulation essays
40
References
[1] G. Salloum-Abou-Jaoude; J. Wang; L. Abou-Khalil; G. Reinhart; Z.Ren; N. Mangelinck-Noel;
X. li; Y. frautelle, Motion of equiaxed grains during directional solidification under static mag-
netic field Journal of Crystal Growth (2014)
[2] M. Rappaz; M. Bellet; M. Deville, Modélisation Numérique en Science et Génie des Matériaux,
Presses Polytechniques et Universitaires Romandes Traité des Materiaux - vol 10 (1998)
[5] X. Li; Y. Zhang; Y. Fautrelle; Z. Ren; C. Esling, Experimental evidence for liquid/solid inter-
face instability caused by the stress in the solid during directional solidification under a strong
magnetic field Scripta Materialia - 60 (2009)
[6] Budenkova, O.; Bernabeu, N.; Rukolaine, S.; Du Terrail Couvat, Y.; Gagnoud, A.; Tarpagkou,
R.; Fautrelle, Y. (2017). Thermoelectric problem for an axisymmetric ellipsoid particle in the
liquid metal: Analytical solution and numerical modeling Applied Mathematical Modelling,
45, 590–605
[7] Zhou, Modeling convection with finite element method and multi-mesh technique EPM-SIMAP
internship report (2017)
[8] nasa.gov/mission_pages/juno/main/index.html
[9] Amestoy, P.R.; Duff, I.S.; l’Excellent, J.-Y. (2000). Multifrontal parallel distributed symmetric
and unsymmetric solvers". Computer Methods in Applied Mechanics and Engineering
41