Solidification Modeling With User Define
Solidification Modeling With User Define
Editors:
Jan Erik Olsen and Stein Tore Johansen
Key words:
CFD, Flow, Modelling
www.sintef.no/byggforsk
www.sintefbok.no
SINTEF Proceedings
SINTEF Proceedings is a serial publication for peer-reviewed conference proceedings
on a variety of scientific topics.
The processes of peer-reviewing of papers published in SINTEF Proceedings are
administered by the conference organizers and proceedings editors. Detailed
procedures will vary according to custom and practice in each scientific community.
PREFACE
This book contains all manuscripts approved by the reviewers and the organizing committee of the
12th International Conference on Computational Fluid Dynamics in the Oil & Gas, Metallurgical and
Process Industries. The conference was hosted by SINTEF in Trondheim in May/June 2017 and is also
known as CFD2017 for short. The conference series was initiated by CSIRO and Phil Schwarz in 1997.
So far the conference has been alternating between CSIRO in Melbourne and SINTEF in Trondheim.
The conferences focuses on the application of CFD in the oil and gas industries, metal production,
mineral processing, power generation, chemicals and other process industries. In addition pragmatic
modelling concepts and bio‐mechanical applications have become an important part of the
conference. The papers in this book demonstrate the current progress in applied CFD.
The conference papers undergo a review process involving two experts. Only papers accepted by the
reviewers are included in the proceedings. 108 contributions were presented at the conference
together with six keynote presentations. A majority of these contributions are presented by their
manuscript in this collection (a few were granted to present without an accompanying manuscript).
The organizing committee would like to thank everyone who has helped with review of manuscripts,
all those who helped to promote the conference and all authors who have submitted scientific
contributions. We are also grateful for the support from the conference sponsors: ANSYS, SFI Metal
Production and NanoSim.
3
Organizing committee: Scientific committee:
Conference chairman: Prof. Stein Tore Johansen Stein Tore Johansen, SINTEF/NTNU
Conference coordinator: Dr. Jan Erik Olsen Bernhard Müller, NTNU
Dr. Bernhard Müller Phil Schwarz, CSIRO
Dr.Sigrid Karstad Dahl Akio Tomiyama, Kobe University
Dr.Shahriar Amini Hans Kuipers, Eindhoven University of Technology
Dr.Ernst Meese Jinghai Li, Chinese Academy of Science
Dr.Josip Zoric Markus Braun, Ansys
Dr.Jannike Solsvik Simon Lo, CD‐adapco
Dr.Peter Witt Patrick Segers, Universiteit Gent
Jiyuan Tu, RMIT
Jos Derksen, University of Aberdeen
Dmitry Eskin, Schlumberger‐Doll Research
Pär Jönsson, KTH
Stefan Pirker, Johannes Kepler University
Josip Zoric, SINTEF
4
CONTENTS
* E-mail: [email protected]
Sub/superscripts
ABSTRACT eff Effective (molecular + turbulent).
The modelling of solidification processes in combination with ESR Electro slag remelting.
fluid flow is one main application of ANSYS Fluent. The solid- ϵ Turbulent dissipation rate.
ification is modelled with the enthalpy porosity technique. k Turbulent kinetic energy.
Therefor the fluid flow is damped like a flow through a porous liq Liquidus / liquid.
media of dendrites. In case of materials with large solidification p Pulling (movement of the solid).
ranges, like the nickel based superalloy 718, the adjustment
sol Solidus.
possibilities of ANSYS Fluent are often not adequate. The pro-
gram postulates a linear dependency between liquid fraction UDF User-defined function.
and temperature. To improve the simulation, the solidification UDM User-defined memory.
was implemented by a user defined function (UDF). The prin- VAR Vacuum arc remelting.
cipal modelling of fluid flow is based on the theory of AN- x X-direction.
SYS Fluent, but it is now possible to adjust the liquid fraction y Y-direction.
in fine temperature steps. 𝑧 Z-direction.
Keywords: Rheology, Interphases, Casting and solidifica-
tion, Process metallurgy, Alloy 718.
INTRODUCTION
Metallurgical processes are often modeled to obtain de-
NOMENCLATURE tails of the inner fluid flow or temperature distribution,
due to the difficult observation possibilities with classical
Greek Symbols measurement methods. The modelling of solidification
𝜖 Turbulent dissipation rate, [-]. processes is in focus of research since the 1970s (Erick-
𝜆 Thermal conductivity, [W/(m K)]. son, 1975).
𝜇𝐷 Dynamic viscosity, [kg/(m s)]. One of the common simulation programs ANSYS Fluent
∇ Divergence operator, [-]. uses the enthalpy-porosity approach (ANSYS Inc.,
Release 14.5, 2012) which was introduced by Poirier
ρ Density, [kg/m³].
(1987). ANSYS Fluent uses the assumption that the liq-
τ Shear stress tensor, [N/m²].
uid fraction is proportional to the temperature in the so-
lidification range. For many standard steels, this assump-
Latin Symbols
tion will be an appropriate approach. In case of some
𝐴𝑚𝑢𝑠ℎ Mushy zone constant, [kg/(m³ s)].
nickel based superalloys, like alloy 718, the supposition
𝑒 Internal energy, [J].
is far-out the real material behavior.
𝑓 Fraction, [-].
Therefore, user-defined functions implement the solidifi-
𝐹 Force against fluid flow per volume, [N/m³].
cation to reproduce the real material behavior.
𝑔 Gravity, [m/s²].
𝑘 Turbulent kinetic energy, [-].
SOLIDIFICATION PHENOMENA
𝐾 Permeability, [m²].
𝑙 Small number, [-]. Important for the simulation of solidification processes
𝑝 Pressure, [Pa]. are the damping of the fluid flow in the mushy region and
𝑄𝑒 volumetric energy source, [J/m³]. the solidification enthalpy. The damping is adjustable
𝑆 Momentum sink for turbulence, [kg/(m³ s)]. with the material specific mushy zone constant (Voller et
𝑣 Velocity, [m/s]. al., 1990) and considers the liquid fraction also.
t Time, [s]. Figure 1 shows the liquid fraction of an alloy 718 in re-
spect to the temperature in the solidification range calcu-
T Temperature, [K].
lated by JMatPro. Obviously, the linear approximation
made by ANSYS Fluent is not appropriate for this mate-
rial. After a cooling of 25 % of the temperature range the
liquid fraction is not 75 % but only 40 %. Therefore, the
583
damping of the fluid flow is underestimated by AN- BUILT-IN SOLIDIFICATION IN ANSYS FLUENT
SYS Fluent. The solidification module from ANSYS Inc. (Release
14.5, 2012) uses the enthalpy-porosity approach to im-
plement the damping of the fluid flow in the mushy re-
gion. Poirier (1987) shows, that the inter dendritic flow
follows Darcy’s law (Darcy, 1856):
Darcy’s law
𝜇𝐷
∇𝑝 = − ∙𝐯 (1)
𝐾
= ∙ 𝐴𝑚𝑢𝑠ℎ (2)
The deviation of the liquid fraction from alloy 718 results 𝐾 3
𝑓𝑙𝑖𝑞 −𝑙
in a nonlinear behavior of the enthalpy in the solidifica-
tion range, because the solidification enthalpy is depend- The ratio between viscosity and permeability (see for-
ent on the liquid fraction. mula (2)) is then inserted in the equations (3) and (4) to
Figure 2 shows the comparison of solidification en- formulate the force F against the fluid flow v as well as
thalpies in respect to the temperature in the solidification the momentum S against the turbulence quantities Φ.
range. The grey line shows the linear implementation of
ANSYS Fluent. Obviously, the change in enthalpy of the 2
(1 − 𝑓𝑙𝑖𝑞 )
mild steel (Koric and Thomas, 2008) is close to the ap- 𝐅= ∙ 𝐴𝑚𝑢𝑠ℎ ∙ (𝐯 − 𝐯𝐩 ) (3)
3
proximation from ANSYS Fluent. Whereas, the red line, 𝑓𝑙𝑖𝑞 −𝜖
representing Alloy 718 (Overfelt et al., 1994), shows a (𝟏 − 𝒇𝒍𝒊𝒒 )
𝟐
𝜕
(𝜌 ⋅ 𝒗) + ∇ ⋅ (𝜌 ⋅ 𝒗 ⋅ 𝒗)
𝜕𝑡 (5)
= −∇𝑝 + ∇ ⋅ (𝝉) + 𝜌 ⋅ 𝒈 + 𝑭
𝜕
(𝜌 ⋅ 𝑒) + ∇ ⋅ (𝒗 ⋅ (𝜌 ⋅ 𝑒 + 𝑝))
Figure 2: Comparison of solidification en- 𝜕𝑡 (6)
thalpies (Overfelt et al., 1994, Koric and Thomas, 2008) = ∇ ⋅ (𝜆𝑒𝑓𝑓 ⋅ ∇𝑇 + 𝝉𝒆𝒇𝒇 ⋅ 𝒗) + 𝑄𝑒
584
2
USER-DEFINED SOLIDIFICATION MODEL (1 − 𝑓𝑙𝑖𝑞 )
To reconstruct the real material behavior of alloy 718 an 𝑆𝜖 = − 3 ∙ 𝐴𝑚𝑢𝑠ℎ ∙ 𝜖 (11)
𝑓𝑙𝑖𝑞 − 𝜖
in-house developed solidification model based on UDFs
is used for several process models, like electro slag re-
The five source terms have to be included for the corre-
melting (ESR) and vacuum arc remelting (VAR).
sponding values in the ANSYS Fluent interface. The pro-
Approach gram implements the source terms in the momentum
The aim of the modified solidification model is to imple- equation (5) as well as the turbulence model.
ment the nonlinear behavior of the liquid fraction in re- Solidification enthalpy
spect to the temperature. The curve progression can be
To implement the nonlinear behavior of the solidification
received for example from a Scheil-Gulliver approach
enthalpy (see Figure 2) the enthalpy is included in the
like in Figure 1 or other calculation programs for thermo-
heat capacity of the material (see Figure 3). Therefore, it
physical data.
is not necessary to modify the energy equation (6) of the
The idea was to reconstruct the solidification model of
solver.
ANSYS Fluent by user-defined functions. Therefore, the
main equations ((3) and (4)) for the damping are also
used.
The solidification enthalpy is included in the heat capac-
ity of the material.
Implementation
The implementation of the modified solidification model
is based on a DEFINE_ADJUST function for the liquid
fraction and several DEFINE_SOURCE functions for the
damping. A modified heat capacity includes the change
in enthalpy.
The liquid fraction should be adjusted very detailed to
represent the real fluid flow. Therefore, liquid fraction
and solidification enthalpy out of the thermophysical da-
tabase are divided in 1 K steps.
Damping of the fluid flow
Figure 3: Heat capacity of alloy 718 including the so-
A DEFINE_ADJUST UDF loops over all the cells in the lidification enthalpy (Giesselmann, 2014)
fluid regions to get the temperature of the cells. A look-
up function searches the corresponding liquid fraction for Obviously, most of the solidification enthalpy is needed
these temperatures out of the tabulated liquid fractions. or set free near to the liquidus temperature. This refers to
The liquid fraction is saved in a user-defined the steep slope of the liquidus fraction in this area (com-
memory (UDM) for post processing. pare Figure 1).
Analog to the calculation procedure in ANSYS Fluent Another possibility to implement the enthalpy of solidi-
the ratio between viscosity and permeability is calculated fication would be a DEFINE_SOURCE UDF. The ad-
with equation (2) and saved in another UDM. This ratio vantage of the presented solution is the reversible char-
is the damping term of velocities and turbulence quanti- acter of the heat capacity. Because some parts of the sim-
ties (see equation (3) and (4)). ulated region maybe melt on again, the solution with
The damping force and momentum values are calculated source term would be more elaborate. Whereas the heat
in several DEFINE_SOURCE UDFs. One UDF for each capacity offers directly the possibility for change of sign
velocity direction and the turbulence quantities, typical in the temperature derivation.
turbulent dissipation rate ε and turbulent kinetic en-
ergy k. The source value is the negative product of the COMPARISON OF THE MODELS
damping term with the velocity or turbulence value (See To compare the built-in solidification of ANSYS Fluent
equations (7) to (11)). If a pull velocity vp moves the solid with the UDF based solidification model a test case was
region, it has to be subtracted from the fluid velocity, here set up. Figure 4 and Figure 5 show the flow of hot metal
in the x direction: through a cooled pipe. The left face is a velocity inlet of
hot liquid metal. The top wall is at constant temperature,
2
(1 − 𝑓𝑙𝑖𝑞 ) which is lower than the solidus temperature. At the right
𝐹𝑥 = − 3 ∙ 𝐴𝑚𝑢𝑠ℎ ∙ (vx − vp ) (7) side, the boundary is an outflow. The contour plot visu-
𝑓𝑙𝑖𝑞 − 𝜖
2
alizes the liquid fraction from one (white) to zero (black).
(1 − 𝑓𝑙𝑖𝑞 ) The black line symbolizes the position of 1 % solid frac-
𝐹𝑦 = − 3 ∙ 𝐴𝑚𝑢𝑠ℎ ∙ 𝑣𝑦 (8)
𝑓𝑙𝑖𝑞 − 𝜖 tion. The vectors and their lengths show the velocity.
2 In Figure 4 the solidification model of ANSYS Fluent
(1 − 𝑓𝑙𝑖𝑞 ) was used. Therefore, the liquid fraction increases uni-
𝐹𝑧 = − 3 ∙ 𝐴𝑚𝑢𝑠ℎ ∙ 𝑣𝑧 (9)
𝑓𝑙𝑖𝑞 − 𝜖 formly over the whole solidification range.
2
(1 − 𝑓𝑙𝑖𝑞 )
𝑆𝑘 = − 3 ∙ 𝐴𝑚𝑢𝑠ℎ ∙ 𝑘 (10)
𝑓𝑙𝑖𝑞 − 𝜖
585
The solidification model of ANSYS Fluent was modified
and calculated in a user-defined function to adjust the liq-
uid fraction concerning the cell temperature properly.
The damping of the motion values is then implemented
by source terms for velocities and turbulence quantities.
The solidification enthalpy is included in the heat capac-
ity of the material. Therefore, the enthalpy can be fitted
very detailed.
A test case shows the similarities and differences of the
two models. The modified solidification implements a
more abrupt damping of the fluid flow.
The modified solidification model is able to replicate the
material behavior more detailed than the built-in solidifi-
cation module of ANSYS Fluent.
586