Introduction

Fluid flow and motion of the growing crystals play an essential role in determining the microstructure during casting.1 For example, owing to the variation of the local temperature gradient and the velocity of the solidification front, a morphological transition can occur from the columnar morphology growing inwards from the surface of the mold and a nucleation dominated equiaxed structure. This columnar to equiaxed transition (CET) influences the mechanical properties and failure characteristics of the cast components. Therefore, understanding and modeling of such processes are of outstanding practical importance. Experiments on transparent alloy systems and in situ synchrotron studies on solidifying alloys2,3,4,5,6 have shown that buoyancy forces may influence the solidification microstructure considerably: e.g. buoyancy driven jets, “plumes”, may form,7,8 which drag dendrite fragments of the columnar domain well into the bulk liquid, which then growing further and heavier fall on top of the columnar layer, leading to CET (see Fig. 1).

Fig. 1
figure 1

Snapshots displaying columnar to equiaxed transition (CET) during casting of a transparent model alloy. a Early stage columnar solidification started from the container wall. b, c Columnar + equiaxed solidification. Note the effect of three “plumes” (upward flow due to buoyancy forces in the melt; they are on the left, at the center, and on the right): small crystal fragments are dragged upwards, and as they grow larger they fall back on top of the crystallized layer. d Late stage. Coloring: black—melt; white—crystal, gray—mold. Snapshots from the video Crystal Growth: Equiaxed zone formation in castings by K.A. Jackson. For the video, see Supplementary Movie 1. Courtesy of K. A. Jackson.

Modeling of this process requires the handling of complex interactions of fluid flow, gravity, and the growing solid particles, a task far from being trivial. Recent studies of solidification in the presence of fluid flow combine either the lattice Boltzmann method (LBM) of fluid flow or the Navier–Stokes equation with a model for solidification, e.g. phase-field/level set/cellular automaton models.9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28 While the majority of the earlier studies refer to solidification of static particles in fluid flow, the motion of growing solid particles in the melt was addressed by more recent investigations. Solutions for the latter problem were presented by Do-Quang and Amberg,21 Steinbach,22,23 Qi et al.,25 and Takaki and coworkers,24,26,27 who coupled the phase-field approach to the Navier–Stokes equations21,25 or to lattice Boltzmann hydrodynamics.22,23,24,26,27

To describe a single dendritic particle that descends in a viscous fluid in two dimensions, Do-Quang and Amberg used a semi-sharp phase-field model combined with the distributed Lagrangian method to realize rigid body motion of the solid domain.21 The phase-field approach by Steinbach and coworkers was used to describe the formation and motion of a single dendritic particle in shear flow in two and three dimensions,22,23 whereas Takaki et al. performed simulations in two dimensions for a descending single dendritic particle and the motion of several dendritic particles in shear flow.24,26 In the latter case a specific dendrite–dendrite interaction, “collision-coalescence” was assumed: the solid particles that touch each other stick together forming a single solid body that moves accordingly. In a recent work Qi et al.25 addressed the buoyancy induced motion of several dendrites, performing the simulations at relatively small viscosity contrast (up to 100) and a large density contrast (1000), however, retaining exclusively hydrodynamic interaction between the dendritic particles.

In this paper, we propose a new LBM based phase-field approach that relies on an overlapping grid technique when handling large number of solidifying particles. This approach allows the modeling of several floating dendritic particles, which do not merge when colliding, rather they tumble over each other and sediment under gravitational force. Thus, regarding the particle–particle interaction, our model can be viewed complementary to the previous methods, and is suitable for addressing the CET.

Results

To illustrate the abilities of the new model introduced in the Methods section, we address multiphase-flow problems of increasing complexity.

Sedimentation of circular particles of fixed size

First, we demonstrate that our approach is suitable for simulating the motion of a relatively large number of circular particles with fixed size. Following previous work,29,30 the initial position of the particles was on a square grid. Snapshots of the velocity field and the position of the particles are displayed in Fig. 2. Owing to gravity, the particles sediment and form a fairly closely packed structure (with some disorder present) via a chaotic transition period. The overall behavior is similar to the relaxation towards a densely packed structure observed for a large number of circular particles in refs. 29,30

Fig. 2
figure 2

Snapshots that show the velocity field and particle position during the sedimentation of 30 circular particles. The snapshots (from left to right) show the initial arrangement and the state of the system after \(1.4\;\times\;1{0}^{5}\) steps (2.8 s), \(2.4\;\times\;1{0}^{5}\) steps (4.8 s), \(3.2\;\times\;1{0}^{5}\) steps (6.4 s), \(4\;\times\;1{0}^{5}\) steps (8 s) and \(8.4\;\times\;1{0}^{5}\) steps (16.8 s). The white lines stand for the streamlines, while the arrows indicate the flow direction. The simulation was performed on a 540 \(\times\) 1024 grid. For the corresponding animation see Supplementary Movie 2.

Falling dendritic particle

Next, we investigate the growth and sedimentation of a single dendritic particle in the melt with an arm growing parallel with the gravitational force (orientation “+”) and with arms inclined by \(4{5}^{\circ }\) relative to the gravitational force (orientation “×”). Thermophysical properties of the binary alloy Al\({}_{45.5}\)Ti\({}_{54.5}\) were used. Uniform \(T=1795\) K was set in the simulation box. We varied the gravitational acceleration in the regime \(0.1g-0.001g\). In all cases, the dendritic particles descended with a decreasing velocity owing to their increasing size. We found a \(g\)-dependent behavior. At low \(g\), if initially one of the arms pointed downwards (orientation “+”), its growth was faster than that of the other arms. During descend the orientation of the particle was fairly stable (as in refs 21 and 25) until the particle started to interact with the bottom wall of the simulation box (see Fig. 3, upper row). Similarly, for initial orientation “×”, the orientation of the particle remained fairly stable (see Fig. 3, bottom row). This finding differs from the behavior reported in ref. 21 A swinging motion was, however, observed for asymmetric initial tilting of the particle. At high \(g\) values, independently of the initial orientation, the particles were swinging and tumbling chaotically in qualitative agreement with the results in ref. 24 The differences we observed relative to previous work are attributable to differences in the gravitational force, a larger number of side-branches, the phase-field fluctuations, etc.

