  This work deals with numerical simulation of water freezing and thawing in a
complex three-dimensional geometry of a porous medium. The porous structure is
represented by a virtual container filled with glass beads. Phase transition
modeling is approached at both macro-scale and micro-scale, combining heat
transfer in a heterogeneous medium and a phase-field approximation of the
Gibbs-Thomson relation by means of the Allen-Cahn equation. The formulation of
the model contains novel components tailored for the given purpose. At the
macro-scale, surface tension effects are negligible and phase transition
focusing based on temperature can replace the Allen-Cahn equation. In contrast
to that, simulations of equilibrium states at the micro-scale allow to
eliminate the heat equation by assuming constant supercooling. For numerical
solution, an efficient hybrid parallel algorithm based on the finite volume
method and the Runge-Kutta-Merson solver with adaptive time stepping are
employed. The results of different model variants at different scales are
discussed. In a parametric study, the full phase-field model is demonstrated to
deliver consistent results across a wide range of surface tension values,
exhibiting curvature-induced premelting if surface tension is artificially
exaggerated. As surface tension tends to the realistic values, the results of
the phase-field approach those of the simplifed temperature-driven phase
transition model. In addition, micro-scale simulations of water freezing at
different supercooling values aim to predict the unfrozen water content and
compare the results with data from literature. Numerical stability, accuracy,
and computational costs are also discussed.
