1 Introduction
Simulating transport processes in volcanic systems is of crucial importance to understand the physics of eruptions, correctly interpret geophysical signals recorded by volcano monitoring systems, anticipate volcanic scenarios, and forecast volcanic hazards . A great number of flow models have been developed to address specific volcanic processes, including magma chamber dynamics , conduit flow , volcanic plumes , pyroclastic flows , and lava flows . Inter-model comparison studies have evaluated individual model performance and the relevance of the different subprocesses, and they have highlighted target areas for improvement . All these models attempt to tackle the great complexity arising from the presence of multiple phases. Interactions among liquid phases (e.g., silicate melt), solid phases (e.g., crystals or pyroclasts), and gas phases (exsolved volatiles or atmospheric gas) are indeed ubiquitous in volcanic systems, from deep magma chambers up into the atmosphere
Volcanic transport processes are typically characterized by a wide range of spatial and temporal scales at which different interacting physical subprocesses occur . From a modeling perspective, there is no general approach able to treat all these subprocesses at the same time, and thus specific models are usually developed for each application.
Figure 1
Schematic representation of the (a) multiscale nature of a gas–liquid–solid flow (reprinted with minor modifications from , with permission from Elsevier), (b) a two-phase volume at the local scale containing discrete phase constituents (e.g., bubbles or droplets), and the corresponding approximation path to describe it as made of two interpenetrating continuum fluids (modified from ).
[Figure omitted. See PDF]
A generic multiphase system can be thought of as composed of sub-domains or regions pertaining to single phases (gas, liquid, or solid) separated by interfaces (boundaries) representing sharp discontinuities where the physical properties change abruptly. The main challenge in modeling multiphase with respect to single-phase flows is due to the presence of such a discontinuity. The topology of this interface defines the amount of interfacial area that is available for the phases to exchange mass, momentum, and energy and strongly affects the behavior of the multiphase mixture. Moreover, this interface is not static but changes dynamically with the flow, and complex flow features may emerge due to the presence of moving phase boundaries. Understanding and modeling multiphase flows also requires taking appropriate consideration of their multiscale character. The typical size of the interfaces can be comparable to, or orders of magnitude smaller than, the domain and flow length scales, or it can even cover a broad range of scales (Fig. ). Cascading effects and multiple coupled phenomena at the different scales may have dramatic consequences for the flow dynamics. At the scale of the system (e.g., volcanic conduit), large flow structures that govern the flow directly depend on the properties of the multiphase mixture, which in turn are determined by the dynamic reorganization of local mesoscale structures (e.g., coalescence and/or breakage of large bubbles or bubble cluster dynamics) as well as the motion of individual constituents at the microscale (e.g., single small bubbles) within a continuum phase (e.g., liquid). Modeling such complex phase interactions across a wide range of scales certainly represents a big challenge.
Interface-resolving methods, similar to direct numerical simulation (DNS) approaches in single-phase turbulent flows , fully resolve the scales of the fluid equations and track the topology of the interfaces. With this approach no assumptions are made regarding the properties of the multiphase mixture or interfacial phase exchanges. The dynamics of the multiphase system emerge naturally from the computation as a direct consequence of solving phase interactions locally at the interfacial scale (under the constraints of mass, momentum, and energy conservation for each phase). DNS can therefore be thought of as a virtual laboratory to understand fundamental physics, especially at the microscale, that can capture emerging dynamics resulting from nonlinear phase interactions that are difficult to parameterize a priori
Simulations of magmatic systems that can aid the interpretation of geophysical or petrological observations need to cope with very large domains on the scale of the kilometers. On the other hand, the smallest scales (e.g., small eddies, bubbles, crystals, Fig. 1a) remain several orders of magnitudes smaller, resulting in skyrocketing computational costs for DNS even when considering relatively simple flow conditions (e.g., laminar flows, ). Multiphase flows that present dispersed interfaces (e.g., bubbly, droplet or particle-laden flows, Fig. 1b), which are common in both natural and industrial settings , have been successfully modeled with a different approach. The multi-fluid formulation employs averaging techniques that filter out the interfacial scales that are too small to be resolved . The complexity of a volume with multiple phases at the local scale is characterized by phase-average properties and a volumetric fraction that expresses the relative presence of one phase with respect to the others (Fig. 1b). Neglecting the details of the topology of the interfaces at the local scale allows describing the phases at the system scale as interpenetrating continua governed by separate sets of conservation equations. The resulting equations hence resemble those for single-phase flows except for the volumetric fraction and the presence of phase interaction terms that require appropriate closure. Similarly to large eddy simulations for turbulent flows, additional constitutive models are in fact required to recover the physics of the missing small scales. The multi-fluid approach allows modeling thermomechanical disequilibrium (e.g., phases with different velocities, temperatures, or pressures) as well as interactions of the dispersed phases for any multiphase system , including magmas . Applications of multi-fluid modeling in volcanology include but are not limited to the study of buoyancy-driven magma mixing , conduit dynamics , and volcanic plumes . However, the definition of appropriate closure models for interfacial phase exchanges is crucial for these models to provide accurate predictions of the evolution of the multiphase system. The closure of the multi-fluid formulation remains challenging and is mostly achieved using system-dependent constitutive equations that are often empirical and valid for specific flow regimes (in terms of interface topology and/or concentrations of the dispersed phase). Thus, the generality of the multi-fluid formulation is reduced by the specificity of the constitutive models. Multi-fluid models are, however, more computationally expensive than single-phase models, as they require an additional set of governing equations for each phase. As the number of phases increases, the computational burden also increases dramatically
The increased ability of models to include detailed physics strictly requires the development of more flexible computational tools that can easily switch between constitutive models and solution techniques to adapt to different dynamical regimes, thereby reducing computational efforts, increasing usability, and easily allowing scientists to perform inter-model comparison studies and models coupling.
The open-source library OpenFOAM provides a variety of fluid solvers for multiphase flows that can be combined with several different constitutive equations. Its modular object-oriented implementation allows developers to easily expand and adapt the code and users to combine different models at runtime with almost no need to code. Given a set of discretized fluid evolution equations (or “solver”), the user can easily select appropriate thermophysical and rheological models or switch from 2D or 3D to axis or plane symmetric simulations. The OpenFOAM community is continuously growing, as is the range of applications of interest for both the academy and industry
This paper is structured as follows. First we provide an overview of the basic ingredients of MagmaFOAM, including the specific magmatic constitutive equations and how they are implemented. Then, we show benchmarks and validation tests aimed at verifying the code ability to solve problems for segregated and dispersed flows of interest for magmatic systems with different modeling approaches. Finally, we summarize and discuss our results and draw the conclusions.
2 MagmaFOAM ingredients2.1 Structure of MagmaFOAM
MagmaFOAM uses the same organization of OpenFOAM (Fig. ), and its hierarchy is therefore subdivided into applications and libraries (
Figure 2
MagmaFOAM–OpenFOAM coupling scheme.
[Figure omitted. See PDF]
Multicomponent constitutive models for magmatic systems
The dynamics of magmas as they ascend, stall through the crust, and possibly erupt are strongly dependent on their physical properties (mostly density and viscosity ), which in turn are determined by composition and phase distribution as well as pressure and temperature conditions. The interplay among – conditions, melt–crystals–bubbles phase changes, and density and viscosity variations originates a wealth of possible space and time patterns for magma storage, transport, and eruption
Multicomponent volatile saturation is included through the SOLWCAD model , which provides equilibrium – saturation over a broad range of – conditions and for virtually any melt composition. This model overcomes the ideal Henrian behavior, which is a reasonable approximation only at low pressures ( MPa; ). Once the phase distribution of volatile species is computed through SOLWCAD, the relevant physical properties for the multiphase magma can be derived.
The density of the silicate melt up to a few gigapascals () ( GPa or km depth) is computed as in with an empirical equation of state as a ratio of the oxides' molar masses () and molar volumes (): 1 where is the mole fraction of the th oxide component. To a good approximation, molar volumes do not depend on melt composition and can be computed with a polynomial expansion: 2 The polynomial coefficients have been determined from laboratory experiments. For the oxides we have used the coefficients reported by and . For and we referred to and , respectively.
Melt viscosity is described as in . This model includes temperature and compositional effects for a wide range of melt compositions. In addition, the model can be used to determine the compositional dependence of important viscosity-derived properties, such as melt glass transition temperature and fragility. This aspect may be particularly relevant when modeling the ascent of degassing magma to determine the potential for brittle fragmentation. A drawback is that the model does not take into account the effect of pressure on viscosity, which can become relevant when modeling magma transport in the deep crust and mantle.
The model is based on the Tammann–Vogel–Fulcher (TFV) relationship for the non-Arrhenian temperature dependence of the bubble–crystal free viscosity : 3 where [] is the temperature, is a constant, and and are parameters that depend on the melt composition, including dissolved volatile species. The constant provides a high-temperature limit for viscosity ( Pa s) that holds for all melts regardless of their composition and is supported by both theoretical considerations and experimental observations
Models accounting for multicomponent phase change require a description of the evolution of the composition at the interface between phases. The mass transfer rate (per unit volume of liquid gas) of a volatile component can be defined as the product between the interfacial mass flux [kg (m s)] and the interfacial area concentration [m m].
4 The area concentration is determined by the geometrical configuration of the gas–liquid interface, and hence it is strongly dependent on the flow regime. It can be computed using simple geometrical assumptions on the dispersed phase (e.g., monodisperse bubbles with constant radius) or, for more complex flow scenarios, with additional transport equations (e.g., IATE model; ). The model for expresses the driving force for diffusive mass transfer of the component and can be calculated with the following relationship: 5 where [kg (m s)] is the mass transfer coefficient, a function of the diffusion coefficient , and is the difference between the mass fraction of the species in the phase () and at the interface (): 6 Under the assumption of local equilibrium, the mass fraction at the interface can be expressed as 7 where is the saturation concentration of a specific volatile species (i.e., mass fraction at thermodynamic equilibrium). In general this is a nonlinear function of pressure (), temperature at the interface,(), melt composition (), and total amount of volatiles of all species (). For magmas with and , can be computed using SOLWCAD or other dedicated models
Constitutive models implemented in MagmaFOAM can be selected and combined at runtime (no need for coding) with existing OpenFOAM solvers suitable for the specific problem under consideration (Fig. ). For example, the MagmaFOAM model for silicate melt density can be used with any compressible solver, either single-phase or multiphase. This constitutive model is not compatible with incompressible solvers that require density to be constant; however, in this case the density of the incompressible fluid can be preliminarily defined by taking advantage of the dedicated MagmaFOAM utility
2.4 Models for multicomponent bubble growth
Volatile phase changes and bubble growth are ubiquitous processes in volcano dynamics . The gas exsolution process begins with the nucleation of bubbles in an oversaturated melt and continues with bubble growth. Bubbles grow by mass diffusion when the silicate melt is oversaturated in volatiles and by mechanical expansion as a response to pressure decrease. The viscosity of the surrounding melt and the surface tension oppose a resistance to bubble growth and control the mechanical disequilibrium between the bubbles and the melt itself. A number of works solve the system of bubbles as a monodisperse periodic array of static, spherical, single-component () growing bubbles surrounded by a viscous melt shell using the Rayleigh–Plesset equation. A suite of models based on a similar approach have been implemented in MagmaFOAM and benchmarked to simulate multicomponent diffusive bubble growth. This approach provides, at low computational cost, an accurate representation of the coupled momentum balance and diffusive transport of volatiles because it resolves the concentration profile well near the bubble interface . The strong assumptions that the size distribution is monodisperse and the bubbles are non-deformable and mechanically coupled with melt limit the range of applicability of the model. In high-viscosity systems at low vesicularity, the model can provide reliable results when compared with experiments
3 Benchmarks and test cases
The test cases presented here are included in the MagmaFOAM distribution together with the relevant post-processing routines. The results shown here are thus fully reproducible, and the benchmarks can be used to study the accuracy and efficiency of other OpenFOAM or external solvers.
3.1 Interface-resolving modeling
The volume of fluid (VOF) method is adopted in OpenFOAM to resolve the position and shape of the interface separating two fluids or phases (e.g., liquid–gas). This methodology treats the interface discontinuity as a smooth but rapid variation (few computational cells) of an indicator field (volumetric fraction) representing the relative presence of one phase with respect to the other in each cell. The volumetric fraction is zero or 1 away from the interface, allowing distinguishing between one phase and the other, and assumes intermediate values in the region containing the interface. As a result, the location of the interface and its shape are known only implicitly from the volumetric fraction. The evolution of the interface is then obtained by simply advecting the volumetric fraction using the velocity field computed from a single-fluid (e.g., the OpenFOAM solver
Here we present benchmarks and test cases to evaluate the accuracy of the solver
3.1.1 Interacting magmas
Magma is thought to rise from the mantle into the crust in discrete batches that then tend to stall and cool at different depths, while their chemistry evolves towards more felsic compositions . Different batches of magma may interact as they ascend towards shallower depths, resulting in magma mingling and mixing. The latter are widespread phenomena in volcanic plumbing systems and have often been invoked as eruption triggers . Mingling and mixing are typically driven either by gravitational Rayleigh–Taylor instabilities, involving contacts between magmas with different densities due to compositional, thermal, or phase stratifications
A standard benchmark to test numerical solvers for Rayleigh–Taylor instability problems requires comparing computed growth rates for small-amplitude single-mode perturbations with the linear stability theory. The latter predicts that a small perturbation grows exponentially with a rate that depends on its wavelength, fluid density and viscosity contrasts , surface tension , compressibility , and diffusivity . The problem parameters can be expressed by two dimensionless numbers: the Atwood number and the Reynolds number (), where and are the two liquid densities, is the kinematic viscosity (), is the wavelength of the perturbation, and is the gravitational acceleration. We consider a 2D rectangular domain with a no-slip condition (walls) on top and bottom boundaries and periodic conditions on the sides. The interface between the two liquids is located at the center of the computational domain (Fig. ). The size of the computational box is determined by the wavelength of the initial perturbation (). Benchmark results are reported in Fig. for Atwood numbers relevant for natural melts. The computed growth rates are in agreement with the theory for different wavelengths (or equivalently wave numbers ) of the perturbation. The solver underestimates the peak growth rates at low , corresponding to high . A more in-depth analysis of the results (Appendix ) reveals that this discrepancy is mainly due to an initial delay in the onset of the perturbation. Removing this initial offset, the computed growth rates are much more accurate. Smaller initial perturbation amplitudes also improve accuracy.
Figure 3
Comparison between computed growth rates (symbols) of the Rayleigh–Taylor instability in the linear regime obtained with the solver
[Figure omitted. See PDF]
Figure 4
Rayleigh–Taylor instability () computed with the OpenFOAM solver
[Figure omitted. See PDF]
Figure 5
Rayleigh–Taylor instability (, ) computed with the OpenFOAM solver
[Figure omitted. See PDF]
As the instability grows and its amplitude becomes comparable with its wavelength, nonlinear effects become dominant and the linear theory is no longer valid to predict the evolution of the system. In order to validate
For the high-Reynolds-number test case () of , the quality of the solution deteriorates using the same resolution (Fig. ). The interface is deformed by artificial secondary instabilities most probably triggered by spurious numerical noise. Removing the interface compression term and doubling the number of cells improves the solution to nearly match the reference.
Magmas usually interact both mechanically and chemically, and therefore the immiscible approximation described above is not justified a priori. Nevertheless, to first approximation and on relatively short timescales (hours to days), chemical diffusion among interacting magmas at the plumbing system scale can be neglected
Figure 6
Rayleigh–Taylor instability between a volatile-rich ( wt %) basalt (bottom) and andesite (top) computed with the OpenFOAM solver
[Figure omitted. See PDF]
3.1.2 Rising bubble dynamicsWe consider a gas bubble rising in a basaltic melt. The bubble, initially at rest, rises due to buoyancy assuming a variety of shapes depending on the system parameters (e.g., liquid viscosity, surface tension, density contrast). demonstrated the ability of
Figure 7
Simulations of bubble rise in a basaltic melt using
[Figure omitted. See PDF]
Overall, breakup mechanisms are well reproduced in our simulations and bubble shapes at given nondimensional times are consistent with those reported by for similar values of the nondimensional numbers (Fig. ) and similar space resolution (20 cells per bubble radius). For the no-breakup regime (Fig. a), the bubble shape in our simulation displays two additional thin wings. In the gradual breakup regime (Fig. b) small droplets are formed at the rear of the bubble. The results are reported here with higher resolution (40 cells per bubble radius), since with lower resolution the bubble presents a slightly different shape with a flatter head. In the catastrophic breakup regime (Fig. c), the bubble immediately collapses, forming a large number of small- to medium-sized bubbles.
3.2 Diffusive bubble growthHere we demonstrate the ability of the ODE solver
Figure 8
Temporal evolution of bubble radius for an instantaneous decompression from MPa to MPa. In blue is the comparison between the MagmaFOAM model
[Figure omitted. See PDF]
3.3 Eulerian multi-fluid modelingIn this section we test the ability of the OpenFOAM two-fluid Eulerian solver
3.3.1 Shock tube simulations
Decompression of a pressurized bubbly magma is a common trigger of explosive volcanic eruptions
Single phase. We perform a standard Sod shock tube benchmark for pure air gas using a perfect gas equation of state. Nearly perfect agreement between the simulation and the analytical solution has been found by discretizing the one-dimensional computational domain with 5000 cells. Then, we test the solver by simulating a shock tube with pure liquid water using the SPWAT equation of state implemented in MagmaFOAM. Discretizing the computational domain with the same number of cells, the contact and shock wave discontinuities are well resolved and do not display any instabilities. Finally, we perform a shock tube simulation with pure liquid basalt (Table ) using the equation of state for silicate melts proposed by and implemented in MagmaFOAM. We use the same computational domain and the same numerical schemes used in the liquid water test. Across the shock discontinuity the solution is more diffusive compared to the test for liquid water, while the contact discontinuity is still well resolved. The figures for the single-phase shock tubes described above are reported in Appendix .
Two phases. We perform two-phase shock tube simulations for gas air–liquid water and gas water–liquid basalt (Table ) shock tubes (Figs. , , ). The equations of state for each phase are the same as for the single-phase cases. In all the simulations, the size of the dispersed phase (i.e., gas bubbles or liquid droplets), instead of being determined by a proper model (i.e., bubble growth model), is kept constant and used as a tuning parameter. This unphysical assumption allows us to control the mechanical and thermal disequilibrium between the gas and liquid phases in order to compare the simulation with the limiting analytical solution for a homogeneous flow . It is worth noting that, even if the size of the dispersed phase is kept constant, its volume fraction can change according to the mass conservation equations.
First, we benchmark the solver with a gas air–liquid water shock tube for which a limiting analytical solution is provided (Fig. ). Initial gas volume fraction is 0.1 in the high-pressure region (to the left of the interface) and 0.05 in the low-pressure region (to the right of the interface). Overall, we find remarkably good agreement with the exact solution. The contact and shock wave discontinuities are well resolved and do not display any instabilities. The numerical solution is only slightly diffusive at the onset of the rarefaction wave. The overshoot visible in the velocity is produced by the mechanical decoupling between the liquid and dispersed gas phase and disappears, reducing the bubble size, as will be discussed in the next subsection.
The same simulation setup is used to simulate a basalt (liquid)–water (gas) shock tube (Fig. ). In this case the simulation is axisymmetric in order to understand the role of melt viscosity. The shape of the axial profiles of pressure, velocity, gas volume fraction, and mixture density are similar to a 1D shock tube (Fig. ) for the air–water system. Velocity profiles along the radial coordinate are flat with a narrow boundary layer near the walls. In this case the higher viscosity ( Pa s) drastically reduces the mechanical phase decoupling and the phase velocities are superimposed.
Finally, we use the same simulation setup in Figs. and , but with an initial gas volume fraction in the low-pressure region (to the right of the interface) equal to 1 (Figs. and in Appendix ). This configuration is more appropriate for a volcanic application in which the shock wave travels in the atmosphere. In this case the continuous and dispersed phases can invert, and thus the bubbly flow, in which bubbles are dispersed in the continuous liquid phase, becomes a particle flow, in which the liquid droplets are dispersed in the gas. This process, usually called fragmentation in volcanological literature, can be modeled as a first approximation using a critical volume fraction criterion (; e.g., , or ). When the rarefaction wave propagates into the high-pressure region (i.e., left side), the bubbly magma expands, accelerates, and fragments. Due to the higher compressibility of the gas phase compared to the liquid melt, the temperature subplot shows phase decoupling during expansion, the amount of which depends on the adopted heat transfer model.
Figure 9
Results at time s for the air–water shock tube using the SPWAT EOS. Solid lines: OpenFOAM; dashed lines: analytical solution ; black lines: mixture; blue lines: liquid (water); red lines: gas (air). Mixture density is calculated a posteriori as , where l is liquid and g is gas. At time 0, the interface dividing the high-pressure (left, l) from low-pressure (right, r) zone is placed at 2.5 m. Initial conditions: MPa, MPa, and K for both phases; gas volume fraction: , , and for both phases. Isobaric heat capacities of gas air and liquid water are J kg K and J kg K, respectively (
[Figure omitted. See PDF]
Figure 10
Results at time for the axisymmetric gas water–basalt shock tube using the Lange–Carmichael EOS and the viscosity model of . Blue lines: liquid (basalt); red lines: gas (water). At time 0, the interface dividing the high-pressure (left, l) from low-pressure (right, r) zone is placed at 2.5 m. Initial conditions: MPa, MPa, and K for both phases; gas volume fraction: , , and for both phases. Isobaric specific heat capacities in the gas and liquid phase are J kg K (
[Figure omitted. See PDF]
.
Figure 11
Results at time s for the axisymmetric gas water–basalt shock tube using the Lange–Carmichael EOS and the viscosity model of , with liquid phase switching from continuous to dispersed. Blue lines: liquid (basalt); red lines: gas (water). At time 0, the interface dividing the high-pressure (left, l) from low-pressure (right, r) zone is placed at 2.5 m. Initial conditions: MPa, MPa, and K for both phases; gas volume fraction: , , and for both phases. Isobaric specific heat capacities in the gas and liquid phase are (
[Figure omitted. See PDF]
The phase coupling problem. Even if we limit to bubbly flow regimes, magmatic systems are characterized by a wide range of viscosities (from 0.1 to ) and bubble sizes (from a few microns to decimeters). The bubble relaxation time () is directly proportional to the square of the bubble diameter and inversely proportional to the kinematic viscosity of the continuous liquid phase (). In magmatic phenomena, when considering small bubbles (e.g., ) and even relatively low viscosities (e.g., 10 Pa s), can reach very small values (), resulting in very strong mechanical phase coupling. Numerical algorithms like the one implemented in OpenFOAM, based on segregated solvers, require special care in order to ensure convergence of the solution when phase coupling is tight . The Partial Elimination Algorithm (PEA), implemented in OpenFOAM, shows the best convergence performance compared to other algorithms . Here we test the PEA method for shock tube simulation conditions within the range of interest for magmatic applications. In Fig. we compare the analytical solution to the simulation results for different values of obtained by changing the bubble diameter. Decreasing from to , the velocities of the two phases tend to overlap as expected and agree with the homogeneous analytical solution. However, by further decreasing the solution diverges even when increasing the number of corrector cycles 40 times. This is an important limitation in the use of the multi-fluid solver. A possible workaround, currently under investigation, is to implement a limiter for the relaxation time.
Figure 12
Air–water shock tube simulations at different relaxation times and number of correctors. Dashed lines: analytical solution; solid lines: simulation. Blue lines: liquid (water); red lines: gas (air). At time 0, the interface dividing the high-pressure (left, l) from low-pressure (right, r) zone is placed at 2.5 m. Initial conditions: , , and for both phases; gas volume fraction: , , and for both phases. Isobaric heat capacities of gas air and liquid water are and , respectively (
[Figure omitted. See PDF]
3.3.2 Reacting boxA many-bubble system at zero gravity, in which bubbles grow by mass diffusion, is analyzed here. The liquid phase is a basaltic melt (Table ) with dissolved water and carbon dioxide whose properties are modeled by the equation of state and the rheological equation of . The ideal gas equation of state has been used for the gas phase. As this is a many-bubble system, bubble growth is approximated through a subgrid model (see Sect. 2.2). The mass transfer coefficient (i.e., in Eq. ) is calculated according to a spherical model and the heat transfer coefficient according to spherical and Ranz–Marshall models, which are both already implemented in OpenFOAM. In addition, the one-group interfacial area transport equation (IATE) model is used to compute the interfacial area required by the mass and heat transfer rate. The IATE is a fundamental equation, formulated from the Boltzmann transport equation, describing the change in surface area between phases, assuming a spherical shape of the dispersed phase .
Figure 13
Reacting box simulation. At time 0 a small amount of gas (volume fraction ) is uniformly distributed in the box, and the basaltic melt is oversaturated in (5 wt %) and (5000 ppm) at 80 MPa and 1373 K. The diffusion coefficients for and in the basalt are and , respectively . Isobaric specific heat capacities in the gas phase are and (
[Figure omitted. See PDF]
At time zero, a small amount of gas is uniformly distributed in the box and the liquid–gas system is out of thermodynamic equilibrium because the liquid is oversaturated in both and . After , has reached thermodynamic equilibrium, increasing the gas volume fraction to (Fig. ) and the bubble size from 1 to about 4 cm (not shown in the figure). This time is consistent with the timescale that characterizes diffusive mass transfer of (diffusion coefficient , ) around a bubble with radius (; ). The dissolved is still out of thermodynamic equilibrium, as expected, because the diffusion coefficient is lower, being set to . The density and viscosity of the liquid vary with the decreasing dissolved . The gas density decreases because of increasing and decreasing that produce a decrease in the molar mass of the gas mixture.
4 ConclusionsIn this work we have presented MagmaFOAM, a library based on OpenFOAM that contains dedicated tools for the simulation of multiphase flows in magmatic systems. The MagmaFOAM implementation results in a flexible framework which is ideal for development, testing, coupling, and application of the great collection of existing and future modeling strategies needed to tackle the variety of nonlinear multiscale processes characterizing magma flows. MagmaFOAM includes dedicated multicomponent constitutive models for dealing with realistic properties for silicate melt–gas systems as well as different utilities that automatize pre- and post-processing operations. We have analyzed a number of test cases that illustrate the current capabilities and limitations of different modeling approaches in solving well-defined and reproducible flow problems, establishing solid ground for future model selection, improvement, and intercomparison studies. We have shown some of the ingredients that can be used for simulating the interaction among different silicate melts, as well as between melts and fluid phases, under different assumptions and aimed at different portions of the magmatic system (deep reservoirs vs. shallow conduits). Applications of MagmaFOAM can thus include the study of magma mingling and mixing, as well as slug rising dynamics or volatile flushing. Nevertheless, important limitations remain, most notably the development of a magma-specific mixture approach or the intrinsic complications in modeling the transition from tight to loose phase coupling (Sect. ).
The framework described in this work allows for maximum flexibility and adaptability, giving the possibility to explore magmatic systems with different approaches given the specific conditions aimed at. As an example, the MagmaFOAM modular approach allows the coupling of its bubble growth models with both single- and multi-fluid solvers, Lagrangian particle tracking, or with more complex constitutive equations. Indeed, at different stages within the evolution of magmatic plumbing systems, different modeling approaches can be more appropriate to capture the fundamental physics governing the dynamics: while low-gas-fraction, deep reservoirs may well be approximated by mixture theory, at shallower levels phase decoupling becomes important and multi-fluid descriptions are more appropriate.
The tool is meant to be under continuous development and is already underway. The addition of population balance equations to single- and multi-fluid models to statistically describe the dispersed phases (bubbles and crystals, ) will improve our understanding of how polydispersity can impact magmatic system evolution . In large-scale multi-fluid simulations, the exchanges of mass, momentum, and energy through the interface between phases need to be modeled accurately to determine the rate of phase change and the degree of mechanical and thermal disequilibrium between phases. The population balance is a statistical approach for modeling the mesoscale dynamics widely used in chemical engineering, which describe the temporal and space evolution of a large number of particles through a number distribution function . In this way microscopic processes involving bubble dynamics and interactions between bubbles can be included in large-scale multi-fluid simulations. In fact, DNS allows modeling particle–particle interactions and capturing emerging behaviors in complex systems; however, the large quantity of microphysics taken into account in DNS has to be filtered and condensed in a sub-model to be used in large-scale simulations. Mesoscopic models represent intermediate models that describe, through a set of mesoscale variables, the microphysics of the system. The formulation of population balance requires adequate closure models for the microphysics that can be developed with the aid of experimental and DNS investigations . The inclusion of Lagrangian tracers will result in a more detailed description, with respect to multi-fluid models, of the microphysics that determine the macroscopic properties driving the dynamics. In the Eulerian–Lagrangian approach, bubbles are treated as discrete Lagrangian particles in an ambient Eulerian continuous flow
Appendix A Linear Rayleigh–Taylor instability
Figure b shows how a small wave number perturbation () initially grows with a slower nonconstant growth rate. Overall this effect makes the extrapolated growth rate smaller than expected. However, after a relatively small time interval, the growth rate becomes constant with a value that results to be in good agreement with the theoretical one (Fig. ). This spurious effect gradually decreases until it disappears as the wave number of the perturbation increases (Fig. a). The simulations are done using the solver
Figure A1
Time evolution of the amplitude of two single-mode perturbations ( – a; – b) for the linear Rayleigh–Taylor instability benchmark. The growth rate of the perturbation is extrapolated with a linear regression excluding data in late (physical) and eventually early (spurious) phases characterized by nonlinear effects (data not marked with an asterisk).
[Figure omitted. See PDF]
Figure A2
Extrapolated growth rate for two perturbations with linear regression excluding (blue) or not excluding (red) data in the initial phase characterized by nonlinear spurious effects.
[Figure omitted. See PDF]
Appendix B multiComponentODERPShellDStatic: model equationsA modified form of the Rayleigh–Plesset equation describes the hydrodynamics of the growth of a multicomponent spherical bubble in a finite incompressible shell of liquid. In the above, is the liquid density, is the bubble radius, is the radius of the shell (; ), is the gas pressure inside the bubble, is the pressure acting on the outside of the liquid shell, is the surface tension, is the time, and is the liquid dynamic viscosity that depends on the concentration of dissolved volatiles in the shell. Given this represents an equation that can be solved to find provided . is given by combining the mass conservation of the gas phase with an equation of state for a perfect gas. Mass conservation of the gas phase is given by
B2 where is the mass diffusivity and the concentration of the th species dissolved in the melt. Mass conservation of the th dissolved species is given by B3 where is the concentration in the gas phase. Assuming local thermodynamic equilibrium at the bubble–melt interface (i.e., , where is the saturation concentration), zero gradient boundary conditions at the shell boundary, and a quasi-static diffusion in the shell , the term in square brackets in Eqs. () and () is given by B4 where is the concentration in the melt at time 0. Assuming constant viscosity, the term in Eq. () is analytically integrated to obtain B5 For a monodispersed distribution, the gas volume fraction is given by B6
Appendix C Shock TubeFigures , , and show results from the single-phase shock tube simulations discussed in Sect. . Figure shows results from the air–water shock tube with liquid phase switching from continuous to dispersed.
Figure C1
Results at time for the air Sod shock tube. Dashed lines: analytical solution; solid lines: simulation. At time 0, the interface dividing the high-pressure (left, l) from low-pressure (right, r) zone is placed at 0 m. Initial conditions: , ; , ; gas volume fraction , ; . Isobaric heat capacity is , corresponding to heat capacity ratio .
[Figure omitted. See PDF]
Figure C2
Results at time for single-phase
shock tube with liquid water using SPWAT EOS. At time 0, the
interface dividing the high-pressure (left, l) from low-pressure
(right, r)
zone is placed at 0. Initial conditions:
, ; ; gas volume fraction ; . Isobaric heat capacity is (
[Figure omitted. See PDF]
Figure C3
Results at time for single-phase shock tube with basaltic melt using Lange–Carmichael EOS. At time 0, the interface dividing the high-pressure (left, l) from low-pressure (right, r) zone is placed at 0. Initial conditions: , ; ; gas volume fraction ; . Isobaric heat capacity is . Thermal conductivity is .
[Figure omitted. See PDF]
Figure C4
Results at time for the air–water
shock tube with liquid phase switching from continuous to
dispersed. Blue lines: liquid (water); red lines: gas (air). At
time 0, the interface dividing the high-pressure (left, l) from low-pressure (right, r) zone is placed at 2.5 m. Initial
conditions: ,
; for both phases; gas volume fraction
, ; for both phases. Isobaric heat capacities of
gas air and liquid water are and
, respectively
(
[Figure omitted. See PDF]
Appendix D Magmatic compositionsTable reports the compositions in terms of major oxides of the magmas used in the simulations shown in the paper.
Table D1Oxide compositions for the magmas used in benchmarking simulations. Amounts are relative.
| SiO | TiO | AlO | FeO | FeO | MnO | MgO | CaO | NaO | KO | |
|---|---|---|---|---|---|---|---|---|---|---|
| Andesite | 0.587 | 0.0088 | 0.1724 | 0.0331 | 0.0409 | 0.0014 | 0.0337 | 0.0688 | 0.0353 | 0.0164 |
| Basalt | 0.484 | 0.0167 | 0.178 | 0.0186 | 0.0836 | 0.0018 | 0.0553 | 0.102 | 0.0387 | 0.0211 |
Code and data availability
The version of the model used to produce the results shown in this paper, as well as input data and scripts to replicate all the simulations presented in this paper, is archived on Zenodo
Author contributions
FB and SC developed and tested the software including pre- and post-processing, performed the simulations, and wrote the first draft of the paper. CPM contributed to paper writing and supervised the work. JM worked on bubble dynamics and their analysis. MdMV provided guidance and help on the multi-fluid solver. PP provided supervision and reviewed the original draft.
Competing interests
The contact author has declared that neither they nor their co-authors have any competing interests.
Disclaimer
Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Acknowledgements
The authors thank Jenny Suckale and an anonymous reviewer for their constructive comments that considerably improved the paper.
Financial support
This research has been supported by the Istituto Nazionale di Geofisica e Vulcanologia (INGV) and Istituto Nazionale di Oceanografia e Geofisica Sperimentale (OGS) under the HPC-TRES program award (grant no. 2016-05) to Federico Brogi. This research has received funding from European Union's Horizon 2020 research and innovation program under the EUROVOLC project (grant no. 731070) and under the ChEESE project (grant no. 823844) as well as Italy's MIUR PRIN (grant no. 2015L33WAK) and from INGV Pianeta Dinamico (CHOPIN).
Review statement
This paper was edited by Lutz Gross and reviewed by Jenny Suckale and one anonymous referee.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
© 2022. This work is published under https://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Abstract
Numerical simulations of volcanic processes play a fundamental role in understanding the dynamics of magma storage, ascent, and eruption. The recent extraordinary progress in computer performance and improvements in numerical modeling techniques allow simulating multiphase systems in mechanical and thermodynamical disequilibrium. Nonetheless, the growing complexity of these simulations requires the development of flexible computational tools that can easily switch between sub-models and solution techniques. In this work we present MagmaFOAM, a library based on the open-source computational fluid dynamics software OpenFOAM that incorporates models for solving the dynamics of multiphase, multicomponent magmatic systems. Retaining the modular structure of OpenFOAM, MagmaFOAM allows runtime selection of the solution technique depending on the physics of the specific process and sets a solid framework for in-house and community model development, testing, and comparison. MagmaFOAM models thermomechanical nonequilibrium phase coupling and phase change, and it implements state-of-the-art multiple volatile saturation models and constitutive equations with composition-dependent and space–time local computation of thermodynamic and transport properties. Code testing is performed using different multiphase modeling approaches for processes relevant to magmatic systems: Rayleigh–Taylor instability for buoyancy-driven magmatic processes, multiphase shock tube simulations propaedeutical to conduit dynamics studies, and bubble growth and breakage in basaltic melts. Benchmark simulations illustrate the capabilities and potential of MagmaFOAM to account for the variety of nonlinear physical and thermodynamical processes characterizing the dynamics of volcanic systems.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
Details
; Colucci, Simone 2
; Matrone, Jacopo 3 ; Montagna, Chiara Paola 2
; Mattia De' Michieli Vitturi 4 ; Papale, Paolo 2 1 Istituto Nazionale di Geofisica e Vulcanologia, sezione di Pisa, Pisa, Italy; Istituto Nazionale di Oceanografia e di Geofisica Sperimentale, Trieste, Italy
2 Istituto Nazionale di Geofisica e Vulcanologia, sezione di Pisa, Pisa, Italy
3 Dipartimento di Matematica, Università degli Studi di Firenze, Florence, Italy
4 Istituto Nazionale di Geofisica e Vulcanologia, sezione di Pisa, Pisa, Italy; Department of Geology, University at Buffalo, Buffalo, New York, USA