Fig. 3
figure 3

Snapshots of dendrites descending in viscous fluid (upper row) with initial orientation “\(+\)”, and (bottom row) with initial orientation “×” at downward gravitational acceleration \(0.001g\). The snapshots are taken (from left to right) after \(2.4\;\times 1{0}^{6}\) steps (4.8 s), \(5\;\times 1{0}^{5}\) steps (10 s), \(8.2\;\times 1{0}^{5}\) steps (16.4 s) and \(1.1\;\times 1{0}^{6}\) steps (22 s). Note the stable behavior until hydrodynamic interaction with the lower wall of the simulation box intervenes, which makes the dendritic particle tumble (see upper row). Coloring is as in Fig. 2. The simulations were performed on a 4000\(\times\)5000 grid. Properties from Table 1 were used. For the corresponding animation see Supplementary Movie 3.

Sedimentation of interacting dendritic particles

Next, we modeled the formation and sedimentation of dendritic particles growing into a homogeneous undercooled Al\({}_{45.5}\)Ti\({}_{54.5}\) liquid under conditions similar to those used in the previous Subsection. In the course of the simulation, supercritical crystal seeds of random position were introduced at random instances in the upper domain of the simulation box. This led to the formation of falling dendritic particles that interacted with each other via the concentration and flow fields, and at short ranges by the Diffuse Interface Field force.31 This simulation resulted in sedimenting dendritic particles that grow, roll, and tumble over each other, as required by the interplay of the acting forces. Snapshots of this process are displayed in Fig. 4.

Fig. 4
figure 4

Snapshots displaying the velocity and concentration fields (upper and bottom rows, respectively) with streamlines during the sedimentation of dendritic particles in viscous fluid and gravity of \(0.001g\). The snapshots are taken (from left to right) after \(8\;\times 1{0}^{4}\) steps (1.6 s), \(2.8\;\times 1{0}^{5}\) steps (5.6 s), \(6\;\times 1{0}^{5}\) steps (12 s) and \(1.8\;\times 1{0}^{6}\) steps (36 s). Coloring is as in Fig. 2. The simulation was performed on a 2000 × 2000 grid. For the corresponding animation see Supplementary Movie 4.

Application to CET

Finally, we apply the present model to simulate two possible mechanisms of CET: (i) nucleation above columnar growth and (ii) via fragments lifted above the columnar domain by a buoyancy driven upward flow (“plumes” shown in Fig. 1).

Snapshots of the simulation for case (i) are shown in Fig. 5. The initial conditions were as follows. The columnar dendrites started from crystal seeds with “+” orientation placed uniformly along the bottom of the simulation box. These seeds belong to the fixed local grid with no-flux boundary condition on its borders. Nucleation of the equiaxed particles is represented by placing 20 randomly oriented and positioned seeds at random instances into the upper part of the simulation box. A temperature gradient of 50 \({\rm K}\,{\rm cm}^{-1}\) pointing upwards was employed, while a spatially uniform cooling rate of 0.6 \({\rm K}\,{\rm s}^{-1}\) was set. Owing to the larger mass density of the \(\beta\)(Ti) seeds, they start to descend while evolving into dendritic particles, settling then on the top of the columnar dendrites growing from below. During settling their orientation changes as a result of the forces acting on them (gravity, flow, contact with other dendritic crystals), and finally they form an equiaxed layer, blocking the growth of the columnar domain. We note that despite its relative complexity, our code runs with reasonable computation times on a single GPU even in such cases: the computation shown in Fig. 5 took about a day on a high-end GPU card.

Fig. 5
figure 5

Snapshots of the velocity and concentration fields (upper and bottom rows, respectively) during CET via columnar growth from the bottom and nucleation in the upper domain of the simulation box. The snapshots are taken (from left to right) after \(7.2\;\times 1{0}^{5}\) steps (14.4 s), \(1\;\times 1{0}^{6}\) steps (20 s), \(1.16\;\times 1{0}^{6}\) steps (23.2 s) and \(1.44\;\times 1{0}^{6}\) steps (28.8 s). Coloring as in Fig. 4. The simulation was performed on a 4096 × 3072 grid. For the corresponding animation see Supplementary Movie 5.

In modeling of case (ii), similar conditions were used except that larger temperature gradient of 80 \({\rm K}\,{\rm cm}^{-1}\) was prescribed. Another difference was that to mimic the flow inside a plume, a fixed velocity boundary condition was set on the right hand side of the simulation box that generated an upward flow. This was needed, since in the present implementation of the LBM, density differences in the liquid due to composition or temperature are neglected. In this simulation, the crystal fragments were represented by five mobile crystal seeds of random initial orientation that were released periodically near the tip of the rightmost columnar dendrite. This treatment serves as an approximation of producing crystal fragments that may appear as the result of either fracture or remelting the neck of sidearms.32

The results of the simulation for case (ii) are shown in Fig. 6. Panels of the first column show the formation of columnar dendrites and five equiaxed dendrites that evolved from initially elliptical seeds while dragged upwards by the flow. In the second column these equiaxed dendrites move towards the columnar zone due to the the combined effect of the vortex formed in the top right corner and gravity. The first equiaxed dendrite just collides with a columnar one. In panels of the third column, each of the equiaxed dendrites reached the columnar zone settling down on top of it and each other, starting thus the formation of a CET zone. Finally, in the rightmost column, a fully blocked columnar zone can be seen on the right, while on the left, the columnar dendrites continue to grow.

Fig. 6
figure 6

