<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "https://jats.nlm.nih.gov/nlm-dtd/publishing/3.0/journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" xml:lang="en" dtd-version="3.0" article-type="research-article">
  <front>
    <journal-meta><journal-id journal-id-type="publisher">GMD</journal-id><journal-title-group>
    <journal-title>Geoscientific Model Development</journal-title>
    <abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">1991-9603</issn><publisher>
    <publisher-name>Copernicus Publications</publisher-name>
    <publisher-loc>Göttingen, Germany</publisher-loc>
  </publisher></journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.5194/gmd-18-6951-2025</article-id><title-group><article-title>A bound-constrained formulation for complex solution  phase minimization</article-title><alt-title>A bound-constrained formulation for complex solution phase minimization</alt-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff2">
          <name><surname>Riel</surname><given-names>Nicolas</given-names></name>
          <email>nriel@uni-mainz.de</email>
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff2 aff3">
          <name><surname>Kaus</surname><given-names>Boris J. P.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-0247-8660</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff4">
          <name><surname>de Montserrat</surname><given-names>Albert</given-names></name>
          
        <ext-link>https://orcid.org/0000-0003-1694-3735</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff2 aff3">
          <name><surname>Moulas</surname><given-names>Evangelos</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-2783-4633</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff5">
          <name><surname>Green</surname><given-names>Eleanor C. R.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-6024-6457</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Dominguez</surname><given-names>Hugo</given-names></name>
          
        <ext-link>https://orcid.org/0009-0001-8425-0503</ext-link></contrib>
        <aff id="aff1"><label>1</label><institution>Institute of Geosciences, Johannes Gutenberg-University, Mainz, Germany</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Terrestrial Magmatic Systems (TeMaS) research center, Johannes Gutenberg-University, Mainz, Germany</institution>
        </aff>
        <aff id="aff3"><label>3</label><institution>Mainz Institute of Multiscale Modelling (M³ODEL), Johannes Gutenberg-University, Mainz, Germany</institution>
        </aff>
        <aff id="aff4"><label>4</label><institution>Department of Earth Sciences, Institut für Geophysik, ETH Zürich, 8092 Zürich, Switzerland</institution>
        </aff>
        <aff id="aff5"><label>5</label><institution>School of Geography, Earth and Atmospheric Sciences, The University of Melbourne, Victoria 3010, Australia</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Nicolas Riel (nriel@uni-mainz.de)</corresp></author-notes><pub-date><day>9</day><month>October</month><year>2025</year></pub-date>
      
      <volume>18</volume>
      <issue>19</issue>
      <fpage>6951</fpage><lpage>6962</lpage>
      <history>
        <date date-type="received"><day>23</day><month>October</month><year>2024</year></date>
           <date date-type="rev-request"><day>4</day><month>November</month><year>2024</year></date>
           <date date-type="rev-recd"><day>19</day><month>August</month><year>2025</year></date>
           <date date-type="accepted"><day>1</day><month>September</month><year>2025</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2025 Nicolas Riel et al.</copyright-statement>
        <copyright-year>2025</copyright-year>
      <license license-type="open-access"><license-p>This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link></license-p></license></permissions><self-uri xlink:href="https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025.html">This article is available from https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025.pdf</self-uri>
      <abstract><title>Abstract</title>

      <p id="d2e156">Prediction of mineral phase assemblages is essential to better understand the dynamics of the solid Earth, such as metamorphic processes, magmatism and the formation of mineral ore deposits. While recently developed thermodynamic databases allow the prediction of stable phase mineral assemblages for an increasing range of pressure, temperature and compositional spaces, the increasing complexity of these databases results in a significant increase of computational cost,  hindering our ability to perform realistic models of reactive fluid/magma transport. Presently, prediction of stable phase equilibrium in complex systems is therefore largely limited by how efficiently single phase minimization can be performed, as more than 75 % of the total computational time is generally dedicated to individual solution phase minimization. This limitation becomes critical for non-ideal solution phase models that involve both  a large number of chemical components, and mixing on a large number of sites, resulting in many inequality constraints of the form <inline-formula><mml:math id="M1" display="inline"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>≤</mml:mo><mml:msubsup><mml:mi>x</mml:mi><mml:mi>l</mml:mi><mml:mi>M</mml:mi></mml:msubsup><mml:mo>≤</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M2" display="inline"><mml:mrow><mml:msubsup><mml:mi>x</mml:mi><mml:mi>l</mml:mi><mml:mi>M</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is the fraction of element <inline-formula><mml:math id="M3" display="inline"><mml:mi>l</mml:mi></mml:math></inline-formula> mixing on site <inline-formula><mml:math id="M4" display="inline"><mml:mi>M</mml:mi></mml:math></inline-formula>.</p>

      <p id="d2e207">Here, we present a general reformulation of complex non-ideal solution phases from the thermodynamic database of Holland et al. (2018), which comprises equations of state for multiple mineral solid solutions appearing in magmatic systems, as well as multicomponent silicate melt and aqueous fluid phases. Using a nullspace approach, non-linear inequality constraints governing the site fractions are transformed into equality constraints, and the resulting problem is turned into an bound-constrained optimization problem, subsequently optimized using efficient gradient-based methods. To test our formulation, we apply it to several equations of state for solution phases known for their complexity and compare the results of our approach against classical optimization algorithms supporting inequality constraints.</p>

      <p id="d2e210">We find that the the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm yields by far the best performance and stability with respect to the other investigated methods, improving the minimization time of individual solution phase by a factor <inline-formula><mml:math id="M5" display="inline"><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula>. We estimate that our new approach can improve the computational time of stable phase equilibrium by a factor <inline-formula><mml:math id="M6" display="inline"><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:math></inline-formula>, thus potentially allowing to model realistic reactive fluid/magmatic systems by directly integrating  phase equilibrium calculations in multiphase thermomechanical codes.</p>
  </abstract>
    
<funding-group>
<award-group id="gs1">
<funding-source>European Research Council</funding-source>
<award-id>Consolidator Grant 771143</award-id>
</award-group>
<award-group id="gs2">
<funding-source>Deutsche Forschungsgemeinschaft</funding-source>
<award-id>521637679</award-id>
</award-group>
</funding-group>
</article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
      <p id="d2e242">While the last decade has seen significant progress in thermomechanical modeling of complex multiphase systems (e.g., <xref ref-type="bibr" rid="bib1.bibx22 bib1.bibx43 bib1.bibx20 bib1.bibx23 bib1.bibx44 bib1.bibx21 bib1.bibx39 bib1.bibx19" id="altparen.1"/>), the coupling with petrological modeling, when addressed at all, remains largely simplified <xref ref-type="bibr" rid="bib1.bibx34" id="paren.2"/>. There are two key obstacles. First, most phase equilibrium modeling tools (e.g., Perple_X, Theriak_Domino, geoPS, MELTS) (<xref ref-type="bibr" rid="bib1.bibx3 bib1.bibx5" id="altparen.3"/>; <xref ref-type="bibr" rid="bib1.bibx47" id="altparen.4"/>; <xref ref-type="bibr" rid="bib1.bibx9" id="altparen.5"/>) have been developed with the primary aim of producing phase diagrams and do not offer useful interfaces to integrate with (parallel) geodynamic codes. Second, phase equilibrium modeling is generally achieved by solving a Gibbs energy minimization problem which is computationally challenging. Several numerical strategies have been developed to solve such optimization problems <xref ref-type="bibr" rid="bib1.bibx9 bib1.bibx3 bib1.bibx5 bib1.bibx31 bib1.bibx47" id="paren.6"/> and some of the most efficient algorithms rely on repeated solution model minimization in order to compute for the most stable mineral assemblage (e.g., <xref ref-type="bibr" rid="bib1.bibx5 bib1.bibx47 bib1.bibx35" id="altparen.7"/>). Although computational performance have been significantly increased over the past few years <xref ref-type="bibr" rid="bib1.bibx47 bib1.bibx35" id="paren.8"/>,single point equilibrium prediction is still costly, with computational times of the order of 10 to 100 ms (e.g., <xref ref-type="bibr" rid="bib1.bibx35" id="altparen.9"/>). This limitation effectively precludes direct coupling of phase equilibrium calculations with thermomechanical models, which requires performing from thousands to hundreds of thousands of such calculations every timestep.</p>
      <p id="d2e275">In order to account for chemical separation in geodynamic models, several computationally cheaper workarounds have been used. This includes the use of pre-computed set of pseudosections (e.g., <xref ref-type="bibr" rid="bib1.bibx28 bib1.bibx1 bib1.bibx39" id="altparen.10"/>), parameterizations (e.g., <xref ref-type="bibr" rid="bib1.bibx17 bib1.bibx16 bib1.bibx15 bib1.bibx46" id="altparen.11"/>) and the ongoing development of neural networks (e.g., <xref ref-type="bibr" rid="bib1.bibx26 bib1.bibx48 bib1.bibx2" id="altparen.12"/>). In <xref ref-type="bibr" rid="bib1.bibx39" id="paren.13"/>, the authors generated a database of pre-computed results from phase-equilibria modeling covering the explored/expected compositional, pressure and temperature range of the system. While this approach is powerful, it suffers several limitations. First, to generate a relevant petrological database, the geodynamic model has to be run multiple times in order to characterize the effective pressure, temperature and compositional range of the system. Second, the database is by definition discrete which implies that a compositional tolerance has to be applied when computing the stable phase equilibrium, thus leading to mass conservation issues.</p>

      <fig id="F1"><label>Figure 1</label><caption><p id="d2e292">Ratio of time spent solving the local problem of the equilibrium composition and order in individual solution models (“total local”), to time spent solving the entire problem of establishing which is the most stable of the possible phase equilibria (“global minimization”), using MAGEMin <xref ref-type="bibr" rid="bib1.bibx35" id="paren.14"/> for two representative test cases. Both tonalite and wet basalt bulk-rock compositions are taken from <xref ref-type="bibr" rid="bib1.bibx14" id="paren.15"/>. In total 619 points were computed from 0 to 12 kbar and from 600 to 900 °C and from 800 to 1100 °C for the tonalite and the wet basalt case, respectively. </p></caption>
        <graphic xlink:href="https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025-f01.png"/>

      </fig>

      <p id="d2e308">Although the heavy computational requirements of stable phase equilibrium modeling remains a major obstacle for direct coupling, recently developed minimization tools yielded a significant improvement in performance <xref ref-type="bibr" rid="bib1.bibx47 bib1.bibx35" id="paren.16"/>. The recent performance increase mainly results from combining/improving existing minimization methods and making use of gradient-based minimization of individual phases to speed up the computations. Several gradient-based minimization methods are currently employed in the different routines computing phase equilibria. Theriak-Domino <xref ref-type="bibr" rid="bib1.bibx4 bib1.bibx5" id="paren.17"/> uses either steepest gradient or Newton-Raphson methods. Minimization of the solution phase model is achieved using a feasible starting guess and continues until a bound or a site fraction constraint is violated. In our recent phase equilibrium calculation software MAGEMin <xref ref-type="bibr" rid="bib1.bibx35" id="paren.18"/>, the analytical expressions of the equations of state for solution phases are passed to NLopt software package <xref ref-type="bibr" rid="bib1.bibx18" id="paren.19"/>. Subsequently, the objective function is minimized using the Conservative Convex Separable Approximation with Quadratic penalty (CCSAQ) algorithm <xref ref-type="bibr" rid="bib1.bibx42" id="paren.20"/> which solves for inequality-constrained nonlinear programming problems. During the inner iterations, a series of convex sub-problems approximating the objective function and the constraints are generated and solved until the constraints are satisfied <xref ref-type="bibr" rid="bib1.bibx42" id="paren.21"/>. This procedure is repeated until the solution phase model is minimized. The phase equilibria calculator GeoPS <xref ref-type="bibr" rid="bib1.bibx47" id="paren.22"/> uses the simulated annealing (SA) method. Compared to gradient-based methods, simulated-annealing is a probabilistic technique for approximating the global optimum of a given function (e.g., <xref ref-type="bibr" rid="bib1.bibx30" id="altparen.23"/>). Here, constraints can be accounted for as penalties on the objective function.</p>
      <p id="d2e336">The first release of MAGEMin followed the <sc>thermocalc</sc> software <xref ref-type="bibr" rid="bib1.bibx32" id="paren.24"/> in treating the physicality of site fractions as a set of inequality constraints expressed as functions of compositional and order variables <xref ref-type="bibr" rid="bib1.bibx14" id="paren.25"/> (see e.g., Eq. <xref ref-type="disp-formula" rid="Ch1.E11"/>). This approach ensures that all site fractions in the present solution phases satisfy the condition <inline-formula><mml:math id="M7" display="inline"><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>. Furthermore, since the parameterisation of site fractions enforces that the sum of all site fractions associated with a given site equals unity, this automatically guarantees that all individual site fractions are also <inline-formula><mml:math id="M8" display="inline"><mml:mrow><mml:mo>≤</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>. However, the use of inequality constraint in gradient-based methods, results in relatively slow performances and occasional solver failure due to slight violation of inequality constraints. Using the first publicly released version of MAGEMin <xref ref-type="bibr" rid="bib1.bibx35" id="paren.26"/>, we find that the global minimization time is largely dominated by how fast gradient-based minimization of individual solution phases can be performed, with 75 % to 90 % of the computation time dedicated to local minimization to find the equilibrium compositions and state of order of solution models (see Fig. <xref ref-type="fig" rid="F1"/>). Therefore, it becomes critically important to improve the minimization time of individual solution phase models to further speed-up the overall phase-equilibrium computational time.</p>
      <p id="d2e376">Here, we present a revised implementation of the compositional and order variables (xeos) of <xref ref-type="bibr" rid="bib1.bibx14" id="text.27"/> within MAGEMin that avoids the need to express the site fraction expressions as non-linear inequality constraints. Elimination of these constraints allows using faster bound-constrained optimization methods, thus considerably improving performance and stability of the code. We compare the accuracy and performance of two well-known gradient-based optimization methods: the conjugate gradient (CG) and the Broyden-Fletcher-Goldfarb-Shanno (BFGS) method.</p>
