Researchers have released an open-source simulation tool that, for the first time within a single framework, couples the full thermofluid dynamics of melting metals with a phase-field model of how crystals nucleate and grow. The software, called microstructureFoam, is described in a paper published in SoftwareX and is distributed as part of the LaserbeamFoam software suite under the GNU General Public License v3.0. Its central promise is deceptively simple: instead of running a fluid-dynamics code and a microstructure code separately and shuttling data between them, the solver updates the thermal field, the flow field and the grain structure together at every time step, exchanging information iteratively between them inside one OpenFOAM-based environment.
The problem the tool addresses is one of the most stubborn in materials engineering. When a concentrated heat source, such as a laser or welding arc, strikes a metallic substrate, it melts a small pool of metal that then solidifies within milliseconds. The liquid-to-solid transition, combined with intense thermal gradients and vigorous flow inside the melt pool, produces highly heterogeneous microstructures. In multicomponent alloys, solute partitioning ahead of the advancing solidification front makes the liquidus temperature position-dependent, adding further complexity. Because these microstructures strongly influence mechanical properties, and because microstructural variability can promote stress localisation and contribute to failure in welded and additively manufactured parts, controlling them is a central goal of manufacturing science.
Experimentally mapping this behaviour is expensive. Fusion welding and additive manufacturing each involve a large number of processing parameters, and full-scale experimental campaigns to explore them are prohibitively costly, as the authors note. High-fidelity computational modelling has therefore become the practical route to understanding microstructural evolution. Two families of methods dominate the field. Cellular automata simulate polycrystalline growth on a computational grid, tracking solidification through discrete cell states; they are efficient but treat grains as largely independent, neglecting thermal interactions between grains, surface-tension effects at the solid-liquid interface and grain coarsening in the mushy zone. Phase-field methods, grounded in thermodynamics and physically informed parameters, naturally capture grain interactions and interfacial phenomena, but at substantially greater computational cost.
Recent work has attacked the cost problem from several directions. The open-source Tusas framework offers a fully coupled, implicit approach to phase-field solidification, and subsequent developments have demonstrated massively parallel multi-GPU simulations of three-dimensional dendritic solidification at the scale of a full melt pool. microstructureFoam takes a different route: it reduces computational complexity by neglecting solute effects in the solidifying substrate, a simplification the authors argue is appropriate for their intended applications, where thermal effects are expected to dominate microstructural evolution. The trade-off is explicit and stated plainly in the paper: the framework reproduces grain evolution at the mesoscale rather than the finer microscopic dendritic structures that arise from micro-segregation at the solid-liquid interface, and the evolution of the composition field is neglected along with its contribution to the free energy.
Underneath the microstructure model sits an established thermofluid engine. The phase-field and nucleation equations are built on the laserbeamFoam solver, which uses a ray-tracing approach to simulate the deposition of laser energy into the substrate. The phase-field formulation follows a continuum-field description adapted from earlier work, governed by time-dependent Ginzburg-Landau equations for a solid-fluid order parameter and a set of grain-order parameters. The total free energy combines contributions from liquid-solid interfaces, grain-boundary interfaces and gradient terms, with model parameters controlling the height of the phase and grain energy barriers. All interface energies are treated as isotropic, but the solver captures some anisotropic growth behaviour through an anisotropic solid-liquid boundary mobility based on the crystallographic orientation of grains at the interface, currently implemented in a cubic form for FCC and BCC materials.
Nucleation is handled with a heterogeneous model after Greer, reflecting the fact that the undercooling required for homogeneous nucleation is rarely reached in most alloy systems and solidification conditions. The activation undercooling for a nucleation site is inversely proportional to the particle diameter of the seed, and if seed diameters follow a Gaussian distribution, so do the activation undercoolings. All potential nucleation sites are assigned at the start of a simulation, randomly distributed through the domain with a minimum spacing check to prevent new grains from nucleating inside existing grains or their surrounding interfaces. For parallel runs on distributed-memory machines, the site positions are determined in serial on the master processor and then distributed to the others. Inactive grain fields, identified by uniformly zero order parameters, can be excluded from derivative computations to save memory and time.
The paper demonstrates the solver with two example cases, both using material properties representative of Ti-6Al-4V, a workhorse alloy of additive manufacturing. The first is a small casting benchmark in a 2 mm by 2 mm domain, with the metal poured at 1724 K, one degree above the alloy’s liquidus, and mould walls held at 500 K to extract heat equally in all directions. A heterogeneous nucleation site density of 1×10^18 sites per cubic metre, a mean activation undercooling of 1 K and a standard deviation of 0.5 K were specified. The simulation reproduces a familiar solidification sequence: at the earliest stages, the slightly superheated metal meets the cold mould walls, the cooling rate peaks, and a large fraction of nucleation sites activates before neighbouring grains can encroach, producing a fine equiaxed zone near the walls. As solidification progresses, cooling slows, nucleation becomes less frequent and the grain structure coarsens, before the thermal gradient eventually pushes the remaining solidification into the columnar regime.
Notably, the benchmark shows no columnar-to-equiaxed transition, and the authors explain why rather than hiding it: the millimetre-scale domain and the aggressive heat extraction, corresponding to an average thermal gradient of 1.224×10^6 K/m between the mould wall and the domain centre, suppress the transition. The domain size was chosen deliberately so the case could run quickly on a laptop or personal computer as an installation check; a larger casting domain could demonstrate a CET, though it would demand more computational resources and possibly a computing cluster. This candour about scope is a useful signal for prospective users weighing what the tool can and cannot yet deliver.
The second example, columnarSolidificationCase, imposes a vertically aligned negative thermal gradient by holding the domain at the liquidus temperature of 1723 K except for a narrow region at the base fixed at 500 K, with an initially fine equiaxed microstructure generated by the accompanying TesselateFoam utility. The snapshots show columnar grains developing through competitive epitaxial growth. Neighbouring grains interact through the latent heat released at the solid-liquid interface; because solute transport is neglected, this impingement is purely thermal. Grains whose crystallographic orientations align most closely with the thermal gradient grow preferentially, thanks to the anisotropic interface mobility, and eventually outgrow and mechanically block misaligned neighbours. The authors present this as a direct demonstration of the mechanism underlying the ⟨001⟩ columnar texture commonly observed in additive manufacturing under strong thermal gradients, with grain coarsening also visible as the roots of columnar grains thicken while the material cools from the liquidus at 1723 K to the solidus at 1658 K.
The authors also report a basic mesh sensitivity assessment, repeating the columnar case at resolutions of 6.25, 5.56 and 5.00 micrometres. All three meshes predict similar front evolution and capture the onset of competitive columnar growth in the early stages, but the coarsest mesh develops noticeable numerical artefacts as solidification progresses, deviating in both predicted front position and grain morphology, while the two finer meshes remain in close agreement. For users, the practical takeaway is that the finer resolutions tested are sufficient for stable predictions in this example. The solver is written in C++, built and tested with OpenFOAM-v2506, fully parallelisable through OpenFOAM’s domain decomposition, and developed on a branch where each commit undergoes code and mathematical review before merging. Tutorial cases are included, and the authors suggest the easiest path for new users is to copy an example, modify the domain, material and laser description files, and run. Future extensions flagged in the paper include coupling with CALPHAD-based thermodynamic databases to treat multicomponent alloys and solute effects, adaptive mesh refinement, dynamically evolving nucleation site densities, improved parallel scalability and GPU acceleration, all of which would extend both the physical fidelity and the reach of a framework whose core contribution, the fully coupled two-way interaction between thermal fields and microstructure in a single finite-volume environment, is already available to anyone willing to compile it.
Subject of Research: A coupled phase-field and thermofluid dynamics solver for simulating microstructural evolution in welding and additive manufacturing
Article Title: microstructureFoam: A phase-field framework for thermofluid dynamics and microstructural evolution
Article References: Yankova, M. S., Dreelan, D., Parivendhan, G., Robson, J. D., Ćosić, P., Rodriguez, S. A., Cardiff, P., Shanthraj, P., & Flint, T. F. (2026). microstructureFoam: A phase-field framework for thermofluid dynamics and microstructural evolution. SoftwareX, 36, Article 103164. https://doi.org/10.1016/j.softx.2026.103164
Image Credits: AI Generated
DOI: 10.1016/j.softx.2026.103164
Keywords: microstructureFoam, OpenFOAM, phase-field modelling, solidification, additive manufacturing, welding, nucleation, columnar grain growth, Ti-6Al-4V, melt pool, open-source software, grain structure
News Source: Denise Maddox. (October 28, 2026). New Open-Source Solver Couples Melt-Pool Physics with Grain-Scale Microstructure. Scienmag.