Snapshots of the velocity (upper row) and concentration fields (bottom row) during CET induced by a “plume” (a process shown in Fig. 1). The flow in the plume is represented by a wall moving upward. The snapshots are taken (from left to right) after \(8\;\times 1{0}^{5}\) steps (16 s), \(1.2\;\times 1{0}^{6}\) steps (24 s), \(1.5\;\times 1{0}^{6}\) steps (30 s) and \(2.1\;\times 1{0}^{6}\) steps (42 s). Simulation performed on a 6016 × 4000 grid. Coloring as in Fig. 4. For the corresponding animation see Supplementary Movie 6.

Discussion

We presented a new phase-field lattice Boltzmann approach that relies on a multigrid technique, which is based on using a global grid and individual subgrids, each of the latter assigned to a moving solid particle. In our model, the moving particles interact via the flow- and composition fields, and a contact force. Using this model, we were able to simulate binary solidification, solute diffusion and advection, melt flow, solid motion, the effect of gravity, and collision of the solid particles with each other or the walls, simultaneously.

A rigorous validation of the model was performed for two cases: (i) we performed a quantitative Schäfer-Turek test for flow around a single circular particle placed asymmetrically in a channel. (ii) We computed the fall of a single circular particle in viscous fluid in the presence of gravity, and compared the trajectory, the velocity components and the angular velocity with literature data. In both cases our results are in a good agreement with literature data from refs. 33,31 Furthermore, we investigated the descending motion of two circular particles, one placed above the other in a channel filled with viscous fluid. We found a fair qualitative agreement with results published for a similar arrangement.34,35 The observed quantitative deviations from previous results are attributed to the different particle–particle and wall–particle interactions used here.

Next, we explored the behavior of the model in more complex cases.

  1. (a)

    We investigated the settling (sedimentation) of 30 circular particles in gravitational field. The results are in a qualitative agreement with literature data: After a fairly chaotic transition period, the particles tend to arrange themselves on a triangular lattice, however, with some faults.

  2. (b)

    We explored the growth of a single dendrite descending in gravitational field, while varying initial orientation and the strength of the gravitational force. We found, that in weak gravity the dendrite retains its initial orientation when started from a symmetric position, we observed a random swinging motion in strong gravity, independently of the initial orientation. In this regime, the particle motion appears chaotic.

  3. (c)

    We studied the sedimentation of growing particles of complex shape (equiaxed dendrites) interacting with each other via flow- and concentration fields and contact force. The particles show irregular motion. When in contact, they tumble over each other. This and the geometrical constraints they exert on each other play a major role in determining the final position of the individual particles. Larger scale simulations would be needed to facilitate the identification of possible trends in sedimentation.

  4. (d)

    We performed illustrative simulations to demonstrate that there are at least two possible routes for realizing CET. Both volumetric nucleation ahead/above of the columnar front and catapulting fragments above the columnar domain by buoyancy driven local upward jets (plumes) can lead to columnar to equiaxed morphological transition.

Summarizing, the model we presented here is fairly flexible, as it was able to address a variety of multiphase-flow problems. It has some limitations, though. A technical limitation originates from the multigrid structure: using a single GPU, the largest number of particles we were able to handle was about 100. Further development of our model can be made in several directions. First, for an explicit incorporation of the plumes, a lattice Boltzmann technique developed for binary liquids needs to be adopted. The formation of dendrite fragments may be incorporated along the line described in ref. 32 Furthermore, the mechanical interaction between solid particles should be refined, introducing criteria for merging of the colliding particles, which should depend on their misorientation and relative motion. Last but not least, the melt flow can be very different in 3D than in 2D, which would certainly affect the results. For quantitative results the extension of the simulation code to three dimensions is, therefore, essential. It would, however, require the use of larger computational resources, e.g. GPU clusters or state-of-the-art supercomputers.

Finally, we would like to mention that parallel to this work,36 similar results for CET were presented by Takaki et al.37 at the conference SES 2018, Madrid, Spain, which were obtained by a slightly different phase-field/lattice Boltzmann model.

Methods

We developed a phase-field lattice Boltzmann model to describe complex cases of multiphase flow, in which solidifying particles move with the melt, as in the case of the CET. We construct the model step by step, combining ingredients taken from other works, and validating the individual steps via performing standard benchmarks tests.

Simulation of CET incorporating mobile particles requires a model that can handle all relevant processes and phenomena simultaneously: solidification, diffusion, melt flow, convection, particle movement, and particle collision. However, coupling various models that can address one or more of these phenomena can be challenging due to the numerical problems arising from the different length- and time scales. Another difficulty that may arise when handling particles that move relative to the grid is a possible distortion of their shape due to numerical issues associated with the advective terms. Our approach to the problem is an overlapping grids scheme, where each individual particle has been assigned and fixed to a local grid that will move according to the velocity of the particle.

Overlapping grids scheme

In the overlapping grids scheme there is a global grid and several local grids (see Fig. 7). The global grid is a fixed, uniformly spaced rectangular grid that defines the simulation box. The fields defined on the global grid are the particle distribution functions required by the LBM and the global concentration field. These fields have boundary conditions that correspond to the physical boundaries of the simulation domain. In addition, for each mobile particle a separate local grid is defined. Each of the latter grids is also rectangular and in our implementation its linear size grows as the size of the particle defined on it requires. The fields defined on the local grids are the phase field corresponding to the given particle (\(\phi =0\): liquid, \(\phi =1\): solid) and the local concentration field. The local grids overlap with and may even extend beyond the global grid, and may also overlap with each other (see the red dashed rectangles in Fig. 7). The boundaries of the local grids are not physical boundaries of the domain, the boundary conditions applied to the local fields are based on the values interpolated from the global grid.

Fig. 7
figure 7

