<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article article-type="research-article" dtd-version="2.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Earth Sci.</journal-id>
<journal-title>Frontiers in Earth Science</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Earth Sci.</abbrev-journal-title>
<issn pub-type="epub">2296-6463</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">760773</article-id>
<article-id pub-id-type="doi">10.3389/feart.2021.760773</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Earth Science</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>High-Performance Computing of 3D Magma Dynamics, and Comparison With 2D Simulation Results</article-title>
<alt-title alt-title-type="left-running-head">Garg and Papale</alt-title>
<alt-title alt-title-type="right-running-head">HPC 3D Magma Dynamics Simulations</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Garg</surname>
<given-names>Deepak</given-names>
</name>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/1446145/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Papale</surname>
<given-names>Paolo</given-names>
</name>
<uri xlink:href="https://loop.frontiersin.org/people/286292/overview"/>
</contrib>
</contrib-group>
<aff>
<institution>Istituto Nazionale di Geofisica e Vulcanologia, Sezione di Pisa</institution>, <addr-line>Pisa</addr-line>, <country>Italy</country>
</aff>
<author-notes>
<fn fn-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/355798/overview">Sara Barsotti</ext-link>, Icelandic Meteorological Office, Iceland</p>
</fn>
<fn fn-type="edited-by">
<p>
<bold>Reviewed by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/1486812/overview">Zhipeng Qin</ext-link>, Guangxi University, China</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/1013697/overview">Giuseppe La Spina</ext-link>, Istituto Nazionale di Geofisica e Vulcanologia (INGV), Italy</p>
</fn>
<corresp id="c001">&#x2a;Correspondence: Deepak Garg, <email>deepak.garg@ingv.it</email>
</corresp>
<fn fn-type="other">
<p>This article was submitted to Volcanology, a section of the journal Frontiers in Earth Science</p>
</fn>
</author-notes>
<pub-date pub-type="epub">
<day>03</day>
<month>02</month>
<year>2022</year>
</pub-date>
<pub-date pub-type="collection">
<year>2021</year>
</pub-date>
<volume>9</volume>
<elocation-id>760773</elocation-id>
<history>
<date date-type="received">
<day>18</day>
<month>08</month>
<year>2021</year>
</date>
<date date-type="accepted">
<day>17</day>
<month>12</month>
<year>2021</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2022 Garg and Papale.</copyright-statement>
<copyright-year>2022</copyright-year>
<copyright-holder>Garg and Papale</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these&#x20;terms.</p>
</license>
</permissions>
<abstract>
<p>The dynamics of magma is often studied through 2D numerical simulations because 3D simulations are usually complex and computationally expensive. However, magmatic systems and physical processes are 3D and approximating them in 2D requires an evaluation of the information which is lost under different conditions. This work presents a physical and numerical model for 3D magma convection dynamics. The model is applied to study the dynamics of magma convection and mixing between andesitic and dacitic magmas. The 3D simulation results are compared with corresponding 2D simulations. We also provide details on the numerical scheme and its parallel implementation in C&#x2b;&#x2b; for high-performance computing. The performance of the numerical code is evaluated through strong scaling exercises involving up to <inline-formula id="inf1">
<mml:math id="m1">
<mml:mo>&#x3e;</mml:mo>
</mml:math>
</inline-formula>12,000&#x20;cores.</p>
</abstract>
<kwd-group>
<kwd>magma dynamics</kwd>
<kwd>3D numerical simulations</kwd>
<kwd>Rayleigh-Taylor instability</kwd>
<kwd>incompressible-compressible multicomponent flow</kwd>
<kwd>VMS finite element method</kwd>
<kwd>strong-scaling</kwd>
<kwd>3D-2D comparison</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<title>1 Introduction</title>
<p>Understanding magma transport in the crust is one of the major challenges in modern volcanology. Current models depict magmatic systems as an interconnected network of compositionally heterogeneous magmas, involving multiple chambers and dikes that extend from shallow to deep levels in the crust (<xref ref-type="bibr" rid="B34">Gudmundsson, 1995</xref>; <xref ref-type="bibr" rid="B33">Gudmundsson, 2011</xref>; <xref ref-type="bibr" rid="B8">Blundy and Annen, 2016</xref>).</p>
<p>Magma chambers are the main engines of active volcanoes and serve as a storage region for magma ascent and its chemical evolution (<xref ref-type="bibr" rid="B19">DePaolo, 1981</xref>; <xref ref-type="bibr" rid="B2">Bachmann and Bergantz, 2003</xref>). The pressure in the chamber may vary largely over time due to a variety of processes, including fractional crystallization, volatile exsolution and magma recharge, potentially leading towards an eruption (<xref ref-type="bibr" rid="B67">Sparks and Huppert, 1984</xref>; <xref ref-type="bibr" rid="B24">Folch and Marti, 1998</xref>; <xref ref-type="bibr" rid="B35">Gudmundsson, 2012</xref>; <xref ref-type="bibr" rid="B21">Edmonds and Wallace, 2017</xref>; <xref ref-type="bibr" rid="B55">Papale et&#x20;al., 2017</xref>; <xref ref-type="bibr" rid="B15">Cassidy et&#x20;al., 2018</xref>). Therefore, studying magma dynamics in a chamber is of utmost importance and has become a mainstream theme over the recent years (<xref ref-type="bibr" rid="B6">Bergantz, 2000</xref>; <xref ref-type="bibr" rid="B17">Couch et&#x20;al., 2001</xref>; <xref ref-type="bibr" rid="B36">Guti&#xe9;rrez and Miguel, 2010</xref>; <xref ref-type="bibr" rid="B45">Karlstrom et&#x20;al., 2010</xref>; <xref ref-type="bibr" rid="B7">Bergantz et&#x20;al., 2015</xref>; <xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>) as the ongoing flow dynamics and associated surface signals can depict the current state of the volcano and its possible evolutions (<xref ref-type="bibr" rid="B32">Gottsmann et&#x20;al., 2011</xref>; <xref ref-type="bibr" rid="B50">Longo et&#x20;al., 2012a</xref>; <xref ref-type="bibr" rid="B3">Bagagli et&#x20;al., 2017</xref>; <xref ref-type="bibr" rid="B66">Sparks and Cashman, 2017</xref>; <xref ref-type="bibr" rid="B13">Carrara, 2019</xref>; <xref ref-type="bibr" rid="B49">Lieto et&#x20;al., 2020</xref>).</p>
<p>Typically, buoyancy instabilities develop when a low-density, volatile-rich, primitive, hot magma ascends in the crust and interacts with previously stored, more chemically evolved, partially degassed and denser magma in shallow chambers (<xref ref-type="bibr" rid="B62">Semenov and Polyansky, 2017</xref>; <xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>). There are multiple pieces of evidence of eruptions shortly preceded by interaction of compositionally different magmas at shallow depths (<xref ref-type="bibr" rid="B75">Tomiya et&#x20;al., 2013</xref>; <xref ref-type="bibr" rid="B65">Sides et&#x20;al., 2014</xref>; <xref ref-type="bibr" rid="B57">Perugini et&#x20;al., 2015</xref>; <xref ref-type="bibr" rid="B69">Sundermeyer et&#x20;al., 2020</xref>). The degree of magma mixing, which spans a continuum from mechanical mingling to complete chemical homogenisation, depends upon the magma properties, the driving forces, and the time available for mixing (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>).</p>
<p>Recently a number of authors [e.g., (<xref ref-type="bibr" rid="B66">Sparks and Cashman, 2017</xref>), and references therein] have been hypothesizing that although usually not seen among the erupted volcanic products, a crystal-rich mush may constitute a large dominant portion of the magmatic plumbing system, with dominantly liquid magma possibly being an ephemeral occurrence driven by melt segregation and contributing to characterize the unrest and eruption states of the volcano. Clear evidence from active magmatic systems is not available yet, as volcanic plumbing systems continue to be hidden from direct observation. A few accidental encounters with buried shallow magma bodies during geothermal drilling do not appear to support the presence of important layers of mushy magma across the rock-magma transition (<xref ref-type="bibr" rid="B22">Eichelberger, 2020</xref>). More is needed before we get to a clear, robust picture of active magmatic systems, justifying substantial efforts to overcome the current limitations in directly observing, measuring and sampling underground magma (<ext-link ext-link-type="uri" xlink:href="https://www.kmt.is">https://www.kmt.is</ext-link>). Here we focus on either dominantly liquid reservoirs, or on the dominantly liquid core region of mushy magma reservoirs, over time scales that are typical of individual magma convection events, likely much less than the time scales associated with the existence of ephemeral liquid-dominated magmatic bodies.</p>
<p>Over the years significant efforts have been invested to study several aspects of the magma physics relevant to understand the&#x20;volcano dynamics and anticipate their evolution. The physics of magma mixing has been studied through numerical simulations and experiments with both synthetic and natural compositions (<xref ref-type="bibr" rid="B11">Campbell and Turner, 1986</xref>; <xref ref-type="bibr" rid="B42">Huppert et&#x20;al., 1986</xref>; <xref ref-type="bibr" rid="B44">Jellinek and Kerr, 1999</xref>; <xref ref-type="bibr" rid="B52">Michioka and Sumita, 2005</xref>; <xref ref-type="bibr" rid="B60">Sato and Sato, 2009</xref>; <xref ref-type="bibr" rid="B18">De Campos et&#x20;al., 2011</xref>; <xref ref-type="bibr" rid="B48">Laumonier et&#x20;al., 2014</xref>; <xref ref-type="bibr" rid="B53">Morgavi et&#x20;al., 2015</xref>; <xref ref-type="bibr" rid="B57">Perugini et&#x20;al., 2015</xref>; <xref ref-type="bibr" rid="B7">Bergantz et&#x20;al., 2015</xref>; <xref ref-type="bibr" rid="B61">Schleicher et&#x20;al., 2016</xref>; <xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>). Usually, numerical simulations are simplified by referring to a 2D geometrical configuration, because 3D dynamics can be very complex and are extremely expensive in terms of required computational resources. Even 2D magma mixing simulations need extremely refined meshes to capture the flow features down to the dm (or lower) scales that are sometimes required, e.g., at the intersection between feeding dykes and chambers (<xref ref-type="bibr" rid="B50">Longo et&#x20;al., 2012a</xref>; <xref ref-type="bibr" rid="B55">Papale et&#x20;al., 2017</xref>). Solving such problems in 3D&#x20;on a single computer is practically impossible. Nowadays the simulations are usually run over clusters of cores providing&#x20;high speed data processing capability. In high performance computing (HPC) paradigm, many processors work simultaneously to produce exceptional computational power and to significantly reduce the total computational time (<xref ref-type="bibr" rid="B20">Dowd and Charles, 2010</xref>; <xref ref-type="bibr" rid="B23">Flanagan et&#x20;al., 2020</xref>). High performance is achieved through parallel computing in which large computational domains are subdivided into smaller, interconnected ones, which can be solved at the same time (<xref ref-type="bibr" rid="B31">Gottlieb, 1989</xref>; <xref ref-type="bibr" rid="B1">Asanovic et&#x20;al., 2006</xref>).</p>
<p>So far the numerical simulations performed for magma mixing in the literature are in 2D (<xref ref-type="bibr" rid="B6">Bergantz, 2000</xref>; <xref ref-type="bibr" rid="B50">Longo et&#x20;al., 2012a</xref>; <xref ref-type="bibr" rid="B55">Papale et&#x20;al., 2017</xref>; <xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>). However, strictly speaking, 2D calculations apply only to flows that are inherently two-dimensional, and can be extended to real 3D systems only under restricted conditions whereby any change in physical quantities over the third dimension can be neglected. Real magmatic systems are commonly such that 2D simplifications can only be introduced with some arbitrariness, typically with the&#x20;objective of extracting zero-order approximations of more&#x20;complex 3D processes and dynamics. In most cases, however, the loss of information due to 2D simplification is unknown.</p>
<p>The purpose of this work is that of 1) presenting a physical and numerical model for transient 3D magma dynamics, including its parallel implementation and scaling performance, 2) applying the model to 3D magma chamber convection dynamics in an initially stratified, gravitationally unstable magma chamber, and 3) comparing the 3D simulation results with the 2D&#x20;case.</p>
</sec>
<sec id="s2">
<title>2 Magma Flow Model</title>
<p>Natural magmas are composed of crystals, melt oxides and volatiles, with the latter that can be dissolved in the liquid phase or exsolved in a gas phase with proportions depending on local pressure (p), temperature (T), and composition (Y). Flow conditions span wide ranges from essentially incompressible to largely compressible, including supersonic flow during eruptions. In magmas where the volatiles are largely dissolved, and the Mach number is &#x226a; 1, the flow remains weakly compressible. In this work we are specifically interested in modelling the flow dynamics inside magma chambers where two compositionally different magmas interact with each other. The model that we present is however general, and can be applied to transonic flow as&#x20;well.</p>
<p>We model compressible/incompressible flow of multi-component magma with GALES (<xref ref-type="bibr" rid="B51">Longo et&#x20;al., 2012b</xref>; <xref ref-type="bibr" rid="B27">Garg et&#x20;al., 2018a</xref>; <xref ref-type="bibr" rid="B28">Garg et&#x20;al., 2018b</xref>; <xref ref-type="bibr" rid="B29">Garg et&#x20;al., 2021</xref>). The numerical scheme and parallel implementation in GALES are described in <xref ref-type="sec" rid="s11">Appendixes A, B</xref>. GALES has been validated on a number of 2D/3D benchmarks for multi-component compressible/incompressible flows (<xref ref-type="bibr" rid="B51">Longo et&#x20;al., 2012b</xref>), single-component compressible/incompressible flows (<xref ref-type="bibr" rid="B27">Garg et&#x20;al., 2018a</xref>), free surface flows (<xref ref-type="bibr" rid="B28">Garg et&#x20;al., 2018b</xref>) and fluid-structure interaction (<xref ref-type="bibr" rid="B29">Garg et&#x20;al., 2021</xref>). Additional validation tests for compressible and incompressible flows with 3D geometries are reported in the <xref ref-type="sec" rid="s11">Supplementary Material</xref>.</p>
<p>The properties of each magma component in GALES are computed from local conditions including composition in terms of ten major oxides plus the two major volatile species H<sub>2</sub>O and CO<sub>2</sub>. The mixture is assumed to be in chemical, mechanical and thermodynamic equilibrium. The flow is governed by the following equations:<disp-formula id="e1">
<mml:math id="m2">
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:mi>&#x3c1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(1)</label>
</disp-formula>
<disp-formula id="e2">
<mml:math id="m3">
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo>&#x2297;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="bold-italic">&#x3c3;</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3c1;</mml:mi>
<mml:mi mathvariant="bold-italic">b</mml:mi>
<mml:mo>,</mml:mo>
</mml:math>
<label>(2)</label>
</disp-formula>
<disp-formula id="e3">
<mml:math id="m4">
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:mi>E</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:mi>E</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">&#x3c3;</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="bold-italic">q</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mi mathvariant="bold-italic">J</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3c1;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">b</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:math>
<label>(3)</label>
</disp-formula>
<disp-formula id="e4">
<mml:math id="m5">
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi>k</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1,2</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>n</mml:mi>
</mml:math>
<label>(4)</label>
</disp-formula>
</p>
<p>
<xref ref-type="disp-formula" rid="e1">Equations 1</xref>&#x2013;<xref ref-type="disp-formula" rid="e3">3</xref> represent mass, momentum and energy conservation of the mixture, while <xref ref-type="disp-formula" rid="e4">Eq. 4</xref> is mass conservation of the <italic>k</italic>th component in the <italic>n</italic>-component mixture. The equations are same as in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>) with a three-dimensional extension of vector and tensor quantities. In the above equations, <italic>Y</italic>
<sub>
<italic>k</italic>
</sub> is the mass fraction of the <italic>k</italic>th component, with <italic>&#x2211;</italic>
<sub>
<italic>k</italic>
</sub>
<italic>Y</italic>
<sub>
<italic>k</italic>
</sub> &#x3d; 1. This implies that for given <italic>n</italic> components, only <italic>n</italic>&#x20;&#x2212; 1 components are independent and require each one expression of <xref ref-type="disp-formula" rid="e4">Eq. 4</xref>. For an <italic>n</italic>-component mixture, the density (<italic>&#x3c1;</italic>) is given by:<disp-formula id="e5">
<mml:math id="m6">
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mo>&#x22ef;</mml:mo>
<mml:mo>&#x2b;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(5)</label>
</disp-formula>where <italic>&#x3c1;</italic>
<sub>
<italic>k</italic>
</sub> is the density of the <italic>k</italic>th component which depends on local p-T and composition; <bold>
<italic>v</italic>
</bold> is the velocity; <bold>
<italic>b</italic>
</bold> is body force vector per unit mass; <italic>E</italic>&#x20;&#x3d; <italic>c</italic>
<sub>
<italic>v</italic>
</sub>
<italic>T</italic>&#x20;&#x2b; <bold>
<italic>&#x7c;v&#x7c;</italic>
</bold>
<sup>2</sup>/2 is total specific energy, with <italic>c</italic>
<sub>
<italic>v</italic>
</sub> being&#x20;the specific heat capacity at constant volume; <italic>T</italic> is temperature; <bold>
<italic>h</italic>
</bold> is the vector of specific enthalpies for the components.</p>
<p>The mass diffusion flux is modelled with Fick&#x2019;s law as<disp-formula id="e6">
<mml:math id="m7">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3c1;</mml:mi>
<mml:mi mathvariant="bold-italic">D</mml:mi>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(6)</label>
</disp-formula>where <bold>
<italic>D</italic>
</bold> is the mass diffusion coefficient matrix. Viscous flux is modelled as<disp-formula id="e7">
<mml:math id="m8">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi mathvariant="bold-italic">&#x3c3;</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:mi>&#x3bc;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mi>&#x3bc;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mi mathvariant="bold-italic">I</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>p</mml:mi>
<mml:mi mathvariant="bold-italic">I</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="bold-italic">&#x3c4;</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>p</mml:mi>
<mml:mi mathvariant="bold-italic">I</mml:mi>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(7)</label>
</disp-formula>where <italic>p</italic> is pressure, <italic>&#x3bc;</italic> is the viscosity of the mixture and <bold>
<italic>&#x3c4;</italic>
</bold> is the viscous stress tensor. The heat flux is modelled by Fourier&#x2019;s law:<disp-formula id="e8">
<mml:math id="m9">
<mml:mi mathvariant="bold-italic">q</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3ba;</mml:mi>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mi>T</mml:mi>
</mml:math>
<label>(8)</label>
</disp-formula>where <italic>&#x3ba;</italic> is thermal conductivity.</p>
<p>
<xref ref-type="disp-formula" rid="e1">Equations 1</xref>&#x2013;<xref ref-type="disp-formula" rid="e4">4</xref> are written in the conservative form and describe fully compressible flow. The incompressible flow equations are merely a simplification of the above equations by referring to a constant density. We remark that although in magma reservoirs the Mach number is usually very low, the density of the magmatic mixture varies, mostly as a response to phase changes of volatile components. Therefore, considering the flow as fully incompressible would miss many important flow features of gas-bearing magmas.</p>
<p>In magma reservoirs, and over the time scale of individual convection events analysed here, phase separation is of minimum importance. In our previous works (<xref ref-type="bibr" rid="B50">Longo et&#x20;al., 2012a</xref>; <xref ref-type="bibr" rid="B55">Papale et&#x20;al., 2017</xref>; <xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>) we have estimated that flow Stokes number St &#x3d; <italic>t</italic>
<sub>0</sub>
<italic>v</italic>
<sub>0</sub>/<italic>l</italic>
<sub>0</sub>, where <italic>t</italic>
<sub>0</sub> is the relaxation time of the crystal, <italic>v</italic>
<sub>0</sub> is the flow velocity and <italic>l</italic>
<sub>0</sub> is the diameter of the crystal, remains very low, of order 10<sup>&#x2013;4</sup> for crystals up to&#x20;cm size. The same is true for gas bubbles. Based on the typical&#x20;gas volume fractions obtained in our previous works and assumed bubble number density as low as 10<sup>14</sup>&#xa0;m<sup>&#x2212;3</sup> (<xref ref-type="bibr" rid="B14">Cashman, 2000</xref>), the value of St remains less than 10<sup>&#x2013;4</sup>. The low value of St indicates that mechanical phase separation is negligible, and the relative velocity terms describing phase separation can be safely ignored.</p>
<p>The physical properties of magma are modelled as a function of local pressure, temperature and composition in the space-time domain, as they evolve during magma convection and mixing. Throughout this paper the word &#x201c;mixing&#x201d; refers to the scale of our analysis, whereby the smallest elements in the computational domain have linear dimension of order 1&#xa0;m. At such a scale many orders of magnitude larger than the scale of molecules, and for the employed computational times of order a few hours, chemical mixing is unresolved and likely to be poorly effective. Therefore, we refer only to mechanical mixing whereby both magma types are present within individual computational elements, with no reference to physical processes occurring at the molecular&#x20;scale.</p>
<p>As components for use in <xref ref-type="disp-formula" rid="e4">Eq. 4</xref> above, we refer here to the magma types involved in convection and mixing (e.g., &#x201c;andesite&#x201d;, &#x201c;rhyolite&#x201d;, etc.), each expressed in terms of oxides including volatile species. Accordingly, each component is modeled as a mixture of 1) silicate melt including the dissolved volatiles and 2) exsolved volatiles. Non-reactive crystals can be added and their effects in modifying the mechanical and thermal properties of magma can be accounted for (for simplicity, however, we have neglected crystals in the computations illustrated below). The density of the volatile free silicate melt is modelled according to (<xref ref-type="bibr" rid="B47">Lange, 1994</xref>) and the effects on the density by dissolved H<sub>2</sub>O is computed by the model of (<xref ref-type="bibr" rid="B9">Burnham et&#x20;al., 1969</xref>). For the gas phase, we use the ideal gas equation as the equation of state. For each magma, the phase distribution of volatiles is computed by multi-component (H<sub>2</sub>O &#x2b; CO<sub>2</sub>) gas-melt equilibrium modelling (<xref ref-type="bibr" rid="B56">Papale et&#x20;al., 2006</xref>). The viscosity of each magma component is modelled as a function of oxide composition, dissolved H<sub>2</sub>O and temperature (non-Arrhenian) as described in (<xref ref-type="bibr" rid="B30">Giordano et&#x20;al., 2008</xref>), with the effect of non-deformable gas bubbles accounted for by the model of (<xref ref-type="bibr" rid="B43">Ishii and Zuber, 1979</xref>) and strain-rate dependent non-Newtonian rheology due to the presence of crystals and of deforming bubbles (<xref ref-type="bibr" rid="B12">Caricchi et&#x20;al., 2007</xref>; <xref ref-type="bibr" rid="B54">Pal, 2003</xref>). The viscosity of the two-component mixture is modelled as <italic>&#x3bc;</italic> &#x3d; <italic>&#x2211;</italic>
<sub>
<italic>k</italic>
</sub>
<italic>x</italic>
<sub>
<italic>k</italic>
</sub>
<italic>&#x3bc;</italic>
<sub>
<italic>k</italic>
</sub>, where <italic>x</italic>
<sub>
<italic>k</italic>
</sub> and <italic>&#x3bc;</italic>
<sub>
<italic>k</italic>
</sub> are, respectively, the mole fraction and the viscosity of the <italic>k</italic>th mixture component (again, in our case, &#x201c;andesite&#x201d;, &#x201c;rhyolite&#x201d;, etc.). The specific heat capacity at constant pressure for the melt is computed as <italic>c</italic>
<sub>
<italic>p</italic>
</sub> &#x3d; <italic>&#x2211;</italic>
<sub>
<italic>j</italic>
</sub>
<italic>x</italic>
<sub>
<italic>j</italic>
</sub>
<italic>c</italic>
<sub>
<italic>pj</italic>
</sub>, where <italic>c</italic>
<sub>
<italic>pj</italic>
</sub> and <italic>x</italic>
<sub>
<italic>j</italic>
</sub> are, respectively, the specific heat capacity at constant pressure and mole fraction for the <italic>j</italic>th oxide subcomponent [<xref ref-type="table" rid="T1">Table&#x20;1</xref> in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>)]. The specific heat capacity at constant volume, <italic>c</italic>
<sub>
<italic>v</italic>
</sub> is computed as <italic>c</italic>
<sub>
<italic>v</italic>
</sub> &#x3d; <italic>c</italic>
<sub>
<italic>p</italic>
</sub> &#x2212; <italic>&#x3b1;</italic>
<sup>2</sup>
<italic>T</italic>/(<italic>&#x3b2;&#x3c1;</italic>), where <italic>&#x3b1;</italic> and <italic>&#x3b2;</italic> are isobaric expansion coefficient and isothermal compressibility coefficient, respectively. In this work we use a constant thermal conductivity, <italic>&#x3ba;</italic> &#x3d; 1.2&#xa0;<italic>Wm</italic>
<sup>&#x2212;1</sup>
<italic>K</italic>
<sup>&#x2212;1</sup> (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>).</p>
<table-wrap id="T1" position="float">
<label>TABLE 1</label>
<caption>
<p>Composition of magmas and list of simulations. For consistency with the corresponding 2D cases in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>), we keep the same simulations numbering&#x20;here.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="center"/>
<th align="center">SiO<sub>2</sub>
</th>
<th align="center">TiO<sub>2</sub>
</th>
<th align="center">Al<sub>2</sub>O<sub>3</sub>
</th>
<th align="center">Fe<sub>2</sub>O<sub>3</sub>
</th>
<th align="center">FeO</th>
<th align="center">MnO</th>
<th align="center">MgO</th>
<th align="center">CaO</th>
<th align="center">Na<sub>2</sub>O</th>
<th align="center">K<sub>2</sub>O</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="center">Andesite</td>
<td align="center">58.70</td>
<td align="center">0.88</td>
<td align="center">17.24</td>
<td align="center">3.31</td>
<td align="center">4.09</td>
<td align="center">0.14</td>
<td align="center">3.37</td>
<td align="center">6.88</td>
<td align="center">3.53</td>
<td align="center">1.64</td>
</tr>
<tr>
<td align="left">Dacite</td>
<td align="center">65.98</td>
<td align="center">0.59</td>
<td align="center">16.15</td>
<td align="center">2.47</td>
<td align="center">2.33</td>
<td align="center">0.09</td>
<td align="center">1.81</td>
<td align="center">4.38</td>
<td align="center">3.85</td>
<td align="center">2.20</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<td rowspan="2" align="center">
<bold>Simulation</bold>
</td>
<td colspan="2" align="center">Andesite</td>
<td colspan="2" align="center">Dacite</td>
<td colspan="1" align="center">Viscosity</td>
<td colspan="1" align="center">Simulated time</td>
</tr>
<tr>
<td align="center">H<sub>2</sub>O wt<italic>%</italic>
</td>
<td align="center">CO<sub>2</sub> wt<italic>%</italic>
</td>
<td align="center">H<sub>2</sub>O wt<italic>%</italic>
</td>
<td align="center">CO<sub>2</sub> wt<italic>%</italic>
</td>
<td align="center">(10<sup>3</sup>&#xa0;Pa&#xa0;s)</td>
<td align="center">(h)</td>
</tr>
</thead>
<tbody>
<tr>
<td align="center">1</td>
<td align="center">4</td>
<td align="center">2</td>
<td align="center">4</td>
<td align="center">0.1</td>
<td align="center">6.2&#x2013;32.0</td>
<td align="center">1.25</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">4</td>
<td align="center">2</td>
<td align="center">4</td>
<td align="center">0.1</td>
<td align="center">62.9&#x2013;320.8</td>
<td align="center">2.0</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The numerical scheme and the stabilization terms employed for the solution of the set of <xref ref-type="disp-formula" rid="e1">Eqs 1</xref>&#x2013;<xref ref-type="disp-formula" rid="e4">4</xref> above, are reported in the <xref ref-type="sec" rid="s11">Appendix</xref>.</p>
</sec>
<sec id="s3">
<title>3 Applications to Magma Mixing Dynamics</title>
<p>As discussed above, magmatic systems often consist of multiple heterogeneous magmas stored in a network of interconnected sills and dykes. Magma mixing is understood as one of many possible mechanisms for triggering an eruption (<xref ref-type="bibr" rid="B68">Sparks et&#x20;al., 1977</xref>). Petrology and geochemistry analysis indicates that multiple intrusions of mafic to intermediate magma in more chemically evolved magmas stored at shallow depths may produce hybrid melts with zoned crystals. Sometimes the ejecta contain abundant inter-mingled hybrid magmas, suggesting efficient stirring and mingling in the reservoir as a result of replenishment and convection dynamics (<xref ref-type="bibr" rid="B76">Turner and Campbell, 1986</xref>; <xref ref-type="bibr" rid="B58">Petrelli et&#x20;al., 2011</xref>; <xref ref-type="bibr" rid="B50">Longo et&#x20;al., 2012a</xref>; <xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>).</p>
<p>Arc volcanoes are known for their dominantly explosive character. Their erupted products span the so-called andesitic magmatic suite, ranging from basaltic andesite to rhyolite. The occurrence of repeated pre-eruptive mixing events involving andesitic and dacitic melts is often recognized in the discharged magmas [e.g., (<xref ref-type="bibr" rid="B70">Tamura et&#x20;al., 2003</xref>; <xref ref-type="bibr" rid="B64">Shane et&#x20;al., 2008</xref>; <xref ref-type="bibr" rid="B16">Conway et&#x20;al., 2020</xref>)].</p>
<p>Here we employ the 3D physical model described above to study the physics of mixing between andesite and dacite magmas. We use these magmas because arc-volcanism emits mainly the andesitic suite of magmas. The objective is to study magma dynamics for this suite of magmas through numerical simulations and extract some geologically meaningful information. We remark that the model and numerical scheme employed here is applicable on any suite of magmas. In particular we model the convection dynamics emerging from a gravitationally unstable stratification of andesite and dacite magmas in a shallow reservoir. We refer to a set up that represents a 3D extension of the one employed in previous work (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>), allowing us to also compare between 2D and 3D dynamics.</p>
<sec id="s3-1">
<title>3.1 Simulation Setup</title>
<p>The computational domain represents a prolate ellipsoid with longer axis in the <italic>x</italic> direction (<xref ref-type="fig" rid="F1">Figure&#x20;1</xref>). The centre of the ellipsoid is placed at 4.1&#xa0;km depth. The lengths of the semi-axes in x, y, and z directions are 400, 100 and 100&#xa0;m respectively. With respect to the 2D setup in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>), the third dimension added here (<italic>z</italic>-axis) is short enough to cause significant deviation from 2D conditions (approximated when the neglected dimension is much longer than the considered ones). We perform two simulations which correspond to run cases &#x23;1 and &#x23;3 in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>). For consistency with the corresponding 2D cases in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>), we keep the same numbering throughout in this work (<xref ref-type="table" rid="T1">Table&#x20;1</xref>). In the simulations, andesite at a temperature of 927&#xb0;C is placed at the bottom of the domain, while the upper part is filled with dacite at a temperature of 876&#xb0;C. A horizontal interface, separating the two magmas, is set at 4,150&#xa0;m depth (<xref ref-type="fig" rid="F1">Figure&#x20;1</xref>). The chemical composition of the two magmas and their volatile contents are reported in <xref ref-type="table" rid="T1">Table&#x20;1</xref>. The two cases differ for only magma viscosity, with case &#x23;1 corresponding to locally defined, space-time dependent viscosity computed as described above, and case &#x23;3 equal to case &#x23;1 with the viscosity arbitrarily multiplied by a factor 10 everywhere in space and time. The effects of varying the amount of volatile contents in the 2D setup were studied in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>). While such a viscosity increase may approximate the effect of non-reactive crystals, which affect viscosity much more than other properties including density, the aim here is mostly that of evaluating the 3D dynamics and comparing with the 2D case, over a range of viscosities thus of dynamic time scales; as well as that of evaluating the 3D code performance in terms of computational time and scalability. The initial pressure distribution is computed by considering the lithostatic load at the chamber roof (average rock density &#x3d; 2,500&#xa0;kg/m<sup>3</sup>) and a horizontally uniform magmastatic profile. The bottom panel of <xref ref-type="fig" rid="F1">Figure&#x20;1</xref> (red lines) displays the initial pressure and density profiles along the chamber axis. No-slip adiabatic conditions are employed at the chamber walls. The numerical scheme presented in the <xref ref-type="sec" rid="s12">Appendix A</xref> is employed with 2.6 million linear tetrahedral elements. The side length of the computational elements ranges 1&#x2013;4&#xa0;m. The numerical integrals are computed with four Gauss quadrature points. The unstructured tetrahedral mesh results in uneven interface providing the initial perturbations that destabilize the interface between the two magma types. The simulations are run on an HP cluster system at INGV Pisa, composed of 432 Intel Xeon 2.3&#xa0;GHz cores distributed over six nodes connected through a low latency 100&#xa0;Gbps Infiniband network. Scaling tests reported below and involving up to thousands cores for a much shorter computational time are run instead on the supercomputing facilities at the Barcelona Supercomputing Center.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>Simulations setup and profiles of pressure and density along chamber axis (<italic>x</italic>&#x20;&#x3d; 0, <italic>z</italic>&#x20;&#x3d; 0).</p>
</caption>
<graphic xlink:href="feart-09-760773-g001.tif"/>
</fig>
</sec>
</sec>
<sec id="s4">
<title>4 Results</title>
<p>We present the results of the numerical simulations by first analysing the 3D convection dynamics, then comparing with the 2D case in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>).</p>
<sec id="s4-1">
<title>4.1 3D Dynamics</title>
<p>The 3D dynamics are illustrated here mostly through comparison between the two simulation cases 1 and 3 in <xref ref-type="table" rid="T1">Table&#x20;1</xref>, with the latter being identical to the former, except for the computed viscosity which is everywhere in space and time arbitrarily multiplied by a factor 10. We anticipate that as for the 2D case (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>), the more viscous situation corresponds to slower convection dynamics, lower number of buoyant plumes of andesite-rich magma rising through the dacite, and finally lower mixing efficiency. <xref ref-type="fig" rid="F2">Figure&#x20;2</xref> illustrates well such differences. The figure shows the evolution of the isosurface corresponding to a mass fraction of andesite equal to 0.5 (which at time zero corresponds to the interface between the two magma types) for cases 1 and 3. The differences are striking: after 100&#xa0;s case 1 shows a highly dynamic state with a complex structure made of several inter-digitized rising plumes interacting with each other and occupying the entire chamber; while at the same time, only minor perturbations appear on the interface initially separating the two dacitic and andesitic magmas. At a later time when the dynamics are well developed also for case 3, this case displays a much simpler overall structure with many less plumes, each one on average much bigger than for case 1. The 0.5 mass fraction isosurface for the more viscous case 3 is conserved within the chamber over a much longer time, and it is still visible after more than 2&#xa0;h from start of the simulation. On the contrary, the same isosurface is completely lost in case 1 after only 5&#xa0;min, as a consequence of much faster and more intense magma mixing for this lower viscosity&#x20;case.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>Temporal evolution of isosurfaces of mass fraction <italic>Y</italic>&#x20;&#x3d; 0.5.</p>
</caption>
<graphic xlink:href="feart-09-760773-g002.tif"/>
</fig>
<p>
<xref ref-type="fig" rid="F3">Figure&#x20;3</xref> highlights the differences in plume structure for the two cases, through a planar view of the interface at an early stage of its destabilization. The higher the viscosity (case 3), the lower the number density (and the larger the average size) of the rising plumes formed as a consequence of Rayleigh-Taylor Instabilities. <xref ref-type="fig" rid="F4">Figure&#x20;4</xref> shows instead the distribution of velocity in the uprising plumes, at the two times (90 and 250&#xa0;s, respectively) at which the maximum velocity is attained for the two cases 1 and 3. That maximum velocity corresponds to 8.2&#xa0;m/s in case 1, while it is only 3.5&#xa0;m/s for the more viscous case&#x20;3.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Plume structure looking at the interface from the top. The interface is depicted by isosurfaces of mass fraction <italic>Y</italic>&#x20;&#x3d; 0.5.</p>
</caption>
<graphic xlink:href="feart-09-760773-g003.tif"/>
</fig>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>Velocity distribution of uprising plumes when the maximum value is reached.</p>
</caption>
<graphic xlink:href="feart-09-760773-g004.tif"/>
</fig>
<p>
<xref ref-type="fig" rid="F5">Figure&#x20;5</xref> illustrates the evolution of mixing throughout the computational domain. Case 1 corresponds to viscosity computed by model described in (<xref ref-type="bibr" rid="B30">Giordano et&#x20;al., 2008</xref>) and case 3 is with tenfold increase in viscosity than case 1. Initially, for both cases 1 and 3 the computational nodes host either pure dacite or pure andesite. In both cases the less viscous, less abundant andesitic end-member quickly vanishes as a pure component (at the scale of the resolution of the present simulations, which is of order 1&#xa0;m), whereas nearly pure dacite continues to be largely present in the system at the latest simulation times. Faster and more efficient mixing for case 1 is clearly visible as an earlier decrease of the maximum length of the compositional bars (that is, faster decrease of the number of nodes hosting pure dacite) as well as narrower compositional interval span inside the chamber at latest simulation times, when efficient convection is terminated in both cases (further illustrated below). For the more viscous case 3 the andesite can be seen to constitute at most about 50% of individual computational nodes, whereas for case 1 the maximum proportion of andesite in individual computational nodes at process end is only about&#x20;30%.</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption>
<p>Distribution of composition across mesh nodes. Simulation case 1 was run up to 4,350&#xa0;s. Therefore, at 7,430 s, only &#x23;3 is displayed.</p>
</caption>
<graphic xlink:href="feart-09-760773-g005.tif"/>
</fig>
<p>In both cases 1 and 3 by the latest times, the system is decompressed throughout by 6 and 2 bars, respectively, and the density evolves from an initial step profile to a smooth one (<xref ref-type="fig" rid="F1">Figure&#x20;1</xref>). For both simulation cases 1 and 3, pressure and temperature distributions along <italic>z</italic>&#x20;&#x3d; 0 and <italic>x</italic>&#x20;&#x3d; 0 planes is provided in the <xref ref-type="sec" rid="s11">Supplementary Material</xref>. We also display the profiles of scaled temperature and composition along the chamber axis in the <xref ref-type="sec" rid="s11">Supplementary Material</xref>.</p>
</sec>
<sec id="s4-2">
<title>4.2 Comparison Between 3D and 2D Simulation Results</title>
<p>As it is explained above, the present 3D simulation cases correspond to previous 2D simulations in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>), so to confidently explore the effects of 3D vs. 2D simulation setup. In particular, the numerical code and the physical and numerical setup in the 2D and 3D cases are the same, except for the specific aspects defining 2D vs. 3D simulated dynamics. The average length of computational elements across the initial compositional interface is of order 1&#xa0;m in both cases, and the number of elements in the 2D cases and along domain-centered 2D slides in the 3D cases are of order 10<sup>5</sup> in both&#x20;cases.</p>
<p>One of the major results from the simulation of 2D magma convection dynamics was the achievement of a stable dynamic state characterized by separate convective regions effectively impeding further mechanical mixing (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>). <xref ref-type="fig" rid="F6">Figure&#x20;6</xref> shows that such a major result is confirmed by 3D numerical simulations: dynamically stable, largely closed circulation patterns separating regions with different composition emerge, explaining the long-term maintenance of the heterogeneities at advanced times in <xref ref-type="fig" rid="F5">Figure&#x20;5</xref>. In fact, the circulation patterns in <xref ref-type="fig" rid="F6">Figure&#x20;6</xref> give rise to a stable, dynamic layering inside the magma chamber (<xref ref-type="fig" rid="F7">Figure&#x20;7</xref>). The details of the circulation patterns are not easy to compare, as those patterns are intimately three-dimensional for the 3D simulations, therefore, comparing a slice cut with the 2D case, e.g. as in <xref ref-type="fig" rid="F8">Figures 8</xref>, <xref ref-type="fig" rid="F9">9</xref> below, would not make any sense. Here we stress the overall first order agreement between the 2D and 3D simulation cases with respect to the major conclusion that magma chamber overturning and associated convection and mixing dynamics lead to the achievement of a stable dynamic state preserving compositional heterogeneities over the long term. We discuss in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>) some major consequences for the interpretation of compositional heterogeneities in magmas erupted during individual eruptions.</p>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption>
<p>Streamline structure with composition colorbar.</p>
</caption>
<graphic xlink:href="feart-09-760773-g006.tif"/>
</fig>
<fig id="F7" position="float">
<label>FIGURE 7</label>
<caption>
<p>Temporal evolution of isosurfaces of mass fraction of andesite.</p>
</caption>
<graphic xlink:href="feart-09-760773-g007.tif"/>
</fig>
<fig id="F8" position="float">
<label>FIGURE 8</label>
<caption>
<p>Comparison between 2D simulation and a vertical slice at <italic>z</italic>&#x20;&#x3d; 0 from the 3D simulation &#x23;1.</p>
</caption>
<graphic xlink:href="feart-09-760773-g008.tif"/>
</fig>
<fig id="F9" position="float">
<label>FIGURE 9</label>
<caption>
<p>Comparison between 2D simulation and a vertical slice at <italic>z</italic>&#x20;&#x3d; 0 from the 3D simulation &#x23;3.</p>
</caption>
<graphic xlink:href="feart-09-760773-g009.tif"/>
</fig>
<p>A more direct comparison between the simulated 2D and 3D dynamics is displayed in <xref ref-type="fig" rid="F8">Figures 8</xref>, <xref ref-type="fig" rid="F9">9</xref> for the simulation cases 1 and 3, respectively. For the 2D case each panel in the figures represents the entire computational domain, with the third neglected dimension (perpendicular to the sheet) assumed much longer than the two simulated ones so as to satisfy the 2D approximation. On the contrary, for the 3D case each panel reports a vertical slice cut across the center of the 3D computational domain, with the third dimension, simulated but not visible from the slice cut, being equal in size to the vertical dimension (<xref ref-type="fig" rid="F1">Figure&#x20;1</xref>).</p>
<p>At first sight, the 3D and 2D dynamics in <xref ref-type="fig" rid="F8">Figures 8</xref>, <xref ref-type="fig" rid="F9">9</xref> appear quite similar, especially in light of the different evolutions characterizing the less and more viscous cases, respectively, one and 3. That may appear surprising, considering the small length of the third chamber dimension in the present 3D simulations. However, such qualitative similarities are consistent with previous findings, e.g., (<xref ref-type="bibr" rid="B79">Young et&#x20;al., 2001</xref>; <xref ref-type="bibr" rid="B10">Cabot, 2006</xref>) (although those authors investigate high-Re incompressible flows), and as for those cases, we show here that the differences are also relevant.</p>
<p>The comparison shows that the interface destabilization time in the two 3D and 2D cases is very similar [while it is significantly influenced, as any other aspect of the overall dynamics, by magma viscosity. The role of viscosity&#x2014;and of volatile contents&#x2014;is however described in (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>), and it is only marginally considered here]. However, the 3D geometry of the interface appears to result in more complex perturbation structure comprising a broad range of scales, compared to the geometrically much simpler 2D perturbations. At later times such a richer 3D structure is visible as a much less symmetric geometry of the rising plumes, and more widespread plume size range. The plumes in the 3D cases also appear to rise faster, and are more mixed than for the 2D cases. That is well evident at time 100&#xa0;s for case 1 (<xref ref-type="fig" rid="F8">Figure&#x20;8</xref>) or time 200&#xa0;s for case 2 (<xref ref-type="fig" rid="F9">Figure&#x20;9</xref>): the 2D plumes maintain a much larger proportion of nearly pure andesite (dark red), which is instead much less represented (<xref ref-type="fig" rid="F9">Figure&#x20;9</xref>), or practically absent (<xref ref-type="fig" rid="F8">Figure&#x20;8</xref>), in the 3D cases at the same time. At the latest simulation times corresponding to achievement of a stable dynamic stratification as discussed above, the more viscous case in <xref ref-type="fig" rid="F9">Figure&#x20;9</xref> shows that andesite-rich (70&#x2013;80&#xa0;wt%) magma concentrates close to magma chamber top in the 2D case, whereas only <inline-formula id="inf2">
<mml:math id="m10">
<mml:mo>&#x3c;</mml:mo>
</mml:math>
</inline-formula> 60&#xa0;wt% andesitic magma occupies the same chamber region in the 3D&#x20;case.</p>
<p>The faster, more efficient mixing dynamics found for the 3D case are best highlighted in <xref ref-type="fig" rid="F10">Figure&#x20;10</xref>. Here, to establish a measure of mixing, we refer to progressive reduction of the overall compositional heterogeneity inside the chamber. As a quantitative measure of such heterogeneity we compute the standard deviation (<italic>&#x3c3;</italic>) of the mass fraction of andesite in the overall computational domain. For any time we first determine the mean value of the composition in the entire domain, then use that value to compute (<italic>&#x3c3;</italic>), which measures the extent of dispersion of the composition around its mean value. The larger the value of (<italic>&#x3c3;</italic>), the lower the extent of mixing:<disp-formula id="e9">
<mml:math id="m11">
<mml:mi>&#x3c3;</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msqrt>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:munderover accentunder="false" accent="false">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:munderover>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>a</mml:mi>
<mml:mi>n</mml:mi>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
<mml:mi>n</mml:mi>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msqrt>
</mml:math>
<label>(9)</label>
</disp-formula>where <italic>N</italic> is the total number of nodes in the computational domain, <italic>x</italic> is mass fraction, and the horizontal bar indicates the mean value over the entire computational domain.</p>
<fig id="F10" position="float">
<label>FIGURE 10</label>
<caption>
<p>Panel <bold>(A)</bold>: Evolution of overall compositional heterogeneities. <italic>&#x3c3;</italic> is overall compositional standard deviation and <italic>&#x3c3;</italic>
<sub>0</sub> is the same quantity at time zero. Panel <bold>(B)</bold>: Zoom view of first 600&#xa0;s.</p>
</caption>
<graphic xlink:href="feart-09-760773-g010.tif"/>
</fig>
<p>The computed evolutions of <italic>&#x3c3;</italic> in <xref ref-type="fig" rid="F10">Figure&#x20;10</xref> for the 2D and 3D simulations evidence the different stages of the overturning process (<xref ref-type="bibr" rid="B26">Garg et&#x20;al., 2019</xref>), starting in all cases with a low slope section corresponding to the initial phase 1 of development of the Rayleigh-Taylor instability, followed by a high slope section corresponding to highly efficient mixing during the convective phase of plume rise and vortex formation (phase 2), and terminating with an essentially flat section (phase 3) when the final stable dynamic state described above, preventing significant further mixing, is achieved. Faster development of the Rayleigh-Taylor instability and transition to phase 2 (efficient plume rise) is highlighted in the zoom view of <xref ref-type="fig" rid="F10">Figure&#x20;10B</xref>. Similarly, faster overall dynamics and more efficient mixing for the 3D case translate in earlier achievement of the flat section corresponding to phase 3. Note that for the high-viscosity case 3, the 2D simulation never attains a completely flat section, indicating that some mixing continues to be effective up to the last simulated time <inline-formula id="inf3">
<mml:math id="m12">
<mml:mo>&#x3e;</mml:mo>
</mml:math>
</inline-formula> 2&#xa0;h. That suggests that constraining the magma circulation patterns over a 2D plane (or better, assuming zero gradient of any flow variable including velocity along the neglected dimension as it is implicit in 2D simulations) may cause the flow streamlines to distort to an extent sufficient to break the closed circulation patterns in <xref ref-type="fig" rid="F6">Figure&#x20;6</xref>, resulting in further mixing not seen at such late times from the 3D simulations. Finally, and mostly relevant, the final extent of homogenization (that is, the overall change in <italic>&#x3c3;</italic>) is significantly larger for the 3D simulation cases, reflecting enhanced convection and mixing efficiency with respect to the 2D case. The difference is important, amounting to 18% of the total <italic>&#x3c3;</italic> change computed from the 2D simulation for case 1, and as large as 55% of that change for case 3. Therefore, not only mixing and homogenization in the magma chamber are significantly enhanced when considering the flow dynamics in a more realistic 3D environment; also, the extent of such enhancement depends substantially on the specific conditions. While the less viscous case 1 leads to more homogenization, the extent of change when moving from 2D to 3D turns out to be larger for the more viscous case 3. In other words, it seems plausible, based on our first 3D simulations and comparison with the corresponding 2D cases, to suggest that the errors and approximations introduced by neglecting more realistic 3D dynamics may vary substantially depending on the conditions considered, and may increase in relevance with increasing magma viscosity.</p>
</sec>
</sec>
<sec id="s5">
<title>5 Code Performance</title>
<p>As we mention above, the 3D simulation results presented above make use of 2.6 million tethrahedral elements in order to resolve the 3D Rayleigh-Taylor flow structure determined by the adopted initial unstable configuration. <xref ref-type="fig" rid="F11">Figure&#x20;11</xref> shows a zoom view of one isosurface distribution from <xref ref-type="fig" rid="F2">Figure&#x20;2</xref>. In particular, superposition of the computational mesh illustrates well the resolution level achieved, and the kind of details that are resolved.</p>
<fig id="F11" position="float">
<label>FIGURE 11</label>
<caption>
<p>Zoom view of the computational mesh and isosurfaces <italic>Y</italic>&#x20;&#x3d; 0.5 at t &#x3d; 100&#xa0;s for case &#x23;1.</p>
</caption>
<graphic xlink:href="feart-09-760773-g011.tif"/>
</fig>
<p>To check the parallel performance of GALES, we conduct a strong scaling test which is widely used to check the ability of a software to deliver results in less time when the amount of resources is increased. The parallel performance is quantified by comparing the actual speedup with the ideal speedup for a given set of processors. The actual speedup and the ideal speedup are defined as<disp-formula id="e10">
<mml:math id="m13">
<mml:mtext>Actual&#x2009;speedup</mml:mtext>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi>r</mml:mi>
<mml:mo>&#x3c;</mml:mo>
<mml:mi>N</mml:mi>
</mml:math>
<label>(10)</label>
</disp-formula>
<disp-formula id="e11">
<mml:math id="m14">
<mml:mtext>Ideal&#x2009;speedup</mml:mtext>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(11)</label>
</disp-formula>where <italic>t</italic>
<sub>
<italic>r</italic>
</sub> and <italic>t</italic>
<sub>
<italic>N</italic>
</sub> are the computational times taken by <italic>r</italic> processors and <italic>N</italic> processors, respectively. Parallel efficiency is computed as the ratio of the actual speedup and the ideal speedup for a given number of processors:<disp-formula id="e12">
<mml:math id="m15">
<mml:mtext>Efficiency</mml:mtext>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mo>.</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(12)</label>
</disp-formula>
</p>
<p>An ideal scalable software should result in a linear speedup. However, this is hardly achieved in real situations. For a given mesh the parallel efficiency decreases as we increase the number of processors, mostly as a consequence of increased time spent in communication among processors. The scaling tests are performed on the Marenostrum supercomputer at the Barcelona Supercomputing Centre (BSC) (<ext-link ext-link-type="uri" xlink:href="https://www.bsc.es/marenostrum/marenostrum/technical-information">https://www.bsc.es/marenostrum/marenostrum/technical-information</ext-link>) within the project GALES-3D (2010PA5625) in the frame of a PRACE preparatory access A (<ext-link ext-link-type="uri" xlink:href="https://prace-ri.eu/">https://prace-ri.eu/</ext-link>).</p>
<p>The scaling tests were run on three different meshes with progressively increasing size. The mesh models are listed in <xref ref-type="table" rid="T2">Table&#x20;2</xref>. The simulations use the same setup as described in <xref ref-type="sec" rid="s3-1">Section 3.1</xref>. The adopted numerical methods and the parallelization strategy employed are illustrated in detail in <xref ref-type="sec" rid="s11">Appendixes A,B</xref>. Here we only recall the monolithic approach to solve the linearized system of equations describing the space-time system dynamics, which is effective in reducing data transfer in parallel computing implementations (<xref ref-type="bibr" rid="B20">Dowd and Charles, 2010</xref>).</p>
<table-wrap id="T2" position="float">
<label>TABLE 2</label>
<caption>
<p>Mesh models for strong scaling&#x20;test.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Test</th>
<th align="center">&#x23;Nodes</th>
<th align="center">&#x23;Elements</th>
<th align="center">&#x23;dofs</th>
<th align="center">r</th>
<th align="center">N</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">1</td>
<td align="left">175001</td>
<td align="left">1004750</td>
<td align="left">1050006</td>
<td align="char" char=".">96</td>
<td align="left">96&#x2013;1,536</td>
</tr>
<tr>
<td align="left">2</td>
<td align="left">1951658</td>
<td align="left">11782329</td>
<td align="left">11709948</td>
<td align="char" char=".">192</td>
<td align="left">192&#x2013;6,144</td>
</tr>
<tr>
<td align="left">3</td>
<td align="left">7802061</td>
<td align="left">47581941</td>
<td align="left">46812366</td>
<td align="char" char=".">384</td>
<td align="left">384&#x2013;12,288</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>
<xref ref-type="fig" rid="F12">Figure&#x20;12</xref> shows the strong scaling results for each test case. The left panels in the figure display the time taken by the assembly procedure, the linear solver and the total time. We report here the average time taken for a non-linear iteration over 10&#x20;time steps (the observed standard deviation being 2&#x20;&#xd7; 10<sup>&#x2013;2</sup>&#x20;s). The right panels in the figure plot the speedup and the efficiency as a function of number of&#x20;cores.</p>
<fig id="F12" position="float">
<label>FIGURE 12</label>
<caption>
<p>Strong scaling results for test cases in <xref ref-type="table" rid="T2">Table&#x20;2</xref>.</p>
</caption>
<graphic xlink:href="feart-09-760773-g012.tif"/>
</fig>
<p>Overall, the scaling behavior of GALES is quite satisfactory in the explored range of computational elements and cores (a parallel efficiency of 0.6 or greater is taken here as satisfactory). The left panels in <xref ref-type="fig" rid="F12">Figure&#x20;12</xref> show that most of the computational time is spent in the assembly of the linearized system of equations. The solution time is only a fraction of the assembly time, increasing in relevance with increasing number of cores thus (right panels) with decreasing parallel efficiency. The total computational time decays nearly linearly (in the log scale of the figures) with increasing number of cores, and the parallel efficiency (right panels) is seen to decrease below satisfactory only for the largest number of cores employed for each different mesh&#x20;size.</p>
<p>Parallel performance primarily depends on load balancing and inter-processor communication. Our linear solvers are distributed and use peer-to-peer communication to solve the system. <xref ref-type="table" rid="T3">Table&#x20;3</xref> displays the partition statistics for test case 3 in <xref ref-type="table" rid="T2">Table&#x20;2</xref>, and illustrates well the reasons and conditions under which the parallel efficiency becomes less than satisfactory. Specifically, we display the average number of elements on a processor and the average percentage of inter-processor boundary nodes, computed from the load balanced partitions generated by the Metis software (see the <xref ref-type="sec" rid="s13">Appendix B</xref> for further details). Load balance when increasing the computational resources reduces the overall execution time. However, by increasing the number of processors the percentage of boundary nodes lying at inter-processor boundaries also increases, implying that the processors need to communicate more data. This translates into increased communication time&#x20;and works towards decreased parallel efficiency. In other words, for any specific problem there is an optimal balance&#x20;between decreasing load per core and increasing core inter-communication when increasing the overall computational resources. The results in <xref ref-type="fig" rid="F12">Figure&#x20;12</xref> show that for GALES, and in the range of the strong scaling exercise described here, a one order of magnitude decrease in total computational time is allowed before such a balancing condition is achieved.</p>
<table-wrap id="T3" position="float">
<label>TABLE 3</label>
<caption>
<p>Partitioning statistics for test case 3 in Table&#x20;2. The second column reports the average number of elements per core. The third column reports the average percentage of nodes lying on inter-processor boundaries.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">&#x23;Cores</th>
<th align="center">&#x23;Elements</th>
<th align="center">Boundary nodes (in&#x20;percentage)</th>
<th align="center">Scaling efficiency</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">384</td>
<td align="center">123911</td>
<td align="char" char=".">19</td>
<td align="char" char=".">1.0</td>
</tr>
<tr>
<td align="left">768</td>
<td align="center">61,955</td>
<td align="char" char=".">23</td>
<td align="char" char=".">1.0</td>
</tr>
<tr>
<td align="left">1,536</td>
<td align="center">30,977</td>
<td align="char" char=".">30</td>
<td align="char" char=".">0.91</td>
</tr>
<tr>
<td align="left">3,072</td>
<td align="center">15,488</td>
<td align="char" char=".">35</td>
<td align="char" char=".">0.80</td>
</tr>
<tr>
<td align="left">6,144</td>
<td align="center">7,744</td>
<td align="char" char=".">42</td>
<td align="char" char=".">0.63</td>
</tr>
<tr>
<td align="left">12,288</td>
<td align="center">3,872</td>
<td align="char" char=".">50</td>
<td align="char" char=".">0.53</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec>
<title>6 Discussion and Conclusion</title>
<p>In this paper we present a 3D parallel code for computing compressible to incompressible multi-component magma dynamics, compare numerical simulations of 3D vs. 2D dynamics for a simple test case represented by the development of Rayleigh-Taylor instability in a stratified, idealized magma chamber, and illustrate code performance by analyzing the results of a strong scaling test involving up to nearly 50 million computational elements and up to <inline-formula id="inf4">
<mml:math id="m16">
<mml:mo>&#x3e;</mml:mo>
</mml:math>
</inline-formula>12,000 computational cores. The computational speedup is close to ideal and above satisfactory levels as long as the element/core ratio is sufficiently large so as to limit boundary nodes to less than half total nodes. The demonstrated parallel efficiency is such as to guarantee efficient use of HPC resources in 3D applications to more realistic magmatic configurations including geometrically complex multiple chamber, dike and conduit systems, likely requiring a number of computational elements exceeding the maximum employed here. Recent extension of GALES to include fluid-structure interaction and coupling with solid elasto-dynamics (<xref ref-type="bibr" rid="B29">Garg et&#x20;al., 2021</xref>) further extends the accessible computational domains requiring exploration of the potential towards exascale computing (e.g., as in the ChEESE European Center of Excellence, <ext-link ext-link-type="uri" xlink:href="http://www.cheese-coe.eu">www.cheese-coe.eu</ext-link>).</p>
<p>The numerical simulations performed here, designed to compare with previous 2D simulations, illustrate the 3D dynamics of magma chamber overturning due to gravitationally unstable initial conditions and development and evolution of Rayleigh-Taylor instability. The numerical results illustrate to a high resolution level the 3D dynamics of development and growth of the instability, the formation and reciprocal interaction of buoyant plumes of magma, the complexities of the associated vorticity patterns and associated magma mixing, and the evolution towards a stable dynamic state preserving compositional heterogeneities and resulting in a dynamic layering of the magma chamber.</p>
<p>Remarkably, the much simpler 2D simulation approach is found to reproduce the more realistic 3D dynamics on a zero/first-order level, showing similar overall dynamics occurring over comparable time scales, and similar overall effects due to increased magma viscosity. On a more quantitative level, the 3D dynamics show however important differences, and in particular they produce faster plumes leading to more efficient magma mixing than for the corresponding 2D approximation. These results are in general consistent with those from the engineering literature (<xref ref-type="bibr" rid="B79">Young et&#x20;al., 2001</xref>; <xref ref-type="bibr" rid="B10">Cabot, 2006</xref>) where similar overall qualitative consistency but important quantitative differences between 2D and 3D simulations are evidenced, although for high Re incompressible flows. In particular, our results suggest that the extent of approximation introduced by the 2D simplification may depend on the specific conditions, and may be smaller for low viscosity conditions. That could be relevant in light of the substantial computational efforts required by the solution of 3D dynamics, and we deserve to evaluate it further, e.g., for more complex geometrical systems over a range of magmatic compositions.</p>
</sec>
</body>
<back>
<sec id="s7">
<title>Data Availability Statement</title>
<p>The raw data supporting the conclusion of this article will be made available by the authors, without undue reservation.</p>
</sec>
<sec id="s8">
<title>Author Contributions</title>
<p>DG and PP designed the study, analysed and discussed the results, and wrote the article, DG carried out the numerical simulations and postprocessed the results.</p>
</sec>
<sec sec-type="COI-statement" id="s9">
<title>Conflict of Interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="disclaimer" id="s10">
<title>Publisher&#x2019;s Note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<ack>
<p>We gratefully acknowledge the reviewers for their comments, which improve the quality of the manuscript. We acknowledge that the results on the code performance have been achieved using the PRACE Research Infrastructure resource MareNostrum based in Spain at Barcelona Supercomputing Centre (BSC). One of us (D.G.) was supported by an EPOS-IT grant.</p>
</ack>
<sec id="s11">
<title>Supplementary Material</title>
<p>The Supplementary Material for this article can be found online at: <ext-link ext-link-type="uri" xlink:href="https://www.frontiersin.org/articles/10.3389/feart.2021.760773/full#supplementary-material">https://www.frontiersin.org/articles/10.3389/feart.2021.760773/full&#x23;supplementary-material</ext-link>
</p>
<supplementary-material xlink:href="DataSheet1.PDF" id="SM1" mimetype="application/PDF" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Asanovic</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Bodik</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Gebis</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Husbands</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Keutzer</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Shalf</surname>
<given-names>J.</given-names>
</name>
<etal/>
</person-group> (<year>2006</year>). <comment>Technical report</comment>. <publisher-loc>Berkeley</publisher-loc>: <publisher-name>EECS Department, University of California</publisher-name>. <article-title>The Landscape of Parallel Computing Research: A View from berkeley.</article-title> </citation>
</ref>
<ref id="B2">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bachmann</surname>
<given-names>O.</given-names>
</name>
<name>
<surname>Bergantz</surname>
<given-names>G. W.</given-names>
</name>
</person-group> (<year>2003</year>). <article-title>Rejuvenation of the Fish canyon Magma Body: A Window into the Evolution of Large-Volume Silicic Magma Systems</article-title>. <source>Geol.</source> <volume>31</volume> (<issue>9</issue>), <fpage>789</fpage>&#x2013;<lpage>792</lpage>. <pub-id pub-id-type="doi">10.1130/g19764.1</pub-id> </citation>
</ref>
<ref id="B3">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bagagli</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Montagna</surname>
<given-names>C. P.</given-names>
</name>
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Longo</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2017</year>). <article-title>Signature of Magmatic Processes in Strainmeter Records at Campi Flegrei (italy)</article-title>. <source>Geophys. Res. Lett.</source> <volume>44</volume>, <fpage>718</fpage>&#x2013;<lpage>725</lpage>. <pub-id pub-id-type="doi">10.1002/2016gl071875</pub-id> </citation>
</ref>
<ref id="B4">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bavier</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Hoemmen</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Rajamanickam</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Thornquist</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2012</year>). <article-title>Amesos2 and Belos: Direct and Iterative Solvers for Large Sparse Linear Systems</article-title>. <source>Scientific Programming</source> <volume>20</volume> (<issue>3</issue>), <fpage>241</fpage>&#x2013;<lpage>255</lpage>. <pub-id pub-id-type="doi">10.1155/2012/243875</pub-id> </citation>
</ref>
<ref id="B5">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bazilevs</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Calo</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Cottrell</surname>
<given-names>J.&#x20;A.</given-names>
</name>
<name>
<surname>Hughes</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Reali</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Scovazzi</surname>
<given-names>G.</given-names>
</name>
<etal/>
</person-group> (<year>2007</year>). <article-title>Variational Multiscale Residual-Based Turbulence Modeling for Large Eddy Simulation of Incompressible Flows</article-title>. <source>CMAME</source> <volume>197</volume> (<issue>1</issue>), <fpage>173</fpage>&#x2013;<lpage>201</lpage>. <pub-id pub-id-type="doi">10.1016/j.cma.2007.07.016</pub-id> </citation>
</ref>
<ref id="B6">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bergantz</surname>
<given-names>G. W.</given-names>
</name>
</person-group> (<year>2000</year>). <article-title>On the Dynamics of Magma Mixing by Reintrusion: Implications for Pluton Assembly Processes</article-title>. <source>J.&#x20;Struct. Geology</source> <volume>22</volume> (<issue>22</issue>), <fpage>1297</fpage>&#x2013;<lpage>1309</lpage>. <pub-id pub-id-type="doi">10.1016/s0191-8141(00)00053-5</pub-id> </citation>
</ref>
<ref id="B7">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Bergantz</surname>
<given-names>G. W.</given-names>
</name>
<name>
<surname>Schleicher</surname>
<given-names>J.&#x20;M.</given-names>
</name>
<name>
<surname>Burgisser</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>Open-system Dynamics and Mixing in Magma Mushes</article-title>. <source>Nat. Geosci.</source> <volume>8</volume>, <fpage>793</fpage>&#x2013;<lpage>796</lpage>. <pub-id pub-id-type="doi">10.1038/ngeo2534</pub-id> </citation>
</ref>
<ref id="B8">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Blundy</surname>
<given-names>J.&#x20;D.</given-names>
</name>
<name>
<surname>Annen</surname>
<given-names>C. J.</given-names>
</name>
</person-group> (<year>2016</year>). <article-title>Crustal Magmatic Systems from the Perspective of Heat Transfer</article-title>. <source>Elements</source> <volume>12</volume> (<issue>2</issue>), <fpage>115</fpage>&#x2013;<lpage>120</lpage>. <pub-id pub-id-type="doi">10.2113/gselements.12.2.115</pub-id> </citation>
</ref>
<ref id="B9">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Burnham</surname>
<given-names>C. W.</given-names>
</name>
<name>
<surname>Holloway</surname>
<given-names>J.&#x20;R.</given-names>
</name>
<name>
<surname>Davis</surname>
<given-names>N. F.</given-names>
</name>
</person-group> (<year>1969</year>). <article-title>Thermodynamic Properties of Water to 1,000&#xb0; C and 10,000 Bars</article-title>. <source>Geol. Soc. America Spec. Pap.</source> <volume>132</volume>, <fpage>1</fpage>&#x2013;<lpage>96</lpage>. <pub-id pub-id-type="doi">10.1130/spe132-p1</pub-id> </citation>
</ref>
<ref id="B10">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Cabot</surname>
<given-names>W.</given-names>
</name>
</person-group> (<year>2006</year>). <article-title>Comparison of Two- and Three-Dimensional Simulations of Miscible Rayleigh-taylor Instability</article-title>. <source>Phys. Fluids</source> <volume>18</volume>, <fpage>1</fpage>&#x2013;<lpage>9</lpage>. <pub-id pub-id-type="doi">10.1063/1.2191856</pub-id> </citation>
</ref>
<ref id="B11">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Campbell</surname>
<given-names>I. H.</given-names>
</name>
<name>
<surname>Turner</surname>
<given-names>J.&#x20;S.</given-names>
</name>
</person-group> (<year>1986</year>). <article-title>The Influence of Viscosity on Fountains in Magma chambers</article-title>. <source>J.&#x20;Petrology</source> <volume>27</volume>, <fpage>1</fpage>&#x2013;<lpage>30</lpage>. <pub-id pub-id-type="doi">10.1093/petrology/27.1.1</pub-id> </citation>
</ref>
<ref id="B12">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Caricchi</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Burlini</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Ulmer</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Gerya</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Vassalli</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>2007</year>). <article-title>Non-newtonian Rheology of crystal-bearing Magmas and Implications for Magma Ascent Dynamics</article-title>. <source>Earth Planet. Sci. Lett.</source> <volume>264</volume>, <fpage>402</fpage>&#x2013;<lpage>419</lpage>. <pub-id pub-id-type="doi">10.1016/j.epsl.2007.09.032</pub-id> </citation>
</ref>
<ref id="B13">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Carrara</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>Numerical Modeling of the Physical Processes Causing the Reawakening of a Magmatic Chamber and of the Associated Geophysical Signals</article-title> <comment>Theses</comment> <publisher-loc>Grenoble</publisher-loc>: <publisher-name>Universit&#xe9; Grenoble Alpes</publisher-name>. </citation>
</ref>
<ref id="B14">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Cashman</surname>
<given-names>C.</given-names>
</name>
</person-group> (<year>2000</year>). <source>Encyclopedia of Volcanoes</source>. <publisher-name>Academic Press</publisher-name>. </citation>
</ref>
<ref id="B15">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Cassidy</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Manga</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Cashman</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Bachmann</surname>
<given-names>O.</given-names>
</name>
</person-group> (<year>2018</year>). <article-title>Controls on Explosive-Effusive Volcanic Eruption Styles</article-title>. <source>Nat. Commun.</source> <volume>9</volume> (<issue>2839</issue>), <fpage>1</fpage>&#x2013;<lpage>16</lpage>. <pub-id pub-id-type="doi">10.1038/s41467-018-05293-3</pub-id> </citation>
</ref>
<ref id="B16">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Conway</surname>
<given-names>C. E.</given-names>
</name>
<name>
<surname>Chamberlain</surname>
<given-names>K. J.</given-names>
</name>
<name>
<surname>Harigane</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Morgan</surname>
<given-names>D. J.</given-names>
</name>
<name>
<surname>Wilson</surname>
<given-names>C. J.&#x20;N.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Rapid Assembly of High-Mg Andesites and Dacites by Magma Mixing at a continental Arc Stratovolcano</article-title>. <source>Geology</source> <volume>48</volume>, <fpage>1033</fpage>&#x2013;<lpage>1037</lpage>. <pub-id pub-id-type="doi">10.1130/g47614.1</pub-id> </citation>
</ref>
<ref id="B17">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Couch</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Sparks</surname>
<given-names>R. S. J.</given-names>
</name>
<name>
<surname>Carroll</surname>
<given-names>M. R.</given-names>
</name>
</person-group> (<year>2001</year>). <article-title>Mineral Disequilibrium in Lavas Explained by Convective Self-Mixing in Open Magma chambers</article-title>. <source>Nature</source> <volume>411</volume>, <fpage>1037</fpage>&#x2013;<lpage>1039</lpage>. <pub-id pub-id-type="doi">10.1038/35082540</pub-id> </citation>
</ref>
<ref id="B18">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>De Campos</surname>
<given-names>C. P.</given-names>
</name>
<name>
<surname>Perugini</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Ertel-Ingrisch</surname>
<given-names>W.</given-names>
</name>
<name>
<surname>Dingwell</surname>
<given-names>D. B.</given-names>
</name>
<name>
<surname>Poli</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2011</year>). <article-title>Enhancement of Magma Mixing Efficiency by Chaotic Dynamics: an Experimental Study</article-title>. <source>Contrib. Mineral. Petrol.</source> <volume>161</volume>, <fpage>863</fpage>&#x2013;<lpage>881</lpage>. <pub-id pub-id-type="doi">10.1007/s00410-010-0569-0</pub-id> </citation>
</ref>
<ref id="B19">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>DePaolo</surname>
<given-names>D. J.</given-names>
</name>
</person-group> (<year>1981</year>). <article-title>Trace Element and Isotopic Effects of Combined Wallrock Assimilation and Fractional Crystallization</article-title>. <source>Earth Planet. Sci. Lett.</source> <volume>53</volume> (<issue>2</issue>), <fpage>189</fpage>&#x2013;<lpage>202</lpage>. <pub-id pub-id-type="doi">10.1016/0012-821x(81)90153-9</pub-id> </citation>
</ref>
<ref id="B20">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Dowd</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Charles</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2010</year>). <source>High Performance Computing</source>. <publisher-loc>Texas</publisher-loc>: <publisher-name>Rice University</publisher-name>. </citation>
</ref>
<ref id="B21">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Edmonds</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Wallace</surname>
<given-names>P. J.</given-names>
</name>
</person-group> (<year>2017</year>). <article-title>Volatiles and Exsolved Vapor in Volcanic Systems</article-title>. <source>Elements</source> <volume>13</volume> (<issue>1</issue>), <fpage>29</fpage>&#x2013;<lpage>34</lpage>. <pub-id pub-id-type="doi">10.2113/gselements.13.1.29</pub-id> </citation>
</ref>
<ref id="B22">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Eichelberger</surname>
<given-names>J.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Distribution and Transport of thermal Energy within Magma&#x2013;Hydrothermal Systems</article-title>. <source>Geosciences</source> <volume>10</volume>, <fpage>1</fpage>&#x2013;<lpage>26</lpage>. <pub-id pub-id-type="doi">10.3390/geosciences10060212</pub-id> </citation>
</ref>
<ref id="B23">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Flanagan</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Davies</surname>
<given-names>G. H.</given-names>
</name>
<name>
<surname>Boy</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Doneddu</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>A Review of a Distributed High Performance Computing Implementation</article-title>. <source>J.&#x20;Inf. Technology Case Appl. Res.</source> <volume>22</volume> (<issue>3</issue>), <fpage>142</fpage>&#x2013;<lpage>158</lpage>. <pub-id pub-id-type="doi">10.1080/15228053.2020.1812803</pub-id> </citation>
</ref>
<ref id="B24">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Folch</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Marti</surname>
<given-names>J.</given-names>
</name>
</person-group> (<year>1998</year>). <article-title>The Generation of Overpressure in Felsic Magma chambers by Replenishment</article-title>. <source>Earth Planet. Sci. Lett.</source> <volume>163</volume> (<issue>1</issue>), <fpage>301</fpage>&#x2013;<lpage>314</lpage>. <pub-id pub-id-type="doi">10.1016/s0012-821x(98)00196-4</pub-id> </citation>
</ref>
<ref id="B25">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Franco</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Rafael Saavedra</surname>
<given-names>G. Z.</given-names>
</name>
</person-group> (<year>2006</year>). <article-title>A Stabilized Finite Element Method Based on Sgs Models for Compressible Flows</article-title>. <source>Computer Methods Appl. Mech. Eng.</source> <volume>196</volume> (<issue>1</issue>), <fpage>652</fpage>&#x2013;<lpage>664</lpage>. </citation>
</ref>
<ref id="B26">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Garg</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Colucci</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Longo</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>Long-lived Compositional Heterogeneities in Magma chambers, and Implications for Volcanic hazard</article-title>. <source>Sci. Rep.</source> <volume>9</volume> (<issue>3321</issue>), <fpage>1</fpage>&#x2013;<lpage>13</lpage>. <pub-id pub-id-type="doi">10.1038/s41598-019-40160-1</pub-id> </citation>
</ref>
<ref id="B27">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Garg</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Longo</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>2018a</year>). <article-title>Computation of Compressible and Incompressible Flows with a Space-Time Stabilized Finite Element Method</article-title>. <source>Comput. Mathematics Appl.</source> <volume>75</volume>, <fpage>4272</fpage>&#x2013;<lpage>4285</lpage>. <pub-id pub-id-type="doi">10.1016/j.camwa.2018.03.028</pub-id> </citation>
</ref>
<ref id="B28">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Garg</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Longo</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>2018b</year>). <article-title>Modeling Free Surface Flows Using Stabilized Finite Element Method</article-title>. <source>Math. Probl. Eng.</source> <volume>2018</volume> (<issue>6154251</issue>), <fpage>1</fpage>&#x2013;<lpage>9</lpage>. <pub-id pub-id-type="doi">10.1155/2018/6154251</pub-id> </citation>
</ref>
<ref id="B29">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Garg</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Longo</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2021</year>). <article-title>A Partitioned Solver for Compressible/incompressible Fluid Flow and Light Structure</article-title>. <source>Comput. Mathematics Appl.</source> <volume>100</volume>, <fpage>182</fpage>&#x2013;<lpage>195</lpage>. <pub-id pub-id-type="doi">10.1016/j.camwa.2021.09.005</pub-id> </citation>
</ref>
<ref id="B30">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Giordano</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Russell</surname>
<given-names>J.&#x20;K.</given-names>
</name>
<name>
<surname>Dingwell</surname>
<given-names>D. B.</given-names>
</name>
</person-group> (<year>2008</year>). <article-title>Viscosity of Magmatic Liquids: a Model</article-title>. <source>Earth Planet. Sci. Lett.</source> <volume>271</volume>, <fpage>123</fpage>&#x2013;<lpage>134</lpage>. <pub-id pub-id-type="doi">10.1016/j.epsl.2008.03.038</pub-id> </citation>
</ref>
<ref id="B31">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Gottlieb</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>1989</year>). <source>Highly Parallel Computing</source>. <publisher-loc>Redwood City, CA</publisher-loc>: <publisher-name>Benjamin-Cummings Publishing Co., Inc.</publisher-name>. </citation>
</ref>
<ref id="B32">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Gottsmann</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>De Angelis</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Fournier</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Van Camp</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Sacks</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Linde</surname>
<given-names>A.</given-names>
</name>
<etal/>
</person-group> (<year>2011</year>). <article-title>On the Geophysical Fingerprint of Vulcanian Explosions</article-title>. <source>Earth Planet. Sci. Lett.</source> <volume>306</volume> (<issue>1</issue>), <fpage>98</fpage>&#x2013;<lpage>104</lpage>. <pub-id pub-id-type="doi">10.1016/j.epsl.2011.03.035</pub-id> </citation>
</ref>
<ref id="B33">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Gudmundsson</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2011</year>). <article-title>Deflection of Dykes into Sills at Discontinuities and Magma-Chamber Formation</article-title>. <source>Tectonophysics</source> <volume>500</volume> (<issue>1</issue>), <fpage>50</fpage>&#x2013;<lpage>64</lpage>. <pub-id pub-id-type="doi">10.1016/j.tecto.2009.10.015</pub-id> </citation>
</ref>
<ref id="B34">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Gudmundsson</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>1995</year>). <article-title>Infrastructure and Mechanics of Volcanic Systems in iceland</article-title>. <source>J.&#x20;Volcanology Geothermal Res.</source> <volume>64</volume> (<issue>1</issue>), <fpage>1</fpage>&#x2013;<lpage>22</lpage>. <pub-id pub-id-type="doi">10.1016/0377-0273(95)92782-q</pub-id> </citation>
</ref>
<ref id="B35">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Gudmundsson</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2012</year>). <article-title>Magma chambers: Formation, Local Stresses, Excess Pressures, and Compartments</article-title>. <source>J.&#x20;Volcanology Geothermal Res.</source> <volume>237-238</volume>, <fpage>19</fpage>&#x2013;<lpage>41</lpage>. <pub-id pub-id-type="doi">10.1016/j.jvolgeores.2012.05.015</pub-id> </citation>
</ref>
<ref id="B36">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Guti&#xe9;rrez</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Miguel</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2010</year>). <article-title>Parada. Numerical Modeling of Time-dependent Fluid Dynamics and Differentiation of a Shallow Basaltic Magma Chamber</article-title>. <source>J.&#x20;Petrology</source> <volume>51</volume> (<issue>3</issue>), <fpage>731</fpage>&#x2013;<lpage>762</lpage>. </citation>
</ref>
<ref id="B37">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hauke</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Hughes</surname>
<given-names>T. J.&#x20;R.</given-names>
</name>
</person-group> (<year>1998</year>). <article-title>A Comparative Study of Different Sets of Variables for Solving Compressible and Incompressible Flows</article-title>. <source>CMAME</source> <volume>153</volume> (<issue>1&#x2013;2</issue>), <fpage>1</fpage>&#x2013;<lpage>44</lpage>. <pub-id pub-id-type="doi">10.1016/s0045-7825(97)00043-1</pub-id> </citation>
</ref>
<ref id="B38">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hauke</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Hughes</surname>
<given-names>T. J.&#x20;R.</given-names>
</name>
</person-group> (<year>1994</year>). <article-title>A Unified Approach to Compressible and Incompressible Flows</article-title>. <source>CMAME</source> <volume>113</volume> (<issue>3</issue>), <fpage>389</fpage>&#x2013;<lpage>395</lpage>. <pub-id pub-id-type="doi">10.1016/0045-7825(94)90055-8</pub-id> </citation>
</ref>
<ref id="B39">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hauke</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2001</year>). <article-title>Simple Stabilizing Matrices for the Computation of Compressible Flows in Primitive Variables</article-title>. <source>CMAME</source> <volume>190</volume> (<issue>51&#x2013;52</issue>), <fpage>6881</fpage>&#x2013;<lpage>6893</lpage>. <pub-id pub-id-type="doi">10.1016/s0045-7825(01)00267-5</pub-id> </citation>
</ref>
<ref id="B40">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hughes</surname>
<given-names>T. J.&#x20;R.</given-names>
</name>
<name>
<surname>Feijoo</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Mazzei</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Quincy</surname>
<given-names>J.&#x20;B.</given-names>
</name>
</person-group> (<year>1998</year>). <article-title>The Variational Multiscale Method&#x2014;A Paradigm for Computational Mechanics</article-title>. <source>Computer Methods Appl. Mech. Eng.</source> <volume>166</volume> (<issue>1</issue>), <fpage>3</fpage>&#x2013;<lpage>24</lpage>. <pub-id pub-id-type="doi">10.1016/s0045-7825(98)00079-6</pub-id> </citation>
</ref>
<ref id="B41">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hughes</surname>
<given-names>T. J.&#x20;R.</given-names>
</name>
</person-group> (<year>1995</year>). <article-title>Multiscale Phenomena: Green&#x2019;s Functions, the Dirichlet-To-Neumann Formulation, Subgrid Scale Models, Bubbles and the Origins of Stabilized Methods</article-title>. <source>Computer Methods Appl. Mech. Eng.</source> <volume>127</volume> (<issue>1</issue>), <fpage>387</fpage>&#x2013;<lpage>401</lpage>. <pub-id pub-id-type="doi">10.1016/0045-7825(95)00844-9</pub-id> </citation>
</ref>
<ref id="B42">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Huppert</surname>
<given-names>H. E.</given-names>
</name>
<name>
<surname>Sparks</surname>
<given-names>R. S. J.</given-names>
</name>
<name>
<surname>Whitehead</surname>
<given-names>J.&#x20;A.</given-names>
</name>
<name>
<surname>Hallworth</surname>
<given-names>M. A.</given-names>
</name>
</person-group> (<year>1986</year>). <article-title>Replenishment of Magma chambers by Light Inputs</article-title>. <source>J.&#x20;Geophys. Res.</source> <volume>91</volume>, <fpage>6113</fpage>&#x2013;<lpage>6122</lpage>. <pub-id pub-id-type="doi">10.1029/jb091ib06p06113</pub-id> </citation>
</ref>
<ref id="B43">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ishii</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Zuber</surname>
<given-names>N.</given-names>
</name>
</person-group> (<year>1979</year>). <article-title>Drag Coefficient and Relative Velocity in Bubbly, Droplet or Particulate Flows</article-title>. <source>Aiche J.</source> <volume>25</volume>, <fpage>843</fpage>&#x2013;<lpage>855</lpage>. <pub-id pub-id-type="doi">10.1002/aic.690250513</pub-id> </citation>
</ref>
<ref id="B44">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Jellinek</surname>
<given-names>A. M.</given-names>
</name>
<name>
<surname>Kerr</surname>
<given-names>R. C.</given-names>
</name>
</person-group> (<year>1999</year>). <article-title>Mixing and Compositional Stratification Produced by Natural Convection: 2. Applications to the Differentiation of Basaltic and Silicic Magma chambers and Komatiite Lava Flows</article-title>. <source>J.&#x20;Geophys. Res.</source> <volume>104</volume>, <fpage>7203</fpage>&#x2013;<lpage>7218</lpage>. <pub-id pub-id-type="doi">10.1029/1998jb900117</pub-id> </citation>
</ref>
<ref id="B45">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Karlstrom</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Dufek</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Manga</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2010</year>). <article-title>Magma Chamber Stability in Arc and continental Crust</article-title>. <source>J.&#x20;Volcanology Geothermal Res.</source> <volume>190</volume> (<issue>3</issue>), <fpage>249</fpage>&#x2013;<lpage>270</lpage>. <pub-id pub-id-type="doi">10.1016/j.jvolgeores.2009.10.003</pub-id> </citation>
</ref>
<ref id="B46">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Karypis</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Kumar</surname>
<given-names>V.</given-names>
</name>
</person-group> (<year>1999</year>). <article-title>A Fast and High Quality Multilevel Scheme for Partitioning Irregular Graphs</article-title>. <source>SIAM J.&#x20;Scientific Comput.</source> <volume>20</volume> (<issue>1</issue>), <fpage>359</fpage>&#x2013;<lpage>392</lpage>. </citation>
</ref>
<ref id="B47">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lange</surname>
<given-names>R. A.</given-names>
</name>
</person-group> (<year>1994</year>). <article-title>Chapter 9. The Effect of H<sub>2</sub>0, CO<sub>2</sub> and F on the Density and Viscosity of Silicate Melts</article-title>. <source>Rev. Mineralogy</source> <volume>30</volume>, <fpage>331</fpage>&#x2013;<lpage>370</lpage>. <pub-id pub-id-type="doi">10.1515/9781501509674-015</pub-id> </citation>
</ref>
<ref id="B48">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Laumonier</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Scaillet</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Pichavant</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Champallier</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Andujar</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Arbaret</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>2014</year>). <article-title>On the Conditions of Magma Mixing and its Bearing on Andesite Production in the Crust</article-title>. <source>Nat. Commun.</source> <volume>5</volume> (<issue>1&#x2013;12</issue>), <fpage>5607</fpage>. <pub-id pub-id-type="doi">10.1038/ncomms6607</pub-id> </citation>
</ref>
<ref id="B49">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lieto</surname>
<given-names>B. D.</given-names>
</name>
<name>
<surname>Romano</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Scarpa</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Linde</surname>
<given-names>A. T.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Strain Signals before and during Paroxysmal Activity at Stromboli Volcano, Italy</article-title>. <source>Geophys. Res. Lett.</source> <volume>47</volume>, <fpage>1</fpage>&#x2013;<lpage>9</lpage>. <pub-id pub-id-type="doi">10.1029/2020gl088521</pub-id> </citation>
</ref>
<ref id="B50">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Longo</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Barsanti</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Cassioli</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>2012</year>). <article-title>A Finite Element Galerkin/Least-Squares Method for Computation of Multicomponent Compressible-Incompressible Flows</article-title>. <source>Comput. Fluids</source> <volume>67</volume>, <fpage>57</fpage>&#x2013;<lpage>71</lpage>. <pub-id pub-id-type="doi">10.1016/j.compfluid.2012.07.008</pub-id> </citation>
</ref>
<ref id="B51">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Longo</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Vassalli</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Saccorotti</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Montagna</surname>
<given-names>C. P.</given-names>
</name>
<name>
<surname>Cassioli</surname>
<given-names>A.</given-names>
</name>
<etal/>
</person-group> (<year>2012</year>). <article-title>Magma Convection and Mixing Dynamics as a Source of Ultra-long-period Oscillations</article-title>. <source>Bull. Volcanol.</source> <volume>74</volume>, <fpage>873</fpage>&#x2013;<lpage>880</lpage>. <pub-id pub-id-type="doi">10.1007/s00445-011-0570-0</pub-id> </citation>
</ref>
<ref id="B52">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Michioka</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Sumita</surname>
<given-names>I.</given-names>
</name>
</person-group> (<year>2005</year>). <article-title>Rayleigh-taylor Instability of a Particle Packed Viscous Fluid: Implications for a Solidifying Magma</article-title>. <source>Geophys. Res. Lett.</source> <volume>32</volume> (<issue>3</issue>), <fpage>1</fpage>&#x2013;<lpage>4</lpage>. <pub-id pub-id-type="doi">10.1029/2004gl021827</pub-id> </citation>
</ref>
<ref id="B53">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Morgavi</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Petrelli</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Vetere</surname>
<given-names>F. P.</given-names>
</name>
<name>
<surname>Gonz&#xe1;lez-Garc&#xed;a</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Perugini</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>High-temperature Apparatus for Chaotic Mixing of Natural Silicate Melts</article-title>. <source>Rev. Scientific Instr.</source> <volume>86</volume>, <fpage>105108</fpage>. <pub-id pub-id-type="doi">10.1063/1.4932610</pub-id> </citation>
</ref>
<ref id="B54">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Pal</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2003</year>). <article-title>Rheological Behavior of Bubble-Bearing Magmas</article-title>. <source>Earth Planet. Sci. Lett.</source> <volume>207</volume> (<issue>1</issue>), <fpage>165</fpage>&#x2013;<lpage>179</lpage>. <pub-id pub-id-type="doi">10.1016/s0012-821x(02)01104-4</pub-id> </citation>
</ref>
<ref id="B55">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Montagna</surname>
<given-names>C. P.</given-names>
</name>
<name>
<surname>Longo</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2017</year>). <article-title>Pressure Evolution in Shallow Magma chambers upon Buoyancy-Driven Replenishment</article-title>. <source>Geochem. Geophys. Geosyst.</source> <volume>18</volume>, <fpage>1214</fpage>&#x2013;<lpage>1224</lpage>. <pub-id pub-id-type="doi">10.1002/2016gc006731</pub-id> </citation>
</ref>
<ref id="B56">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Papale</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Moretti</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Barbato</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2006</year>). <article-title>The Compositional Dependence of the Saturation Surface of H<sub>2</sub>O&#x2b;CO<sub>2</sub> Fluids in Silicate Melts</article-title>. <source>Chem. Geology</source> <volume>229</volume>, <fpage>78</fpage>&#x2013;<lpage>95</lpage>. <pub-id pub-id-type="doi">10.1016/j.chemgeo.2006.01.013</pub-id> </citation>
</ref>
<ref id="B57">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Perugini</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>De Campos</surname>
<given-names>C. P.</given-names>
</name>
<name>
<surname>Petrelli</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Dingwell</surname>
<given-names>D. B.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>Concentration Variance Decay during Magma Mixing: a Volcanic Chronometer</article-title>. <source>Sci. Rep.</source> <volume>5</volume> (<issue>14225</issue>), <fpage>1</fpage>&#x2013;<lpage>10</lpage>. <pub-id pub-id-type="doi">10.1038/srep14225</pub-id> </citation>
</ref>
<ref id="B58">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Petrelli</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Perugini</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Poli</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2011</year>). <article-title>Transition to Chaos and Implications for Time-Scales of Magma Hybridization during Mixing Processes in Magma Chambers</article-title>. <source>Lithos</source> <volume>125</volume> (<issue>1</issue>), <fpage>211</fpage>&#x2013;<lpage>220</lpage>. <pub-id pub-id-type="doi">10.1016/j.lithos.2011.02.007</pub-id> </citation>
</ref>
<ref id="B59">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Rispoli</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Delibra</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Venturini</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Corsini</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Saavedra</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Tezduyar</surname>
<given-names>T. E.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>Particle Tracking and Particle-Shock Interaction in Compressible-Flow Computations with the V-SGS Stabilization and <italic>Y Z &#x3b2;</italic> Shock-Capturing</article-title>. <source>Comput. Mech.</source> <volume>55</volume>, <fpage>1201</fpage>&#x2013;<lpage>1209</lpage>. <pub-id pub-id-type="doi">10.1007/s00466-015-1160-3</pub-id> </citation>
</ref>
<ref id="B60">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sato</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Sato</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2009</year>). <article-title>Study of Effect of Magma Pocket on Mixing of Two Magmas with Different Viscosities and Densities by Analogue Experiments</article-title>. <source>J.&#x20;Volcanology Geothermal Res.</source> <volume>181</volume> (<issue>1&#x2013;2</issue>), <fpage>115</fpage>&#x2013;<lpage>123</lpage>. <pub-id pub-id-type="doi">10.1016/j.jvolgeores.2009.01.005</pub-id> </citation>
</ref>
<ref id="B61">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Schleicher</surname>
<given-names>J.&#x20;M.</given-names>
</name>
<name>
<surname>Bergantz</surname>
<given-names>G. W.</given-names>
</name>
<name>
<surname>Breidenthal</surname>
<given-names>R. E.</given-names>
</name>
<name>
<surname>Burgisser</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2016</year>). <article-title>Time Scales of crystal Mixing in Magma Mushes</article-title>. <source>Geophys. Res. Lett.</source> <volume>43</volume>, <fpage>1543</fpage>&#x2013;<lpage>1550</lpage>. <pub-id pub-id-type="doi">10.1002/2015gl067372</pub-id> </citation>
</ref>
<ref id="B62">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Semenov</surname>
<given-names>A. N.</given-names>
</name>
<name>
<surname>Polyansky</surname>
<given-names>O. P.</given-names>
</name>
</person-group> (<year>2017</year>). <article-title>Numerical Modeling of the Mechanisms of Magma Mingling and Mixing: A Case Study of the Formation of Complex Intrusions</article-title>. <source>Russ. Geology Geophys.</source> <volume>58</volume>, <fpage>1317</fpage>&#x2013;<lpage>1332</lpage>. <pub-id pub-id-type="doi">10.1016/j.rgg.2017.11.001</pub-id> </citation>
</ref>
<ref id="B63">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Shakib</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Hughes</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Johan</surname>
<given-names>Z.</given-names>
</name>
</person-group> (<year>1991</year>). <article-title>A New Finite Element Formulation for Computational Fluid Dynamics: X. The Compressible Euler and Navier-Stokes Equations</article-title>. <source>CMAME</source> <volume>89</volume> (<issue>1&#x2013;3</issue>), <fpage>141</fpage>&#x2013;<lpage>219</lpage>. <pub-id pub-id-type="doi">10.1016/0045-7825(91)90041-4</pub-id> </citation>
</ref>
<ref id="B64">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Shane</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Doyle</surname>
<given-names>L. R.</given-names>
</name>
<name>
<surname>Nairn</surname>
<given-names>I. A.</given-names>
</name>
</person-group> (<year>2008</year>). <article-title>Heterogeneous Andesite-Dacite Ejecta in 26-16.6 Ka Pyroclastic Deposits of Tongariro Volcano, New&#x20;Zealand: the Product of Multiple Magma-Mixing Events</article-title>. <source>Bull. Volcanol.</source> <volume>70</volume>, <fpage>517</fpage>&#x2013;<lpage>536</lpage>. <pub-id pub-id-type="doi">10.1007/s00445-007-0152-3</pub-id> </citation>
</ref>
<ref id="B65">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sides</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Edmonds</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Maclennan</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Houghton</surname>
<given-names>B. F.</given-names>
</name>
<name>
<surname>Swanson</surname>
<given-names>D. A.</given-names>
</name>
<name>
<surname>Maclnnis</surname>
<given-names>M. J.</given-names>
</name>
<etal/>
</person-group> (<year>2014</year>). <article-title>Magma Mixing and High Fountaining during the 1959 Ki&#x304;lauea Iki Eruption, Hawai&#x2018;i</article-title>. <source>Earth Planet. Sci. Lett.</source> <volume>400</volume>, <fpage>102</fpage>&#x2013;<lpage>112</lpage>. <pub-id pub-id-type="doi">10.1016/j.epsl.2014.05.024</pub-id> </citation>
</ref>
<ref id="B66">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sparks</surname>
<given-names>R. S. J.</given-names>
</name>
<name>
<surname>Cashman</surname>
<given-names>K. V.</given-names>
</name>
</person-group> (<year>2017</year>). <article-title>Dynamic Magma Systems: Implications&#x20;for Forecasting Volcanic Activity</article-title>. <source>Elements</source> <volume>13</volume>, <fpage>35</fpage>&#x2013;<lpage>40</lpage>. <pub-id pub-id-type="doi">10.2113/gselements.13.1.35</pub-id> </citation>
</ref>
<ref id="B67">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sparks</surname>
<given-names>R. S. J.</given-names>
</name>
<name>
<surname>Huppert</surname>
<given-names>H. E.</given-names>
</name>
</person-group> (<year>1984</year>). <article-title>Density Changes during the Fractional Crystallization of Basaltic Magmas: Fluid Dynamic Implications</article-title>. <source>Contr. Mineral. Petrol.</source> <volume>85</volume>, <fpage>300</fpage>&#x2013;<lpage>309</lpage>. <pub-id pub-id-type="doi">10.1007/bf00378108</pub-id> </citation>
</ref>
<ref id="B68">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sparks</surname>
<given-names>S. R. J.</given-names>
</name>
<name>
<surname>Sigurdsson</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Wilson</surname>
<given-names>L.</given-names>
</name>
</person-group> (<year>1977</year>). <article-title>Magma Mixing: a Mechanism for Triggering Acid Explosive Eruptions</article-title>. <source>Nature</source> <volume>267</volume>, <fpage>315</fpage>&#x2013;<lpage>318</lpage>. <pub-id pub-id-type="doi">10.1038/267315a0</pub-id> </citation>
</ref>
<ref id="B69">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sundermeyer</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>G&#xe4;tjen</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Weimann</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Worner</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>Timescales from Magma Mixing to Eruption in Alkaline Volcanism in the Eifel Volcanic fields, Western germany</article-title>. <source>Contrib. Mineral. Petrol.</source> <volume>175</volume>, <fpage>1</fpage>&#x2013;<lpage>23</lpage>. <pub-id pub-id-type="doi">10.1007/s00410-020-01715-y</pub-id> </citation>
</ref>
<ref id="B70">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Tamura</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Yuhara</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Ishii</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Irino</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Shukuno</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2003</year>). <article-title>Andesites and Dacites from Daisen Volcano, Japan: Partial-To-Total Remelting of an Andesite Magma Body</article-title>. <source>J.&#x20;Petrology</source> <volume>44</volume> (<issue>12</issue>), <fpage>2243</fpage>&#x2013;<lpage>2260</lpage>. <pub-id pub-id-type="doi">10.1093/petrology/egg076</pub-id> </citation>
</ref>
<ref id="B71">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Tezduyar</surname>
<given-names>T. E.</given-names>
</name>
<name>
<surname>Senga</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2006</year>). <article-title>Stabilization and Shock-Capturing Parameters in Supg Formulation of Compressible Flows</article-title>. <source>Computer Methods Appl. Mech. Eng.</source> <volume>195</volume> (<issue>13</issue>), <fpage>1621</fpage>&#x2013;<lpage>1632</lpage>. <pub-id pub-id-type="doi">10.1016/j.cma.2005.05.032</pub-id> </citation>
</ref>
<ref id="B72">
<citation citation-type="book">
<collab>The Belos Project Team</collab> (<year>2021</year>). <source>The BELOS Project Website</source>. </citation>
</ref>
<ref id="B73">
<citation citation-type="book">
<collab>The Epetra Project Team</collab> (<year>2021</year>). <source>The EPETRA Project Website</source>. </citation>
</ref>
<ref id="B74">
<citation citation-type="book">
<collab>The Trilinos Project Team</collab> (<year>2021</year>). <source>The Trilinos Project Website</source>. </citation>
</ref>
<ref id="B75">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Tomiya</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Miyagi</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Saito</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Geshi</surname>
<given-names>N.</given-names>
</name>
</person-group> (<year>2013</year>). <article-title>Short Time Scales of Magma-Mixing Processes Prior to the 2011 Eruption of Shinmoedake Volcano, Kirishima Volcanic Group, Japan</article-title>. <source>Bull. Volcanol</source>. <volume>75</volume>, <fpage>1</fpage>&#x2013;<lpage>19</lpage>. <pub-id pub-id-type="doi">10.1007/s00445-013-0750-1</pub-id> </citation>
</ref>
<ref id="B76">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Turner</surname>
<given-names>J.&#x20;S.</given-names>
</name>
<name>
<surname>Campbell</surname>
<given-names>I. H.</given-names>
</name>
</person-group> (<year>1986</year>). <article-title>Convection and Mixing in Magma chambers</article-title>. <source>Earth-Science Rev.</source> <volume>23</volume> (<issue>4</issue>), <fpage>255</fpage>&#x2013;<lpage>352</lpage>. <pub-id pub-id-type="doi">10.1016/0012-8252(86)90015-2</pub-id> </citation>
</ref>
<ref id="B77">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Vollaire</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Nicolas</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Nicolas</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>1998</year>). <article-title>Parallel Computing for the Finite Element Method</article-title>. <source>Eur. Phys. J.&#x20;Appl. Phys.</source> <volume>1</volume>, <fpage>305</fpage>&#x2013;<lpage>314</lpage>. </citation>
</ref>
<ref id="B78">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Xu</surname>
<given-names>F.</given-names>
</name>
<name>
<surname>Moutsanidis</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Kamensky</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Hsu</surname>
<given-names>M.-C.</given-names>
</name>
<name>
<surname>Murugan</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Ghoshal</surname>
<given-names>A.</given-names>
</name>
<etal/>
</person-group> (<year>2017</year>). <article-title>Compressible Flows on Moving Domains: Stabilized&#x20;Methods, Weakly Enforced Essential Boundary Conditions,&#x20;Sliding Interfaces, and Application to Gas-Turbine Modeling</article-title>. <source>Comput. Fluids</source> <volume>158</volume>, <fpage>201</fpage>&#x2013;<lpage>220</lpage>. <pub-id pub-id-type="doi">10.1016/j.compfluid.2017.02.006</pub-id> </citation>
</ref>
<ref id="B79">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Young</surname>
<given-names>Y.-N.</given-names>
</name>
<name>
<surname>Tufo</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Dubey</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Rosner</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2001</year>). <article-title>On the Miscible Rayleigh-Taylor Instability: Two and Three Dimensions</article-title>. <source>J.&#x20;Fluid Mech.</source> <volume>447</volume>, <fpage>377</fpage>&#x2013;<lpage>408</lpage>. <pub-id pub-id-type="doi">10.1017/s0022112001005870</pub-id> </citation>
</ref>
</ref-list>
<sec id="s12">
<title>Appendix A Numerical method</title>
<p>The system of <xref ref-type="disp-formula" rid="e1">Eqs (1</xref>&#x2013;<xref ref-type="disp-formula" rid="e4">4)</xref> can be written and solved in a fully coupled monolithic manner as a single transport system (<xref ref-type="bibr" rid="B37">Hauke and Hughes, 1998</xref>; <xref ref-type="bibr" rid="B51">Longo et al., 2012b</xref>; <xref ref-type="bibr" rid="B27">Garg et al., 2018a</xref>):<disp-formula id="e113">
<mml:math id="m117">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="bold-italic">S</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(13)</label>
</disp-formula>where the vectors are given by<disp-formula id="e114">
<mml:math id="m118">
<mml:mi mathvariant="bold-italic">U</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mtable class="matrix">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:mi mathvariant="bold-italic">v</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:mi>E</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="28.45274pt"/>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mtable class="matrix">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">&#x3b4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mi>p</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mi>E</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mi>p</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="28.45274pt"/>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mtable class="matrix">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">&#x3c4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:msub>
<mml:mrow>
<mml:mi>&#x3c4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:munder>
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:munder>
<mml:msub>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">J</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="28.45274pt"/>
<mml:mi mathvariant="bold-italic">S</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="[" close="]">
<mml:mrow>
<mml:mtable class="matrix">
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:mi mathvariant="bold-italic">b</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="center">
<mml:mn>0</mml:mn>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:math>
<label>(14)</label>
</disp-formula>
</p>
<p>In the above equations the following notions are used: <bold>
<italic>&#x3b4;</italic>
</bold>
<sub>
<italic>i</italic>
</sub> &#x3d; <bold>
<italic>&#x3b4;e</italic>
</bold>
<sub>
<italic>i</italic>
</sub> and <bold>
<italic>&#x3c4;</italic>
</bold>
<sub>
<italic>i</italic>
</sub> &#x3d; <bold>
<italic>&#x3c4;e</italic>
</bold>
<sub>
<italic>i</italic>
</sub>, where <bold>
<italic>e</italic>
</bold>
<sub>
<italic>i</italic>
</sub> is the unit vector in the <italic>i</italic>
<sup>th</sup> direction and <bold>
<italic>&#x3b4;</italic>
</bold> &#x3d; [<italic>&#x3b4;</italic>
<sub>
<italic>ij</italic>
</sub>] is the Kronecker delta. The sub-indexes <italic>i</italic> and <italic>j</italic> stand for spatial coordinates, <italic>i.e.</italic> <italic>i, j</italic>&#x3d;1,2,3; while <italic>k</italic> stands for the mixture component. For spatial coordinates the Einstein summation convention of repeated indexes is used throughout.</p>
<p>
<xref ref-type="disp-formula" rid="e113">Equation (13)</xref> can be rewritten for any independent set of variables <bold>X</bold> (<xref ref-type="bibr" rid="B63">Shakib et al., 1991</xref>; <xref ref-type="bibr" rid="B38">Hauke and Hughes, 1994</xref>) as<disp-formula id="e115">
<mml:math id="m119">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="bold-italic">S</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
</mml:math>
<label>(15)</label>
</disp-formula>where <bold>
<italic>A</italic>
</bold>
<sub>
<italic>0</italic>
</sub> &#x3d; <bold>
<italic>U</italic>
</bold>
<sub>,<bold>
<italic>X</italic>
</bold>
</sub>, <inline-formula id="inf505">
<mml:math id="m520">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula> is the <italic>i</italic>th Euler Jacobian matrix and <bold>
<italic>K</italic>
</bold> &#x3d; [<bold>
<italic>K</italic>
</bold>
<sub>
<italic>ij</italic>
</sub>] is the diffusivity matrix with <inline-formula id="inf506">
<mml:math id="m521">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>.</p>
<p>The monolithic approach used in this work has several advantages over segregated approaches in terms of simplicity of the formulation, robustness of the solution approach, and smaller data transfer when doing parallel programming. In the present study, the vector <bold>
<italic>X</italic>
</bold> has been chosen as the set of pressure primitive variables, i.e. <bold>
<italic>X</italic>
</bold> &#x3d; [<italic>p</italic>, <bold>
<italic>v</italic>
</bold>, <italic>T, Y</italic>
<sub>
<italic>k</italic>
</sub>], which allows modelling of both compressible and incompressible flows by a unified formulation (<xref ref-type="bibr" rid="B38">Hauke and Hughes, 1994</xref>; <xref ref-type="bibr" rid="B37">Hauke and Hughes, 1998</xref>; <xref ref-type="bibr" rid="B51">Longo et al., 2012b</xref>; <xref ref-type="bibr" rid="B78">Xu et al., 2017</xref>; <xref ref-type="bibr" rid="B27">Garg et al., 2018a</xref>; <xref ref-type="bibr" rid="B28">Garg et al., 2018b</xref>; <xref ref-type="bibr" rid="B29">Garg et al., 2021</xref>).</p>
<p>The boundary value problem can be expressed as below. Consider an open spatial domain &#x3a9; with boundary &#x393;, such that &#x393; &#x3d; &#x393;<sub>
<italic>G</italic>
</sub> &#x222a; &#x393;<sub>
<italic>H</italic>
</sub> and &#x393;<sub>
<italic>G</italic>
</sub> &#x2229; &#x393;<sub>
<italic>H</italic>
</sub> &#x3d; <italic>&#x3d5;</italic>, where &#x393;<sub>
<italic>G</italic>
</sub> and &#x393;<sub>
<italic>H</italic>
</sub> are the Dirichlet and Neumann parts of the boundary, respectively. The strong form of the problem consists of finding the solution vector <inline-formula id="inf507">
<mml:math id="m522">
<mml:mi mathvariant="bold-italic">X</mml:mi>
<mml:mo>:</mml:mo>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
<mml:mo>&#x2192;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mi>q</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula>, where <italic>n</italic>
<sub>
<italic>eq</italic>
</sub> is the number of equations of the system, such that for the given essential boundary conditions <bold>
<italic>X</italic>
</bold>
<sub>
<italic>G</italic>
</sub> and the natural boundary conditions <bold>
<italic>X</italic>
</bold>
<sub>
<italic>H</italic>
</sub>, the following equations are satisfied:<disp-formula id="e116">
<mml:math id="m123">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="bold-script">L</mml:mi>
<mml:mi mathvariant="bold-italic">X</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="bold-italic">S</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mtext>in</mml:mtext>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mtext>on</mml:mtext>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>H</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mtext>on</mml:mtext>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>H</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(16)</label>
</disp-formula>where <inline-formula id="inf718">
<mml:math id="m724">
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> is the residual of the equations and <inline-formula id="inf719">
<mml:math id="m725">
<mml:mi mathvariant="bold-script">L</mml:mi>
</mml:math>
</inline-formula> represents the transient-advective-diffusive operator such that<disp-formula id="e117">
<mml:math id="m126">
<mml:mtable class="aligned">
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mi mathvariant="bold-script">L</mml:mi>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(17)</label>
</disp-formula>
</p>
<p>The weak form of the above equations can be expressed as: given a trial function space <inline-formula id="inf510">
<mml:math id="m528">
<mml:mi mathvariant="fraktur">T</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">{</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-italic">X</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">H</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mi>q</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-italic">X</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mtext>on</mml:mtext>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">}</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> and weighting function space <inline-formula id="inf511">
<mml:math id="m529">
<mml:mi>&#x393;</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mo stretchy="false">{</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">H</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mi>q</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mtext>on</mml:mtext>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>G</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo stretchy="false">}</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> find <inline-formula id="inf712">
<mml:math id="m729">
<mml:mi mathvariant="bold-italic">X</mml:mi>
<mml:mo>&#x2208;</mml:mo>
</mml:math>
</inline-formula> such that <inline-formula id="inf513">
<mml:math id="m530">
<mml:mo>&#x2200;</mml:mo>
<mml:mspace width="0.3333em"/>
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mi mathvariant="script">&#x393;</mml:mi>
</mml:math>
</inline-formula>
<disp-formula id="e118">
<mml:math id="m131">
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mo>&#x222b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(18)</label>
</disp-formula>which by substituting the definition of <inline-formula id="inf514">
<mml:math id="m532">
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>, integrating by parts and applying the boundary conditions, can be written as<disp-formula id="e119">
<mml:math id="m133">
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="bold-italic">S</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>H</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>H</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(19)</label>
</disp-formula>
</p>
<sec>
<title>A.1 Variational Multiscale Formulation</title>
<p>We consider the transport operator <inline-formula id="inf5">
<mml:math id="m17">
<mml:mi mathvariant="bold-script">L</mml:mi>
</mml:math>
</inline-formula> in Eq. 17 as quasi-linear and solve Eq. 13 by variational multiscale method (VMS) (<xref ref-type="bibr" rid="B41">Hughes, 1995</xref>; <xref ref-type="bibr" rid="B40">Hughes et&#x20;al., 1998</xref>; <xref ref-type="bibr" rid="B5">Bazilevs et&#x20;al., 2007</xref>). The VMS method has been successfully used for compressible flows (<xref ref-type="bibr" rid="B25">Franco and Rafael Saavedra, 2006</xref>; <xref ref-type="bibr" rid="B59">Rispoli et&#x20;al., 2015</xref>) and turbulent flows (<xref ref-type="bibr" rid="B5">Bazilevs et&#x20;al., 2007</xref>) without employing any <italic>ad hoc</italic> terms such as eddy viscosities. In the VMS method the solution vector <bold>
<italic>X</italic>
</bold> is decomposed into the resolved (coarse, grid-scale) finite element solution <inline-formula id="inf6">
<mml:math id="m18">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula> and unresolved (fine, sub-grid) error <bold>
<italic>X&#x2032;</italic>
</bold>,<disp-formula id="e20">
<mml:math id="m19">
<mml:mi mathvariant="bold-italic">X</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(20)</label>
</disp-formula>
</p>
<p>Similarly <bold>
<italic>W</italic>
</bold> is decomposed as<disp-formula id="e21">
<mml:math id="m20">
<mml:mi mathvariant="bold-italic">W</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo>&#x2b;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(21)</label>
</disp-formula>
</p>
<p>The VMS method consists of substituting the above splitting into the weak form and solving the following two subproblems for coarse-scale and fine-scale:<disp-formula id="e22">
<mml:math id="m21">
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(22)</label>
</disp-formula>
<disp-formula id="e23">
<mml:math id="m22">
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(23)</label>
</disp-formula>
</p>
<p>The essence of VMS method is to solve for the coarse scale solution numerically and compute the fine scale part either analytically or approximate it through an algebraic expression. With this aim, using adjoint duality, <xref ref-type="disp-formula" rid="e22">Eq. 22</xref> can be written as<disp-formula id="e24">
<mml:math id="m23">
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-script">L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(24)</label>
</disp-formula>where<disp-formula id="e25">
<mml:math id="m24">
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-script">L</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2a;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(25)</label>
</disp-formula>
</p>
<p>Assuming <bold>
<italic>X&#x2032;</italic>
</bold> &#x3d; 0 on element boundaries, <xref ref-type="disp-formula" rid="e23">Eq. 23</xref> can be expressed as:<disp-formula id="e26">
<mml:math id="m25">
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">S</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(26)</label>
</disp-formula>
</p>
<p>The solution of the above equation can be represented as a function <italic>f</italic> of <inline-formula id="inf7">
<mml:math id="m26">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula> and <inline-formula id="inf8">
<mml:math id="m27">
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>:<disp-formula id="e27">
<mml:math id="m28">
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>f</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(27)</label>
</disp-formula>
</p>
<p>To obtain a simple, basic and computationally efficient method, the VMS formulation relies on approximating <bold>
<italic>X&#x2032;</italic>
</bold> with the product of element-wise algebraic stabilisation operator <bold>
<italic>P</italic>
</bold> and the coarse scale residual, <inline-formula id="inf9">
<mml:math id="m29">
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula> (<xref ref-type="bibr" rid="B5">Bazilevs et&#x20;al., 2007</xref>),<disp-formula id="e28">
<mml:math id="m30">
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="bold-italic">P</mml:mi>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(28)</label>
</disp-formula>
</p>
<p>Complete VMS formulation along with the discontinuity capturing operator (see below) (<xref ref-type="bibr" rid="B71">Tezduyar and Senga, 2006</xref>) can be expressed as:<disp-formula id="equ1">
<mml:math id="m31">
<mml:msub>
<mml:mrow>
<mml:mo>&#x222b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:mi mathvariant="bold-italic">S</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close="">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">F</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi>d</mml:mi>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mo>&#x222b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>H</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>&#x22c5;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">H</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi>d</mml:mi>
<mml:mi mathvariant="normal">&#x393;</mml:mi>
</mml:math>
</disp-formula>
<disp-formula id="equ2">
<mml:math id="m32">
<mml:mo>&#x2b;</mml:mo>
<mml:munderover accentunder="false" accent="false">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:munderover>
<mml:msub>
<mml:mrow>
<mml:mo>&#x222b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msub>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2b;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">K</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mi mathvariant="bold-italic">P</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="bold-script">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi>d</mml:mi>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:math>
</disp-formula>
<disp-formula id="e29">
<mml:math id="m33">
<mml:mo>&#x2b;</mml:mo>
<mml:munderover accentunder="false" accent="false">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:munderover>
<mml:msub>
<mml:mrow>
<mml:mo>&#x222b;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3bd;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>dc</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">W</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">A</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msubsup>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x304;</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi>d</mml:mi>
<mml:mi mathvariant="normal">&#x3a9;</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(29)</label>
</disp-formula>
</p>
</sec>
<sec>
<title>A.2 Stabilization Operator</title>
<p>In the present work we follow the same design for the <bold>
<italic>P</italic>
</bold> matrix as it was developed in (<xref ref-type="bibr" rid="B39">Hauke, 2001</xref>) and extended to multi-component conditions in (<xref ref-type="bibr" rid="B51">Longo et&#x20;al., 2012b</xref>). We first design <bold>
<italic>P</italic>
</bold>
<sub>
<bold>
<italic>U</italic>
</bold>
</sub> for the conservation variables and then transform it into the pressure-primitive-variable formulation (<bold>
<italic>P</italic>
</bold>
<sub>
<bold>
<italic>X</italic>
</bold>
</sub>) using the following expression<disp-formula id="e30">
<mml:math id="m34">
<mml:mi mathvariant="bold-italic">P</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(30)</label>
</disp-formula>
</p>
<p>
<bold>
<italic>P</italic>
</bold>
<sub>
<bold>
<italic>U</italic>
</bold>
</sub> is given as:<disp-formula id="e31">
<mml:math id="m35">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>diag</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(31)</label>
</disp-formula>where the diagonal entries are given by<disp-formula id="e32">
<mml:math id="m36">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>min</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(32)</label>
</disp-formula>
<disp-formula id="e33">
<mml:math id="m37">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>min</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>12</mml:mn>
<mml:mi>&#x3bc;</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(33)</label>
</disp-formula>
<disp-formula id="e34">
<mml:math id="m38">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>E</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>min</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>12</mml:mn>
<mml:mi>&#x3ba;</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(34)</label>
</disp-formula>
<disp-formula id="e35">
<mml:math id="m39">
<mml:msub>
<mml:mrow>
<mml:mi>P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>Y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>min</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2b;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo stretchy="false">&#x7c;</mml:mo>
<mml:mi mathvariant="bold-italic">v</mml:mi>
<mml:mo stretchy="false">&#x7c;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mfrac>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mrow>
<mml:mn>12</mml:mn>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(35)</label>
</disp-formula>where &#x394;<italic>t</italic> is the time step, <italic>h</italic>
<sup>
<italic>e</italic>
</sup> is the element size along the streamline direction, <italic>c</italic> is the local sound speed and <italic>d</italic>
<sub>
<italic>k</italic>
</sub> is the mass diffusion coefficient of <italic>k</italic>th component.</p>
<p>To handle incompressibility the entry of the first row of the <bold>
<italic>P</italic>
</bold> matrix is modified as<disp-formula id="e36">
<mml:math id="m40">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2b;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">P</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2a;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">g</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="bold-italic">g</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(36)</label>
</disp-formula>where <bold>
<italic>P</italic>
</bold>
<sub>
<italic>c</italic>
</sub> and <bold>
<italic>P</italic>
</bold>
<sub>
<italic>m</italic>
</sub> are the diagonal entries of <bold>
<italic>P</italic>
</bold> matrix corresponding to the continuity and the momentum equations, and<disp-formula id="e37">
<mml:math id="m41">
<mml:mi mathvariant="bold-italic">g</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:msub>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:munderover accentunder="false" accent="false">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:munderover>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3be;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mtext>and</mml:mtext>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="bold-italic">g</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="bold-italic">g</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:munderover accentunder="false" accent="false">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:munderover>
<mml:msub>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(37)</label>
</disp-formula>
</p>
</sec>
<sec>
<title>A.3 Discontinuity Capturing Operator</title>
<p>The discontinuity capturing operator is implemented as in (<xref ref-type="bibr" rid="B71">Tezduyar and Senga, 2006</xref>). The parameter <italic>&#x3bd;</italic>
<sub>dc</sub> is defined as<disp-formula id="e38">
<mml:math id="m42">
<mml:msub>
<mml:mrow>
<mml:mi>&#x3bd;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>dc</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mi mathvariant="normal">&#x2016;</mml:mi>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ref</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mi mathvariant="bold-italic">Z</mml:mi>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:munderover accentunder="false" accent="false">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn>3</mml:mn>
</mml:mrow>
</mml:munderover>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ref</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3b2;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">U</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>ref</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mi mathvariant="bold-italic">U</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
</mml:mrow>
</mml:msup>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3b2;</mml:mi>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(38)</label>
</disp-formula>where <bold>
<italic>U</italic>
</bold>
<sub>ref</sub> is a diagonal scaling matrix constructed from the reference values of the components of <bold>
<italic>U</italic>
</bold> and <bold>
<italic>Z</italic>
</bold> &#x3d; <bold>
<italic>U</italic>
</bold>
<sub>,<italic>t</italic>
</sub> &#x2b; <bold>
<italic>A</italic>
</bold>
<sub>
<italic>i</italic>
</sub>
<bold>
<italic>U</italic>
</bold>
<sub>,<italic>i</italic>
</sub>. The parameter <italic>&#x3b2;</italic> determines the sharpness of the discontinuity and is set as <italic>&#x3b2;</italic> &#x3d; 1 for smoother solution and <italic>&#x3b2;</italic> &#x3d; 2 to retain sharp discontinuity. <italic>h</italic>
<sub>
<italic>dc</italic>
</sub> is defined as<disp-formula id="e39">
<mml:math id="m43">
<mml:msub>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mi>c</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>2</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:munderover accentunder="false" accent="false">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:munderover>
<mml:mfenced open="|" close="|">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mi>&#x3c1;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:mi>&#x3c1;</mml:mi>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="bold">&#x2207;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>N</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(39)</label>
</disp-formula>
</p>
</sec>
<sec>
<title>A.4 Numerical Discretization and Solver</title>
<p>The weight functions (<bold>
<italic>W</italic>
</bold>
<sup>
<italic>h</italic>
</sup>), the solution variables (<bold>
<italic>X</italic>
</bold>
<sup>
<italic>h</italic>
</sup>), and their time derivatives (<inline-formula id="inf10">
<mml:math id="m44">
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:math>
</inline-formula>) are expanded in terms of piece-wise linear basis functions. The integrals in <xref ref-type="disp-formula" rid="e29">Eq. 29</xref> are then evaluated using Gauss quadrature resulting in a system of non-linear ordinary differential equations:<disp-formula id="e40">
<mml:math id="m45">
<mml:mi mathvariant="bold-italic">R</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
<mml:mo>,</mml:mo>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mo>&#x307;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>0</mml:mn>
</mml:math>
<label>(40)</label>
</disp-formula>where <bold>
<italic>R</italic>
</bold> is the residual vector, <bold>
<italic>X</italic>
</bold> is the vector of unknowns and <inline-formula id="inf11">
<mml:math id="m46">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>X</mml:mi>
</mml:mrow>
<mml:mo>&#x307;</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula> is its time derivative. To solve <xref ref-type="disp-formula" rid="e40">Eq. 40</xref> a predictor-corrector method is used (<xref ref-type="bibr" rid="B63">Shakib et&#x20;al., 1991</xref>). The temporal discretization is done by implicit Euler method. Given the solution at time instance <italic>n</italic>, the algorithm is written&#x20;as:</p>
<p>Predictor:<disp-formula id="e41">
<mml:math id="m47">
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(41)</label>
</disp-formula>
</p>
<p>Corrector:</p>
<p>Construct Jacobian matrix:<disp-formula id="e42">
<mml:math id="m48">
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">M</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x2202;</mml:mi>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(42)</label>
</disp-formula>
</p>
<p>Solve for &#x394;<bold>
<italic>X</italic>
</bold>:<disp-formula id="e43">
<mml:math id="m49">
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">M</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msubsup>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:mo>&#x2212;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msubsup>
</mml:math>
<label>(43)</label>
</disp-formula>
</p>
<p>Update the solution:<disp-formula id="e44">
<mml:math id="m50">
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x3d;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="bold-italic">n</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn mathvariant="bold-italic">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2b;</mml:mo>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">X</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(44)</label>
</disp-formula>Within a time step, the iteration loop ends if either the maximum prespecified corrector passes are reached or one of the following convergence criteria is met:<disp-formula id="e45">
<mml:math id="m51">
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msup>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mo>&#x3c;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>5</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mtext>or</mml:mtext>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mfrac>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold-italic">i</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msup>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold-italic">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mn mathvariant="bold-italic">0</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:msup>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
</mml:mfrac>
<mml:mo>&#x3c;</mml:mo>
<mml:mn>1</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>8</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
<label>(45)</label>
</disp-formula>
</p>
<p>The linear system of <xref ref-type="disp-formula" rid="e43">Eq. 43</xref> is solved with the GMRES method from the Belos package of Trilinos (<xref ref-type="bibr" rid="B4">Bavier et&#x20;al., 2012</xref>; <xref ref-type="bibr" rid="B72">The Belos Project Team, 2021</xref>). GMRES is a Krylov subspace-based iterative method that minimizes the residual of the linear system and is best known for its robustness and efficiency in solving large and sparse systems of equations. The GMRES solver requires to specify an initial guess of the solution, the subspaces number, restarts, iterations and the tolerance for the relative residual. For all numerical tests in this study we set these numbers as subspaces &#x3d; 200, restarts &#x3d; 5, iterations &#x3d; 300 and residual tolerance &#x3d; 10<sup>&#x2013;6</sup>. The GMRES method often requires a good preconditioner which could effectively lower the condition number of the matrix and achieve convergence with reasonable computational effort. We use the incomplete lower-upper factorization (ILU) preconditioned version of the GMRES method. The preconditioner is generated from the ifpack package of Trilinos.</p>
</sec>
<sec>
<title>A.5 Time Step Control</title>
<p>As described in the previous subsection, we use an implicit method which does not bring about any stability requirement on time step. Nevertheless, a control on time step is needed. In fact an arbitrarily large time step results in ill-conditioned linear system of equations which is computationally expensive to solve. Whereas, a very small time step takes too many time iterations to reach to the predefined final time and hence needs a long time to finish the simulation. An implicit method combined with a suitable time adaptive method reduces the total compute time. In this work we control the time step through a prespecified value of the Courant number (Cr): before each time iteration, the time step (&#x394;<italic>t</italic>) is computed as (<xref ref-type="bibr" rid="B63">Shakib et&#x20;al., 1991</xref>):<disp-formula id="e46">
<mml:math id="m52">
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mtext>Cr</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfrac>
<mml:mspace width="0.3333em" class="nbsp"/>
<mml:mi>m</mml:mi>
<mml:mi>a</mml:mi>
<mml:mi>x</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>&#x3bc;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mi>&#x3ba;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>&#x3c1;</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>d</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x2b;</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msqrt>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mi>v</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>2</mml:mn>
<mml:msup>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>c</mml:mi>
<mml:msqrt>
<mml:mrow>
<mml:mn>4</mml:mn>
<mml:mo stretchy="false">&#x2016;</mml:mo>
<mml:mi>v</mml:mi>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">&#x2016;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2b;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
</mml:msqrt>
</mml:mrow>
<mml:mrow>
<mml:mi>h</mml:mi>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mfrac>
</mml:math>
<label>(46)</label>
</disp-formula>
</p>
<p>Since the numerical method is implicit, Cr is not constrained to be smaller than 1. However, we fix Cr &#x3d; 1 in this study and adapt the time step accordingly.</p>
</sec>
</sec>
<sec id="s13">
<title>Appendix B Parallel implementation</title>
<p>GALES is written in object-oriented C&#x2b;&#x2b; and is parallelized using OpenMpi for parallel computing. In the framework of the FEM, computations are carried out at the element level which is well suited for parallelization as the computational load can be well balanced by distributing almost equally weighted elements on different processors (<xref ref-type="bibr" rid="B77">Vollaire et al., 1998</xref>). Typically, an FEM solver spends most of its time in the following two steps:</p>
<p>1. Element level computations and assembly of the linear system of equations</p>
<p>2. Solution of the linear system of equations</p>
<p>Both steps can be performed in parallel. In GALES, prior to the simulation, the computational mesh is partitioned into multiple parts. Each part is assigned to a processor (process) that carries out all of the numerical operations corresponding to that part of the mesh. We use the element based domain partition strategy, in which each element is assigned to a unique processor, but nodes can belong to multiple processors if they belong to the element lying on the boundary between different subdomains. For mesh partitioning we use METIS, which uses the multilevel heuristic graph partitioning approach and assigns a balanced number of elements to processors (<xref ref-type="bibr" rid="B46">Karypis and Kumar, 1999</xref>). That is crucial for load-balancing and performance. For the element level computations, we construct vectors and matrices from the boost library which has a rich variety of optimized functions for vector and matrix arithmetics and is very convenient in the frame of FEM.</p>
<p>The distribution of degrees of freedom (DOFs) across the processors is taken care of by suitable mappings. In GALES we construct maps with the <italic>Epetra_Map</italic> class (<xref ref-type="bibr" rid="B73">The Epetra Project Team, 2021</xref>) of the Trilinos library (<xref ref-type="bibr" rid="B74">The Trilinos Project Team, 2021</xref>). The maps encapsulate the details of distributing data over MPI processors. We create two different distributed maps that we call shared map and non-shared map. The shared map is based on the element distribution. We use it to initialize the vector of DOFs and to carry the solution forward in transient problems. The non-shared map is based on the uniquely assigned mesh nodes. Before creating the map each node lying on inter-processor boundaries is assigned uniquely to an owner processor. This is to ensure that the aggregate of DOFs over owner PIDs is equal to the total DOFs of the computational mesh and is independent of the mesh parts. The maps themselves are distributed and do not store all data on a single processor to ensure memory scalability.</p>
<p>The global sparse tangent matrix, solution vector and the right-hand side vectors of the linear system of <xref ref-type="disp-formula" rid="e43">Eq. (43)</xref> are constructed as distributed objects whose entries lie across multiple processors. To define them, we use the <italic>FE_CrsMatrix</italic> and <italic>FE_Vector</italic> classes of the Epetra package. The classes automatically handle the details about the data layout, the storage format, and the number of the ghost nodes and their corresponding location. The data entries in <italic>FE_CrsMatrix</italic> are stored in a compressed row format. The element level data can be added to the global linear system through three functions, <italic>InsertGlobalValues, ReplaceGlobalValues <italic>and</italic> SumIntoGlobalValues</italic>. The objects of the classes are created by passing the DOFs distribution described by the non-shared map. The assembly procedure is completed by calling the <italic>GlobalAssemble</italic> function, which gathers any shared data into the non-overlapping partitioning defined by the non-shared map. <italic>GlobalAssemble</italic> is a collective method that reorganizes the data to be classified as off-processor, on-processor and on inter-processor boundaries. Accordingly, the communication patterns are established to transfer the data from a non-owner processor to the owner as specified by the non-shared map. The reorganized data structure is further used for the matrix-vector product in the linear solver. Finally, the linear solver is solved with parallel GMRES solver implemented in the Belos package which is proved to be scalable up to several hundred thousands of processors (<xref ref-type="bibr" rid="B72">The Belos Project Team, 2021</xref>).</p>
</sec>
</back>
</article>