</sec>
<sec id="Ch1.S2">
  <label>2</label><title>Methodology</title>
<sec id="Ch1.S2.SS1">
  <label>2.1</label><title>Solution phase formulation</title>
      <p id="d2e397">At fixed pressure <inline-formula><mml:math id="M9" display="inline"><mml:mi>P</mml:mi></mml:math></inline-formula> and temperature <inline-formula><mml:math id="M10" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula>, the total Gibbs energy of solution phase <inline-formula><mml:math id="M11" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula> is given by

            <disp-formula id="Ch1.E1" content-type="numbered"><label>1</label><mml:math id="M12" display="block"><mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M13" display="inline"><mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> [J] is the Gibbs energy of the solution phase <inline-formula><mml:math id="M14" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M15" display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> the number of end-members of solution phase <inline-formula><mml:math id="M16" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M17" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> [mol] is the fraction of end-member <inline-formula><mml:math id="M18" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> dissolved in solution phase <inline-formula><mml:math id="M19" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M20" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> [J mol<sup>−1</sup>] is the molar chemical potential of end-member <inline-formula><mml:math id="M22" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> in solution phase <inline-formula><mml:math id="M23" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula>. An end-member is defined as an independent instance of a solution phase, at a single specified composition, for which the Gibbs energy is fully defined as a function of pressure and temperature only. In a given chemical system, the linear combinations of the end-members span the complete crystallographic site-occupancy space of the solution phase.</p>
      <p id="d2e590">The molar chemical potential of a phase is a function of the dissolved end-members within a solution phase (see <xref ref-type="bibr" rid="bib1.bibx8" id="altparen.28"/> for a review)

            <disp-formula id="Ch1.E2" content-type="numbered"><label>2</label><mml:math id="M24" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msubsup><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mn mathvariant="normal">0</mml:mn></mml:msubsup><mml:mo>+</mml:mo><mml:mi>R</mml:mi><mml:mi>T</mml:mi><mml:mi>ln⁡</mml:mi><mml:mo>(</mml:mo><mml:msubsup><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">id</mml:mi></mml:msubsup><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msubsup><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">ex</mml:mi></mml:msubsup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M25" display="inline"><mml:mi>R</mml:mi></mml:math></inline-formula> [J mol<sup>−1</sup> K<sup>−1</sup>]  is the ideal gas constant, <inline-formula><mml:math id="M28" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> [K] is the absolute temperature, <inline-formula><mml:math id="M29" display="inline"><mml:mrow><mml:msubsup><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">id</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> [/] is the ideal activity, <inline-formula><mml:math id="M30" display="inline"><mml:mrow><mml:msubsup><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mn mathvariant="normal">0</mml:mn></mml:msubsup></mml:mrow></mml:math></inline-formula> [J mol<sup>−1</sup>] the reference molar Gibbs energy of the pure end-member <xref ref-type="bibr" rid="bib1.bibx10 bib1.bibx13" id="paren.29"/> and <inline-formula><mml:math id="M32" display="inline"><mml:mrow><mml:msubsup><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">ex</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> [J mol<sup>−1</sup>] is the molar excess energy term <xref ref-type="bibr" rid="bib1.bibx33 bib1.bibx12" id="paren.30"/>. The ideal activity coefficient <inline-formula><mml:math id="M34" display="inline"><mml:mrow><mml:msubsup><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">id</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is generally defined as  <inline-formula><mml:math id="M35" display="inline"><mml:mrow><mml:msubsup><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">id</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> for molecular mixing, or else for mixing on crystallographic sites as

            <disp-formula id="Ch1.E3" content-type="numbered"><label>3</label><mml:math id="M36" display="block"><mml:mrow><mml:msubsup><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">id</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:munder><mml:mo movablelimits="false">∏</mml:mo><mml:mi>s</mml:mi></mml:munder><mml:mo>(</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup><mml:msup><mml:mo>)</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow></mml:msup></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M37" display="inline"><mml:mrow><mml:msubsup><mml:mi>X</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is the site fraction of the element <inline-formula><mml:math id="M38" display="inline"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> that appears on site <inline-formula><mml:math id="M39" display="inline"><mml:mi>s</mml:mi></mml:math></inline-formula> in end-member <inline-formula><mml:math id="M40" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> of phase <inline-formula><mml:math id="M41" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M42" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the number of atoms contained in mixing site <inline-formula><mml:math id="M43" display="inline"><mml:mi>s</mml:mi></mml:math></inline-formula> of <inline-formula><mml:math id="M44" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula>, and <inline-formula><mml:math id="M45" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is a normalization constant that ensures that <inline-formula><mml:math id="M46" display="inline"><mml:mrow><mml:msubsup><mml:mi>a</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">id</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is unity for the pure end-member <inline-formula><mml:math id="M47" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>.</p>
      <p id="d2e1042">In the asymmetric formalism, <inline-formula><mml:math id="M48" display="inline"><mml:mrow><mml:msubsup><mml:mi>g</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">ex</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is given by:

            <disp-formula id="Ch1.E4" content-type="numbered"><label>4</label><mml:math id="M49" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msubsup><mml:mi>g</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi mathvariant="normal">ex</mml:mi></mml:msubsup></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>&gt;</mml:mo><mml:mi>m</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mi>m</mml:mi><mml:mo>′</mml:mo></mml:msubsup><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mi>n</mml:mi><mml:mo>′</mml:mo></mml:msubsup><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>⋅</mml:mo><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>v</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>v</mml:mi><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

          where <inline-formula><mml:math id="M50" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the proportion of end-members <inline-formula><mml:math id="M51" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:math></inline-formula> weighted by the asymmetry parameters, as <inline-formula><mml:math id="M52" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:mo>(</mml:mo><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow></mml:msubsup><mml:msub><mml:mi>p</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msub><mml:mi>v</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, with <inline-formula><mml:math id="M53" display="inline"><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> the van Laar parameters for end-members <inline-formula><mml:math id="M54" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:math></inline-formula>. <inline-formula><mml:math id="M55" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> where <inline-formula><mml:math id="M56" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M57" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> where <inline-formula><mml:math id="M58" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>≠</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:math></inline-formula>. <inline-formula><mml:math id="M59" display="inline"><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> [J mol<sup>−1</sup>] is the interaction energy between end-members <inline-formula><mml:math id="M61" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M62" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> in the solution.</p>
      <p id="d2e1453">In <xref ref-type="bibr" rid="bib1.bibx14" id="text.31"/>, composition (the overall ratios of elements) and order (the distribution of elements over mixing sites) in an xeos are parameterized in terms of an independent set of variables (see example below). Given this formulation, the set of Eqs. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) to (<xref ref-type="disp-formula" rid="Ch1.E4"/>) can be directly transformed into the following Gibbs free energy minimization problem as function of the compositional and order variable <inline-formula><mml:math id="M63" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>:

            <disp-formula id="Ch1.E5" content-type="numbered"><label>5</label><mml:math id="M64" display="block"><mml:mrow><mml:mi mathvariant="normal">min</mml:mi><mml:mspace width="0.33em" linebreak="nobreak"/><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          subject to the site fraction of the element

            <disp-formula id="Ch1.E6" content-type="numbered"><label>6</label><mml:math id="M65" display="block"><mml:mrow><mml:msubsup><mml:mi>X</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          and that the compositional and order variables <inline-formula><mml:math id="M66" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> must be within a lower (<inline-formula><mml:math id="M67" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">l</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">b</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) and upper (<inline-formula><mml:math id="M68" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">b</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) limit

            <disp-formula id="Ch1.E7" content-type="numbered"><label>7</label><mml:math id="M69" display="block"><mml:mrow><mml:mi mathvariant="bold-italic">l</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">b</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>≤</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>≤</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">b</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M70" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M71" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M72" display="inline"><mml:mrow><mml:msubsup><mml:mi>X</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> are functions of the compositional and order variables <inline-formula><mml:math id="M73" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, and, <inline-formula><mml:math id="M74" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">lb</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M75" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">ub</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the lower and upper bounds on the set of compositional and order variables <inline-formula><mml:math id="M76" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. The first derivative of <inline-formula><mml:math id="M77" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is given by

            <disp-formula id="Ch1.E8" content-type="numbered"><label>8</label><mml:math id="M78" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          and the first derivative of the inequality constraints on the site fraction by

            <disp-formula id="Ch1.E9" content-type="numbered"><label>9</label><mml:math id="M79" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
</sec>
<sec id="Ch1.S2.SS2">
  <label>2.2</label><title>A revised formulation</title>
      <p id="d2e1865">The solid solutions presented in <xref ref-type="bibr" rid="bib1.bibx14" id="text.32"/> are formulated on the basis of exchanging chemical species on a finite number of unique crystallographic sites (Bragg–Williams-type formulation, see Myhill and Connolly, 2021 for more details). A key challenge with this formulation is that minimization has to be performed while keeping site fractions <inline-formula><mml:math id="M80" display="inline"><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>. Our previous implementation <xref ref-type="bibr" rid="bib1.bibx35" id="paren.33"/> imposed these inequalities constraints directly using NLopt <xref ref-type="bibr" rid="bib1.bibx18" id="paren.34"/>, which has a significantly higher numerical cost compared to the bound-constrained minimization algorithms. To simplify the optimization problem and reduce computation time, we use an alternative nullspace formulation (similar to HeFESTo, <xref ref-type="bibr" rid="bib1.bibx41" id="altparen.35"/>), different from the compositional and order variable approach used in e.g., <xref ref-type="bibr" rid="bib1.bibx14" id="text.36"/>, that transforms the non-linear inequality constraints on the site fractions into linear equality constraints. This reformulation is illustrated below using olivine as a representative example.</p>
      <p id="d2e1894">The olivine solid solution model <xref ref-type="bibr" rid="bib1.bibx14" id="paren.37"/> contains 2 mixing sites M1 and M2 and represents a phase that can be expressed by the general formula:

            <disp-formula id="Ch1.E10" content-type="numbered"><label>10</label><mml:math id="M81" display="block"><mml:mrow><mml:mo>[</mml:mo><mml:msup><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup><mml:msup><mml:mo>]</mml:mo><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>[</mml:mo><mml:msup><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi mathvariant="normal">Ca</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup><mml:msubsup><mml:mo>]</mml:mo><mml:mn mathvariant="normal">4</mml:mn><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="normal">SiO</mml:mi></mml:mrow></mml:msubsup></mml:mrow></mml:math></disp-formula></p>
      <p id="d2e1976">Here <inline-formula><mml:math id="M82" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M83" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> can be exchanged on crystallographic site M1 and <inline-formula><mml:math id="M84" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M85" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M86" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ca</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> can be exchanged on site crystallographic M2. In <xref ref-type="bibr" rid="bib1.bibx14" id="text.38"/>, the site fractions are expressed as:

                <disp-formula specific-use="gather" content-type="numbered"><mml:math id="M87" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E11"><mml:mtd><mml:mtext>11</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>Q</mml:mi></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E12"><mml:mtd><mml:mtext>12</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mi>Q</mml:mi></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E13"><mml:mtd><mml:mtext>13</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mi>Q</mml:mi></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E14"><mml:mtd><mml:mtext>14</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>x</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mi>Q</mml:mi></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E15"><mml:mtd><mml:mtext>15</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Ca</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>c</mml:mi></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          where composition has been parameterized using the variables <inline-formula><mml:math id="M88" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:mo>(</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M89" display="inline"><mml:mrow><mml:mi>c</mml:mi><mml:mo>=</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Ca</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula>, and order has been parameterized using the variable <inline-formula><mml:math id="M90" display="inline"><mml:mrow><mml:mi>Q</mml:mi><mml:mo>=</mml:mo><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mo>(</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:mo>(</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. Note that we have dropped the ion charges in the notation of the equations.</p>
      <p id="d2e2379">This parameterisation ensures that the site fractions on each of the individual sites are inherently normalized to 1. Two other types of constraint might be built into the parameterisation in a more complex example: (i) charge balance: if variably-charged ions were mixing, charge balance would be maintained during compositional change, and (ii) equidistribution: the xeos might be simplified by equating two site fractions, typically involving minor elements. The resulting set of composition and order variables is an independent set, that fully and uniquely describes the site occupancies at a given composition and state of order, subject to physical constraints arising from the lattice structure of the mineral. The relationship between the number of composition and order variables and the number of site fractions is then given by:

            <disp-formula id="Ch1.E16" content-type="numbered"><label>16</label><mml:math id="M91" display="block"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi mathvariant="normal">sf</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:msub><mml:mi mathvariant="normal">eq</mml:mi><mml:mi mathvariant="normal">norm</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:msub><mml:mi mathvariant="normal">eq</mml:mi><mml:mi mathvariant="normal">cb</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:msub><mml:mi mathvariant="normal">eq</mml:mi><mml:mi mathvariant="normal">edist</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          with <inline-formula><mml:math id="M92" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi mathvariant="normal">sf</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> the number of site fractions, <inline-formula><mml:math id="M93" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> the number of compositional and order variables, <inline-formula><mml:math id="M94" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:msub><mml:mi mathvariant="normal">eq</mml:mi><mml:mi mathvariant="normal">norm</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> the number of constraints arising from the normalization of site fractions on a given site to 1, <inline-formula><mml:math id="M95" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:msub><mml:mi mathvariant="normal">eq</mml:mi><mml:mi mathvariant="normal">cb</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> the number of charge balance equations, equal to 0 or 1, and <inline-formula><mml:math id="M96" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:msub><mml:mi mathvariant="normal">eq</mml:mi><mml:mi mathvariant="normal">edist</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> the number of equidistribution constraints imposed. Collectively, the normalized charge balance and equidistribution constraints form a set of linear equalities among the site fractions.</p>
      <p id="d2e2512">In the revised implementation, we retrieve the set of equality constraints <inline-formula><mml:math id="M97" display="inline"><mml:mrow><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">b</mml:mi></mml:mrow></mml:math></inline-formula>  for olivine from the site fractions <inline-formula><mml:math id="M98" display="inline"><mml:mrow><mml:msubsup><mml:mtext mathvariant="bold">X</mml:mtext><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Ca</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>,  and compositional and order variables <inline-formula><mml:math id="M99" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>c</mml:mi><mml:mo>,</mml:mo><mml:mi>Q</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> as follows. We first take the partial derivatives of site fractions as functions of the compositional and order variables as:

            <disp-formula id="Ch1.E17" content-type="numbered"><label>17</label><mml:math id="M100" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msubsup><mml:mtext mathvariant="bold">X</mml:mtext><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mfenced close="]" open="["><mml:mtable class="matrix" columnalign="center center center" framespacing="0em"><mml:mtr><mml:mtd><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mtd><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd><mml:mtd><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mi>c</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>c</mml:mi></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>-</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:mtd><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd></mml:mtr></mml:mtable></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M101" display="inline"><mml:mrow><mml:msubsup><mml:mtext mathvariant="bold">X</mml:mtext><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is the site fraction of the element <inline-formula><mml:math id="M102" display="inline"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> that appears on site <inline-formula><mml:math id="M103" display="inline"><mml:mi>s</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M104" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> the set of compositional and order variables <inline-formula><mml:math id="M105" display="inline"><mml:mrow><mml:mi>c</mml:mi><mml:mi>v</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M106" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M107" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula> the compositional and order variables of olivine as defined in <xref ref-type="bibr" rid="bib1.bibx14" id="text.39"/>. Next, we compute the matrix of site mixing coefficients <bold>A</bold> using symbolic expressions as

            <disp-formula id="Ch1.E18" content-type="numbered"><label>18</label><mml:math id="M108" display="block"><mml:mrow><mml:mtext mathvariant="bold">A</mml:mtext><mml:mo>=</mml:mo><mml:mi mathvariant="normal">Null</mml:mi><mml:mo mathsize="2.5em">(</mml:mo><mml:mo mathsize="1.5em">(</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mtext mathvariant="bold">X</mml:mtext><mml:mi>e</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mo mathsize="1.5em">)</mml:mo><mml:mi>T</mml:mi></mml:msup><mml:mo mathsize="2.5em">)</mml:mo><mml:mo>=</mml:mo><mml:mfenced close="]" open="["><mml:mtable class="matrix" columnalign="center center center center center" framespacing="0em"><mml:mtr><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">0</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd><mml:mtd><mml:mn mathvariant="normal">1</mml:mn></mml:mtd></mml:mtr></mml:mtable></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M109" display="inline"><mml:mi mathvariant="normal">Null</mml:mi></mml:math></inline-formula> stands for the null space. We then establish the vector of constraints <inline-formula><mml:math id="M110" display="inline"><mml:mi mathvariant="bold-italic">b</mml:mi></mml:math></inline-formula> as

            <disp-formula id="Ch1.E19" content-type="numbered"><label>19</label><mml:math id="M111" display="block"><mml:mrow><mml:mi mathvariant="bold-italic">b</mml:mi><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo mathvariant="italic">}</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          which ensures that the sum of the site fractions of mixing sites <inline-formula><mml:math id="M112" display="inline"><mml:mrow><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M113" display="inline"><mml:mrow><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> equal unity. Subsequently, given <inline-formula><mml:math id="M114" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:msubsup><mml:mtext mathvariant="bold">X</mml:mtext><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> and by linearizing <inline-formula><mml:math id="M115" display="inline"><mml:mrow><mml:mtext mathvariant="bold">A</mml:mtext><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">b</mml:mi></mml:mrow></mml:math></inline-formula>  we can return the set of linear equalities on the olivine site fractions, which comprises two site normalization expressions:

            <disp-formula id="Ch1.E20" content-type="numbered"><label>20</label><mml:math id="M116" display="block"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>×</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>×</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1.0</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          and

            <disp-formula id="Ch1.E21" content-type="numbered"><label>21</label><mml:math id="M117" display="block"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>×</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>×</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Fe</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>×</mml:mo><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Ca</mml:mi><mml:mrow><mml:mi mathvariant="normal">M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1.0</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

          Note that, for more complex activity-composition models, and depending on the arbitrary order in which the site fractions are listed, the nullspace operation may not yield expressions that clearly represent the site normalization, charge balance, and equidistribution constraints. However, it will always produce an independent set of linear equalities whose total number is equal to the sum of the number of site normalization constraints, the number of charge balance constraints, and the number of equidistribution constraints. These equalities are mathematically equivalent to the original constraints and can be linearly recombined to recover their straightforward forms.</p>
      <p id="d2e3124">In the implementation of <xref ref-type="bibr" rid="bib1.bibx35" id="text.40"/>, MAGEMin solved for the equilibrium composition and state of order of a phase in terms of the variables <inline-formula><mml:math id="M118" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, subject to the constraint that the values of site fractions should be <inline-formula><mml:math id="M119" display="inline"><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>. To eliminate the site fraction inequalities from the implementation, we now wish to solve directly for the site fractions, while subjecting them to the equality constraints obtained via the nullspace operation. The resulting problem can be expressed as

            <disp-formula id="Ch1.E22" content-type="numbered"><label>22</label><mml:math id="M120" display="block"><mml:mrow><mml:mi mathvariant="normal">min</mml:mi><mml:mspace width="0.33em" linebreak="nobreak"/><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          subject to

            <disp-formula id="Ch1.E23" content-type="numbered"><label>23</label><mml:math id="M121" display="block"><mml:mrow><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">b</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M122" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> represent the <inline-formula><mml:math id="M123" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> site-fractions and <inline-formula><mml:math id="M124" display="inline"><mml:mrow><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">b</mml:mi></mml:mrow></mml:math></inline-formula> is the set of <inline-formula><mml:math id="M125" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> equality constraints (Eq. <xref ref-type="disp-formula" rid="Ch1.E18"/>). The linear equality constraints can now be eliminated from the problem, reducing the number of variables solved for back to the number of composition and ordering variables. This is accomplished by parameterizing the feasible set of the constraint equation <inline-formula><mml:math id="M126" display="inline"><mml:mrow><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">b</mml:mi></mml:mrow></mml:math></inline-formula> using a particular solution <inline-formula><mml:math id="M127" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> and a matrix <inline-formula><mml:math id="M128" display="inline"><mml:mrow><mml:mi mathvariant="bold">N</mml:mi><mml:mi mathvariant="bold-italic">z</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>×</mml:mo><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>p</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> that spans the nullspace of <inline-formula><mml:math id="M129" display="inline"><mml:mi mathvariant="bold">A</mml:mi></mml:math></inline-formula>, such that:

            <disp-formula id="Ch1.E24" content-type="numbered"><label>24</label><mml:math id="M130" display="block"><mml:mrow><mml:mo mathsize="1.5em" mathvariant="italic">{</mml:mo><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mspace linebreak="nobreak" width="0.33em"/><mml:mo>|</mml:mo><mml:mspace linebreak="nobreak" width="0.33em"/><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">b</mml:mi><mml:mo mathvariant="italic" mathsize="1.5em">}</mml:mo><mml:mo>=</mml:mo><mml:mo mathvariant="italic" mathsize="1.5em">{</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mo>+</mml:mo><mml:mi mathvariant="bold">N</mml:mi><mml:mi mathvariant="bold-italic">z</mml:mi><mml:mspace linebreak="nobreak" width="0.33em"/><mml:mo>|</mml:mo><mml:mspace width="0.33em" linebreak="nobreak"/><mml:mi mathvariant="bold-italic">z</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mi>p</mml:mi></mml:mrow></mml:msup><mml:mo mathvariant="italic" mathsize="1.5em">}</mml:mo><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

          This parameterization can be obtained by performing a full QR decomposition of the constraint matrix <inline-formula><mml:math id="M131" display="inline"><mml:mi mathvariant="bold">A</mml:mi></mml:math></inline-formula>, written as:

            <disp-formula id="Ch1.E25" content-type="numbered"><label>25</label><mml:math id="M132" display="block"><mml:mrow><mml:mi mathvariant="bold">A</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold">Q</mml:mi><mml:mfenced close="]" open="["><mml:mtable class="matrix" columnalign="center" framespacing="0em"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="bold">R</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mn mathvariant="bold">0</mml:mn></mml:mtd></mml:mtr></mml:mtable></mml:mfenced><mml:mo>=</mml:mo><mml:mfenced close="]" open="["><mml:mtable class="matrix" columnalign="center" framespacing="0em"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="bold">Q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mspace linebreak="nobreak" width="0.33em"/><mml:msub><mml:mi mathvariant="bold">Q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mfenced><mml:mfenced open="[" close="]"><mml:mtable class="matrix" columnalign="center" framespacing="0em"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="bold">R</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mn mathvariant="bold">0</mml:mn></mml:mtd></mml:mtr></mml:mtable></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M133" display="inline"><mml:mrow><mml:mi mathvariant="bold">Q</mml:mi><mml:mo>∈</mml:mo><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>×</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> is an orthogonal matrix whose columns <inline-formula><mml:math id="M134" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">q</mml:mi><mml:mi>m</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> form an orthonormal basis for <inline-formula><mml:math id="M135" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="double-struck">R</mml:mi><mml:mi>m</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>. These columns are typically grouped into two blocks: <inline-formula><mml:math id="M136" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">Q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, which contains the first <inline-formula><mml:math id="M137" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> columns and spans the image (row space) of <inline-formula><mml:math id="M138" display="inline"><mml:mi mathvariant="bold">A</mml:mi></mml:math></inline-formula>, and <inline-formula><mml:math id="M139" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">Q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, which contains the remaining <inline-formula><mml:math id="M140" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>-</mml:mo><mml:mi>p</mml:mi></mml:mrow></mml:math></inline-formula> columns and spans the nullspace of <inline-formula><mml:math id="M141" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold">A</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>. With this decomposition, the set of solutions to the linear equality constraints can be written as:

            <disp-formula id="Ch1.E26" content-type="numbered"><label>26</label><mml:math id="M142" display="block"><mml:mrow><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">Q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:msubsup><mml:mi mathvariant="bold">R</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi>T</mml:mi></mml:msubsup><mml:mi mathvariant="bold-italic">b</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold">Q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mi>z</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M143" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">Q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:msubsup><mml:mi mathvariant="bold">R</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi>T</mml:mi></mml:msubsup><mml:mi mathvariant="bold">b</mml:mi></mml:mrow></mml:math></inline-formula> is a particular solution to <inline-formula><mml:math id="M144" display="inline"><mml:mrow><mml:mi mathvariant="bold">A</mml:mi><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">b</mml:mi></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M145" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">Q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mi>z</mml:mi></mml:mrow></mml:math></inline-formula> is any vector in the nullspace of <inline-formula><mml:math id="M146" display="inline"><mml:mi mathvariant="bold">A</mml:mi></mml:math></inline-formula>.</p>
      <p id="d2e3635">In other words, the use of the null space of <inline-formula><mml:math id="M147" display="inline"><mml:mi mathvariant="bold">A</mml:mi></mml:math></inline-formula> (<inline-formula><mml:math id="M148" display="inline"><mml:mrow><mml:mi mathvariant="bold">N</mml:mi><mml:mi mathvariant="bold-italic">z</mml:mi></mml:mrow></mml:math></inline-formula>) parameterizes the space such that for any step <inline-formula><mml:math id="M149" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>z</mml:mi></mml:mrow></mml:math></inline-formula>,  <inline-formula><mml:math id="M150" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mo>+</mml:mo><mml:mi mathvariant="bold">N</mml:mi><mml:mi mathvariant="bold-italic">z</mml:mi><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>z</mml:mi></mml:mrow></mml:math></inline-formula> remains in the feasible domain.</p>
      <p id="d2e3686">Using the elimination method, Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>) becomes

            <disp-formula id="Ch1.E27" content-type="numbered"><label>27</label><mml:math id="M151" display="block"><mml:mrow><mml:mi mathvariant="normal">min</mml:mi><mml:mspace width="0.33em" linebreak="nobreak"/><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="bold">X</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:msub><mml:mi>p</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          and the parameterized first derivative becomes

            <disp-formula id="Ch1.E28" content-type="numbered"><label>28</label><mml:math id="M152" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">x</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">z</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:msubsup><mml:mi mathvariant="bold">X</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">z</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">N</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo mathsize="2.5em">(</mml:mo><mml:mo mathsize="2.5em">(</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="italic">λ</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">x</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mo mathsize="2.5em">)</mml:mo><mml:mi>T</mml:mi></mml:msup><mml:msub><mml:mi mathvariant="bold">N</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:msup><mml:mo mathsize="2.5em">)</mml:mo><mml:mi>T</mml:mi></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M153" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold">X</mml:mi><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is the site fraction of the element <inline-formula><mml:math id="M154" display="inline"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> that appears on site <inline-formula><mml:math id="M155" display="inline"><mml:mi>s</mml:mi></mml:math></inline-formula>. Equation (<xref ref-type="disp-formula" rid="Ch1.E27"/>) is then minimized using the gradient information given by Eq. (<xref ref-type="disp-formula" rid="Ch1.E28"/>) and the methods presented below.</p>
</sec>
<sec id="Ch1.S2.SS3">
  <label>2.3</label><title>Gradient-type iterative methods</title>
      <p id="d2e3943">Given a bound-constrained optimization problem:

            <disp-formula id="Ch1.E29" content-type="numbered"><label>29</label><mml:math id="M156" display="block"><mml:mtable columnspacing="1em" class="aligned" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo movablelimits="false">min⁡</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mtext>subject to </mml:mtext></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>&gt;</mml:mo><mml:mi mathvariant="italic">ϵ</mml:mi></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

          where <inline-formula><mml:math id="M157" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is twice continuously differentiable, where <inline-formula><mml:math id="M158" display="inline"><mml:mi mathvariant="italic">ϵ</mml:mi></mml:math></inline-formula> is a small number, typically <inline-formula><mml:math id="M159" display="inline"><mml:mrow><mml:mo>≤</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">8</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>. The general gradient-type iterative method to solve this problem is of the form

            <disp-formula id="Ch1.E30" content-type="numbered"><label>30</label><mml:math id="M160" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          for iteration <inline-formula><mml:math id="M161" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M162" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the search direction and <inline-formula><mml:math id="M163" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the step-length. In this study, we compute the step-length using a Wolfe line search <xref ref-type="bibr" rid="bib1.bibx45" id="paren.41"/> such that the inequalities

            <disp-formula id="Ch1.E31" content-type="numbered"><label>31</label><mml:math id="M164" display="block"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>≤</mml:mo><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msubsup><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          and

            <disp-formula id="Ch1.E32" content-type="numbered"><label>32</label><mml:math id="M165" display="block"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>≥</mml:mo><mml:mi mathvariant="italic">σ</mml:mi><mml:msubsup><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          are satisfied, where <inline-formula><mml:math id="M166" display="inline"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>&lt;</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>&lt;</mml:mo><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M167" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the maximum feasible step-length, computed as

            <disp-formula id="Ch1.E33" content-type="numbered"><label>33</label><mml:math id="M168" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mfenced open="{" close=""><mml:mtable class="cases" rowspacing="0.2ex" columnspacing="1em" columnalign="left left" framespacing="0em"><mml:mtr><mml:mtd><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mstyle displaystyle="false"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mi mathvariant="normal">min</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mspace width="0.33em" linebreak="nobreak"/><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi mathvariant="normal">abs</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mfrac></mml:mstyle></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mtext>if any </mml:mtext><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>≤</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mtext>otherwise</mml:mtext><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mfenced></mml:mrow></mml:math></disp-formula>

          The maximum feasible step-length <inline-formula><mml:math id="M169" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> ensures that the values of site-fractions remain <inline-formula><mml:math id="M170" display="inline"><mml:mrow><mml:mo>≥</mml:mo><mml:mi mathvariant="italic">ϵ</mml:mi></mml:mrow></mml:math></inline-formula> and form the bounds of the problem. Iterations are then processed until a stopping criterion is satisfied. Because solution phases are not necessarily convex during global Gibbs energy minimization, we set the stopping criteria using the relative change of the objective function. The stopping criteria is met when

            <disp-formula id="Ch1.E34" content-type="numbered"><label>34</label><mml:math id="M171" display="block"><mml:mrow><mml:mi mathvariant="normal">abs</mml:mi><mml:mo>(</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo><mml:mo>&lt;</mml:mo><mml:mi mathvariant="normal">tol</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M172" display="inline"><mml:mi mathvariant="normal">tol</mml:mi></mml:math></inline-formula> is a small number typically <inline-formula><mml:math id="M173" display="inline"><mml:mrow><mml:mo>≤</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">8</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d2e4436">If the descent direction <inline-formula><mml:math id="M174" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is simply chosen to be <inline-formula><mml:math id="M175" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> we obtain the steepest descent algorithm. However, this approach is known to be prone to oscillation (e.g., <xref ref-type="bibr" rid="bib1.bibx29" id="altparen.42"/>) and slow convergence, and will therefore not be explored. Instead, we test two bound-constrained optimization methods that use the gradient information of the previous iteration(s), namely the conjugate gradient and the Broyden-Fletcher-Goldfarb-Shanno (BFGS) method.</p>
<sec id="Ch1.S2.SS3.SSS1">
  <label>2.3.1</label><title>Conjugate gradient method</title>
      <p id="d2e4480">For the conjugate gradient method, the descent direction is initialized for the first iteration increment <inline-formula><mml:math id="M176" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> as

              <disp-formula id="Ch1.E35" content-type="numbered"><label>35</label><mml:math id="M177" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

            and for increment <inline-formula><mml:math id="M178" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> as

              <disp-formula id="Ch1.E36" content-type="numbered"><label>36</label><mml:math id="M179" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

            Here, <inline-formula><mml:math id="M180" display="inline"><mml:mrow><mml:msub><mml:mi>g</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the gradient <inline-formula><mml:math id="M181" display="inline"><mml:mrow><mml:mi>g</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> of function <inline-formula><mml:math id="M182" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> at point <inline-formula><mml:math id="M183" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M184" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the conjugate gradient update parameter. Variants of the conjugate gradient method are defined by using different update parameters <inline-formula><mml:math id="M185" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> (see for example <xref ref-type="bibr" rid="bib1.bibx11 bib1.bibx37 bib1.bibx38" id="altparen.43"/>). Here, we employ the three-term conjugate gradient method presented by <xref ref-type="bibr" rid="bib1.bibx27" id="text.44"/> with the update parameter <inline-formula><mml:math id="M186" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> defined in <xref ref-type="bibr" rid="bib1.bibx38" id="text.45"/>

              <disp-formula id="Ch1.E37" content-type="numbered"><label>37</label><mml:math id="M187" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>‖</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:msup><mml:mo>‖</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

            and further extend the descent direction term as

              <disp-formula id="Ch1.E38" content-type="numbered"><label>38</label><mml:math id="M188" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

            where <inline-formula><mml:math id="M189" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and

              <disp-formula id="Ch1.E39" content-type="numbered"><label>39</label><mml:math id="M190" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mo>‖</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:msup><mml:mo>‖</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

            A useful property of the three-term conjugate gradient method is that the search direction always satisfies the sufficient descent condition without any line search <xref ref-type="bibr" rid="bib1.bibx27" id="paren.46"/>.</p>
      <p id="d2e4888">The descent direction is parameterized to satisfy the equality constraints (Eq. <xref ref-type="disp-formula" rid="Ch1.E18"/>) such as

              <disp-formula id="Ch1.E40" content-type="numbered"><label>40</label><mml:math id="M191" display="block"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi><mml:mi>p</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">N</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold">N</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:msup><mml:mo>)</mml:mo><mml:mi>T</mml:mi></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
</sec>
<sec id="Ch1.S2.SS3.SSS2">
  <label>2.3.2</label><title>BFGS method</title>
      <p id="d2e4941">The Broyden-Fletcher-Goldfarb-Shanno (BFGS) method is a well-known quasi-Newton method for solving unconstrained and bound-constrained optimization problems (see for instance <xref ref-type="bibr" rid="bib1.bibx7 bib1.bibx6" id="altparen.47"/>). The quasi-Newton descent direction is given by

              <disp-formula id="Ch1.E41" content-type="numbered"><label>41</label><mml:math id="M192" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msup><mml:mi mathvariant="bold">B</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

            where <inline-formula><mml:math id="M193" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold">B</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> is the inverse of the Hessian matrix. Here, we approximate <inline-formula><mml:math id="M194" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold">B</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> using the Sherman-Morrison formula <xref ref-type="bibr" rid="bib1.bibx40" id="paren.48"/> such as

              <disp-formula id="Ch1.E42" content-type="numbered"><label>42</label><mml:math id="M195" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msubsup><mml:mi mathvariant="bold">B</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:msubsup><mml:mi mathvariant="bold">B</mml:mi><mml:mi>k</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msubsup><mml:mi mathvariant="bold">B</mml:mi><mml:mi>k</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msubsup><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold">B</mml:mi><mml:mi>k</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msubsup><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:msubsup><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msubsup><mml:mi mathvariant="bold">B</mml:mi><mml:mi>k</mml:mi><mml:mo>-</mml:mo></mml:msubsup><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:msubsup><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

            where <inline-formula><mml:math id="M196" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">x</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M197" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">y</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">g</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M198" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold">B</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> is initialized with the identity matrix.</p>
      <p id="d2e5277">Because of the relatively low dimensionality of the solution phase model (<inline-formula><mml:math id="M199" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula>) we do not consider the limited-memory BFGS method (L-BFGS) and instead update <inline-formula><mml:math id="M200" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold">B</mml:mi><mml:mi>k</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> (Eq. <xref ref-type="disp-formula" rid="Ch1.E42"/>) during every iteration. Once the problem has converged (i.e., Eq. <xref ref-type="disp-formula" rid="Ch1.E34"/> is satisfied),  we reset the Hessian matrix inverse <inline-formula><mml:math id="M201" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">B</mml:mi><mml:mrow><mml:msup><mml:mi>k</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> to the identity matrix and perform additional iteration(s). This ensures that the problem converges to its local minimum in the event the quality of the approximate Hessian matrix inverse <inline-formula><mml:math id="M202" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">B</mml:mi><mml:mrow><mml:msup><mml:mi>k</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is degraded.</p>
      <p id="d2e5347">As for the conjugate gradient method, the descent direction is parameterized to satisfy the equality constraints (Eq. <xref ref-type="disp-formula" rid="Ch1.E18"/>) such as

              <disp-formula id="Ch1.E43" content-type="numbered"><label>43</label><mml:math id="M203" display="block"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi><mml:mi>p</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">N</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:msubsup><mml:mi mathvariant="bold-italic">d</mml:mi><mml:mi>k</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi mathvariant="bold">N</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:msup><mml:mo>)</mml:mo><mml:mi>T</mml:mi></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
</sec>
</sec>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>Application</title>
      <p id="d2e5402">In order to test the bound-constrained solution phase formulation, we selected, from the <xref ref-type="bibr" rid="bib1.bibx14" id="text.49"/> set of xeos spaning 11 oxides (Na<sub>2</sub>O-CaO-K<sub>2</sub>O-FeO-MgO-Al<sub>2</sub>O<sub>3</sub>-SiO<sub>2</sub>-H<sub>2</sub>O-TiO<sub>2</sub>-O-Cr<sub>2</sub>O<sub>3</sub>), three solution phases with complex features including high-dimensional composition–order spaces and geologically significant solvi: clinoamphibole (Na<sub>2</sub>O-CaO-K<sub>2</sub>O-FeO-MgO-Al<sub>2</sub>O<sub>3</sub>-SiO<sub>2</sub>-H<sub>2</sub>O-TiO<sub>2</sub>-O), clinopyroxene (Na<sub>2</sub>O-CaO-K<sub>2</sub>O-FeO-MgO-Al<sub>2</sub>O<sub>3</sub>-SiO<sub>2</sub>-TiO<sub>2</sub>-O-Cr<sub>2</sub>O<sub>3</sub>) and spinel (FeO-MgO-Al<sub>2</sub>O<sub>3</sub>-TiO<sub>2</sub>-O-Cr<sub>2</sub>O<sub>3</sub>) (Table <xref ref-type="table" rid="T1"/>). We use as starting points the set of feasible points of each discretized solution phase. Discretization of the solution phases is achieved using a compositional variable step of 0.25 which yielded 5498, 4124 and 1521 feasible starting points (or pseudocompounds) for clino-amphibole, clinopyroxene and spinel, respectively. Because gradient-based minimization of solution phase models is achieved with respect to a given Gibbs hyperplane <xref ref-type="bibr" rid="bib1.bibx4 bib1.bibx5 bib1.bibx47 bib1.bibx35" id="paren.50"/>, we first compute the phase equilibrium at a given pressure, temperature and bulk-rock composition to retrieve the global minimum Gibbs hyperplane using MAGEMin (Table <xref ref-type="table" rid="T1"/>). Although any other arbitrary Gibbs hyperplane can be used for this test, we choose a global minimum hyperplane in order to explore a known spinel solvus,  All computations were performed on a Linux (x86_64-linux-gnu) operating system, utilizing a 6-core 11th Gen Intel(R) Core(TM) i5-11400H CPU running at 2.70 GHz.</p>

<table-wrap id="T1" specific-use="star"><label>Table 1</label><caption><p id="d2e5684">Solution phase models parameters.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="5">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="left"/>
     <oasis:colspec colnum="4" colname="col4" align="left"/>
     <oasis:colspec colnum="5" colname="col5" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Tested phase</oasis:entry>
         <oasis:entry colname="col2">clino-amphibole</oasis:entry>
         <oasis:entry colname="col3">clinopyroxene</oasis:entry>
         <oasis:entry colname="col4">spinel</oasis:entry>
         <oasis:entry colname="col5">spinel solvus</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">Pressure [kbar]</oasis:entry>
         <oasis:entry colname="col2">5.0</oasis:entry>
         <oasis:entry colname="col3">12.0</oasis:entry>
         <oasis:entry colname="col4">12.0</oasis:entry>
         <oasis:entry colname="col5">3.26</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Temperature [K]</oasis:entry>
         <oasis:entry colname="col2">923.15</oasis:entry>
         <oasis:entry colname="col3">1323.15</oasis:entry>
         <oasis:entry colname="col4">1323.15</oasis:entry>
         <oasis:entry colname="col5">1179.4</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Number of points</oasis:entry>
         <oasis:entry colname="col2">4950</oasis:entry>
         <oasis:entry colname="col3">4121</oasis:entry>
         <oasis:entry colname="col4">1521</oasis:entry>
         <oasis:entry colname="col5">1521</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Tested methods</oasis:entry>
         <oasis:entry colname="col2">CCSAQ, SLSQP, CG, BFGS</oasis:entry>
         <oasis:entry colname="col3">CCSAQ, SLSQP, CG, BFGS</oasis:entry>
         <oasis:entry colname="col4">CCSAQ, SLSQP, CG, BFGS</oasis:entry>
         <oasis:entry colname="col5">BFGS</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Number of dimensions</oasis:entry>
         <oasis:entry colname="col2">17</oasis:entry>
         <oasis:entry colname="col3">13</oasis:entry>
         <oasis:entry colname="col4">10</oasis:entry>
         <oasis:entry colname="col5">10</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Oxides</oasis:entry>
         <oasis:entry namest="col2" nameend="col5" align="center">Reference Gibbs hyperplane [J] </oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M233" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">SiO</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M234" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>960.9655</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M235" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1011.909631</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M236" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1011.909631</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M237" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1001.730935</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M238" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Al</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:msub><mml:mi mathvariant="normal">O</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M239" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1768.2476</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M240" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1829.092564</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M241" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1829.092564</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M242" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1818.611331</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M243" display="inline"><mml:mi mathvariant="normal">CaO</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M244" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>788.4474</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M245" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>819.264126</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M246" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>819.264126</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M247" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>812.972365</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M248" display="inline"><mml:mi mathvariant="normal">MgO</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M249" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>678.9683</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M250" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>695.467358</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M251" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>695.467358</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M252" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>689.113013</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M253" display="inline"><mml:mi mathvariant="normal">FeO</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M254" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>355.2975</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M255" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>412.948568</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M256" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>412.948568</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M257" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>396.911228</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M258" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">K</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mi mathvariant="normal">O</mml:mi></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M259" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>914.9708</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M260" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>971.890270</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M261" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>971.890270</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M262" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>966.511310</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M263" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Na</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mi mathvariant="normal">O</mml:mi></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M264" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>839.9561</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M265" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>876.544354</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M266" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>876.544354</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M267" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>882.719670</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M268" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">TiO</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M269" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1008.3630</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M270" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1073.640927</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M271" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1073.640927</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M272" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1045.994137</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M273" display="inline"><mml:mi mathvariant="normal">O</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M274" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>263.7269</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M275" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>276.590707</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M276" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>276.590707</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M277" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>249.181839</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M278" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Cr</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:msub><mml:mi mathvariant="normal">O</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M279" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1262.6087</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M280" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1380.299631</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M281" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1380.299631</oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M282" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>1332.815844</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M283" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">H</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mi mathvariant="normal">O</mml:mi></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M284" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>368.4674</oasis:entry>
         <oasis:entry colname="col3">–</oasis:entry>
         <oasis:entry colname="col4">–</oasis:entry>
         <oasis:entry colname="col5">–</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p id="d2e6371">The performance and reliability of the bound-constrained formulations are tested against the inequality constrained formulations using the Sequential Least-Squares Quadratic Programming (SLSQP) <xref ref-type="bibr" rid="bib1.bibx24 bib1.bibx25" id="paren.51"/> and Conservative Convex Separable Approximation with Quadratic penalty (CCSAQ) methods <xref ref-type="bibr" rid="bib1.bibx42" id="paren.52"/>. The minimizations using the SLSQP and CCSAQ methods were computed using the C implementation of NLopt <xref ref-type="bibr" rid="bib1.bibx16" id="paren.53"/> through MAGEMin as described in <xref ref-type="bibr" rid="bib1.bibx35" id="text.54"/> and in the scripts provided in Supplement. Because the algorithms explored in this study (Julia implementation of CG and BFGS methods) exhibited similar accuracy with residual <inline-formula><mml:math id="M285" display="inline"><mml:mrow><mml:mo>≤</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">13</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, the differences in algorithm accuracy are not discussed. Here, a minimization is considered successful when the norm of the distance to the solution is <inline-formula><mml:math id="M286" display="inline"><mml:mrow><mml:mo>≤</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="Ch1.S4" sec-type="conclusions">
  <label>4</label><title>Discussion</title>
<sec id="Ch1.S4.SS1">
  <label>4.1</label><title>Algorithms performance and reliability</title>
      <p id="d2e6434">The box plots depicted in Fig. <xref ref-type="fig" rid="F2"/> illustrate that the performance of the unconstrained CG method is comparable to that of the inequality-constrained CCSAQ method (implemented via NLopt). While the CG method outperforms CCSAQ for amphibole, with minimization times of  <inline-formula><mml:math id="M287" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 2100 <inline-formula><mml:math id="M288" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s versus <inline-formula><mml:math id="M289" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 4200 <inline-formula><mml:math id="M290" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s, respectively, the efficiency of CCSAQ is larger for problems with lower dimensionality, such as clinopyroxene and spinel. The SLSQP method demonstrates superior efficiency, with average minimization times of <inline-formula><mml:math id="M291" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 340 <inline-formula><mml:math id="M292" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for amphibole, <inline-formula><mml:math id="M293" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 270 <inline-formula><mml:math id="M294" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for clinopyroxene, and <inline-formula><mml:math id="M295" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 120 <inline-formula><mml:math id="M296" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for spinel. However, the BFGS algorithm outperforms SLSQP, achieving average minimization times of <inline-formula><mml:math id="M297" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 220 <inline-formula><mml:math id="M298" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for amphibole, 180 <inline-formula><mml:math id="M299" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for clinopyroxene, and <inline-formula><mml:math id="M300" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 100 <inline-formula><mml:math id="M301" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for spinel; a performance increase of 20 % to 50 %. Additionally, the BFGS method's convergence requires between 25 to 90 iterations across different solution phase models, as indicated in Fig. <xref ref-type="fig" rid="F3"/>. Notably, the minimum time per iteration is influenced by the dimensionality of the solution phase model, ranging from <inline-formula><mml:math id="M302" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 4.0 <inline-formula><mml:math id="M303" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s per iteration for clino-amphibole to <inline-formula><mml:math id="M304" display="inline"><mml:mo>∼</mml:mo></mml:math></inline-formula> 2.1 <inline-formula><mml:math id="M305" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for spinel (Fig. <xref ref-type="fig" rid="F3"/> and Table <xref ref-type="table" rid="T1"/>).</p>

      <fig id="F2" specific-use="star"><label>Figure 2</label><caption><p id="d2e6593">Minimization time box plot for tested solution phases and optimization methods. SLSQP, Sequential Least-Squares Quadratic Programming (supporting both inequality and equality constraints); CCSAQ, Conservative Convex Separable Approximation with Quadratic penalty; CG, conjugate gradiend; BFGS, Broyden-Fletcher-Goldfarb-Shanno. 5498, 4124 and 1521 starting points for clino-amphibole, clinopyroxene and spinel, respectively. Starting points were generated by evenly sampling the entire feasible space following the method presented in <xref ref-type="bibr" rid="bib1.bibx35" id="text.55"/>. The numbers below the boxes show the number of successful minimizations over the total number of tested points.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025-f02.png"/>

        </fig>

      <fig id="F3"><label>Figure 3</label><caption><p id="d2e6607">Number of iterations versus minimization time for the BFGS method. The red lines show the minimum minimization time per iteration.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025-f03.png"/>

        </fig>

      <p id="d2e6617">Although the average minimization time is a good indicator of the raw performance of the algorithms, reliability of the solvers is of key importance when computing phase equilibria. In this light, we find that the bound-constrained algorithms (CG and BFGS) are far superior to the inequality constraints ones (CCSAQ and SLSQP). For instance, the bound-constrained methods (BFGS and CG) successfully minimize 100 % of the tested starting points (Fig. <xref ref-type="fig" rid="F2"/>) while the inequality constraints methods show a significant amount of unsuccessful minimization reaching up to 50 % in some cases e.g., clino-amphibole minimization using SLSQP or spinel using CCSAQ (Fig. <xref ref-type="fig" rid="F2"/>). The unsuccessful minimizations are related to violated inequality constraints and the inability for the algorithms (SLSQP and CCSAQ) to go back to the feasible domain.</p>
      <p id="d2e6624">Finally, we tested the BFGS algorithm for an equilibrium between two phases separated by a solvus i.e., an objective function containing more than one local minimum. The parameters of the test are given in Table <xref ref-type="table" rid="T1"/> (spinel solvus) and the results are shown in Fig. <xref ref-type="fig" rid="F4"/>. The bound-constrained formulation and the BFGS method perfectly captures the solvus with consistent minimization time similar to those shown in Fig. <xref ref-type="fig" rid="F2"/>.</p>

      <fig id="F4"><label>Figure 4</label><caption><p id="d2e6635">Minimization paths for an example of spinel solvus. The spinel solvus has been computed using the Gibbs hyperplane provided in Table <xref ref-type="table" rid="T1"/> which was computed using MAGEMin. Black dots, starting point in the <inline-formula><mml:math id="M306" display="inline"><mml:mrow><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Cr</mml:mi><mml:mi>M</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M307" display="inline"><mml:mrow><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Mg</mml:mi><mml:mi>T</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M308" display="inline"><mml:mrow><mml:msubsup><mml:mi>X</mml:mi><mml:mi mathvariant="normal">Ti</mml:mi><mml:mi>M</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> site fraction sub-system; yellow circles with black outline, local minimum of the solvus; red and blue lines, minimization paths from starting point to local minimum. Note that the diagram only displays a 3D sub-system of the full 10D system. </p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025-f04.png"/>

        </fig>

</sec>
<sec id="Ch1.S4.SS2">
  <label>4.2</label><title>Minimization of perturbed systems</title>
      <p id="d2e6693">Minimization from discretized starting points allows quantification and comparison of the raw performance and stability of the algorithms (CG, BFGS and CCSAQ, see Fig. <xref ref-type="fig" rid="F2"/>). However, a phase equilibrium calculation employing gradient-based methods generally involves finding a new local minimum under slightly to moderately perturbed conditions between global iterations <xref ref-type="bibr" rid="bib1.bibx5 bib1.bibx35" id="paren.56"/> i.e., that the distance between the starting point and the ending point during local minimization of individual phases is small. A measure of this distance can be calculated as the variation of the norm of the Gibbs hyperplane: <inline-formula><mml:math id="M309" display="inline"><mml:mrow><mml:mo>‖</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi><mml:msubsup><mml:mo>‖</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M310" display="inline"><mml:mi mathvariant="normal">Γ</mml:mi></mml:math></inline-formula> is the chemical potential of the pure components of the system (oxides in our case, Table <xref ref-type="table" rid="T1"/>). In order to test the performance of the SLSQP and BFGS methods under small perturbations, we use as starting points the minima obtained by tests 1 to 3 and apply a perturbation to the Gibbs hyperplane (Table <xref ref-type="table" rid="T1"/>). The perturbation is set by applying a random rotation to the objective function which shifts the local minimum from its current position. We explore the effect of such perturbation by computing 10 000 random rotations per solution phase yielding a range of chemical potential <inline-formula><mml:math id="M311" display="inline"><mml:mrow><mml:mo>‖</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi><mml:msubsup><mml:mo>‖</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:math></inline-formula> varying from 0.0 to ca. 60.0. The results of the minimizations of the rotated systems are presented in Fig. <xref ref-type="fig" rid="F5"/>a–c.</p>

      <fig id="F5" specific-use="star"><label>Figure 5</label><caption><p id="d2e6755">Minimization time for perturbed systems. <bold>(a–c)</bold> SLSQP algorithm applied to clino-amphibole, clinopyroxene and spinel, respectively. <bold>(d–f)</bold> BFGS algorithm applied to clino-amphibole, clinopyroxene and spinel, respectively. <inline-formula><mml:math id="M312" display="inline"><mml:mrow><mml:mo>‖</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi><mml:msubsup><mml:mo>‖</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:math></inline-formula> is a measure of the distance between the starting guess and the solution. Note that the inequality constrained SLSQP method does not show any correlation between the distance to solution and the minimization. The BFGS method, instead, exhibits a clear trend of decreasing minimization for smaller distances to solution.</p></caption>
          <graphic xlink:href="https://gmd.copernicus.org/articles/18/6951/2025/gmd-18-6951-2025-f05.png"/>

        </fig>

      <p id="d2e6789">For perturbed conditions, we find that the minimization time of the SLSQP algorithm does not scale with the norm of the perturbation (<inline-formula><mml:math id="M313" display="inline"><mml:mrow><mml:mo>‖</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi><mml:msubsup><mml:mo>‖</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:math></inline-formula>) (Fig. <xref ref-type="fig" rid="F5"/>a, b, c). This relationship is independent of the tested solution phase model (Fig. <xref ref-type="fig" rid="F5"/>a–c). Instead, for the BFGS algorithm, the minimization time scales with the norm of the perturbation (Fig. <xref ref-type="fig" rid="F5"/>d–f). For a <inline-formula><mml:math id="M314" display="inline"><mml:mrow><mml:mo>‖</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi><mml:msubsup><mml:mo>‖</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">10.0</mml:mn></mml:mrow></mml:math></inline-formula> the minimization time is divided by a factor of ca. 2.0 to 3.0 with respect to the mean raw minimization time (Fig. <xref ref-type="fig" rid="F2"/>) resulting in an average time of 70–80 <inline-formula><mml:math id="M315" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for clino-amphibole, 50–60 <inline-formula><mml:math id="M316" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for clinopyroxene and 30–40 <inline-formula><mml:math id="M317" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for spinel.</p>
      <p id="d2e6868">We propose a revised xeos implementation using a nullspace approach, that allows using bound-constrained, rather than inequality-constrained, gradient-based optimisation methods.  We tested the performance and computational reliability of different algorithms and find that the BFGS method yields the best performance, decreasing the minimization time of individual solution phases by a factor <inline-formula><mml:math id="M318" display="inline"><mml:mrow><mml:mo>≥</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> compared to CG and CCSAQ methods and by a factor of 1.5 to 2.0 with respect to the SLSQP method (Fig. <xref ref-type="fig" rid="F2"/>). Under slight perturbations, the minimization time is further decreased by a factor of 2.0 reaching down to <inline-formula><mml:math id="M319" display="inline"><mml:mo>≤</mml:mo></mml:math></inline-formula> 100 <inline-formula><mml:math id="M320" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for clino-amphibole, <inline-formula><mml:math id="M321" display="inline"><mml:mo>≤</mml:mo></mml:math></inline-formula> 80 <inline-formula><mml:math id="M322" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for clinopyroxene and <inline-formula><mml:math id="M323" display="inline"><mml:mo>≤</mml:mo></mml:math></inline-formula> 50 <inline-formula><mml:math id="M324" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">µ</mml:mi></mml:mrow></mml:math></inline-formula>s for spinel.</p>
      <p id="d2e6929">Regarding computational reliability, bound-constrained optimization methods(such as CG and BFGS), are clearly preferable over methods with inequality constraints (CCSAQ and SLSQP), which exhibit a considerable proportion of unsuccessful minimizations.</p>
      <p id="d2e6932">Using an bound-constrained nullspace formulation and the BFGS method, can therefore significantly improve the performance of stable phase calculations. Given that in MAGEMin, <inline-formula><mml:math id="M325" display="inline"><mml:mo>≥</mml:mo></mml:math></inline-formula> 75 % of the computational load is dedicated to local minimization of solution phase models, we estimate a general speed-up of stable phase equilibrium prediction by a factor <inline-formula><mml:math id="M326" display="inline"><mml:mo>≥</mml:mo></mml:math></inline-formula> 5. Such improvement can potentially opens up the possibility of performing 2D reactive models fluid/magma transport.</p>
</sec>
</sec>

      
      </body>
    <back><notes notes-type="codedataavailability"><title>Code and data availability</title>

      <p id="d2e6956">All the Julia scripts and data necessary to reproduce the results and figures of this contribution are provided on Zenodo (<ext-link xlink:href="https://doi.org/10.5281/zenodo.13982544" ext-link-type="DOI">10.5281/zenodo.13982544</ext-link>, <xref ref-type="bibr" rid="bib1.bibx36" id="altparen.57"/>) and GitHub on <uri>https://github.com/ComputationalThermodynamics/SandBox</uri> (last access: 30 July 2024).</p>
  </notes><app-group>
        <supplementary-material position="anchor"><p id="d2e6968">The supplement related to this article is available online at <inline-supplementary-material xlink:href="https://doi.org/10.5194/gmd-18-6951-2025-supplement" xlink:title="zip">https://doi.org/10.5194/gmd-18-6951-2025-supplement</inline-supplementary-material>.</p></supplementary-material>
        </app-group><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d2e6977">NR developed and implemented the new formulation, made the analysis and wrote the paper. BJPK, EG, AdM, and VM provided technical support and feedback during development. HD did the additional testing and improvement of the code. All authors actively contributed to the project through regular meetings and provided critical feedback. All authors revised the final version of the paper.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d2e6983">At least one of the (co-)authors is a member of the editorial board of <italic>Geoscientific Model Development</italic>. The peer-review process was guided by an independent editor, and the authors also have no other competing interests to declare.</p>
  </notes><notes notes-type="disclaimer"><title>Disclaimer</title>

      <p id="d2e6992">Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors. Also, please note that this paper has not received English language copy-editing. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.</p>
  </notes><ack><title>Acknowledgements</title><p id="d2e6998">We thank the two anonymous reviewers for their helpful and constructive reviews, which greatly improved the quality of this paper.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d2e7003">This study was funded by the European Research Council through the MAGMA project, ERC Consolidator Grant #771143. Nicolas Riel, Boris J. P. Kaus and Evangelos Moulas would also like to acknowledge the German Research Foundation (DFG) – project number 521637679 for financial support.This open-access publication was funded  by Johannes Gutenberg University Mainz.</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

      <p id="d2e7014">This paper was edited by Mauro Cacace and reviewed by two anonymous referees.</p>
  </notes><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><label>Bouilhol et al.(2015)Bouilhol, Magni, van Hunen, and Kaislaniemi</label><mixed-citation> Bouilhol, P., Magni, V., van Hunen, J., and Kaislaniemi, L.: A numerical approach to melting in warm subduction zones, Earth and Planetary Science Letters, 411, 37–44, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx2"><label>Candioti et al.(2024)Candioti, Nathwani, and Chelle-Michou</label><mixed-citation>Candioti, L. G., Nathwani, C. L., and Chelle-Michou, C.: Towards fully-coupled thermodynamic-thermomechanical two-phase flow models of transcrustal magmatic systems, in: EGU General Assembly Conference Abstracts, p. 16936, <ext-link xlink:href="https://doi.org/10.5194/egusphere-egu25-8644" ext-link-type="DOI">10.5194/egusphere-egu25-8644</ext-link>, 2024.</mixed-citation></ref>
      <ref id="bib1.bibx3"><label>Connolly(2005)</label><mixed-citation> Connolly, J. A. D.: Computation of phase equilibria by linear programming: A tool for geodynamic modeling and its application to subduction zone decarbonation, Earth and Planetary Science Letters, 236, 524–541, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx4"><label>de Capitani and Brown(1987)</label><mixed-citation>de Capitani, C. and Brown, T. H.: The computation of chemical equilibrium in complex systems containing non-ideal solutions, Geochimica et Cosmochimica Acta, 51, 2639–2652, <ext-link xlink:href="https://doi.org/10.1016/0016-7037(87)90145-1" ext-link-type="DOI">10.1016/0016-7037(87)90145-1</ext-link>, 1987.</mixed-citation></ref>
      <ref id="bib1.bibx5"><label>de Capitani and Petrakakis(2010)</label><mixed-citation>de Capitani, C. and Petrakakis, K.: The computation of equilibrium assemblage diagrams with Theriak/Domino software, American Mineralogist, 95, 1006–1016, <ext-link xlink:href="https://doi.org/10.2138/am.2010.3354" ext-link-type="DOI">10.2138/am.2010.3354</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx6"><label>Dennis and Schnabel(1996)</label><mixed-citation>Dennis, J. E. and Schnabel, R. B.: Numerical methods for unconstrained optimization and nonlinear equations, SIAM, <ext-link xlink:href="https://doi.org/10.1137/1.9781611971200" ext-link-type="DOI">10.1137/1.9781611971200</ext-link>, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx7"><label>Fletcher(1987)</label><mixed-citation>Fletcher, R.: Practical methods of optimization, John and Sons, Chichester, <ext-link xlink:href="https://doi.org/10.1002/9781118723203" ext-link-type="DOI">10.1002/9781118723203</ext-link>, 1987.</mixed-citation></ref>
      <ref id="bib1.bibx8"><label>Ganguly(2001)</label><mixed-citation> Ganguly, J.: Thermodynamic modelling of solid solutions, EMU Notes in Mineralogy, 3, 37–69, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx9"><label>Ghiorso and Sack(1995)</label><mixed-citation> Ghiorso, M. S. and Sack, R. O.: Chemical mass transfer in magmatic processes IV. A revised and internally consistent thermodynamic model for the interpolation and extrapolation of liquid-solid equilibria in magmatic systems at elevated temperatures and pressures, Contributions to Mineralogy and Petrology, 119, 197–212, 1995.</mixed-citation></ref>
      <ref id="bib1.bibx10"><label>Helgeson(1978)</label><mixed-citation> Helgeson, H. C.: Summary and critique of the thermodynamic properties of rock-forming minerals, American Journal of Science, 278, 1–229, 1978.</mixed-citation></ref>
      <ref id="bib1.bibx11"><label>Hestenes and Stiefel(1952)</label><mixed-citation>Hestenes, M. R. and Stiefel, E.: Methods of conjugate gradients for solving, Journal of research of the National Bureau of Standards, 49, 409–436, <ext-link xlink:href="https://doi.org/10.6028/jres.049.044" ext-link-type="DOI">10.6028/jres.049.044</ext-link>, 1952.</mixed-citation></ref>
      <ref id="bib1.bibx12"><label>Holland and Powell(2003)</label><mixed-citation> Holland, T. and Powell, R.: Activity–composition relations for phases in petrological calculations: an asymmetric multicomponent formulation, Contributions to Mineralogy and Petrology, 145, 492–501, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx13"><label>Holland and Powell(1998)</label><mixed-citation>Holland, T. J. B. and Powell, R.: An internally consistent thermodynamic data set for phases of petrological interest, Journal of Metamorphic Geology, 16, 309–343, <ext-link xlink:href="https://doi.org/10.1111/j.1525-1314.1998.00140.x" ext-link-type="DOI">10.1111/j.1525-1314.1998.00140.x</ext-link>, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx14"><label>Holland et al.(2018)Holland, Green, and Powell</label><mixed-citation> Holland, T. J. B., Green, E. C. R., and Powell, R.: Melting of peridotites through to granites: a simple thermodynamic model in the system KNCFMASHTOCr, Journal of Petrology, 59, 881–900, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx15"><label>Hu et al.(2022)Hu, Jackson, and Blundy</label><mixed-citation>Hu, H., Jackson, M. D., and Blundy, J.: Melting, compaction and reactive flow: Controls on melt fraction and composition change in crustal mush reservoirs, Journal of Petrology, 63, egac097, <ext-link xlink:href="https://doi.org/10.1093/petrology/egac097" ext-link-type="DOI">10.1093/petrology/egac097</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx16"><label>Jackson et al.(2018)Jackson, Blundy, and Sparks</label><mixed-citation> Jackson, M., Blundy, J., and Sparks, R.: Chemical differentiation, cold storage and remobilization of magma in the Earth's crust, Nature, 564, 405–409, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx17"><label>Jackson et al.(2003)Jackson, Cheadle, and Atherton</label><mixed-citation>Jackson, M. D., Cheadle, M. J., and Atherton, M. P.: Quantitative modeling of granitic melt generation and segregation in the continental crust, Journal of Geophysical Research: Solid Earth, 108, <ext-link xlink:href="https://doi.org/10.1029/2001JB001050" ext-link-type="DOI">10.1029/2001JB001050</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx18"><label>Johnson(2021)</label><mixed-citation>Johnson, S. G.: The NLopt nonlinear-optimization package, <ext-link xlink:href="https://doi.org/10.7283/633E-1497" ext-link-type="DOI">10.7283/633E-1497</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx19"><label>Katz et al.(2022)Katz, Jones, Rudge, and Keller</label><mixed-citation>Katz, R. F., Jones, D. W. R., Rudge, J. F., and Keller, T.: Physics of Melt Extraction from the Mantle: Speed and Style, Annual Review of Earth and Planetary Sciences, 50, 507–540, <ext-link xlink:href="https://doi.org/10.1146/annurev-earth-032320-083704" ext-link-type="DOI">10.1146/annurev-earth-032320-083704</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx20"><label>Keller and Katz(2016)</label><mixed-citation>Keller, T. and Katz, R. F.: The Role of Volatiles in Reactive Melt Transport in the Asthenosphere, Journal of Petrology, 57, 1073–1108, <ext-link xlink:href="https://doi.org/10.1093/petrology/egw030" ext-link-type="DOI">10.1093/petrology/egw030</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx21"><label>Keller and Suckale(2019)</label><mixed-citation>Keller, T. and Suckale, J.: A continuum model of multi-phase reactive transport in igneous systems, Geophysical Journal International, 219, 185–222, <ext-link xlink:href="https://doi.org/10.1093/gji/ggz287" ext-link-type="DOI">10.1093/gji/ggz287</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx22"><label>Keller et al.(2013)Keller, May, and Kaus</label><mixed-citation>Keller, T., May, D. A., and Kaus, B. J. P.: Numerical modelling of magma dynamics coupled to tectonic deformation of lithosphere and crust, Geophysical Journal International, 195, 1406–1442, <ext-link xlink:href="https://doi.org/10.1093/gji/ggt306" ext-link-type="DOI">10.1093/gji/ggt306</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx23"><label>Keller et al.(2017)Keller, Katz, and Hirschmann</label><mixed-citation> Keller, T., Katz, R. F., and Hirschmann, M. M.: Volatiles beneath mid-ocean ridges: Deep melting, channelised transport, focusing, and metasomatism, Earth and Planetary Science Letters, 464, 55–68, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx24"><label>Kraft(1988)</label><mixed-citation>Kraft, D.: A software package for sequential quadratic programming, Forschungsbericht- Deutsche Forschungs- und Versuchsanstalt fur Luft- und Raumfahrt, <uri>https://primo.uni-due.de/permalink/49HBZ_UDE/1gpd7fl/alma990012356640206446</uri> (last access: 7 October 2025), 1988.</mixed-citation></ref>
      <ref id="bib1.bibx25"><label>Kraft(1994)</label><mixed-citation> Kraft, D.: Algorithm 733: TOMP–Fortran modules for optimal control calculations, ACM Transactions on Mathematical Software (TOMS), 20, 262–281, 1994.</mixed-citation></ref>
      <ref id="bib1.bibx26"><label>Leal et al.(2020)Leal, Kyas, Kulik, and Saar</label><mixed-citation> Leal, A. M., Kyas, S., Kulik, D. A., and Saar, M. O.: Accelerating reactive transport modeling: on-demand machine learning algorithm for chemical equilibrium calculations, Transport in Porous Media, 133, 161–204, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx27"><label>Liu et al.(2018)Liu, Feng, and Zou</label><mixed-citation> Liu, J., Feng, Y., and Zou, L.: Some three-term conjugate gradient methods with the inexact line search condition, Calcolo, 55, 1–16, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx28"><label>Magni et al.(2014)Magni, Bouilhol, and Van Hunen</label><mixed-citation> Magni, V., Bouilhol, P., and Van Hunen, J.: Deep water recycling through time, Geochemistry, Geophysics, Geosystems, 15, 4203–4216, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx29"><label>Nocedal et al.(2002)Nocedal, Sartenaer, and Zhu</label><mixed-citation> Nocedal, J., Sartenaer, A., and Zhu, C.: On the behavior of the gradient norm in the steepest descent method, Computational Optimization and Applications, 22, 5–35, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx30"><label>Pincus(1970)</label><mixed-citation> Pincus, M.: A Monte Carlo method for the approximate solution of certain types of constrained optimization problems, Operations research, 18, 1225–1228, 1970.</mixed-citation></ref>
      <ref id="bib1.bibx31"><label>Piro(2011)</label><mixed-citation> Piro, M. H. A.: Computation of Thermodynamic Equilibria Pertinent to Nuclear Materials in Multi-Physics Codes, PhD thesis, Royal Military College of Canada (Canada), ISBN 9780494822272, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx32"><label>Powell and Holland(1988)</label><mixed-citation> Powell, R. and Holland, T.: An internally consistent dataset with uncertainties and correlations: 3. Applications to geobarometry, worked examples and a computer program, Journal of metamorphic Geology, 6, 173–204, 1988.</mixed-citation></ref>
      <ref id="bib1.bibx33"><label>Powell and Holland(1993)</label><mixed-citation> Powell, R. and Holland, T.: On the formulation of simple mixing models for complex phases, American Mineralogist, 78, 1174–1180, 1993.</mixed-citation></ref>
      <ref id="bib1.bibx34"><label>Riel et al.(2019)Riel, Bouilhol, van Hunen, Cornet, Magni, Grigorova, and Velic</label><mixed-citation> Riel, N., Bouilhol, P., van Hunen, J., Cornet, J., Magni, V., Grigorova, V., and Velic, M.: Interaction between mantle-derived magma and lower arc crust: quantitative reactive melt flow modelling using STyx, Geological Society, London, Special Publications, 478, 65–87, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx35"><label>Riel et al.(2022)Riel, Kaus, Green, and Berlie</label><mixed-citation>Riel, N., Kaus, B. J., Green, E., and Berlie, N.: MAGEMin, an efficient Gibbs energy minimizer: application to igneous systems, Geochemistry, Geophysics, Geosystems, 23, e2022GC010427, <ext-link xlink:href="https://doi.org/10.1029/2022GC010427" ext-link-type="DOI">10.1029/2022GC010427</ext-link>, 2022.</mixed-citation></ref>
      <ref id="bib1.bibx36"><label>Riel et al.(2024)</label><mixed-citation>Riel, N., Kaus, B., de Montserrat, A., Moulas, E., Green, E., and Dominguez, H.: An unconstrained formulation for complex solution phase minimization (Codes) (1.0), Zenodo [code, data set], <ext-link xlink:href="https://doi.org/10.5281/zenodo.13982544" ext-link-type="DOI">10.5281/zenodo.13982544</ext-link>, 2024.</mixed-citation></ref>
      <ref id="bib1.bibx37"><label>Rivaie et al.(2012)Rivaie, Mamat, June, and Mohd</label><mixed-citation> Rivaie, M., Mamat, M., June, L. W., and Mohd, I.: A new class of nonlinear conjugate gradient coefficients with global convergence properties, Applied Mathematics and Computation, 218, 11323–11332, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx38"><label>Rivaie et al.(2015)Rivaie, Mamat, and Abashar</label><mixed-citation> Rivaie, M., Mamat, M., and Abashar, A.: A new class of nonlinear conjugate gradient coefficients with exact and inexact line searches, Applied Mathematics and Computation, 268, 1152–1163, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx39"><label>Rummel et al.(2020)Rummel, Kaus, Baumann, White, and Riel</label><mixed-citation>Rummel, L., Kaus, B. J. P., Baumann, T. S., White, R. W., and Riel, N.: Insights into the Compositional Evolution of Crustal Magmatic Systems from Coupled Petrological-Geodynamical Models, Journal of Petrology, 61, <ext-link xlink:href="https://doi.org/10.1093/petrology/egaa029" ext-link-type="DOI">10.1093/petrology/egaa029</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx40"><label>Sherman and Morrison(1950)</label><mixed-citation> Sherman, J. and Morrison, W. J.: Adjustment of an inverse matrix corresponding to a change in one element of a given matrix, The Annals of Mathematical Statistics, 21, 124–127, 1950.</mixed-citation></ref>
      <ref id="bib1.bibx41"><label>Stixrude and Lithgow-Bertelloni(2011)</label><mixed-citation>Stixrude, L. and Lithgow-Bertelloni, C.: Thermodynamics of mantle minerals – II. Phase equilibria, Geophysical Journal International, 184, 1180–1213, <ext-link xlink:href="https://doi.org/10.1111/j.1365-246X.2010.04890.x" ext-link-type="DOI">10.1111/j.1365-246X.2010.04890.x</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx42"><label>Svanberg(2002)</label><mixed-citation>Svanberg, K.: A class of globally convergent optimization methods based on conservative convex separable approximations, SIAM Journal on Optimization, 12, 555–573, <ext-link xlink:href="https://doi.org/10.1137/S1052623499362822" ext-link-type="DOI">10.1137/S1052623499362822</ext-link>, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx43"><label>Taylor-West and Katz(2015)</label><mixed-citation> Taylor-West, J. and Katz, R. F.: Melt-preferred orientation, anisotropic permeability and melt-band formation in a deforming, partially molten aggregate, Geophysical Journal International, 203, 1253–1262, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx44"><label>Turner et al.(2017)Turner, Katz, Behn, and Keller</label><mixed-citation> Turner, A. J., Katz, R. F., Behn, M. D., and Keller, T.: Magmatic focusing to mid-ocean ridges: The role of grain-size variability and non-newtonian viscosity, Geochemistry, Geophysics, Geosystems, 18, 4342–4355, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx45"><label>Wolfe(1969)</label><mixed-citation> Wolfe, P.: Convergence conditions for ascent methods, SIAM review, 11, 226–235, 1969.</mixed-citation></ref>
      <ref id="bib1.bibx46"><label>Wong and Keller(2023)</label><mixed-citation>Wong, Y.-Q., and Keller, T.: A unified numerical model for two-phase porous, mush and suspension flow dynamics in magmatic systems, 233, 769–795, <ext-link xlink:href="https://doi.org/10.1093/gji/ggac481" ext-link-type="DOI">10.1093/gji/ggac481</ext-link>, 2023.</mixed-citation></ref>
      <ref id="bib1.bibx47"><label>Xiang and Connolly(2021)</label><mixed-citation>Xiang, H. and Connolly, J. A. D.: GeoPS: An interactive visual computing tool for thermodynamic modelling of phase equilibria, Journal of Metamorphic Geology, <ext-link xlink:href="https://doi.org/10.1111/jmg.12626" ext-link-type="DOI">10.1111/jmg.12626</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx48"><label>Yuan et al.(2024)Yuan, Asimow, Gurnis, and Antoshechkina</label><mixed-citation> Yuan, Q., Asimow, P. D., Gurnis, M., and Antoshechkina, P. M.: Enabling large-scale geodynamic-geochemical modeling via neural network acceleration, in: AGU Fall Meeting Abstracts, vol. 2024,  V41E–3161, 2024AGUFMV41E.3161Y, 2024.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>A bound-constrained formulation for complex solution  phase minimization</article-title-html>
<abstract-html/>
<ref-html id="bib1.bib1"><label>Bouilhol et al.(2015)Bouilhol, Magni, van Hunen, and
Kaislaniemi</label><mixed-citation>
      
Bouilhol, P., Magni, V., van Hunen, J., and Kaislaniemi, L.: A numerical
approach to melting in warm subduction zones, Earth and Planetary Science
Letters, 411, 37–44, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Candioti et al.(2024)Candioti, Nathwani, and
Chelle-Michou</label><mixed-citation>
      
Candioti, L. G., Nathwani, C. L., and Chelle-Michou, C.: Towards fully-coupled
thermodynamic-thermomechanical two-phase flow models of transcrustal magmatic
systems, in: EGU General Assembly Conference Abstracts, p. 16936, <a href="https://doi.org/10.5194/egusphere-egu25-8644" target="_blank">https://doi.org/10.5194/egusphere-egu25-8644</a>, 2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Connolly(2005)</label><mixed-citation>
      
Connolly, J. A. D.: Computation of phase equilibria by linear programming: A
tool for geodynamic modeling and its application to subduction zone
decarbonation, Earth and Planetary Science Letters, 236, 524–541, 2005.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>de Capitani and Brown(1987)</label><mixed-citation>
      
de Capitani, C. and Brown, T. H.: The computation of chemical equilibrium in
complex systems containing non-ideal solutions, Geochimica et Cosmochimica
Acta, 51, 2639–2652, <a href="https://doi.org/10.1016/0016-7037(87)90145-1" target="_blank">https://doi.org/10.1016/0016-7037(87)90145-1</a>,
1987.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>de Capitani and Petrakakis(2010)</label><mixed-citation>
      
de Capitani, C. and Petrakakis, K.: The computation of equilibrium assemblage
diagrams with Theriak/Domino software, American Mineralogist, 95, 1006–1016,
<a href="https://doi.org/10.2138/am.2010.3354" target="_blank">https://doi.org/10.2138/am.2010.3354</a>, 2010.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Dennis and Schnabel(1996)</label><mixed-citation>
      
Dennis, J. E. and Schnabel, R. B.: Numerical methods for unconstrained
optimization and nonlinear equations, SIAM, <a href="https://doi.org/10.1137/1.9781611971200" target="_blank">https://doi.org/10.1137/1.9781611971200</a>, 1996.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Fletcher(1987)</label><mixed-citation>
      
Fletcher, R.: Practical methods of optimization, John and Sons,
Chichester, <a href="https://doi.org/10.1002/9781118723203" target="_blank">https://doi.org/10.1002/9781118723203</a>, 1987.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Ganguly(2001)</label><mixed-citation>
      
Ganguly, J.: Thermodynamic modelling of solid solutions, EMU Notes in
Mineralogy, 3, 37–69, 2001.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Ghiorso and Sack(1995)</label><mixed-citation>
      
Ghiorso, M. S. and Sack, R. O.: Chemical mass transfer in magmatic processes
IV. A revised and internally consistent thermodynamic model for the
interpolation and extrapolation of liquid-solid equilibria in magmatic
systems at elevated temperatures and pressures, Contributions to Mineralogy
and Petrology, 119, 197–212, 1995.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Helgeson(1978)</label><mixed-citation>
      
Helgeson, H. C.: Summary and critique of the thermodynamic properties of
rock-forming minerals, American Journal of Science, 278, 1–229, 1978.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Hestenes and Stiefel(1952)</label><mixed-citation>
      
Hestenes, M. R. and Stiefel, E.: Methods of conjugate gradients for solving,
Journal of research of the National Bureau of Standards, 49, 409–436, <a href="https://doi.org/10.6028/jres.049.044" target="_blank">https://doi.org/10.6028/jres.049.044</a>, 1952.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Holland and Powell(2003)</label><mixed-citation>
      
Holland, T. and Powell, R.: Activity–composition relations for phases in
petrological calculations: an asymmetric multicomponent formulation,
Contributions to Mineralogy and Petrology, 145, 492–501, 2003.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Holland and Powell(1998)</label><mixed-citation>
      
Holland, T. J. B. and Powell, R.: An internally consistent thermodynamic data
set for phases of petrological interest, Journal of Metamorphic Geology, 16,
309–343, <a href="https://doi.org/10.1111/j.1525-1314.1998.00140.x" target="_blank">https://doi.org/10.1111/j.1525-1314.1998.00140.x</a>, 1998.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Holland et al.(2018)Holland, Green, and Powell</label><mixed-citation>
      
Holland, T. J. B., Green, E. C. R., and Powell, R.: Melting of peridotites
through to granites: a simple thermodynamic model in the system KNCFMASHTOCr,
Journal of Petrology, 59, 881–900, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Hu et al.(2022)Hu, Jackson, and Blundy</label><mixed-citation>
      
Hu, H., Jackson, M. D., and Blundy, J.: Melting, compaction and reactive flow:
Controls on melt fraction and composition change in crustal mush reservoirs,
Journal of Petrology, 63, egac097, <a href="https://doi.org/10.1093/petrology/egac097" target="_blank">https://doi.org/10.1093/petrology/egac097</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Jackson et al.(2018)Jackson, Blundy, and Sparks</label><mixed-citation>
      
Jackson, M., Blundy, J., and Sparks, R.: Chemical differentiation, cold storage
and remobilization of magma in the Earth's crust, Nature, 564, 405–409,
2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Jackson et al.(2003)Jackson, Cheadle, and Atherton</label><mixed-citation>
      
Jackson, M. D., Cheadle, M. J., and Atherton, M. P.: Quantitative modeling of
granitic melt generation and segregation in the continental crust, Journal of
Geophysical Research: Solid Earth, 108, <a href="https://doi.org/10.1029/2001JB001050" target="_blank">https://doi.org/10.1029/2001JB001050</a>, 2003.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Johnson(2021)</label><mixed-citation>
      
Johnson, S. G.: The NLopt nonlinear-optimization package,
<a href="https://doi.org/10.7283/633E-1497" target="_blank">https://doi.org/10.7283/633E-1497</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Katz et al.(2022)Katz, Jones, Rudge, and Keller</label><mixed-citation>
      
Katz, R. F., Jones, D. W. R., Rudge, J. F., and Keller, T.: Physics of Melt
Extraction from the Mantle: Speed and Style, Annual Review of Earth and
Planetary Sciences, 50, 507–540, <a href="https://doi.org/10.1146/annurev-earth-032320-083704" target="_blank">https://doi.org/10.1146/annurev-earth-032320-083704</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Keller and Katz(2016)</label><mixed-citation>
      
Keller, T. and Katz, R. F.: The Role of Volatiles in Reactive Melt Transport
in the Asthenosphere, Journal of Petrology, 57, 1073–1108,
<a href="https://doi.org/10.1093/petrology/egw030" target="_blank">https://doi.org/10.1093/petrology/egw030</a>, 2016.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Keller and Suckale(2019)</label><mixed-citation>
      
Keller, T. and Suckale, J.: A continuum model of multi-phase reactive
transport in igneous systems, Geophysical Journal International, 219,
185–222, <a href="https://doi.org/10.1093/gji/ggz287" target="_blank">https://doi.org/10.1093/gji/ggz287</a>, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Keller et al.(2013)Keller, May, and Kaus</label><mixed-citation>
      
Keller, T., May, D. A., and Kaus, B. J. P.: Numerical modelling of magma
dynamics coupled to tectonic deformation of lithosphere and crust,
Geophysical Journal International, 195, 1406–1442, <a href="https://doi.org/10.1093/gji/ggt306" target="_blank">https://doi.org/10.1093/gji/ggt306</a>,
2013.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Keller et al.(2017)Keller, Katz, and Hirschmann</label><mixed-citation>
      
Keller, T., Katz, R. F., and Hirschmann, M. M.: Volatiles beneath mid-ocean
ridges: Deep melting, channelised transport, focusing, and metasomatism,
Earth and Planetary Science Letters, 464, 55–68, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Kraft(1988)</label><mixed-citation>
      
Kraft, D.: A software package for sequential quadratic programming,
Forschungsbericht- Deutsche Forschungs- und Versuchsanstalt fur Luft- und
Raumfahrt, <a href="https://primo.uni-due.de/permalink/49HBZ_UDE/1gpd7fl/alma990012356640206446" target="_blank"/> (last access: 7 October 2025), 1988.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Kraft(1994)</label><mixed-citation>
      
Kraft, D.: Algorithm 733: TOMP–Fortran modules for optimal control
calculations, ACM Transactions on Mathematical Software (TOMS), 20, 262–281,
1994.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Leal et al.(2020)Leal, Kyas, Kulik, and Saar</label><mixed-citation>
      
Leal, A. M., Kyas, S., Kulik, D. A., and Saar, M. O.: Accelerating reactive
transport modeling: on-demand machine learning algorithm for chemical
equilibrium calculations, Transport in Porous Media, 133, 161–204, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Liu et al.(2018)Liu, Feng, and Zou</label><mixed-citation>
      
Liu, J., Feng, Y., and Zou, L.: Some three-term conjugate gradient methods with
the inexact line search condition, Calcolo, 55, 1–16, 2018.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Magni et al.(2014)Magni, Bouilhol, and Van Hunen</label><mixed-citation>
      
Magni, V., Bouilhol, P., and Van Hunen, J.: Deep water recycling through time,
Geochemistry, Geophysics, Geosystems, 15, 4203–4216, 2014.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Nocedal et al.(2002)Nocedal, Sartenaer, and Zhu</label><mixed-citation>
      
Nocedal, J., Sartenaer, A., and Zhu, C.: On the behavior of the gradient norm
in the steepest descent method, Computational Optimization and Applications,
22, 5–35, 2002.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Pincus(1970)</label><mixed-citation>
      
Pincus, M.: A Monte Carlo method for the approximate solution of certain types
of constrained optimization problems, Operations research, 18, 1225–1228,
1970.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Piro(2011)</label><mixed-citation>
      
Piro, M. H. A.: Computation of Thermodynamic Equilibria Pertinent to Nuclear
Materials in Multi-Physics Codes, PhD thesis, Royal Military College of
Canada (Canada), ISBN 9780494822272, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Powell and Holland(1988)</label><mixed-citation>
      
Powell, R. and Holland, T.: An internally consistent dataset with uncertainties
and correlations: 3. Applications to geobarometry, worked examples and a
computer program, Journal of metamorphic Geology, 6, 173–204, 1988.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Powell and Holland(1993)</label><mixed-citation>
      
Powell, R. and Holland, T.: On the formulation of simple mixing models for
complex phases, American Mineralogist, 78, 1174–1180, 1993.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Riel et al.(2019)Riel, Bouilhol, van Hunen, Cornet, Magni, Grigorova,
and Velic</label><mixed-citation>
      
Riel, N., Bouilhol, P., van Hunen, J., Cornet, J., Magni, V., Grigorova, V.,
and Velic, M.: Interaction between mantle-derived magma and lower arc crust:
quantitative reactive melt flow modelling using STyx, Geological Society,
London, Special Publications, 478, 65–87, 2019.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Riel et al.(2022)Riel, Kaus, Green, and Berlie</label><mixed-citation>
      
Riel, N., Kaus, B. J., Green, E., and Berlie, N.: MAGEMin, an efficient Gibbs
energy minimizer: application to igneous systems, Geochemistry, Geophysics,
Geosystems, 23, e2022GC010427, <a href="https://doi.org/10.1029/2022GC010427" target="_blank">https://doi.org/10.1029/2022GC010427</a>, 2022.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Riel et al.(2024)</label><mixed-citation>
      
Riel, N., Kaus, B., de Montserrat, A., Moulas, E., Green, E., and Dominguez, H.: An unconstrained formulation for complex solution phase minimization (Codes) (1.0), Zenodo [code, data set], <a href="https://doi.org/10.5281/zenodo.13982544" target="_blank">https://doi.org/10.5281/zenodo.13982544</a>, 2024.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Rivaie et al.(2012)Rivaie, Mamat, June, and Mohd</label><mixed-citation>
      
Rivaie, M., Mamat, M., June, L. W., and Mohd, I.: A new class of nonlinear
conjugate gradient coefficients with global convergence properties, Applied
Mathematics and Computation, 218, 11323–11332, 2012.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Rivaie et al.(2015)Rivaie, Mamat, and Abashar</label><mixed-citation>
      
Rivaie, M., Mamat, M., and Abashar, A.: A new class of nonlinear conjugate
gradient coefficients with exact and inexact line searches, Applied
Mathematics and Computation, 268, 1152–1163, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Rummel et al.(2020)Rummel, Kaus, Baumann, White, and
Riel</label><mixed-citation>
      
Rummel, L., Kaus, B. J. P., Baumann, T. S., White, R. W., and Riel, N.:
Insights into the Compositional Evolution of Crustal Magmatic Systems from
Coupled Petrological-Geodynamical Models, Journal of Petrology, 61,
<a href="https://doi.org/10.1093/petrology/egaa029" target="_blank">https://doi.org/10.1093/petrology/egaa029</a>, 2020.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Sherman and Morrison(1950)</label><mixed-citation>
      
Sherman, J. and Morrison, W. J.: Adjustment of an inverse matrix corresponding
to a change in one element of a given matrix, The Annals of Mathematical
Statistics, 21, 124–127, 1950.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Stixrude and Lithgow-Bertelloni(2011)</label><mixed-citation>
      
Stixrude, L. and Lithgow-Bertelloni, C.: Thermodynamics of mantle minerals –
II. Phase equilibria, Geophysical Journal International, 184, 1180–1213,
<a href="https://doi.org/10.1111/j.1365-246X.2010.04890.x" target="_blank">https://doi.org/10.1111/j.1365-246X.2010.04890.x</a>, 2011.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Svanberg(2002)</label><mixed-citation>
      
Svanberg, K.: A class of globally convergent optimization methods based on
conservative convex separable approximations, SIAM Journal on Optimization,
12, 555–573, <a href="https://doi.org/10.1137/S1052623499362822" target="_blank">https://doi.org/10.1137/S1052623499362822</a>, 2002.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Taylor-West and Katz(2015)</label><mixed-citation>
      
Taylor-West, J. and Katz, R. F.: Melt-preferred orientation, anisotropic
permeability and melt-band formation in a deforming, partially molten
aggregate, Geophysical Journal International, 203, 1253–1262, 2015.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Turner et al.(2017)Turner, Katz, Behn, and Keller</label><mixed-citation>
      
Turner, A. J., Katz, R. F., Behn, M. D., and Keller, T.: Magmatic focusing to
mid-ocean ridges: The role of grain-size variability and non-newtonian
viscosity, Geochemistry, Geophysics, Geosystems, 18, 4342–4355, 2017.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Wolfe(1969)</label><mixed-citation>
      
Wolfe, P.: Convergence conditions for ascent methods, SIAM review, 11,
226–235, 1969.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Wong and Keller(2023)</label><mixed-citation>
      
Wong, Y.-Q., and Keller, T.: A unified numerical model for two-phase porous, mush and suspension flow dynamics in magmatic systems, 233, 769–795, <a href="https://doi.org/10.1093/gji/ggac481" target="_blank">https://doi.org/10.1093/gji/ggac481</a>, 2023.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Xiang and Connolly(2021)</label><mixed-citation>
      
Xiang, H. and Connolly, J. A. D.: GeoPS: An interactive visual computing tool
for thermodynamic modelling of phase equilibria, Journal of Metamorphic
Geology, <a href="https://doi.org/10.1111/jmg.12626" target="_blank">https://doi.org/10.1111/jmg.12626</a>, 2021.

    </mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Yuan et al.(2024)Yuan, Asimow, Gurnis, and
Antoshechkina</label><mixed-citation>
      
Yuan, Q., Asimow, P. D., Gurnis, M., and Antoshechkina, P. M.: Enabling
large-scale geodynamic-geochemical modeling via neural network acceleration, in: AGU Fall Meeting Abstracts, vol. 2024,  V41E–3161, 2024AGUFMV41E.3161Y, 2024.

    </mixed-citation></ref-html>--></article>