The global grid and the mobile local grids with the particles. The global grid (black rectangle) defines the simulation domain. The local grids (red dashed rectangles) can have different sizes since they are resized as the corresponding particles are growing. The border of a local grid is not an actual physical border, it can overflow from the simulation box and also it may overlap with a border of a different local grid.

For the \(\alpha\)th local grid, in addition to the fields mentioned above, the following values are calculated and stored in each time step:

  • \({M}_{\alpha }\): total mass of the solid

  • \({{\bf{r}}}_{\alpha }^{{\rm{l}}}\): position of the center of mass in local grid coordinates

  • \({{\bf{r}}}_{\alpha }^{{\rm{g}}}\): position of center of mass in global grid coordinates

  • \({\theta }_{\alpha }\): rotation angle

  • \({I}_{\alpha }\): moment of inertia

  • \({{\bf{u}}}_{\alpha }\): velocity

  • \({\omega }_{\alpha }\): angular velocity

The total mass, local center of mass, and the moment of inertia are determined from the phase field as

$${M}_{\alpha }={\rho }_{{\rm{s}}}{\int_{{V}_{\alpha }}}{\phi }_{\alpha }({\bf{x}})\ {\rm{d}}V,$$
(1)
$${{\bf{r}}}_{\alpha }^{{\rm{l}}}=\frac{1}{{M}_{\alpha }}{\int_{{V}_{\alpha }}}{\phi_{\alpha }}({\bf{x}}){\bf{x}}\ {\rm{d}}V,$$
(2)
$${I}_{\alpha }={\rho }_{{\rm{s}}}{\int_{{V}_{\alpha }}}{\phi }_{\alpha }({\bf{x}})\cdot | {\bf{x}}-{{\bf{r}}}_{\alpha }^{{\rm{l}}}{| }^{2}\ {\rm{d}}V,$$
(3)

where \({\rho }_{{\rm{s}}}\) is the density of solid phase.

To move the local grid, the different forces acting on the solid on the local grid are calculated and then the equation of motion for the center of mass is solved. The different forces are: (i) fluid force acting on the boundary of a particle, (ii) particle interaction force that act at the contact points between two neighboring particles, and (iii) external forces, like gravity.

To calculate the fluid force acting on the particle, the phase-field values on the local grids are projected to a global \({\phi }^{{\rm{g}}}\) auxiliary field using the bilinear interpolation method. the velocity of each solid point is also determined on the global grid. in the fluid flow simulations, the diffuse interface of the moving particles are substituted with sharp, moving boundaries defined by the \({\phi }^{{\rm{g}}}=0.5\) condition.

When all forces and the movement of the particle is calculated, then the phase-field equations are solved on the local, and the concentration equations are solved on both the global and local grids. The two solutions (global or local) for the concentration equation are considered in updating the values for each point. The effect of fluid flow on the concentration field is taken into account via an advection term in the concentration equation. An advantage of this approach is that as the local grid moves with the particle, there are no advection terms in effect inside the particle and close to its boundary. This ensures that the movement of the particle does not change its shape and composition.

Fluid flow in the LBM

In simulating the fluid flow, the LBM was used with the multiple-relaxation-time (MRT) collision operator38,39 that has better numerical stability over the single-relaxation-time scheme.40 The nine discrete velocity vectors in the D2Q9 model are

$${{\bf{e}}}_{i}=\left\{\begin{array}{l}(0,0),\qquad\qquad\qquad\ \ \, i=0,\\ (\pm 1,0)c,(0,\pm 1)c,\quad i=1-4,\\ (\pm 1,\pm 1)c,\qquad\qquad i=5-8,\end{array}\right.$$
(4)

where \(c={\delta }_{x}/{\delta }_{t}\) is the unit of velocity, \({\delta }_{x}\) and \({\delta }_{t}\) are the lattice constant and the time step.

Following the notation of,40 the LBE can be formulated at site \({{\bf{x}}}_{j}\) at time \({t}_{n}\) as

$${\bf{f}}({{\bf{x}}}_{j}+{{\bf{e}}}_{i}{\delta }_{t},{t}_{n}+{\delta }_{t})-{\bf{f}}({{\bf{x}}}_{j},{t}_{n})={\boldsymbol{\Omega }}({\bf{f}}),$$
(5)

where \({\bf{f}}\) and \({\boldsymbol{\Omega }}\) are nine-dimensional column vectors

$${\bf{f}}({{\bf{x}}}_{j}+{{\bf{e}}}_{i}{\delta }_{t},{t}_{n}+{\delta }_{t}):= \left[{f}_{0}({{\bf{x}}}_{j},{t}_{n}+{\delta }_{t}),\ldots ,\right. {\left.{f}_{8}({{\bf{x}}}_{j}+{{\bf{e}}}_{i}{\delta }_{t},{t}_{n}+{\delta }_{t})\right]}^{\dagger },$$
(6)
$${\bf{f}}({{\bf{x}}}_{j},{t}_{n}):= {\left[{f}_{0}({{\bf{x}}}_{j},{t}_{n}),{f}_{1}({{\bf{x}}}_{j},{t}_{n}),\ldots ,{f}_{8}({{\bf{x}}}_{j},{t}_{n})\right]}^{\dagger },$$
(7)
$${\boldsymbol{\Omega }}({\bf{f}}):= {\left[{\Omega }_{0}({{\bf{x}}}_{j},{t}_{n}),{\Omega }_{1}({{\bf{x}}}_{j},{t}_{n}),\ldots ,{\Omega }_{8}({{\bf{x}}}_{j},{t}_{n})\right]}^{\dagger },$$
(8)

where \(\dagger\) denotes the transpose operation, \({f}_{i}\) is the distribution function corresponding to the discrete velocity \({{\bf{e}}}_{i}\), and \({\Omega }_{i}\) is the change in \({f}_{i}\) due to collisions of the fluid particles. In the MRT model, the collision operator can be written as

$${\boldsymbol{\Omega }}=-{{\bf{M}}}^{-1}\cdot {\bf{S}}\cdot [{\bf{m}}-{{\bf{m}}}^{{\rm{eq}}}],$$
(9)

where \({\bf{m}}\) and \({{\bf{m}}}^{{\rm{eq}}}\) are the velocity moments of the distribution functions \({\bf{f}}\) and their equilibria, respectively, \({\rm{S}}\) is a non-negative \(9\times 9\) diagonal relaxation matrix, and \({\bf{M}}\) is a \(9\times 9\) matrix that linearly transforms the distribution functions \({\bf{f}}\) to the velocity moments \({\bf{m}}\):

$${\bf{m}}={\bf{M}}\cdot {\bf{f}},\qquad {\bf{f}}={{\bf{M}}}^{-1}\cdot {\bf{m}}$$
(10)

In the D2Q9 model the components of the moment vector can be arranged in the following order:

$${\bf{m}}={(\rho ,e,\epsilon ,{j}_{x},{q}_{x},{j}_{y},{q}_{y},{p}_{xx},{p}_{yy})}^{\dagger },$$
(11)

where \(\rho\) is the fluid density, \(e\) and \(\epsilon\) are related to the total energy and the energy square, \({j}_{x}\) and \({j}_{y}\) are the components of the flow momentum \({\boldsymbol{j}}=\rho {\bf{u}}\), where \({\bf{u}}=({u}_{x},{u}_{y})\) is the fluid velocity and \({p}_{xx}\) and \({p}_{yy}\) are the symmetric and traceless components of the stress tensor, respectively.

The speed of sound for the D2Q9 model is

$${c}_{{\rm{s}}}=\frac{1}{\sqrt{3}}c,$$
(12)

while the shear viscosity is

$$\nu =\frac{1}{3}\left(\frac{1}{{s}_{\nu }}-\frac{1}{2}\right)c,$$
(13)

where \({s}_{\nu }\) is the relaxation time corresponding to the viscosity.

The evolution process in the MRT-LBM consist of two steps: the collision step and the streaming one. The collision step is first executed in the moment space, then transformed to the velocity space

$${{\bf{m}}}^{* }({\bf{x}},t)={\bf{m}}({\bf{x}},t)-\hat{S}\cdot \left[{\bf{m}}({\bf{x}},t)-{{\bf{m}}}^{{\rm{eq}}}({\bf{x}},t)\right],$$
(14)
$${{\bf{f}}}^{* }({\bf{x}},t)={{\bf{M}}}^{-1}\cdot {{\bf{m}}}^{* }({\bf{x}},t).$$
(15)

The streaming step is still implemented in the velocity space

$${f}_{i}=({\bf{x}}+{{\bf{e}}}_{i}{\delta }_{t},t+{\delta }_{t})={f}_{i}^{* }({\bf{x}},t),$$
(16)

where \({f}_{i}^{* }({\bf{x}},t)\) is the post-collision distribution function.

Boundary treatment and fluid force calculation

There are many different approaches to incorporate boundaries in the LBM.41 In our model the particles are considered as sharp, arbitrarily shaped, moving walls during the streaming step of the LBM. For each velocity vector \({{\bf{e}}}_{i}\) on the global grid that has liquid node (at \({{\bf{x}}}_{{\rm{f}}}\) where \({\phi }^{{\rm{g}}}\le 0.5\)) on one end and solid node (at \({{\bf{x}}}_{{\rm{b}}}\) where \({\phi }^{{\rm{g}}}\,{>}\,0.5\)) on the other end, the exact position \({{\bf{x}}}_{{\rm{w}}}\) of the solid–liquid interface (\({\phi }^{{\rm{g}}}=0.5\)) is determined by linear interpolation. The velocity of the wall point \({{\bf{x}}}_{{\rm{w}}}\) is calculated as

$${{\bf{v}}}_{{\rm{w}}}={{\bf{u}}}_{\alpha }+{\omega }_{\alpha }\times \left[{{\bf{x}}}_{{\rm{w}}}-{{\bf{r}}}_{\alpha }^{{\rm{g}}}\right].$$
(17)

For the directions \({{\bf{e}}}_{i}\) discussed above, which start from a solid and ends in a liquid node, the \({f}_{\overline{i}}^{* }({{\bf{x}}}_{{\rm{b}}},{t}_{n})\) post-collision distribution function is undetermined. It has to be constructed to fulfill the no-slip boundary condition. From the several methods suggested by different authors, we chose the approach by Mei et al.42. They developed a second-order accurate treatment of the boundary condition for curved boundaries in the LBM framework. They provided a formula for the undetermined post-collision distribution function that depends on the exact position and velocity of boundary, \({{\bf{x}}}_{{\rm{w}}}\) and \({{\bf{v}}}_{{\rm{w}}}\). For a detailed description, see ref. 42

The fluid force exerted on the solid particles has been determined using the Galilean invariant momentum exchange method by Wen et al.43. At direction \(i\) and time \({t}_{n}\) the fluid exerts a force

$$\delta {{\bf{F}}}_{i}({{\bf{x}}}_{{\rm{w}}})=({{\bf{e}}}_{i}-{{\bf{v}}}_{{\rm{w}}}){f}_{i}^{* }({{\bf{x}}}_{{\rm{f}}},{t}_{n})-({{\bf{e}}}_{\overline{i}}-{{\bf{v}}}_{{\rm{w}}}){f}_{\overline{i}}^{* }({{\bf{x}}}_{{\rm{b}}},{t}_{n})$$
(18)

to the \({{\bf{x}}}_{w}\) wall point of particle \(\alpha\). The total hydrodynamic force \({{\bf{F}}}_{\alpha }^{{\rm{h}}}\) and torque \({{\bf{T}}}_{\alpha }^{{\rm{h}}}\) are

$${{\bf{F}}}_{\alpha }^{{\rm{h}}}=\sum _{{{\bf{x}}}_{{\rm{w}}}\in {\Gamma }_{\alpha }}\delta {\bf{F}}({{\bf{x}}}_{{\rm{w}}}),$$
(19)
$${{\bf{T}}}_{\alpha }^{{\rm{h}}}=\sum _{{{\bf{x}}}_{{\rm{w}}}\in {\Gamma }_{\alpha }}({{\bf{x}}}_{{\rm{w}}}-{{\bf{r}}}_{\alpha }^{{\rm{g}}})\times \delta {\bf{F}}({{\bf{x}}}_{{\rm{w}}}),$$
(20)

where \({\Gamma }_{\alpha }\) is the set of all wall points of particle \(\alpha\).

Particle collisions in the diffuse interface field approach

As the number and/or the size of the particles is increasing, collisions are likely to happen. Collisions can happen between the mobile equiaxed dendrites, between the equiaxed dendrites and the fixed columnar dendrites, or between the mobile dendrites and the boundaries of the simulation box. In the case of spherical particles, where the contact events can be easily determined from the known position of the particles the short-range repulsion is usually modeled by hard-sphere or soft-sphere potentials. Detecting the contact events between arbitrarily shaped particles such as the dendrites is, however, non-trivial and it can be very time consuming, when the surface of the particles become large and complex. As a practical solution, we implemented the Diffuse Interface Field Approach of Wang et al.31 that relates the short-range interaction force to the overlap of diffuse fields (in our case, the phase fields) via a soft-particle potential. It has the advantage that it takes into account the arbitrary shapes and sizes of individual particles automatically, i.e., without explicitly tracking the particle surfaces. The sort-range particle interaction is formulated as an effective local force density exerted on the \(\alpha\)th particle by its neighbors,

$$\begin{array}{lll}d{{\bf{F}}}_{\alpha }^{{\rm{sr}}}({\bf{x}})=\kappa {\sum \limits_{\alpha ^\prime \ne \alpha}}{\phi }_{\alpha }({\bf{x}}){\phi }_{\alpha ^{\prime} }({\bf{x}}) \times\, \left[\nabla {\phi }_{\alpha }({\bf{x}})-\nabla {\phi }_{\alpha ^{\prime} }({\bf{x}})\right]{d}^{3}r,\end{array}$$
(21)

where the constant \(\kappa\) characterizes the strength of the interaction.

The total short-range interaction force \({{\bf{F}}}_{\alpha }^{{\rm{sr}}}\) and torque \({{\bf{T}}}_{\alpha }^{{\rm{sr}}}\) acting on the center of mass of the \(\alpha\)th particle are

$${{\bf{F}}}_{\alpha }^{{\rm{sr}}}={\int_{V}}{\rm{d}}{{\bf{F}}}_{\alpha }^{{\rm{sr}}}({\bf{x}}),$$
(22)
$${{\bf{T}}}_{\alpha }^{{\rm{sr}}}={\int_{V}}\left[{\bf{x}}-{{\bf{x}}}_{\alpha }^{{\rm{c}}}\right]\times {{\bf{F}}}_{\alpha }^{{\rm{sr}}}({\bf{x}}).$$
(23)

Particle motion

The total force \({{\bf{F}}}_{\alpha }\) and torque \({{\bf{T}}}_{\alpha }\) acting on the \(\alpha\)th particle consist of contributions from the fluid flow, short-range particle interaction and external force:

$${{\bf{F}}}_{\alpha }={{\bf{F}}}_{\alpha }^{{\rm{h}}}+{{\bf{F}}}_{\alpha }^{{\rm{sr}}}+{{\bf{F}}}_{\alpha }^{{\rm{ext}}},$$
(24)
$${{\bf{T}}}_{\alpha }={{\bf{T}}}_{\alpha }^{{\rm{h}}}+{{\bf{T}}}_{\alpha }^{{\rm{sr}}}.$$
(25)

The motion and rotation of the center of mass of the \(\alpha\)th particle are determined by

$${M}_{\alpha }\frac{d{{\bf{U}}}_{\alpha }}{dt}={{\bf{F}}}_{\alpha },\qquad {I}_{\alpha }\frac{d{{\boldsymbol{\Omega }}}_{\alpha }}{dt}={{\bf{T}}}_{\alpha }.$$
(26)

Phase-field method

We modeled binary solidification using the phase-field model developed by Kim and coworkers.44,45 The model equations were solved on the respective local (equiaxed dendrites) or global (columnar dendrites) grid. For the \(\alpha\)th local grid the phase-field equation reads as

$$\begin{array}{lll}\frac{\partial {\phi }_{\alpha }}{\partial t}\,=\,{M}_{\phi }\left[\right.\nabla \cdot {\epsilon }_{\phi }^{2}\nabla {\phi }_{\alpha }+p^{\prime} \left({\phi }_{\alpha }\right)\left[{f}_{{\rm{l}}}({c}_{{\rm{l}},\alpha })-{f}_{{\rm{s}}}({c}_{{\rm{s}},\alpha })\right.\\ \left.-({c}_{{\rm{l}},\alpha }-{c}_{{\rm{s}},\alpha }){f_{1}^{\prime}} ({c}_{{\rm{l}},\alpha })\right]-wg^{\prime} ({\phi }_{\alpha })\left]\right.,\end{array}$$
(27)

where \(f^{\prime}\) denotes the derivative of \(f\), \({M}_{\phi }\) is the phase-field mobility defined in ref., 45 \({\epsilon }_{\phi }^{2}\) is the coefficient of the gradient energy term for the phase field in the free energy functional, \(g({\phi }_{\alpha })={\phi }_{\alpha }^{2}{(1-{\phi }_{\alpha })}^{2}\) and \(p({\phi }_{\alpha })={\phi }_{\alpha }^{3}(10-15{\phi }_{\alpha }+6{\phi }_{\alpha }^{2})\) are the double well and interpolation functions, \({f}_{{\rm{s}}}\) and \({f}_{{\rm{l}}}\) are the free energy densities of the solid and liquid phases, \(w\) is the free energy scale, whereas \({c}_{{\rm{s}},\alpha }\) and \({c}_{{\rm{l}},\alpha }\) are the compositions of the solid and liquid phases defined by the relations

$${f_{s}^{\prime}} ({c}_{{\rm{s}}})={f_{1}^{\prime}} ({c}_{{\rm{l}}}),$$
(28)
$$c=p(\phi ){c}_{{\rm{s}}}-\left[1-p(\phi )\right]{c}_{{\rm{l}}},$$
(29)

where \(c,{c}_{{\rm{l}}},{c}_{{\rm{s}}}\), and \(\phi\) are the respective quantities on the local grid \(\alpha\) or the global grid. The equation of motion (EOM) of the concentration field on the local grid \(\alpha\)

$$\frac{\partial {c}_{\alpha }}{\partial t}=\nabla \left[D\left({\phi }_{\alpha }\right)\nabla {c}_{{\rm{l}},\alpha }\right]+{{\bf{v}}}_{\alpha }\left[1-p({\phi }_{\alpha })\right]\nabla {c}_{\alpha },$$
(30)

where \(D\) is a phase field dependent diffusivity. The last term on the RHS is the advection current that takes into account the influence of the fluid flow. The local fluid velocity \({{\bf{v}}}_{\alpha }\) is determined from the global fluid velocity \({\bf{v}}\) by subtracting the velocity of the given volume element of the moving local grid. The EOM for the global concentraiton \({c}^{g}\) has a similar form

$$\frac{\partial {c}^{{\rm{g}}}}{\partial t}=\nabla \left[D\left({\phi }^{{\rm{g}}}\right)\nabla {c}_{{\rm{l}}}^{{\rm{g}}}\right]+{\bf{v}}\left[1-p({\phi }^{{\rm{g}}})\right]\nabla {c}^{{\rm{g}}}.$$
(31)

Since the concentration equation is solved on the global and on all local grids, several solutions may exist for the same volume elements (with the same global coordinates) where the grids overlap. In the bulk liquid, where the concentration equation simplifies to a diffusion equation plus an advection term, the solutions should be identical on all grids. However, in the solid or through the diffuse solid–liquid interface the solutions may be very different on the different grids. If we consider the volume elements inside or through the diffuse interface of particle \(\alpha\), the concentration equation will differ from the simple diffusion plus advection equation only on the local grid \(\alpha\), as it is the grid where the particle is defined. This means that for any non-liquid volume element, the solution of the concentration equation should be selected from the grid to where the non-liquid volume element belongs.

Our selection rule is therefore based on the phase-field values on the local grids. If \({\phi }_{\alpha }({\bf{x}})\ge {\phi }_{0}\), where the \({\phi }_{0}\) critical value is chosen as \(1{0}^{-3}\), meaning that \({\bf{x}}\) is inside or close to a solid particle \(\alpha\), then the composition calculated on the local grid \(\alpha\) is selected as the correct composition on site \({\bf{x}}\). The values calculated on the other grids (including the global one) are overwritten by this value after bilinear interpolation between the respective grids. If \({\phi }_{\alpha }({\bf{x}})\;<\;{\phi }_{0}\) for each \(\alpha\), i.e. \({\bf{x}}\) site is in the bulk liquid, then the composition calculated on the global grid is used on the local grids. If two solids on different grids are overlapping at \({\bf{x}}\), then composition is selected from the grid, where \(\phi ({\bf{x}})\) is higher.

Computation

The flow chart of the computations is shown in Fig. 8. The consecutive computational steps are the following:

  1. (1)

    Initialize fields

  2. (2)

    For each local grid calculate mass, center of mass and moment of inertia

  3. (3)

    Compute the flow field via solving the LB equation (Eq. 5)

  4. (4)

    Calculate hydrodynamic force and torque (Eq. 20)

  5. (5)

    Solve the global concentration EOM (Eq. 31)

  6. (6)

    Calculate particle–particle interaction force and torque (Eq. 23)

  7. (7)

    Move local grids (particles)

  8. (8)

    On each local grid:

    1. (a)

      Overwrite local concentration from \({c}^{{\rm{g}}}\) global concentration field

    2. (b)

      Solve the EOM for concentration (Eq. 30)

    3. (c)

      Solve the EOM for phase field (Eq. 27)

    4. (d)

      Calculate new mass, center of mass and moment of inertia

  9. (9)

    Update \({\phi }^{{\rm{g}}}\) via projections from the local grids

  10. (10)

    Overwrite \({c}^{{\rm{g}}}\) global concentration field from local fields

  11. (11)

    Repeat steps (2–10).

Fig. 8
figure 8

The structure of the numerical model.

Materials properties and numerical implementation

As the main goal of the present paper is to demonstrate that multiphase flow of growing particles can be handled with our approach, we performed our simulations in two dimensions with free energies of the bulk solid (\(\beta\)(Ti) of bcc structure) and bulk liquid phases taken from the CALPHAD-type assessment in ref., 46 and with reasonable estimates for the other input data. To keep the solution of the dynamical equations numerically tractable, as in the work of Takaki et al.,26 we set the viscosity about three orders of magnitude smaller than the experimental value. The parameter sets used in the simulations are compiled in Table 1. To incorporate fluctuations, we added Gaussian white noise with zero mean and correlator

$$\langle \zeta ({\bf{r}},t)\cdot \zeta ({\bf{r}}^{\prime} ,t^{\prime} )\rangle =\alpha [1-p(\phi )](2{M}_{\phi }{k}_{{\rm{B}}}T)\delta ({\bf{r}}-{\bf{r}}^{\prime} )\delta (t-t^{\prime} )$$
(32)

to the equation of motion of the phase field, where the relative noise strength was set to \(\alpha =0.3\).

Table 1 Materials properties and model parameters used in the computations for Al45.5Ti54.5.

The equations of motion for the phase- and concentration fields were solved by an explicit finite difference method combined with forward Euler time-stepping on uniformly spaced rectangular grids of various sizes. Unless stated otherwise, the sides of the simulation box were modeled as inert solid walls (i.e., no-flux boundary condition for the phase- and the concentration fields on the global grid). The solid wall was set up to exert a short-range repulsive force on the solid particles as proposed by Wang,31 an arrangement that yielded a hydrodynamically damped elastic collision with the wall.

Our simulation code was written in OpenCL using the PyOpenCL library47 and run on single GPU cards. The typical runtime was 1 day for the largest CET simulations using an NVIDIA Tesla V100-SMX2 GPU.

Validation of the model

We performed standard benchmark tests at different stages of code development to validate the model and its numerical implementation.

Flow over a cylinder in a channel

The first benchmark case is the flow around a cylinder placed in a channel as described in ref. 33 This test demonstrates the ability of the code for treating curved boundaries and investigates the accuracy achieved in calculating the respective fluid forces. The geometry and boundary conditions are shown in Fig. 9.

Fig. 9
figure 9

Geometry and boundary conditions of Schäfer-Turek 2D benchmark test case.33

At the inlet a parabolic velocity profile was

$${U}_{x}(0,y)=4{U}_{\text{max}}\frac{y(H-y)}{{H}^{2}},\qquad {U}_{y}=0,$$
(33)

where \(H\) is the height of the box. The respective Reynolds number was defined as \(Re=UD/\nu\), where \(U=2{U}_{\text{max}}/3\) is the characteristic velocity, and \(D\) is the diameter of the cylinder. The Reynolds number was set to 20 and the simulations were performed using different grid sizes, with \(n=30,60,90\), where \(n\) is the number of grid points on diameter \(D\) of the cylinder. The comparison with the reference data can be made via the drag- and lift coefficients:

$${C}_{{\rm{d}}}=\frac{2{F}_{x}}{\rho {U}^{2}D},\qquad {C}_{{\rm{l}}}=\frac{2{F}_{y}}{\rho {U}^{2}D},$$
(34)

where \({F}_{x}\) and \({F}_{y}\) are the vertical and horizontal fluid forces, respectively. These measured dimensionless coefficients are shown in Table 2 along with reference data obtained by solving the Navier–Stokes equations.33 We found that for \(n\ge 60\) our computations are in a good agreement with the Navier–Stokes results.

Table 2 The drag- (\({C}_{{\rm{d}}}\)) and lift (\({C}_{{\rm{l}}}\)) coefficients for three different resolutions, where \(n\) is the cylinder diameter in grid points. The last row shows the results from solving the Navier–Stokes equation. 33

Descending circular particle

Next, we performed simulations to describe the motion of a cylinder in a channel filled with viscous fluid under conditions given in ref., 43 and shown schematically in Fig. 10. A cylinder of \(D\) = 0.4 cm was released in a channel of width \(4D\) and 10 times larger length. The fluid density and kinetic viscosity were 1 \({\rm g}\,{\rm cm}^{-3}\) and 0.01 cm s−1, while the density of the cylinder was 1.003 \({\rm g}\,{\rm cm}^{-3}\). The cylinder was released \({l}_{0}=0.0076\) cm right of the wall. While descending under a gravitational acceleration of \(g=9.80\,{\rm m}\,{\rm s}^{-2}\), the cylinder rotated. The respective results for the trajectory of the cylinder, the temporal variation of the angular velocity, and the horizontal and vertical velocity components are compared with reference data from ref. 43 in Fig. 11. We found a good agreement between the present simulations and the literature data.

Fig. 10
figure 10

A schematic drawing of the benchmark consisting a cylinder that descends in a vertical channel.43 Here, \(g\) is the gravity and \(D\) is the diameter of the cylinder. The cylinder is released at a distance \({l}_{0}\) from the left wall.

Fig. 11
figure 11

Sedimentation of a circular particle: Time-dependent (a) trajectory, (b) angular velocity, (c) horizontal velocity and (d) vertical velocity. For comparison, results from ref. 43 are also shown.

Sedimentation of two circular particles

We also performed the benchmark case of two sedimenting particles in a vertical channel. The two particles undergo the drafting, kissing and thumbling (DKT) phenomenon during the sedimentation.34 We used the same conditions as in ref., 35 the geometry is shown in Fig. 12. The computation domain was \(W\times H=2\ \,\text{cm}\,\times 8\ \,\text{cm}\,\). The fluid density and viscosity were 1.0 \({\rm g}\,{\rm cm}^{-3}\) and 0.01 \({\rm g}\,{\rm cm}^{-1}\ {\rm s}^{-1}\), respectively. The particle density was 1.01 \({\rm g}\,{\rm cm}^{-3}\), and the diameter \(D=0.2\) cm. The two particles were released from the centerline of the channel of height of 7.2 cm and 6.8 cm, respectively. The simulation was performed on a uniform grid of 250 \(\times\)1000 nodes with a relaxation time parameter of 0.65. The trajectories of the particles are compared with the results from ref. 35 in Fig. 13. Our simulation recovers the DKT phenomena reported in the reference simulation. A qualitative agreement is observed. We attribute the observed quantitative differences to the different models used to calculate the particle–particle and particle–wall interactions in the two approaches.

Fig. 12
figure 12

A schematic drawing of two circular particles sedimenting under gravity in a \(W\times H\) sized channel. \(D\) is the diameter of the particles which are released in the centerline of the channel.

Fig. 13
figure 13

Trajectories of the two circular particles (P1 and P2) during the sedimentation. (a) transverse coordinates (x), (b) longitudinal coordinates (y) of the particles center. The dashed lines show the numerical results of Wang et al.35 for comparison.