This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

MASKE: A kinetic simulator of coupled chemical and mechanical processes driving microstructural evolution

Enrico Masoero
Abstract

The microstructure of materials evolves through chemical reactions and mechanical stress, often strongly coupled in phenomena such as pressure solution or crystallization pressure. This article presents MASKE: a simulator to address the challenge of modelling coupled chemo-mechanical processes in microstructures. MASKE represents solid phases as agglomerations of particles whose off-lattice displacements generate mechanical stress through interaction potentials. Particle precipitation and dissolution are sampled using Kinetic Monte Carlo, with original reaction rate equations derived from Transition State Theory and featuring contributions from mechanical interactions. Molecules in solution around the solid are modelled implicitly, through concentrations that change during microstructural evolution and define the saturation indexes for user-defined chemical reactions. The structure and implementation of the software are explained first. Then, two examples on a nanocrystal of calcium hydroxide address its chemical equilibrium and its mechanical response under a range of imposed strain rates, involving stress-driven dissolution and recrystallization. These examples highlight MASKE’s distinctive ability to simulate strongly coupled chemo-mechanical processes. MASKE is available, open-source, on GitHub.

keywords:
A. chemo-mechanical processes , C. numerical algorithms , A. microstructures , Kinetic Monte Carlo.
journal: Published article DOI:10.1061/JENMDT.EMENG-7896 under ©American Society of Civil Engineers.
\affiliation

organization=Department of Civil and Environmental Engineering, Politecnico di Milano,addressline=Piazza Leonardo da Vinci 32, city=Milan, postcode=20133, state=MI, country=Italy

{highlights}

MASKE is presented: off-lattice Kinetic Monte Carlo on discretized microstructures

Original rate equations hard-coupling chemical reactions with mechanical stress

Dissolution/growth of a calcium hydroxide nanocrystal is simulated over long time

The crystal is put under realistic strain rates to compute stress-strain curves

A complex balance between solution chemistry, pressure solution, and plastic flow

1 Introduction

A strong coupling between mechanical stress and chemical reactions often underlies the microstructural evolution of materials. Examples of stress-driven nucleation and growth of materials are commonly found in nature, e.g. rock metamorphism or the adaptive growth of bones (Hart et al., 2017) and plants (Kouhen et al., 2023), but such processes are also exploited in nano-manufacturing, e.g. the heterogeneous precipitation of islands on top of mismatching crystals, which is a challenge in semiconductor production (Dubrovskii et al., 2010). Further examples concern the degradation of materials, such as crystallization pressure (Scherer, 2004), pressure solution (viz. pressure-induced dissolution, Rutter (1983)), creep from the relaxation of eigenstress originated during the formation of concrete (Bažant et al., 1997), and stress-corrosion cracking (Raja and Shoji, 2011).

In Solid Mechanics, the modelling of chemo-mechanical processes is quite established at the macroscopic continuum level, with fully coupled formulations of reactive transport and linear momentum conservation, e.g. in Gawin et al. (2009). At the constitutive level, these formulations sometimes consider the stress or strain stemming from phase transformations, e.g. local expansion during alkali-silica reaction and sulphate attack in concrete (Pesavento et al., 2012; Cefis and Comi, 2017), whereas the rates of chemical transformation are rarely stress-dependent (Bellomo et al., 2012). Chemo-mechanical modelling is less advanced at the smaller microstructural level, where the focus in on the evolving morphology of single, or multiple, crystalline and amorphous phases. The length and time scales of such microstructural processes are too large for direct atomistic simulations, hence appropriate coarse-graining approaches are needed. However, most current simulations of microstructural evolution either describe the geometry of growing/dissolving solids without addressing their stress field, or they focus on the mechanical interactions prompting structural aggregation and collapse, but considering chemical reactions only qualitatively. Among the former, with focus on chemistry, there are microstructural development codes such as in Van Breugel (1995); Bishnoi and Scrivener (2009); Bullard et al. (2011), as well as others simulators based on cellular automata (Bentz et al., 1994; Bullard et al., 2010) or on Kinetic Monte Carlo (KMC) (Martin et al., 2020). Examples of simulators with a focus on mechanics are instead those in Ioannidou et al. (2014, 2016, 2022), based on interacting particles. Exceptions exist, but with limitations. For example, (Li et al., 2015) and (Feng et al., 2017) staggered finite element simulations of mechanical response with a reactive module to simulate solid precipitation, respectively of stress-free cement hydrates during creep and of expanding ettringite during sulphate attack in a cement paste. In both cases, however, chemo-mechanical coupling was not intrinsic to the model, but imposed by alternating chemical and mechanical modules. Differently, Meakin and Rosso (2008) employed stress-dependent reaction rates in KMC simulations of crystal dissolution near stress-inducing dislocations. However the solid in these simulations was bound to a fixed lattice geometry (a cubic Kossel crystal), hence the stress field near the dislocation was pre-imposed and non-relaxing during dissolution. Another noteworthy method is the Phase Field, which does offer a framework to fully couple chemistry and mechanics; however, its high computational cost is preventing application to complex 3D structures, with multiple phases, liquid and solid, undergoing nonlinear mechanical processes (Tourret et al., 2022).

This work presents MASKE: a simulator of fluid-solid microstructures discretized via mechanically interacting particles whose dissolution and precipitation are sampled using off-lattice Kinetic Monte Carlo. MASKE allows the user to define multiple chemical reactions, along with their usual thermodynamic and kinetic parameters such as equilibrium constants and activation energies. Chemo-mechanical coupling is introduced through rate equations for the chemical reactions that feature the change in mechanical interaction energy accompanying particle dissolution or precipitation. Precursors of these rate equations where used in previous works. Shvab et al. (2017) captured the experimental hydration rate curve of a cement paste by simulating the nucleation and stress-driven agglomeration of calcium-silicate-hydrate nanoparticles. Coopamootoo and Masoero (2020) simulated the experimentally measured critical undersaturation of a tricalcim silicate (C3S) paste, below which stress-driven stepwave dissolution is initiated at screw dislocations; recently, Coopamootoo K (2023) have extended the result to finite-sized crystal, capturing the full experimental relationship between dissolution rate and saturation index of C3S. Alex et al. (2023) applied the coupled rate equations to the carbonation of a model cement paste, featuring multiple solid phases, ions in solution, and chemical reactions. These microscale simulations provided apparent rate constants that, employed in macroscale simulations of carbonation, matched a range of experimental results (Freeman et al., 2019). All these applications showed that the coupled reaction rates in MASKE can capture chemo-mechanical processes at experimentally realistic length and time scales. However, a detailed presentation and discussion of the architecture, capabilities, and limitations of MASKE are still due.

The algorithm and software architecture of MASKE are described in detail, accompanying its recent release, open-source, on GitHub (Masoero, 2023a). The main article focuses on the most important parts, concept,s and steps in the algorithm; much more details are provided in several appendices, which guide the interested reader to a deeper understanding of the method, while also describing the input, output, and some data structures of the software. In the main article, particular attention is paid to: (i) the stress-dependent rates of chemical reaction implemented in MASKE, and their relationship with Transition State Theory (TST) and its predictions; (ii) the KMC algorithm to sample particle dissolution and off-lattice precipitation; (iii) the possibility to integrate continuous kinetic processes in time along with discrete KMC events. These key features are demonstrated via two sample applications, both considering a spheroidal nano-crystal of calcium hydroxide Ca(OH)2 in an aqueous solution of its ions. The chemical kinetics of Ca(OH)2 under mechanical stress is of practical importance, as the instability and dissolution of this phase is responsible for pH drop and steel corrosion in reinforced concrete, and contribute to carbonation creep in cement pastes (Parrott, 1975). Here however the focus is not on experimental validation, which has been already addressed in part by the applications summarised in the previous paragraph. Instead, the aim here is to showcase the three key features of MASKE listed above. Hence, the first application considers the chemical equilibrium, dissolution, and growth of the Ca(OH)2 crystal in stress-free conditions; the results are compared with expectations from classical TST, and clarify the effect of some parameters in the rate equations and in the off-lattice sampling of precipitation. The second example puts the crystal under compression for a wide range of imposed strain rates; the results show that the interplay between mechanical deformations and stress-driven dissolution and recrystallization trigger rich and sometimes counter-intuitive mechanical responses, which are nevertheless explained by analysing the evolution of local stresses during the tests.

2 Methodology

This section presents for the first time the main structure and salient features of MASKE: a C++, object-oriented, parallel software that combines continuous processes, which are explicitly integrated in time, with discrete events, such as dissolution/precipitation reactions, sampled using off-lattice Kinetic Monte Carlo (KMC). In the Appendices, the interested reader can find full details of the MASKE algorithm, its implementation, the commands in its input script, and the parameters in its chemical database input file. In this section, attention is also paid to mechanical interactions between particles that are later used in two sample applications on Ca(OH)2 nanocrystals. The methodological details of these applications are provided here too.

2.1 Model description

A typical simulation features spherical particles in a prismatic simulation box with volume VboxV_{box} and periodic or fixed boundary conditions: see Fig. 1. Box and particles are generated and tracked using the LAMMPS C++ library interface (Thompson et al., 2022). The particles may represent any explicit phase, hereafter assumed to be solid ones. The particles interact mechanically with each other through user-defined interaction potentials, which are also defined and managed in LAMMPS: e.g. the Uij(rij)U_{ij}(r_{ij}) interaction in Fig. 1. The current version of MASKE can only manage pairwise interactions, but extensions to any of the potentials in LAMMPS would be quite straightforward: see A for more discussion on this. Particle displacements caused by the mechanical interactions are also computed in LAMMPS, via usual methods such as molecular dynamics or energy minimization (respectively using the runrun and minimizeminimize commands in LAMMPS). This interface with LAMMPS gives the user flexibility to study complex systems with various mechanical interaction potentials and loading conditions.

Refer to caption

Figure 1: A typical simulation box in MASKE, with an implicit solution and solid particles interacing via effective potentials (in this example, pairwise energy UijU_{ij} as a function of interparticle distance rijr_{ij}).

The portion of a simulation box that is not occupied by solid particles contains a volume voidVvoidV of empty space, and a volume VsolV_{sol} of implicit solution made up of various, user-defined molecular species. The current version of MASKE assumes that the molar concentrations of the solvated species are uniform in VsolV_{sol}, with no diffusion taking place. There is also an additional volume ΔVbox\Delta V_{box} attached to the simulation box, which can receive some of the molecules released during dissolution reactions, or provide some of the molecules consumed during precipitation reactions. This ΔVbox\Delta V_{box} can be used to keep VboxV_{box} limited, which is where time-consuming operations take place; for example, Fig. 2 depicts a scenario where this approach allows focussing on dissolution and precipitation near the surface of a large grain, while preserving realistic concentrations in solution and surface-to-volume ratio of suspended grains at a larger scale. The initial molar concentrations of all the solvated molecules in VboxV_{box} and in ΔVbox\Delta V_{box} are provided by the user in the input script, along with fixing the temperature of the solution and the AA and BB solvent parameters to be used in Debye-Hückel calculations of activity coefficients.

Refer to caption

Figure 2: Rationale of adding a solution volume ΔVbox\Delta V_{box}, connected to the simulation box of volume VboxV_{box}.

MASKE simulates discrete events, which happen once every Δtk\Delta t_{k} units of time (where Δtk\Delta t_{k} varies during a simulation depending on mechanical interactions and solution composition), but also continuous processes that are numerically integrated over a user-specified time interval Δti\Delta t_{i} with time step dtidt_{i} (for the ithi^{th} continuous process). In the current version of MASKE, the possible discrete events are full dissolution (called deletiondeletion) of any existing particle, or full precipitation (called nucleationnucleation) of a new particle at any possible location in VboxV_{box}. The only continuous process implemented so far is called CmstoreLMPCmstoreLMP: it repeatedly executes a set of stored LAMMPS commands, specified by the user in the MASKE input script (see C for more details on the input/output structure of the code). A CmstoreLMPCmstoreLMP process will be used in an example here, to impose a constant strain rate. The occurrence of discrete events and continuous processes is staggered onto a unique time line, tt^{*}, which is advanced by whichever event or process has the shortest time of future occurrence, or FOTFOT. The details of how this unique time line is managed can be found in B. The occurrence of discrete events is sampled using Kinetic Monte Carlo (KMC), thus the list of all possible discrete events is associated with a unique FOTkFOT_{k}, which is the future occurrence time of any one out of all the possible discrete events. If FOTkFOT_{k} is smaller than FOTiFOT_{i} of all the other continuous processes, i.e. if a discrete event is next in line to be executed, then one discrete event is picked out from the list of all the possible ones, with a probability that is proportional to its individual rate. This is the usual approach in KMC simulations; specifically, MASKE uses a rejection-free KMC algorithm that is time-dependent (Prados et al., 1997), to account for changes in solution composition or stress state that continuous processes may induce between two successive discrete events. The equations of time-dependent KMC are also presented and discussed in B.

In the KMC method, FOTkFOT_{k} is obtained from the cumulative rate:

Rk=jN+Mrk,jR_{k}=\sum_{j}^{N+M}r_{k,j} (1)

which is the sum of the individual rates rk,ir_{k,i} of all NN possible particle deletions plus all MM particle nucleations at all possible locations in the simulation box. The expressions for rk,jr_{k,j} are presented in the next section. NN is finite, whereas the number of possible locations for particle precipitation is infinite and, in principle, one should sample them all to use KMC. To treat this problem, MASKE asks the user to select a region within VboxV_{box} and to create a 3D lattice of MM trial particles of the desired type, viz. with desired chemical composition and interaction potentials. Each of these MM trial particles is then driven towards its closest local minimum of interaction energy with the other already-existing, so-called realreal particles (no interactions between trial particles are considered, and the positions of the real particles are kept fixed while moving the trial ones). This energy minimization is performed using a bespoke algorithm, called quickmaskequickmaske, which the quickminquickmin algorithm in LAMMPS except that each trial particles is independently relaxed. The fineness of the user-specified lattice determines the volume ΔV\Delta V of the generic lattice cell. The energy minimum obtained for a trial particle is assumed to characterize all the particles that may nucleate anywhere else in ΔV\Delta V. In this way, the cumulative rate of all the MM sampled nucleation events is effectively a numerical integral in the sampled region, with resolution ΔV\Delta V. The most accurate result is obtained when ΔV0\Delta V\rightarrow 0, but in practice a small but finite ΔV\Delta V is already sufficient to estimate the cumulative nucleation rate accurately. How small ΔV\Delta V should be, it depends on the employed interaction potentials and on the morphology of the simulated microstructure. An assumption underling this approach is that the energy minima alone fully control the precipitation rate cumulated over the whole VboxV_{box}. In reality, thermal fluctuations would add contributions also from the locations surrounding the minima; future versions of MASKE may sample such fluctuations by relaxing the trial particles using molecular dynamics instead of energy minimization. F offers more discussion on interaction energy landscapes and their sampling for dissolution and precipitation events.

The flowchart in Fig. 3 depicts the algorithm for the kinetic simulations in MASKE. A brief description is given here, while more details can be found in E. The left side of the flowchart summarises the sampling of FOTFOT for all the discrete and continuous processes in a simulation. The shortest FOTFOT determines which type of process or event is to be executed next. If a continuous process is next, it is directly integrated numerically over its time period Δti\Delta t_{i} (user-specified in the input script). After that, the individual rates rk,jr_{k,j} of the sampled discrete events are multiplied times Δti\Delta t_{i} and these products are stored in a per-particle array called ratesTratesT, of size N+MN+M. The ratesTratesT array is used in the next kinetic step for computing FOTkFOT_{k}. If the next event to execute is instead a discrete one, the ratesTratesT values are immediately updated, adding to each entry the product rk,j(FOTkt)r_{k,j}(FOT_{k}-t^{*}). The ratesTratesT values are then used to select which discrete event to carry out specifically, out of all the possible ones. After executing a discrete event, the concentrations of the solvated molecules are updated accordingly, as discussed in the next section, and the ratesTratesT values are reset to zero. Subsequently, irrespective of whether the executed process is continuous or discrete, MASKE restores the initial position of all trial particles and executes a third type of possible processes, called EveryEvery. Unlike continuous or discrete processes, whose occurrence is associated to a time line, processes of type EveryEvery are simply executed once every nn kinetic steps, where a step is one full loop in Fig. 3. nn is user-specified as an input, and presently MASKE implements only one type of EveryEvery process, called EmstoreLMPEmstoreLMP, which executes a set of LAMMPS command that the user can specify and store in the input script. A typical use of such an EveryEvery process is to execute a full energy minimization of the system with n=1n=1, i.e. after each execution of a continuous or discrete process.

Refer to caption

Figure 3: Flow chart of the main kinetic loop in MASKE.

The algorithm in Fig. 3 is well suited to parallelisation, since each discrete event (i.e. each of the NN particle deletions and MM particle nucleations) can be sampled independently. Furthermore, spatial domain decomposition can be exploited during energy minimization. To exploit this, MASKE features a two-level parallelisation. On the first level, the user can specify multiple groups of processors, called subcommunicatorssubcommunicators, and attribute the sampling of one or more processes to each subcommunicator (e.g. one subcommunicator samples particle deletion, another one samples nucleation). On the second level, each subcommunicator uses all its processors to run any invoked LAMMPS command, e.g. energy calculations and minimisation using domain decomposition. This article does not report on the scalability and efficiency of the parallelisation, which is amenable to optimisation in the current version of MASKE. However, previously published works have already exploited both levels of parallelisation to simulate hundreds of thousands particles (Coopamootoo and Masoero, 2020) and multiple types of solid particles, all sampled for deletion and nucleation (Alex et al., 2023).

2.2 Chemical reactions: rates and mechanisms

MASKE computes the rate of any discrete event, such as particle deletion or nucleation, based on two user-defined entities: a chemical reaction and a reaction mechanism, both specified in a chemical database text file, called ChemDBChemDB, whose syntax is presented in D. The chemical reaction is assumed to be one-step and is defined primarily through its formula and stoichiometric coefficients, e.g. :

Ca(OH)2Ca2++2OH\displaystyle Ca(OH)_{2}\rightarrow Ca^{2+}+2OH^{-} (2)

for the dissolution of a calcium hydroxide molecule. The stoichiometric coefficients are specified in the ChemDBChemDB file. The molecules appearing in the reaction formulas are also user-defined in the ChemDBChemDB file, along with a set of useful parameters. For the ithi^{th} solvated molecule, these parameters are its apparent volume vapp,iv_{app,i}, hydrated radius aioa^{o}_{i}, ionic charge ziz_{i}, and the bib_{i} parameter for Debye-Hückel calculations of activity coefficients, discussed later. For solid molecular species, only linear sizes are required, which are used to compute their molecular volumes. ChemDBChemDB gathers also the thermodynamic and kinetic parameters associated to each chemical reaction: standard free energy barriers ΔGo\Delta G^{o{\ddagger}}, standard concentrations of activated complexes coc^{o{\ddagger}} (in the sense of Transition State Theory, which will be used below to express rate equations), equilibrium constants KeqK_{eq}, and interfacial energies γ\gamma. See D for more details on this quantities.

The ChemDBChemDB file also contains the definition of reaction mechanisms, which are the sets of assumptions that MASKE makes when assembling single chemical reactions to delete or nucleate a full particle. Indeed, a particle may be a coarse-grained entity whose deletion or creation may entail more than just a single reaction, e.g. nr,j,dissn_{r,j,diss} or nr,j,nucn_{r,j,nuc} reactions respectively to dissolve or nucleate a particle. Classical Nucleation Theory is an example of multiple individual reactions being assembled to express a reaction rate at the particle scale. In the current version of MASKE, the only implemented mechanism is called allparallpar and it assumes that, irrespective of how big a particle is, its full deletion or nucleation only takes the time for one single-step chemical reaction to occur. This is exact if the volume Vp,jV_{p,j} of the generic particle jj equals the sum of the volumes of solid molecules dissolving or precipitating in one reaction. For bigger particles instead, the allparallpar mechanism effectively assumes that the same chemical reaction takes places everywhere in Vp,jV_{p,j} at the same time. This is clearly unrealistic for particles beyond the nanometre or so, therefore in this article all the examples will feature particles whose Vp,jV_{p,j} entail nr,j,diss=nr,j,nuc=1n_{r,j,diss}=n_{r,j,nuc}=1. Hereafter this resolution is called ’unimolecular’, although in principle a single chemical reaction might also involve multiple solid molecules at once.

Whenever a particle is deleted or nucleated, a chemical reaction is carried out as part of an allparallpar mechanisms. MASKE ensures mass conservation by consistently managing molecule exchanges between solid phases and solution, following the user-specified reaction formulas in ChemDBChemDB. Chemical reactions may entail differences in volume between reactants and products; these are accommodated in the voidVvoidV volume introduced in the previous section, which may thus be positive or negative. The current version of MASKE does not simulate chemical reactions taking place in the implicit solution, hence it does not minimize the free energy of the solution itself. An interface between MASKE and the thermodynamic simulator PHREEQC (Parkhurst, 1995) is currently being developed, to address this limitation.

The rate equations for the allparallpar mechanis in MASKE are rooted in Transition State Theory (TST), but with an extension to account for excess enthalpy coming from the mechanical interactions between particles. This excess enthalpy term, originally proposed in Shvab et al. (2017), is essential for capturing the effect of local morphology and stress state on reaction rates. The rate equations for one-step dissolution and precipitation reactions are:

r1,d\displaystyle r_{1,d} =κkBThcdoγdexp(ΔGdokBT)exp[(1χ)ΔUdγΩkBT1nr,j,diss]Qr,dVtα/3\displaystyle=\kappa\frac{k_{B}T}{h}\frac{c^{o{\ddagger}}_{d}}{\gamma^{\ddagger}_{d}}\exp\left(\frac{-\Delta G^{o{\ddagger}}_{d}}{k_{B}T}\right)\exp\left[-(1-\chi)\frac{\Delta U_{d}-\gamma\Omega}{k_{B}T}\cdot\frac{1}{n_{r,j,diss}}\right]Q_{r,d}V_{t}^{\alpha/3} (3)
r1,pr\displaystyle r_{1,pr} =κkBThcproγprexp(ΔGprokBT)exp[χΔUpr+γΩkBT1nr,j,nuc]Qr,prΔVVtα/31\displaystyle=\kappa\frac{k_{B}T}{h}\frac{c^{o{\ddagger}}_{pr}}{\gamma^{\ddagger}_{pr}}\exp\left(\frac{-\Delta G^{o{\ddagger}}_{pr}}{k_{B}T}\right)\exp\left[-\chi\frac{\Delta U_{pr}+\gamma\Omega}{k_{B}T}\cdot\frac{1}{n_{r,j,nuc}}\right]Q_{r,pr}\Delta V\cdot V_{t}^{\alpha/3-1} (4)

Eqs. 3 and 4 will be hereafter called ’straight’ rate equations, as opposed to ’net’ rates defined later in this section. κ\kappa is the probability of an activated complex evolving into reaction products; MASKE makes the common assumption that κ=1\kappa=1 (Lasaga, 2014). kBk_{B} and hh are the Boltzmann and Planck constants, and TT is the temperature in degrees Kelvin. cdoc^{o{\ddagger}}_{d} and cproc^{o{\ddagger}}_{pr} are the standard concentrations of activated complexes for the dissolution and precipitation reactions, γd\gamma^{{\ddagger}}_{d} and γpro\gamma^{o{\ddagger}}_{pr} are their activity coefficients, and ΔGdo\Delta G^{o{\ddagger}}_{d} and ΔGpro\Delta G^{o{\ddagger}}_{pr} are their standard free energies of activation. coc^{o{\ddagger}} and ΔGo\Delta G^{o{\ddagger}} can be estimated experimentally, noting that the whole prefactors in Eqs. 3 and 4 defines the rate constant kk:

k=κkBThcoγdexp(ΔGokBT)k=\kappa\frac{k_{B}T}{h}\frac{c^{o{\ddagger}}}{\gamma^{\ddagger}_{d}}\exp\left(\frac{-\Delta G^{o{\ddagger}}}{k_{B}T}\right) (5)

Eq. 5 implies that the arbitrary choice of coc^{o{\ddagger}} must be compensated by the value of ΔGo\Delta G^{o{\ddagger}}, so that a physical, univocally defined rate constant is preserved. The details of this compensation are discussed in F.

The VtV_{t} term in Eqs. 3 and 4 is the tributary volume of the particle being sampled for deletion or nucleation, viz. the volume of the interaction energy basin, whose local energy minimum is where the sampled particle sits. The user of MASKE must specify VtV_{t} in the ChemDBChemDB file; for solid phases governed by short-range interactions, VtV_{t} is typically in the range of one particle volume (see F for more discussion and examples of VtV_{t}). α\alpha is the spatial dimensionality of cdoc^{o{\ddagger}}_{d} or cproc^{o{\ddagger}}_{pr}; namely, α=3\alpha=3 if the reactions are per unit volume or, as typical for dissolution/precipitation, α=2\alpha=2 indicating reactions per unit surface. ΔV\Delta V is the cell volume of the user-defined lattice of trial particles sampling candidate nucleation sites. When the KMC algorithm sums all the nucleartion rates for trial particles pertaining to the same interaction energy basin, the sum of all ΔV\Delta V’s equals VtV_{t} (within the limits posed by the finite, and not infinitesimal, value of ΔV\Delta V). As a result, Vtα/3V_{t}^{\alpha/3} in Eqs. 3 equals the sum of all ΔVVtα/31\Delta V\cdot V_{t}^{\alpha/3-1} pertaining to the same interaction energy basin. This aspect is discussed in more detail in G.

The square brackets in Eqs. 3 and 4 quantify the excess enthalpy of a particle, resulting from two contributions: ΔUd\Delta U_{d}, which is the change in total interaction energy in the system caused by the particle deletion (ΔUpr\Delta U_{pr} is the analogous term for a nucleation even), andγ\gamma, which is the solid-solution interfacial energy attributed to the sampled particle, and user-defined in the ChemDBChemDB file. The Ω\Omega term, which multiplies γ\gamma in the excess enthalpy, is the surface area of the sampled particle. nr,j,dissn_{r,j,diss} and nr,j,nucn_{r,j,nuc} appear in the excess enthalpy because the allparallpar mechanism may be used for particles whose deletion or nucleation entails multiple chemical reactions; for the unimolecular resolution in this article, nr,j,diss=nr,j,nuc=1n_{r,j,diss}=n_{r,j,nuc}=1. The user-defined parameter χ\chi, with value between 0 and 0.5, specifies which fraction of excess enthalpy U+γΩU+\gamma\Omega is still present in the system when the reaction is in its activated complex state. χ=0\chi=0 is the usual assumption in TST, but results in this article will show that χ>0\chi>0 may sometimes improve the efficiency of a simulation.

The last terms to be defined in the rate equations are Qr,dQ_{r,d} and Qr,prQ_{r,pr}, which are the activity products of the reactants in the dissolution and precipitation reactions. If ii is the generic solvated reactant:

Qr=i(γici)νiQ_{r}=\prod_{i}(\gamma_{i}c_{i})^{\nu_{i}} (6)

where cic_{i} is the concentration in solution of the molecular species ii, νi\nu_{i} is its stoichiometric coefficient in the reaction, and γi\gamma_{i} is its activity coefficient. MASKE computes γi\gamma_{i} using the WATEQ Debye-Hückel formula (Truesdell and Jones, 1974):

log10(γi)=zi2AI1+BaioI+biIlog_{10}(\gamma_{i})=\frac{-z_{i}^{2}A\sqrt{I}}{1+Ba_{i}^{o}\sqrt{I}}+b_{i}I (7)

ziz_{i} is the charge of the ithi^{th} species. AA and BB are solvent-specific constants (0.51 and 3.29 nm-1 for water). aioa_{i}^{o} is the hydrated radius of the molecule in solution, and bib_{i} is a molecule-specific dimensionless constant; both these parameters are provided by the user in the ChemDBChemDB file. II is the ionic strength of the fluid, featuring nsn_{s} solvated species:

I=j=1nscjzj2I=\sum_{j=1}^{n_{s}}c_{j}z_{j}^{2} (8)

When aioa_{i}^{o} or bib_{i} are unknown, MASKE computes the activity coefficients using established simplified methods (Langmuir, 1997), detailed in F.

The straight rate expressions in Eqs. 3 and 4 sample all the fluctuations between particle deletion and nucleation that, on average, guide the overall morphology evolution of the system. However, many such fluctuations may cancel out, especially near equilibrium, leading to inefficient simulations where the overall morphology makes very little progress on average. In such scenarios it may be convenient to remove the fluctuations by considering net rates instead, defined as the difference between straight rates:

r1,dnet\displaystyle r_{1,d}^{net} =max0,r1,dr1,pr=\displaystyle=\max\langle 0,r_{1,d}-r_{1,pr}\rangle=
=max0,κkBThcdoγdexp(ΔGdokBT)Vtα/3\displaystyle=\max\left\langle 0,\kappa\frac{k_{B}T}{h}\frac{c^{o{\ddagger}}_{d}}{\gamma^{\ddagger}_{d}}\exp\left(\frac{-\Delta G^{o{\ddagger}}_{d}}{k_{B}T}\right)V_{t}^{\alpha/3}\cdot\right.
{exp[(1χ)ΔUdγΩkBT1nr,j,diss]Qr,dexp[χΔUd+γΩkBT1nr,j,diss]Qp,dKeq,d}\displaystyle\hskip 42.67912pt\left.\left\{\exp\left[-(1-\chi)\frac{\Delta U_{d}-\gamma\Omega}{k_{B}T}\cdot\frac{1}{n_{r,j,diss}}\right]Q_{r,d}-\exp\left[-\chi\frac{-\Delta U_{d}+\gamma\Omega}{k_{B}T}\cdot\frac{1}{n_{r,j,diss}}\right]\frac{Q_{p,d}}{K_{eq,d}}\right\}\right\rangle (9)
r1,prnet\displaystyle r_{1,pr}^{net} =max0,r1,prr1,d=\displaystyle=\max\langle 0,r_{1,pr}-r_{1,d}\rangle=
=max0,κkBThcproγprexp(ΔGprokBT)ΔVVtα/31\displaystyle=\max\left\langle 0,\kappa\frac{k_{B}T}{h}\frac{c^{o{\ddagger}}_{pr}}{\gamma^{\ddagger}_{pr}}\exp\left(\frac{-\Delta G^{o{\ddagger}}_{pr}}{k_{B}T}\right)\Delta V\cdot V_{t}^{\alpha/3-1}\cdot\right.
{exp[χΔUpr+γΩkBT1nr,j,nuc]Qr,prexp[(1χ)ΔUprγΩkBT1nr,j,nuc]Qp,prKeq,pr}\displaystyle\hskip 28.45274pt\left.\left\{\exp\left[-\chi\frac{\Delta U_{pr}+\gamma\Omega}{k_{B}T}\cdot\frac{1}{n_{r,j,nuc}}\right]Q_{r,pr}-\exp\left[-(1-\chi)\frac{-\Delta U_{pr}-\gamma\Omega}{k_{B}T}\cdot\frac{1}{n_{r,j,nuc}}\right]\frac{Q_{p,pr}}{K_{eq,pr}}\right\}\right\rangle (10)

These net rate equations are also implemented in MASKE, as a possible option for the allparallpar mechanism. Their derivation is detailed in F. Qp,dQ_{p,d} and Qp,prQ_{p,pr} are the activity products of the products of the dissolution and precipitation reactions, with Keq,dK_{eq,d} and Keq,prK_{eq,pr} their equilibrium constants. The reactants of a dissolution reaction and the products of a precipitation reaction are solid phases, conventionally in standard state when stress-free, thus Qr,d=Qp,pr=1Q_{r,d}=Q_{p,pr}=1. G shows how the net rates in Eqs. 9 and 10 effectively scale linearly with the saturation index β\beta of the solution for the associated chemical reaction; namely, r1,dnet(1β)r_{1,d}^{net}\sim(1-\beta) and r1,prnet(β1)r_{1,pr}^{net}\sim(\beta-1), as usual in Transition State Theory. The definition of β\beta is:

β=Qr,prKeq,d=Qp,dKeq,d\beta=\frac{Q_{r,pr}}{K_{eq,d}}=\frac{Q_{p,d}}{K_{eq,d}} (11)

noting that both the reactants of precipitation and the products of dissolution are simply the solvated species participating in the reaction. In a scenario where there is no excess enthalpy from changes in mechanical stress and interfacial energies, β=1\beta=1 would imply equilibrium, i.e. no dissolution nor precipitation taking place, whereas β>1\beta>1 would favour precipitation and β<1\beta<1 dissolution.

2.3 Interaction potentials between identical particles

The energy UU from mechanical interactions plays an important role in the reaction rates in MASKE, via the excess enthalpy terms ΔUdγΩ\Delta U_{d}-\gamma\Omega and ΔUpr+γΩ\Delta U_{pr}+\gamma\Omega in Eqs. 3 and 4, as implemented in the allparallpar mechanism. All the examples in this article will employ a truncated harmonic potential of interaction between pairs of identical, spherical particles, ii and jj:

Uij\displaystyle U_{ij} =12k0(rijr0)2ε0ifrij<rc\displaystyle=\frac{1}{2}k_{0}\left(r_{ij}-r_{0}\right)^{2}-\varepsilon_{0}\;\;\;\mathrm{if}\;r_{ij}<r_{c}
Uij\displaystyle U_{ij} =0ifrijrc\displaystyle=0\;\;\;\mathrm{if}\;r_{ij}\geq r_{c} (12)

Refer to caption

Figure 4: Truncated harmonic potential between two identical particles ii and jj, with interparticle distance rijr_{ij}, equilibrium distance r0r_{0} with minimum Uij=ε0U_{ij}=-\varepsilon_{0}, and interaction cutoff rcr_{c}.

plotted in Fig. 4. rijr_{ij} is the interparticle distance. When the particles are at their equilibrium distance r0r_{0}, the interaction energy UijU_{ij} is minimum and equal to the bond energy ε0-\varepsilon_{0}. The stiffness of the interaction is dictated by the k0k_{0} parameter. The cutoff distance for the interaction, rcr_{c}, is set here as the distance at which UijU_{ij} returns to zero when rij>r0r_{ij}>r_{0}; because of this definition, rcr_{c} is not an independent parameter, but it is fixed once r0r_{0}, k0k_{0}, and ε0\varepsilon_{0} are decided:

rc=r0+2ε0k0r_{c}=r_{0}+\sqrt{\frac{2\varepsilon_{0}}{k_{0}}} (13)

k0k_{0} is obtained from the Young modulus EE of the material of the particles:

k0=πE(D0/2)2r0k_{0}=\pi\frac{E(D_{0}/2)^{2}}{r_{0}} (14)

The particle diameter D0D_{0} is close but not equal to r0r_{0}, and their relationship depends on the modelling choice of the ‘limit crystal lattice’ of the solid phase. Depending on the type and range of the employed interaction potential, there are only several ordered arrangements, viz. crystal lattices, that are mechanically stable and where all the interacting particles sit at equilibrium distances. For instance, limit crystal lattices for the short-ranged, first-neighbour-only, radial interactions in Fig. 4, would be face centred cubic (FCC) or hexagonal close packing (HCP), both with nb=12n_{b}=12 first neighbours in the bulk. The mismatch between r0r_{0} and D0D_{0} emerges because any limit crystal lattice of spherical particles features a porosity and fills the space only up to a volume fraction η<1\eta<1. For example, both FCC and HPC lattices have packing fraction η=0.74\eta=0.74, hence a 26% porosity. However, if these limit lattices are used to discretise a non-porous continuum in a simulation, the maximum packing η\eta should represent a solid with same density as a non-porous phase, viz. with the same number of molecules, or mass, per unit volume. To exactly compensate for the artificial porosity 1η1-\eta, Coopamootoo and Masoero (2020) have proposed to use an r0r_{0} smaller than D0D_{0} by:

r0=Dη3r_{0}=D\sqrt[3]{\eta} (15)

The expressions of excess enthalpy in Eqs. 3 and 4 (ΔU±γΩ\Delta U\pm\gamma\Omega) impose a dependence between interaction potential ε0\varepsilon_{0} and solid-solution interfacial energy γ\gamma, which must be respected in order to produce physically meaningful simulations. Consider a particle in kink position in the crystal lattice, which by definition has nb/2n_{b}/2 first neighbours. Precipitating or dissolving a stress-free particle in a kink position should not change the excess enthalpy of the system, because it creates the same amount of solid-solution interfacial area as it removes. Such a dissolution (and similarly, in reverse, for precipitation) can be modelled, first, as a detachment of the kink particle from the solid, which causes a loss of nb/2n_{b}/2 inter-particle bonds each with energy ε0\varepsilon_{0} (accounted for in the ΔU\Delta U term), and second, as a dissolution of the detached particle which removes γΩ\gamma\Omega interfacial energy. This leads to:

ε0nb2=γΩε0=2γΩnb\varepsilon_{0}\frac{n_{b}}{2}=\gamma\Omega\;\;\rightarrow\;\;\varepsilon_{0}=\frac{2\gamma\Omega}{n_{b}} (16)

2.4 Interaction potentials between different particles

One example in this article will feature mechanical interactions between particles of two different types, with different sizes and representing different materials. For such scenarios, Alex et al. (2023) have proposed an extension of the truncated harmonic potential in Fig. 4:

Uij\displaystyle U_{ij} =12k12(rijr12)2ε12ifrij<rc,12\displaystyle=\frac{1}{2}k_{12}\left(r_{ij}-r_{12}\right)^{2}-\varepsilon_{12}\;\;\;\mathrm{if}\;r_{ij}<r_{c,12}
Uij\displaystyle U_{ij} =0ifrijrc,12\displaystyle=0\;\;\;\mathrm{if}\;r_{ij}\geq r_{c,12} (17)

The equilibrium distance r12=(r0,1+r0,2)/2r_{12}=(r_{0,1}+r_{0,2})/2 is the average of the equilibrium distances between identical particles for the two different types, 1 and 2. The stiffness term is expressed as k12=2k1k2k1+k2k_{12}=2\frac{k_{1}k_{2}}{k_{1}+k_{2}}, i.e. idealizing the interacting particles as two springs in series, with individual stiffness as per Eq. 14. The bond energy is ε12=γ12(Ω1+Ω2)nb\varepsilon_{12}=\frac{\gamma_{12}(\Omega_{1}+\Omega_{2})}{n_{b}}, with γ12\gamma_{12} the solid-solid interfacial energy between the particles and Ω1\Omega_{1} and Ω2\Omega_{2} their individual surface areas. Eq. 13 is still valid for the cutoff distance, using r12r_{12}, ε12\varepsilon_{12}, and k12k_{12} in it.

2.5 Example 1: dissolution, growth, and equilibrium of a stress-free crystal

A nanocrystal of calcium hydroxide, Ca(OH)2, is considered in this example. The crystal is immersed in an aqueous solution of Ca2+ and OH- ions at room temperature T=298T=298 K. The crystal is made of 4,055 spherical particles, each with the volume of one Ca(OH)2 molecule, Vp,CH=VM,CHNa=0.0557V_{p,CH}=\frac{V_{M,CH}}{N_{a}}=0.0557 nm3, where NaN_{a} is the Avogadro number and VM,CH=33.53V_{M,CH}=33.53 cm3/mol is the molar volume of calcium hydroxide (indicated as CHCH in the subscript). This brings to a particle diameter DCH=0.4737D_{CH}=0.4737 nm. The particles are initially arranged on an FCC lattice with cell size a=2r0,CHa=\sqrt{2}\;r_{0,CH}, which implies that r0,CHr_{0,CH} is the distance between first-neighbour particles in the lattice. Given the packing density η=0.74\eta=0.74 of the FCC lattice, Eq. 15 provides r0,CH=η3DCH=0.4285r_{0,CH}=\sqrt[3]{\eta}\;D_{CH}=0.4285 nm.

Refer to caption

Figure 5: (a) Initial configuration of the Ca(OH)2 nano-crystal, obtain from pre-dissolving a cubic crystal of Ca(OH)2 particles in FCC arrangement; (b) A section of the same nano-crystal surrounded by trial particles, used to sample precipitation of new particles. The trial particles are shown after minimization to their closest local energy minima, hence those in the inner part of the spherical shell region leave the perfect cubic arrangement of the initial lattice, driven by mechanical interactions with the other, already existing Ca(OH)2 particles (in red). Instead, the trial particles in the outer part of the spherical shell do not interact with any existing particle, hence they maintain the ordered cubic arrangement of the trial lattice.

The interaction potential between particles is the truncated harmonic one from Eq. 12. From the Young modulus ECH=48E_{CH}=48 GPa (Wittmann, 1986) of calcium hydroxide, Eq. 14 provides k0,CH=19,745k_{0,CH}=19,745 MPa\cdotnm. The bond energy ε0,CH\varepsilon_{0,CH} comes from Eq. 16, having considered an interfacial energy between calcium hydroxide and surrounding solution γ=68.4\gamma=68.4 mJ/m2 (Estrela et al., 2005) and nb=12n_{b}=12 first neighbours for a bulk particle in the FCC lattice. The interaction cutoff distance thus becomes rc,CH=0.457r_{c,CH}=0.457 nm, from Eq. 13; this entails a failure strain rc,CHr0,CHr0,CH6.5%\frac{r_{c,CH}-r_{0,CH}}{r_{0,CH}}\approx 6.5\%, which is reasonable at the molecular scale. With these interactions, an initially cubic grain of FCC-arranged calcium hydroxide particles is pre-dissolved as in Masoero (2023b), obtaining the rounded grain with diameter of ca. 7.3 nm in Fig. 5, which is the configuration for this example.

A very large volume of solution is placed in contact with the solid grain, by setting ΔVbox=1020\Delta V_{box}=10^{20} nm3. In this way, particle dissolution and precipitation negligibly change the concentration of solvated ions, which retain their initially assigned values 111The apparent volumes of solvated Ca2+ and OH- ions, set to -0.025129603 nm3 and 0.001030404 nm3 respectively (Lothenbach et al., 2019) in the ChemDBChemDB database, have a negligible effect in this example due to the large ΔV\Delta V attached to the simulation box. The chemical reactions underlying dissolution and precipitation here are:

Ca(OH)2Ca2++2OH\displaystyle Ca(OH)_{2}\rightarrow Ca^{2+}+2OH^{-}\;\;\; withKeq,d=6.30866106\displaystyle\mathrm{with}\;K_{eq,d}=6.30866\cdot 10^{-6}
Ca2++2OHCa(OH)2\displaystyle Ca^{2+}+2OH^{-}\rightarrow Ca(OH)_{2}\;\;\; withKeq,pr=1Keq,d=1.58512105\displaystyle\mathrm{with}\;K_{eq,pr}=\frac{1}{K_{eq,d}}=1.58512\cdot 10^{5} (18)

The value of Keq,dK_{eq,d} is taken from Lothenbach et al. (2019). The solvated ions are assigned the following parameters to calculate their activities as well as the ionic strength of the solution: zCa=+2z_{Ca}=+2, aCao=0.486a_{Ca}^{o}=0.486 nm, bCa=0.15b_{Ca}=0.15, and zOH=1z_{OH}=-1, aOHo=1.065a_{OH}^{o}=1.065 nm, bOH=0.064b_{OH}=0.064 (Lothenbach et al., 2019). In this way, the activity product of the solvated ions for Eq. 18 can be computed for any initially imposed set of concentrations. The explored concentrations range from 0 for both Ca2+ and OHOH^{-} (saturation index β=0\beta=0) to cCa=39.1c_{Ca}=39.1 mmol/L, cOH=78.2c_{OH}=78.2 mmol/L (i.e. pH =12.89=12.89 and β=10\beta=10). Chemical equilibrium in stress-free conditions is expected at β=1\beta=1, which implies cCa=16.43c_{Ca}=16.43 mmol/L and cOH=32.86c_{OH}=32.86 mmol/L (pH =12.51=12.51) for the fixed cOH/cCa=2c_{OH}/c_{Ca}=2 ratio assumed here to ensure charge neutrality of the solution.

For the dissolution reaction in Eq. 18, the activation energy ΔGdo\Delta G^{o{\ddagger}}_{d} and standard state concentration of the activated complex cdc^{{\ddagger}}_{d} are both computed from the rate constant of Ca(OH)2 dissolution in Bullard (2007): k=0.66μk=0.66\;\mumol m-2 s-1. The conversion from 1μ1\;\mumol m-2 to number of reactions per nm2nm^{2}, which are the simulation units, yields cd=106Na/1018=0.6022c^{{\ddagger}}_{d}=10^{-6}N_{a}/10^{18}=0.6022 nm-2. Eq. 5 then provides ΔGdo=74\Delta G^{o{\ddagger}}_{d}=74 kJ/mol =122.9=122.9 ag nm2 ns-2 in simulation units. For the precipitation reaction in Eq. 18, cpr=cdc^{{\ddagger}}_{pr}=c^{{\ddagger}}_{d} is assumed, thus ΔGpro=ΔGdo+kBTln(Keq,d)=45\Delta G^{o{\ddagger}}_{pr}=\Delta G^{o{\ddagger}}_{d}+k_{B}T\ln(K_{eq,d})=45 kJ/mol =74=74 ag nm2 ns-2. The activity coefficients of the activated complex are taken as γd=γpr=1\gamma^{\ddagger}_{d}=\gamma^{\ddagger}_{pr}=1, as usual for reactions involving solids (Domínguez et al., 1998).

Deletion of existing particles and nucleation of trial particles are sampled using two different subcommunicators: subAsubA with 1 processor, and subBsubB with 2 processors. For particle nucleation, a cubic lattice of 50,656 trial particles is employed, with lattice spacing r0,CH/2r_{0,CH}/2 in all three directions. The trial lattice is only created in a spherical shell region with inner and outer radii of 1.8 and 5 nm respectively, as shown in Fig. 5; this avoids the computational cost of sampling unlikely precipitation events far from the surface of the initial crystal, while leaving room for enough growth or dissolution to reach a steady state regime with constant average reaction rate. For the trial particles to move into a local minimum of interaction energy, 600 steps of energy minimisation are performed using the aforementioned quickmaskequickmaske algorithm, with time step of 0.45 ps and a maximum displacement per step of r0,CH/200r_{0,CH}/200. Such a short minimization is appropriate because, for the interactions used here, a particle only needs to move by r0,CHr_{0,CH} or less, to find its closest local energy minimum. The ions added/removed to/from the solution after particle dissolution/precipitation are distributed between the volume of solution VsolV_{sol} in the simulation box and the additional ΔVbox\Delta V_{box} in proportion to their volumes. However, since ΔVboxVsol\Delta V_{box}\gg V_{sol}, changes in ion concentrations and saturation index saturation β\beta within the simulation box are negligible here. After each accepted dissolution or precipitation event, a process of type EveryEvery is invoked, which minimizes the total interaction energy by displacing all the real particles in the system; this is done via 10,000 steps of the LAMMPS quickminquickmin algorithm, with timestep of 1 ps and a maximum displacement per step of 0.2 nm.

2.6 Example 2: strain-rate effect on a crystal under stress-driven dissolution

The nanocystal of Ca(OH)2 from the previous example is now brought into initial contact with two platens, via a procedure detailed in Masoero (2023b): see Fig. 6.a. The platens are arbitrarily discretized with particles of diameter DS=0.6D_{S}=0.6 in an FCC lattice, hence with equilibrium distance r0,S=η3DS=0.5427r_{0,S}=\sqrt[3]{\eta}D_{S}=0.5427. The mechanical interactions between particles in the platens are of the form in Eq. 12, with elastic modulus typical of steel, ES=200E_{S}=200 GPa, which yields a high interaction stiffness, k0,S=208,397k_{0,S}=208,397 MPa\cdotnm A high interfacial energy is then assumed between platen particles and the solution, γS=200\gamma_{S}=200 mJ m2{}^{-}2, which leads to ε0,S=37.70\varepsilon_{0,S}=37.70 MPa\cdotnm3. The resulting cutoff for the platen particles is rc,S=0.5617r_{c,S}=0.5617 nm, viz. a strain at failure of ca. 3.5%. The mechanical interactions between platen and Ca(OH)2 particles are of the form in Eq. 17, with equilibrium distance r0,CHS=0.4856r_{0,CH-S}=0.4856 nm and interaction stiffness kCHS=33,200k_{CH-S}=33,200 MPa\cdotnm, obtained from the already computed, individual r0r_{0} and stiffness of the two particle types. The platen-Ca(OH)2 bond energy is set to εCHS=0\varepsilon_{CH-S}=0, making the interaction purely repulsive, i.e. rc,CHS=r0,CHSr_{c,CH-S}=r_{0,CH-S} and no bond under tension.

Refer to caption

Figure 6: (a) Crystal of Ca(OH)2 in initial contact with two platens; (b) Section of the crystal showing the distribution of per-particle virial stress σz,i\sigma_{z,i} after a small downward displacement of the top platen.

The volume of the simulation box is set to Vbox=8,000V_{box}=8,000 nm3, with an additional volume in contact with it ΔVbox=10,000\Delta V_{box}=10,000 nm3. The initial volume of the crystal is given by the initial number of Ca(OH)2 particles times their individual volume, V0,CH=N0,CHVp,CH=40550.0557=226V_{0,CH}=N_{0,CH}\cdot V_{p,CH}=4055\cdot 0.0557=226 nm3, hence the initial volume of solution (in VboxV_{box} plus in ΔVbox\Delta V_{box}) is Vsol,tot18,000V_{sol,tot}\approx 18,000 nm3. The change in concentration of Ca2+ and OH- ions in solution caused by the dissolution of one Ca(OH)2 can be approximately estimated by neglecting the changes in solution volume caused by the reaction (MASKE accounts for them, through the volume of the Ca(OH)2 particle and the apparent volumes of solvated Ca2+ and OH- ions given in Section 2.5). For Ca2+, a dissolution event releases one molecule, hence changing cCac_{Ca} approximately by 1/Vsol,tot921/V_{sol,tot}\approx 92 μ\mumol/L; for OH- ions the change is 2/Vsol,tot1842/V_{sol,tot}\approx 184 μ\mumol/L. Therefore, in this example the dissolution of Ca(OH)2 particles during a simulation may significantly change the concentrations of ions in solution, and thus the saturation index β\beta.

Only the Ca(OH)2 particles are allowed to dissolve and to nucleate, via the same chemical reactions, thermodynamic and kinetic parameters, and trial precipitation lattice as in Example 1. The initial ion concentrations are set to cCa=0.01643c_{Ca}=0.01643 mol/L and cOH=0.03286c_{OH}=0.03286 mol/L, implying β=1\beta=1. This means that no sustained dissolution nor precipitation is expected in stress-free conditions. All the particles in both platens are constrained not to move under the action of forces; this is done using the setforcesetforce fix in LAMMPS. However, the particles in the top platen are rigidly displaced towards the bottom platen by 0.01 nm (via the displace_atomsdisplace\_atoms command in LAMMPS) every dtdt nanoseconds of simulated time in MASKE. This is done by using a continuous process of mstoreLMPmstoreLMP type in the MASKE input script. The chosen value of dtdt controls the downward velocity of the top platen: vz=0.01/dtv_{z}=0.01/dt nm/ns. The initial distance between the centres of mass of the two platens is 9.12 nm, hence the imposed strain rate is estimated in ϵz˙0.01/dt/9.12=1.1103/dt\dot{\epsilon_{z}}\approx 0.01/dt/9.12=1.1\cdot 10^{-3}/dt ns-1.

The platens put the Ca(OH)2 crystal under compression: see Fig. 6.b. The average compressive stress in the crystal, σz\sigma_{z}, is estimated as the per-particle virial stress in zz direction for each Ca(OH)2 particles, σz,i\sigma_{z,i} (computed in LAMMPS via a computecompute of type stress/atomstress/atom), averaged over all the NCHN_{CH} particles of Ca(OH)2 existing at any time in the simulation:

σz,i=1Vp,ij=1Nn,i(ziFz,j+zjFz,i)\sigma_{z,i}=\frac{1}{V_{p,i}}\sum_{j=1}^{N_{n,i}}\left(z_{i}\cdot F_{z,j}+z_{j}\cdot F_{z,i}\right) (19)

Vp,iV_{p,i} is the volume of the ith particle, j is the index of a neighbouring particle (of any type), Nn,iN_{n,i} is the number of neighbours mechanically interacting with particle ii, zz is the Z coordinate of the two interacting particles, and FzF_{z} is the Z component of the force on each particle stemming from the pairwise interaction. The presence of per-particle stresses entails a nonzero excess enthalpy in the rate equations for dissolution and precipitation. As a result, the compression is expected to trigger dissolution of Ca(OH)2 even if the solution is initially at β=1\beta=1. As the compressive strain increases, dissolution will help relaxing the increasing σz\sigma_{z}, but the concurring increase in ion concentrations in solution, and thus of β\beta, will try to slow down dissolution and even cause precipitation of new Ca(OH)2 particles in stress-free regions of the crystal surface. All this will result in a complex kinetic balance between solution chemistry and mechanical stress, which will depend on the imposed strain rate and generate a non-trivial evolution of the crystal morphology through dissolution/precipitation events and plastic deformations.

3 Results

3.1 Example 1: dissolution, growth, and equilibrium of a stress-free crystal

This section considers the Ca(OH)2 nanocrystal described in Section 2.5, with the aim of assessing: (1) whether the simulations correctly predict the transition from crystal dissolution to growth that, for stress-free crystals, is expected as the solution goes from undersaturated (β<1\beta<1) to supersaturated (β>1\beta>1); (2) the variability in the results stemming from the random numbers involved in the Kinetic Monte Carlo algorithm (see B to appreciate the role of random numbers); (3) how the fineness of the lattice of trial particles may impact the results; (4) the pros and cons of using straight or net rates (viz. Eqs. 3 and 4 rather than Eqs. 9 and 10).

Fig. 7 shows precipitation and dissolution rates obtained from simulations using net rates. The rates are expressed per unit area of crystal surface SS and per unit time. To estimate SS, knowing the volume VpV_{p} of a Ca(OH)2 particle and the number NCHN_{CH} of particles at any give time in a simulation, one can compute the total volume of the crystal VpNCHV_{p}N_{CH}, and set S=π(6VpNCH/π)2/3S=\pi(6V_{p}N_{CH}/\pi)^{2/3}, having approximated the whole crystal as a sphere. Fig. 7.a shows a typical curve of precipitation rate (averaged over the 100 KMC events before the current one) vs. simulated time. The time scale extends to various seconds, despite the nanometre scale of the system: this ability to sample long time scales irrespective of the length scale being considered, is a strength of the KMC approach. Fig. 7.a also shows a steady state of constant rate in the initial part of the simulation; this happens for all β1\beta\leq 1 and β8\beta\geq 8 values, but not when 1<β<81<\beta<8. The steady state values are plotted against β\beta in Fig. 7.b; for the 1<β<81<\beta<8 range, the plotted rate is the one averaged over the first 100 KMC steps of a simulation. Fig. 7.b shows that: (i) dissolution (viz. a negative precipitation rate) is correctly predicted when β<1\beta<1, as well as precipitation when β<1\beta<1 and and chemical equilibrium (viz. zero rate) when β=1\beta=1. The figure also shows that the sequence of pseudo-random numbers used in the KMC algorithm has a negligible effect on the average rates (‘seed 1’ and ‘seed 2’ indicate two difference sequences).

Refer to caption

Figure 7: (a) Precipitation rate as a function of time for a Ca(OH)2 crystal in a supersaturated solution with β=10\beta=10. The rate is normalized per unit area of crystal surface and per unit time; (b) Initial rates of dissolution and precipitation at various saturation levels, showing the expected transition across chemical equilibrium at β=1\beta=1 for two different sequences of pseudo-random numbers in the KMC algorithm (seed 1 and seed 2); (c) Final crystal configuration after precipitation at β=10\beta=10.

Transition State Theory (TST) predicts a linear relationship between rates per unit surface and β\beta; by contrast the simulations, despite using rates that are based on TST, produce a nonlinearity in the 1<β<81<\beta<8 range: see Fig. 7.b. This effect is due to the crystal morphology. An overall linear relationship, as per TST, requires that kink sites are not exhausted during precipitation; this is possible if there is a very large number of such sites in the initial crystal, which is not the case for the nanocrystal simulated here. Alternatively, new kink sites must be created rapidly, which is possible if β\beta is large compared to the energy barriers of precipitating particles with fewer neighbours nn than a kink site, ΔGn=ε0(nkinkn)\Delta G_{n}=\varepsilon_{0}(n_{kink}-n), or if rare, energetically unfavourable fluctuations favour precipitation in under-coordinated sites, such as adatoms, which provide starting points for the growth of new layers. The latter scenario is impossible when net rates are used, as they average out all the energetically unfavourable fluctuations. As a result in Fig. 7.b, when 1<β<81<\beta<8, precipitation is short-lived as it only consumes the initial kink sites. The continuous exhaustion of kink sites causes a continuous decrease in rate, which explains why a steady state is not established in said range. When β8\beta\geq 8, instead, new kink sites can be formed on certain crystal facets and precipitation can proceed further and faster. However, when the layers growing from facets on which new kinks can form at β=10\beta=10 are exhausted, precipitation stops and the crystal ends up with the clear-cut morphology in Fig. 7.c. Even higher β\beta values would enable formation of new kinks on other facets too, thus sustaining further precipitation; a systematic exploration of these β\beta thresholds is not of primary interest here, but an indication of this process at play will be given later in Example 2. A close inspection of Fig. 7.b reveals a nonlinear increase in dissolution rate also as β\beta approaches 0. This happens because a very low β\beta enables the dissolution of sites that are more coordinated than kinks, creating vacancies (or ‘pits’) on the crystal surfaces where new dissolution fronts can emanate, accelerating the overall process.

The effect of energetically unfavourable fluctuations is shown in Fig. 8.a,b, with simulation results from using straight rates. The χ\chi parameter in the rate equations controls how prevalent the effects of fluctuations are. The explored values are χ=0\chi=0 (as usual in Transition State Theory), which attributes all the excess enthalpy from mechanical interactions to the dissolution reaction only and maximizes the fluctuations, to χ=0.5\chi=0.5, which equally distributes the excess enthalpy between dissolution and precipitation, minimizing fluctuations but not removing them (as opposed to net rates). Fig. 8.a shows that all the results from straight rates predict a linear relationship between overall rate and β\beta, also in the 1β81\leq\beta\leq 8 range where net rates were unable to nucleate new crystal layers. Straight rates instead always enable the formation and stabilization of adatoms (e.g. those circled in Fig. 8.b) which allow for indefinite growth. A close inspection of Fig. 8.a reveals a slight shift of equilibrium (i.e. rate = 0) towards β\beta values that are slightly greater than 1; this is the effect of relying on an estimated value of VtV_{t} when explicitly sampling both dissolution and precipitation events (here VtV_{t} was set to Vp,CHrc,CHr0,CHV_{p,CH}\frac{r_{c,CH}}{r_{0,CH}}).

Refer to caption

Figure 8: (a) Precipitation rate vs. β\beta curves from using straight rates; (b) a typical final morphology from simulations with straight rates and χ=0.5\chi=0.5 (this one is for β=10\beta=10). A few adatoms are circled in black, which result from energetically unfavourable fluctuations and provide nucleation spots for the growth of new layers; (c) Effect of the fineness of the cubic trial lattice for precipitation, whose spacing is scaled here by a factor ζ\zeta, such that the spacing is ζr0,CH/2\zeta\cdot r_{0,CH}/2. The kinetics in (c) are for simulations with net rates, at β=10\beta=10.

All the simulations with straight rates, β>1\beta>1, and χ=0.5\chi=0.5 produce the same morphology as in Fig. 8.b, which is reached when the entire nucleation lattice is covered by real particles; further growth is expected if bigger lattices were used. The same morphology is expected to emerge when χ=0\chi=0 and χ=0.05\chi=0.05, but in this case the simulations were stopped after a few thousands atoms precipitated, because of the high computational cost of sampling many unlikely fluctuations. Indeed, the precipitation of ca. 500 particles at β=10\beta=10 required ca. 10,000 KMC steps in simulations with χ=0\chi=0 and 8,000 steps when χ=0.05\chi=0.05, as opposed to 800 steps with χ=0.5\chi=0.5, and 500 steps for net rates. On the other hand, Fig. 8.a shows that the precipitation rates compute with χ=0\chi=0 are significantly underestimated in all the other simulations with χ>0\chi>0, as well as when net rates are used. This confirms that rare fluctuations are important for quantitatively capturing the nucleation of new layers. Therefore, when using MASKE one should judge on a case-by-case basis whether to use straight or net rates and, in case, which value of χ\chi, in order to balance the requirements of running rapid calculations, predicting qualitatively correct mechanisms, and obtaining quantitatively correct rates.

A last parametric study here concerns the impact of the fineness of the nucleation lattice on the resulting average rates. For simulations using net rates, Fig. 8.c shows the temporal increase in NCHN_{CH} at β=10\beta=10 when cubic nucleation lattices of different spacing ζr0,CH/2\zeta\cdot r_{0,CH}/2 are employed. All simulations with lattice spacing less than r0,CH/2r_{0,CH}/2, viz. with ζ1\zeta\leq 1, return very similar results 222The simulation with ζ=0.33\zeta=0.33 was stopped earlier because it entailed the sampling of ca. 1.4 million trial particles, as opposed to ca. 50,000 when ζ=1\zeta=1 and ca. 6,000 when ζ=2\zeta=2. Coarser lattices however, with ζ>1\zeta>1, underestimate precipitation because they miss energetically convenient minima in the interaction energy landscape. This indicates that a nucleation lattice spacing of r0,CH/2r_{0,CH}/2 or less is appropriate for the simulations and the mechanical interaction potentials considered here.

3.2 Example 2: strain-rate effect on a crystal under stress-driven dissolution

In this example, the Ca(OH)2 crystal from the previous section is surrounded by a relatively small volume of solution, which is initially at chemical equilibrium with the crystal itself, viz. β=1\beta=1. The crystal is then subjected to a compressive strain with fixed rate, which should favour the dissolution of particles under high mechanical stress. The dissolving particles increase the concentration of Ca2+ and OH- in solution, hence its saturation index β\beta too; this may cause precipitation of new Ca(OH)2 particles in regions of the crystal surface that are under low mechanical stress. At high imposed strain rates, plastic deformations may occur too.

Fig. 9 shows the deformation and stress field of the Ca(OH)2 crystal when compressed at different strain rates ϵ˙z\dot{\epsilon}_{z}. The KMC algorithm in MASKE allows exploring a broad range of strain rates, here from 10810^{8} s-1 to 10410^{-4} s-1; this is valuable because the experiments typically impose rates in the order of the lowest values here, which are difficult to reach with other simulation techniques (e.g. molecular dynamics; Cao et al. (2019)). All the simulations in Fig. 9 employed net rates; some considerations on the effect of straight rates will be made later in this section.

At low strain rates, ϵ˙z104\dot{\epsilon}_{z}\sim 10^{-4} s-1 in Fig. 9, the dissolution triggered by the per-particle stress (via the excess enthalpy in the rate equations) is fast compared to the deformation process. As a result, the dissipation of local stress σz,i\sigma_{z,i} through dissolution is efficient, therefore the local stress remains relatively low even at high ϵz\epsilon_{z}, as shown by the dark violet color in the ϵz=40\epsilon_{z}=40% snapshot in Fig. 9. The same snapshot shows significant recrystallization, driven by the increase of β\beta in solution eventually triggering precipitation of new Ca(OH)2 in low-stress regions.

Higher strain rates induce higher per-particle stresses σz,i\sigma_{z,i}: see ϵ˙z=1.1\dot{\epsilon}_{z}=1.1 and 108\sim 10^{8} s-1 in Fig. 9. For compatibility of displacements, the rate at which a layer of particles in contact with the platens dissolves must equal the velocity at which the top platen moves. A higher strain rate entails a higher platen velocity, which requires a higher dissolution rate, achieved by allowing a slightly higher strain before dissolution, which in turn increases the local stress and thus the excess enthalpy term in the rate. Fig. 9 also shows that little recrystallization takes place at high strain rates. This is because the precipitation rate scales linearly with β\beta, and therefore with the number of dissolved particles (assuming that no reprecipitation takes places at all, which is a good approximation at high strain rates). At a given strain level ϵz\epsilon_{z}, the number of dissolved particles is basically the same irrespective of the imposed strain rate (for sufficiently high ϵ˙z\dot{\epsilon}_{z}). By contrast, the strain rates have been increased by orders of magnitude here, as well as the dissolution rates required to accommodate the strain; in the resulting short timescales of the deformation/dissolution processes, precipitation events become rare. In the simulation with highest strain rate, 108\sim 10^{8} s-1, the animation of the full chemo-mechanical process in Fig. 9 shows that plastic shear slips along crystalline planes occur at high strain levels, ϵz30%\epsilon_{z}\gtrsim 30\%. Such slips are not recorded at lower strain rates, where the dissolution-induced relaxation of local stresses prevents the activation of plastic deformations.

Refer to caption

Figure 9: Snapshots from simulations of a Ca(OH)2 nanocrystal deforming, dissolving, and reprecipitating under a compression imposed at a constant strain rate ϵ˙z\dot{\epsilon}_{z}. The color map highlights the per-particle virial stress σz,i\sigma_{z,i}.

Fig. 9 also shows results for a purely mechanical response, i.e. with both dissolution and precipitation turned off. The simulation was conducted at a low strain rate ϵ˙z104\dot{\epsilon}_{z}\sim 10^{-4} s-1, but the same result would be obtained at higher strain rates because the particles are brought to static equilibrium between two successive execution of the platen-moving continuous process in MASKE (static equilibrium is imposed via a MASKE process of type EveryEvery performing energy minimization in MASKE). Therefore inertial effects do not contribute to rate-dependence here. The purely mechanical response in Fig. 9 is somewhat similar to the coupled chemo-mechanical one at high ϵ˙z108\dot{\epsilon}_{z}\sim 10^{8} s-1, but with some important differences too. At low strain levels (see ϵz=10%\epsilon_{z}=10\% in Fig. 9), even the limited dissolution taking place at ϵ˙z108\dot{\epsilon}_{z}\sim 10^{8} s-1 is sufficient to reduce the local stresses compared to the purely mechanical test. At ϵz20%\epsilon_{z}\sim 20\% and 40%40\% the purely mechanical test displays a wider low-stress region near the surface of the crystal; the particles in this region do not contribute significantly to the overall mechanical response to the compression. Partial dissolution at ϵ˙z108\dot{\epsilon}_{z}\sim 10^{8} instead moulds the crystal layers in contact with the platens, removing particles with high σz,i\sigma_{z,i} that induce stress concentration, and thus enabling a more uniform mechanical response. Another distinctive aspect of the purely mechanical test is that extensive plastic deformations from shear slips already start at ϵz17%\epsilon_{z}\approx 17\%, and a fully developed central shear band controls the entire deformation response at ϵz30%\epsilon_{z}\gtrsim 30\%. In the dissolving crystal with ϵ˙z108\dot{\epsilon}_{z}\sim 10^{8}, instead, small and isolated, plastic shear slips only start appearing at ϵz30%\epsilon_{z}\approx 30\%.

Fig. 10.a shows the stress strain curves computed at different strain rates ϵ˙z\dot{\epsilon}_{z}. A higher ϵ˙z\dot{\epsilon}_{z} produces a higher average compressive stress σz\sigma_{z}; this reflects the already-discussed need for faster dissolution (whose rate depends on local stresses) to ensure compatibility of displacements at the platen-crystal interface.

Refer to caption

Figure 10: (a) Stress-strain curves for the Ca(OH)2 nanocrystal from simulations at different strain rates ϵ˙z\dot{\epsilon}_{z}; (b) Evolution of saturation index β\beta during the simulations; (c) Evolution of the precipitation rate (negative for dissolution), averaged over 100 KMC steps, from the simulations with ϵ˙z104\dot{\epsilon}_{z}\approx 10^{-4} and 11 s-1.

A counter-intuitive result in Fig. 10.a is that crystals that are allowed to dissolve, when compressed at high rates, are stronger than crystals that are not allowed dissolve. This is indicated in Fig. 10.a, by the higher peak σz\sigma_{z} of the curve for ϵ˙z108\dot{\epsilon}_{z}\approx 10^{8} s-1, compared to the ‘mech. only’ curve. The ‘mech. only’ curve lacks the mechanism of particle dissolution, which helps relaxing the local stresses on particles while ensuring compatibility of displacement at the crystal-platen interface. Such compatibility, in the ‘mech. only’ simulation, relies entirely on mechanical deformations; these are initially elastic and, when local stresses become too high, plastic shear slips are triggered and relax the local stress. One may thus expect that the ‘mech. only’ simulation, being more constrained, would produce a higher σz\sigma_{z} than simulations where dissolution is possible too. This is indeed the case at low strain levels: see ϵz<0.2\epsilon_{z}<0.2 in Fig. 10.a. However, the first extensive shear slips in the ‘mech. only’ simulation occur already at ϵz17%\epsilon_{z}\approx 17\%. After that point, subsequent shear slips effectively cap the peak stress σz\sigma_{z} to ca. 2’000 MPa. By contrast, in the ϵ˙z108\dot{\epsilon}_{z}\approx 10^{8} s-1 simulation, dissolution of the most stressed particles limits the maximum local stress, which gets redistributed as a lower stress to the particles neighbouring the dissolved one. All this leads to a more uniform stress distribution in the crystal (see Fig. 9) while also delaying the triggering of plastic slips until ϵz30%\epsilon_{z}\approx 30\%. As a result, the peak stress σz\sigma_{z} in the ϵ˙z108\dot{\epsilon}_{z}\approx 10^{8} s-1 is ca. 2’500 MPa, greater than in the ‘mech. only’ case.

Another finding from Fig. 10.a is the stepwise stress-strain curve at the lowest strain rate, ϵ˙z104\dot{\epsilon}_{z}\approx 10^{-4} s-1. Specifically, σz\sigma_{z} increases with ϵz\epsilon_{z} for a while, then it oscillates around a constant value while ϵz\epsilon_{z} keeps increasing, until a new regime of increasing σz\sigma_{z} is entered, and so forth. Three such steps can be counted in Fig. 10.a. This behaviour is the result of the kinetic chemo-mechanical balance established during the simulations. At low rates ϵ˙z\dot{\epsilon}_{z}, no plastic deformations are triggered and particle dissolution is the only mechanisms to accommodate the externally imposed ϵ˙z\dot{\epsilon}_{z}. When compression starts, the first dissolution events release ions in solution, raising the saturation index β\beta for Ca(OH)2 precipitation: see the increasing β\beta at ϵz<0.15\epsilon_{z}<0.15 in the ϵ˙z104\dot{\epsilon}_{z}\approx 10^{-4} s-1 curve in Fig. 10.b. With the net rate equations used here, Example 1 in the previous section has shown that no significant precipitation is possible when β8\beta\lesssim 8, hence β\beta keeps increasing. The increasing β\beta slows down dissolution but, since the overall rate ϵ˙z\dot{\epsilon}_{z} is imposed and must be matched, a compensating increase in dissolution rate is made possible through an increase in mechanical stress (which increases the excess enthalpy term in the dissolution rate equation). This explains the regimes of increasing σz\sigma_{z} in Fig. 10.a, which indeed correspond to regimes of increasing β\beta in Fig. 10.b. At β8\beta\approx 8, particle precipitation consumes any further ion that dissolution releases in solution, so that the average rate (precipitation minus dissolution over 100 KMC steps) oscillates around zero: see the curve for ϵ˙z104\dot{\epsilon}_{z}\approx 10^{-4} s-1 in Fig. 10.c when 0.15<ϵz<0.30.15<\epsilon_{z}<0.3. As a result, β\beta now remains constant while ϵz\epsilon_{z} increases, and the constant overall rate ϵ˙z\dot{\epsilon}_{z} implies that the stress σz\sigma_{z} must remain constant too. This explains the matching plateaus in Figs. 10.a and 10.b. The first plateau continues until exhausting all the surface sites where precipitation at β8\beta\approx 8 is possible: cf. the final morphology in Fig. 7.b. Then a new regime of increasing β\beta and σz\sigma_{z} is entered, until a new plateau occurs at β50\beta\approx 50, when precipitation on other exposed crystal surfaces becomes possible too. The new plateau again corresponds to a net dissolution rate oscillating around zero, in Fig. 10.c. All this describes a complex, kinetic equilibrium between composition of the solution, stress state in the crystal, and microstructural evolution.

The stepwise shape of the stress-strain curve is lost at higher strain rates, as shown by the ϵ˙z1\dot{\epsilon}_{z}\approx 1 s-1 curves in Fig. 10. Additional results omitted here show a progressive reduction and disappearance of the plateaus for intermediate rate values between ϵ˙z104\dot{\epsilon}_{z}\approx 10^{-4} s-1 and 1 s-1. This means that, despite some particles do still precipitate when β8\beta\gtrsim 8, they cannot compete any more with the faster rate of the dissolving particles. Consistently, when ϵ˙z1\dot{\epsilon}_{z}\approx 1 s-1 the saturation index β\beta increases monotonically in Fig. 10.b and the average dissolution rate never goes to zero in Fig. 10.c. The β(ϵz)\beta(\epsilon_{z}) curves in Fig. 10.b for ϵ˙z1\dot{\epsilon}_{z}\approx 1 and 10+410^{+4} s-1 are similar, meaning that dissolution progresses at a similar rate. This is expected because, in a scenario where precipitation is negligible, the total amount of dissolved ions depends only on the accommodated strain ϵz\epsilon_{z}. If β\beta is approximately identical for ϵ˙z1\dot{\epsilon}_{z}\approx 1 and 10+410^{+4} s-1, then σz\sigma_{z} is necessarily greater at the higher imposed rate, since only σz\sigma_{z} now can speed up the dissolution rate to match ϵ˙z\dot{\epsilon}_{z}. Less intuitively, the β(ϵz)\beta(\epsilon_{z}) curve for ϵ˙z108\dot{\epsilon}_{z}\approx 10^{8} s-1 in Fig. 10.b is initially similar to those for ϵ˙z1\dot{\epsilon}_{z}\approx 1 and 10+410^{+4} s-1, but it significantly diverges from them at ϵz0.20.3\epsilon_{z}\approx 0.2-0.3, leading to less concentrated solutions at high strain levels ϵz\epsilon_{z}. The reason for this lies in the triggering of plastic deformations at high rate, ϵ˙z108\dot{\epsilon}_{z}\approx 10^{8} s-1, which cap the stress level (see σz\sigma_{z} at ϵz0.3\epsilon_{z}\gtrsim 0.3 in Fig. 10.a) and provide another mechanism to accommodate the imposed strain. With a capped σz\sigma_{z}, the increasing β\beta reduces the dissolution rate, which in turn reduces the slope of the β(ϵz)\beta(\epsilon_{z}) curve in Fig. 10.b. The resulting interdependence between plastic deformations and composition of the solution is another non-trivial result of the chemo-mechanical coupling in MASKE.

All the results in this section are from simulations where the allparallpar mechanism in MASKE employed net rates of dissolution and precipitation, as per Eqs. 9 and 10. Additional tests were conducted using straight rates too, as per Eqs. 3 and 4, with χ\chi values between 0 and 0.5. At high strain strain rates, ϵ˙z1\dot{\epsilon}_{z}\gtrsim 1 s-1, straight and net rates produce almost identical results; this is expected, since the main effect of using straight straight is to favour precipitation, which plays a negligible role at high ϵ˙z\dot{\epsilon}_{z}. Instead, at low ϵ˙z1\dot{\epsilon}_{z}\lesssim 1, simulations using straight rates produced lower β(ϵz)\beta(\epsilon_{z}) than those from net rates at same ϵ˙z\dot{\epsilon}_{z}. This agrees with the findings from Example 1 in the previous section, where straight rates were shown to enable precipitation at lower β\beta values. Therefore, simulations with straight rates are indeed expected to produce plateaus in β\beta and σz\sigma_{z} at lower ϵz\epsilon_{z} than simulations with net rates. These aspect, however, should be studied further because the efficiency loss from using straight rates significantly limited the maximum ϵz\epsilon_{z} that could be reached during the simulations. For the purpose of this paper, the results presented here for net rates have already demonstrated how MASKE can predict the emergence of a complex kinetic balance between chemical and mechanical processes over long time scales.

4 Conclusion and outlook

The article has introduced MASKE, a kinetic simulator of microstructural evolution driven by chemical reactions and mechanical stress. Solid domains are modelled as mechanically interacting particles, while the surrounding environment, which was an aqueous solution in the examples here, is modelled implicitly through the concentrations of molecular species in it. The composition of the solution co-evolves with the solid phases, in respect of mass conservation, all while dissolution and precipitation reactions transform molecules from the solid into solvated species and vice versa.

The uniqueness of MASKE stems from several key strengths:

  1. 1.

    MASKE implements an off-lattice, rejection-free, Kinetic Monte Carlo (KMC) framework to simulate the dissolution and precipitation of particles. This framework gives access to realistic time scales that are relevant for the experiments;

  2. 2.

    MASKE features original chemo-mechanical rate equations for dissolution and precipitation, which capture the effect of mechanical stress on the reaction rates. To simulate the deformations that induce mechanical stress, the particles are free to move off-lattice, but this implies that infinite positions are to be sampled for possible particle precipitation. To treat this issue, a discretization method has been proposed which approximates the integral of the precipitation rate over the whole simulation box by considering only a finite number of trial particles;

  3. 3.

    The reaction rates are implemented in both straight and net forms. Depending on the application, the user can opt for the computational efficiency of net rates, or for more computationally demanding but also more precise (mechanistically and quantitatively) simulations using straight rates;

  4. 4.

    The KMC sampling of discrete dissolution/precipitation events is coupled with the explicit integration of continuous processes. In the article, this coupling has been exploited to impose a strain rate. Other continuous processes are currently being implemented, in particular one that simulates the metabolic activity of bacteria, explicitly modelled as particles as in Li et al. (2019), for the purpose of modelling biomineralization in self-healing concrete Bagga et al. (2022);

  5. 5.

    In MASKE, the user can define bespoke chemical reactions and mechanisms in a chemistry database file. MASKE is also interfaced with the LAMMPS library, through which the user can specify complex initial microstructures, loading conditions, and interaction potentials. As a result, a wide variety of problems with disparate chemistries can be simulated;

  6. 6.

    MASKE features a two level parallelisation, ready for use in High Performance Computing. The simulations in this article used both levels of parallelisation, but on simple examples that required only 3 processors in total (despite one simulation already featured 1.4 million trial particles). Applications of MASKE involving more processors have been presented elsewhere (Coopamootoo and Masoero, 2020; Alex et al., 2023).

A number of additional features provide promising avenues for further development. These in particular may involve:

  1. 1.

    Coarse-graining the reaction rates to reach microstructural scales. The allparallpar mechanism presented here is only accurate for unimolecular reactions, but Shvab et al. (2017) already proposed coarse-grained rate expression for nanoparticles with diameter of ca. 10 nm. The version of MASKE that is currently on GitHub already includes a mechanism for particles with diameter of 1\sim 1 μ\mum, which will be presented in a separate article;

  2. 2.

    Allowing particles to partially grow or dissolve, whereas now they can only appear or disappear at once. This would be desirable when using coarser particles, to avoid unrealistically large, sudden changes in stress (and thus in stress-dependent reaction rates) when a full particle is deleted or added. Partial dissolution and growth would thus be important for capturing well certain phenomena, such as crystallization pressure (Masoero, 2023b). Even better if the partial growth or dissolution of particles were anisotropic. Such anisotropy would at least require ellipsoidal particles, which would be rather straightforward to include in MASKE, since ellipsoidal particles and appropriate potentials for them already exist in LAMMPS (Berardi et al., 1998). However, partial growth and dissolution (either as discrete KMC events or as continuous processes) will require additional implementation and a new, probably less efficient, way of sampling energy changes ΔU\Delta U to compute the excess enthalpy terms in the reaction rates;

  3. 3.

    Improving the model of the solution, allowing for heterogenous local concentrations of solvated molecules, which may also react chemically within the implicit fluid. For the reactions in solution, there is ongoing work to couple MASKE with the PHREEQC library (Parkhurst et al., 1999). Heterogeneous concentrations would be desirable for simulations at larger length scales, and the resulting concentration gradients would prompt diffusion that can be implemented in MASKE as a continuous process to be integrated in time.

Two examples in this article have shown that MASKE, already in its current form, can capture interesting coupled phenomena that challenge other simulation methods. Example 1 confirmed that MASKE correctly predicts the dissolution, growthm and chemical equilibrium of a nanocrystal of Ca(OH)2, depending on the concentrations of Ca2+ and OH- ions in the surrounding solution. Straight rate equations have been shown to effectively allow the nucleation of new crystal layers through energetically unfavourable fluctuations. Example 2 then addressed the effects of chemo-mechanical coupling, by imposing a compressive strain rate to the crystal. The results showed that a complex kinetic balance is established between dissolution rates, chemical composition of the solution surrounding the crystal, elastic stress state in the crystal, and plastic deformations too. A family of curves is obtained, which quantifies the stress-strain response of the crystal as a function of the imposed strain rate. These curves offer a constitutive models for simulations al larger scales, e.g. continuum simulations based on the Finite Element Method. All in all, MASKE offers a new way to reconstruct the chemo-mechanical kinetics of evolving microstructures. This capability can be leveraged to simulate the formation and behaviour of new materials in computer-aided design, and to predict the degradation of materials for both conventional and accidental scenarios of future exposure.


References

  • Alex et al. (2023) Alex, A., Freeman, B., Jefferson, A., Masoero, E., 2023. Carbonation and self-healing in concrete: Kinetic monte carlo simulations of mineralization. Cement and Concrete Composites , 105281.
  • Bagga et al. (2022) Bagga, M., Hamley-Bennett, C., Alex, A., Freeman, B.L., Justo-Reinoso, I., Mihai, I.C., Gebhard, S., Paine, K., Jefferson, A.D., Masoero, E., et al., 2022. Advancements in bacteria based self-healing concrete and the promise of modelling. Construction and Building Materials 358, 129412.
  • Bažant et al. (1997) Bažant, Z.P., Hauggaard, A.B., Baweja, S., Ulm, F.J., 1997. Microprestress-solidification theory for concrete creep. I: Aging and drying effects. Journal of Engineering Mechanics 123, 1188–1194.
  • Bellomo et al. (2012) Bellomo, F.J., Armero, F., Nallim, L.G., Oller, S., 2012. A constitutive model for tissue adaptation: necrosis and stress driven growth. Mechanics Research Communications 42, 51–59.
  • Bentz et al. (1994) Bentz, D.P., Coveney, P.V., Garboczi, E.J., Kleyn, M.F., Stutzman, P.E., 1994. Cellular automaton simulations of cement hydration and microstructure development. Modelling and Simulation in Materials Science and Engineering 2, 783.
  • Berardi et al. (1998) Berardi, R., Fava, C., Zannoni, C., 1998. A gay–berne potential for dissimilar biaxial particles. Chemical physics letters 297, 8–14.
  • Bishnoi and Scrivener (2009) Bishnoi, S., Scrivener, K.L., 2009. μ\muic: A new platform for modelling the hydration of cements. Cement and Concrete Research 39, 266–274.
  • Bullard (2007) Bullard, J.W., 2007. A three-dimensional microstructural model of reactions and transport in aqueous mineral systems. Modelling and Simulation in Materials Science and Engineering 15, 711.
  • Bullard et al. (2010) Bullard, J.W., Enjolras, E., George, W.L., Satterfield, S.G., Terrill, J.E., 2010. A parallel reaction-transport model applied to cement hydration and microstructure development. Modelling and Simulation in Materials Science and Engineering 18, 025007.
  • Bullard et al. (2011) Bullard, J.W., Lothenbach, B., Stutzman, P.E., Snyder, K.A., 2011. Coupling thermodynamics and digital image models to simulate hydration and microstructure development of portland cement pastes. Journal of Materials Research 26, 609–622.
  • Cao et al. (2019) Cao, P., Short, M.P., Yip, S., 2019. Potential energy landscape activations governing plastic flows in glass rheology. Proceedings of the National Academy of Sciences 116, 18790–18797.
  • Cefis and Comi (2017) Cefis, N., Comi, C., 2017. Chemo-mechanical modelling of the external sulfate attack in concrete. Cement and Concrete Research 93, 57–70.
  • Coopamootoo and Masoero (2020) Coopamootoo, K., Masoero, E., 2020. Simulations of crystal dissolution using interacting particles: prediction of stress evolution and rates at defects and application to tricalcium silicate. The Journal of Physical Chemistry C 124, 19603–19615.
  • Coopamootoo K (2023) Coopamootoo K, M.E., 2023. Simulations of tricalcium silicate dissolution at screw dislocations: effects of fnite crystal size and mechanical interaction potentials. Cement and Concrete Research In press.
  • Domínguez et al. (1998) Domínguez, A., Jimenez, R., López-Cornejo, P., Pérez, P., Sánchez, F., 1998. On the calculation of transition state activity coefficient and solvent effects on chemical reactions. Collection of Czechoslovak chemical communications 63, 1969–1976.
  • Dubrovskii et al. (2010) Dubrovskii, V., Sibirev, N., Zhang, X., Suris, R., 2010. Stress-driven nucleation of three-dimensional crystal islands: from quantum dots to nanoneedles. Crystal growth & design 10, 3949–3955.
  • Estrela et al. (2005) Estrela, C., Estrela, C.R.d.A., Guimarães, L.F., Silva, R.S., Pécora, J.D., 2005. Surface tension of calcium hydroxide associated with different substances. Journal of Applied Oral Science 13, 152–156.
  • Feng et al. (2017) Feng, P., Bullard, J.W., Garboczi, E.J., Miao, C., 2017. A multiscale microstructure model of cement paste sulfate attack by crystallization pressure. Modelling and simulation in materials science and engineering 25, 065013.
  • Freeman et al. (2019) Freeman, B.L., Cleall, P.J., Jefferson, A.D., 2019. An indicator-based problem reduction scheme for coupled reactive transport models. International Journal for Numerical Methods in Engineering 120, 1428–1455.
  • Gawin et al. (2009) Gawin, D., Pesavento, F., Schrefler, B.A., 2009. Modeling deterioration of cementitious materials exposed to calcium leaching in non-isothermal conditions. Computer Methods in Applied Mechanics and Engineering 198, 3051–3083.
  • Hart et al. (2017) Hart, N.H., Nimphius, S., Rantalainen, T., Ireland, A., Siafarikas, A., Newton, R., 2017. Mechanical basis of bone strength: influence of bone material, bone structure and muscle action. Journal of musculoskeletal & neuronal interactions 17, 114.
  • Ioannidou et al. (2016) Ioannidou, K., Krakowiak, K.J., Bauchy, M., Hoover, C.G., Masoero, E., Yip, S., Ulm, F.J., Levitz, P., Pellenq, R.J.M., Del Gado, E., 2016. Mesoscale texture of cement hydrates. Proceedings of the National Academy of Sciences 113, 2029–2034.
  • Ioannidou et al. (2022) Ioannidou, K., Labbez, C., Masoero, E., 2022. A review of coarse grained and mesoscale simulations of c–s–h. Cement and Concrete Research 159, 106857.
  • Ioannidou et al. (2014) Ioannidou, K., Pellenq, R.J.M., Del Gado, E., 2014. Controlling local packing and growth in calcium–silicate–hydrate gels. Soft Matter , 1121–1133.
  • Kouhen et al. (2023) Kouhen, M., Dimitrova, A., Scippa, G.S., Trupiano, D., 2023. The course of mechanical stress: Types, perception, and plant response. Biology 12, 217.
  • Langmuir (1997) Langmuir, D., 1997. Aqueous environmental. Geochemistry Prentice Hall: Upper Saddle River, NJ 600.
  • Lasaga (2014) Lasaga, A.C., 2014. Kinetic theory in the earth sciences. Princeton University Press.
  • Li et al. (2019) Li, B., Taniguchi, D., Gedara, J.P., Gogulancea, V., Gonzalez-Cabaleiro, R., Chen, J., McGough, A.S., Ofiteru, I.D., Curtis, T.P., Zuliani, P., 2019. Nufeb: A massively parallel simulator for individual-based modelling of microbial communities. PLoS Computational Biology 15, e1007125.
  • Li et al. (2015) Li, X., Grasley, Z., Garboczi, E.J., Bullard, J.W., 2015. Modeling the apparent and intrinsic viscoelastic relaxation of hydrating cement paste. Cement and Concrete Composites 55, 322–330.
  • Lothenbach et al. (2019) Lothenbach, B., Kulik, D.A., Matschei, T., Balonis, M., Baquerizo, L., Dilnesa, B., Miron, G.D., Myers, R.J., 2019. Cemdata18: A chemical thermodynamic database for hydrated portland cements and alkali-activated materials. Cement and Concrete Research 115, 472–506.
  • Martin et al. (2020) Martin, P., Gaitero, J.J., Dolado, J.S., Manzano, H., 2020. Kimera: a kinetic montecarlo code for mineral dissolution. Minerals 10, 825.
  • Masoero (2023a) Masoero, E., 2023a. MASKE GitHub Repository.
  • Masoero (2023b) Masoero, E., 2023b. Maske: Particle-based chemo-mechanical simulations of degradation processes, in: International RILEM Conference on Synergising expertise towards sustainability and robustness of CBMs and concrete structures, Springer. pp. 159–170.
  • Meakin and Rosso (2008) Meakin, P., Rosso, K.M., 2008. Simple kinetic monte carlo models for dissolution pitting induced by crystal defects. The Journal of chemical physics 129.
  • Parkhurst (1995) Parkhurst, D.L., 1995. User’s guide to PHREEQC: A computer program for speciation, reaction-path, advective-transport, and inverse geochemical calculations. 95-4227, US Department of the Interior, US Geological Survey.
  • Parkhurst et al. (1999) Parkhurst, D.L., Appelo, C., et al., 1999. User’s guide to phreeqc (version 2): A computer program for speciation, batch-reaction, one-dimensional transport, and inverse geochemical calculations. Water-resources investigations report 99, 312.
  • Parrott (1975) Parrott, L., 1975. Increase in creep of hardened cement paste due to carbonation under load. Magazine of Concrete Research 27, 179–181.
  • Pesavento et al. (2012) Pesavento, F., Gawin, D., Wyrzykowski, M., Schrefler, B.A., Simoni, L., 2012. Modeling alkali–silica reaction in non-isothermal, partially saturated cement based materials. Computer Methods in Applied Mechanics and Engineering 225, 95–115.
  • Prados et al. (1997) Prados, A., Brey, J., Sánchez-Rey, B., 1997. A dynamical monte carlo algorithm for master equations with time-dependent transition rates. Journal of statistical physics 89, 709–734.
  • Raja and Shoji (2011) Raja, V., Shoji, T., 2011. Stress corrosion cracking: theory and practice. Elsevier.
  • Rutter (1983) Rutter, E., 1983. Pressure solution in nature, theory and experiment. Journal of the Geological Society 140, 725–740.
  • Scherer (2004) Scherer, G.W., 2004. Stress from crystallization of salt. Cement and concrete research 34, 1613–1624.
  • Shvab et al. (2017) Shvab, I., Brochard, L., Manzano, H., Masoero, E., 2017. Precipitation mechanisms of mesoporous nanoparticle aggregates: off-lattice, coarse-grained, kinetic simulations. Crystal Growth & Design 17, 1316–1327.
  • Thompson et al. (2022) Thompson, A.P., Aktulga, H.M., Berger, R., Bolintineanu, D.S., Brown, W.M., Crozier, P.S., in’t Veld, P.J., Kohlmeyer, A., Moore, S.G., Nguyen, T.D., et al., 2022. Lammps-a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales. Computer Physics Communications 271, 108171.
  • Tourret et al. (2022) Tourret, D., Liu, H., LLorca, J., 2022. Phase-field modeling of microstructure evolution: Recent applications, perspectives and challenges. Progress in Materials Science 123, 100810.
  • Truesdell and Jones (1974) Truesdell, A.H., Jones, B.F., 1974. Wateq, a computer program for calculating chemical equilibria of natural waters. J. Res. US Geol. Surv 2, 233–248.
  • Van Breugel (1995) Van Breugel, K., 1995. Numerical simulation of hydration and microstructural development in hardening cement-based materials (i) theory. Cement and concrete research 25, 319–331.
  • Wittmann (1986) Wittmann, F.H., 1986. Estimation of the modulus of elasticity of calcium hydroxide. Cement and Concrete Research 16, 971–972.

Appendix A Details on system description

The main article has presented a typical simulation in MASKE as featuring explicit particles, typically representing solid units, and an implicit fluid surrounding them: see Fig. 1. The current version of MASKE assumes prismatic boxes (orthogonal in LAMMPS syntax) but extensions to other box shapes, e.g. triclinic ones, are within scope for future implementation. MASKE accepts all boundary conditions in LAMMPS, but for now only fixed and periodic conditions have been tested. LAMMPS assigns a type to each particle, which MASKE uses to associate possible events to sets of particles: for example, MASKE may associate a certain reaction formula to the dissolution of type 1 particles, and a different formula to particles of type 2. One would often associate different types to different solid species, but MASKE does not require that, as it does not track the chemical composition nor the type of individual particles; the user is responsible for attributing events and reactions consistently with particle types. Such implementation is appropriate when a particle represents a homogeneous, mono-phase solid, such as a nanocrystal; future versions of MASKE may include tracking of the internal structure of particles, e.g. to simulate partial growth or dissolution of particles each representing a polycrystal.

Particle shapes are also defined in LAMMPS, via the atom_style command. For example, the sphere style includes information on per-particle radius, whereas ellipsoid includes per-particle shape through radii along three principal axes. MASKE for now assumes spherical particles, hence only uses per-particle radii. Future implementation may also include other atom_styles from LAMMPS, e.g. to consider individual atoms and directly apply MASKE at the atomistic level, or to employ ellipsoidal particles for simulating richer coarse-grained morphologies.

The particles interact via effective potentials, which are defined and managed in LAMMPS: e.g. see Fig. 1. The particle displacements caused by the interactions are also computed by LAMMPS, with typical methods such as energy minimization or molecular dynamics. Currently MASKE extracts per-particle interaction energies from LAMMPS, obtained through a pe/atom compute. MASKE uses these energies to quantify the change in total energy of the system, ΔUi\Delta U_{i}, generated by adding or deleting the generic particle ii. This ΔUi\Delta U_{i} informs the reaction rates. For pairwise interactions, ΔUi\Delta U_{i} is simply twice the per-particle energy of particle ii read from LAMMPS. Currently MASKE assumes that this relationship holds, hence that pairwise interactions are used in LAMMPS (these include user-defined, tabulated, pair potentials). Higher-order interactions, such as three-body or else, will need future implementation and a different, probably more time-consuming, approach to compute ΔUi\Delta U_{i} in MASKE.

The implicit solution surrounding the solid particles is defined and managed directly in MASKE, which tracks the number of molecules and molar concentrations for various, user-defined, solvated species. Molarities require the user to specify the molecular volume of each solvated species, so that the total volume of the solution can be tracked while chemical reactions alter it. Future versions of MASKE may adopt molalities instead. The concentrations of solvated species are assumed to be uniform in the simulation box, which is the same as assuming infinitely fast diffusion. This hypothesis is realistic at small scales, e.g. below the micrometre. Diffusion algorithms may be included in future implementations. Currently, MASKE does not minimize the free energy of the solution through speciation, neither it considers the kinetics of chemical reactions between molecules in solution, unless these reactions produce or dissolve solid particles as a result. There is however no obstacle to implementing these features and, indeed, current development is underway to couple MASKE with PHREEQC to include speciation in solution.

During a typical simulation, molecules disappear from solution to form new solid particles, or vice versa. During these transformations, MASKE preserves the total number of molecules, as long as the user has consistently associated particle types to solid species, and to chemical reactions with correct stoichiometry. The volume of molecules in solution typically differs from that of the same molecules when combined in a solid; as a result, the total volume of solid particles plus implicit solution may change as the system evolves. The MASKE variable voidVvoidV tracks the difference between the volume of the simulation box, VboxV_{box}, and the volume of solid plus solution in it. If voidV<0voidV<0, then the total volume of the system has expanded beyond VboxV_{box}. Presently, voidVvoidV is just recorded for information, but in the future it may be used to change the volume of the box or to estimate the pressure of the fluid.

A last element of the model is an additional volume of solution, ΔV\Delta V, implicitly attached to the simulation box. ΔV\Delta V initially features the same molecules with same concentrations as in the solution in VboxV_{box}. Currently there is no process in MASKE to exchange molecules between VboxV_{box} and ΔV\Delta V, but dissolution/precipitation events taking place in VboxV_{box} can use molecules from ΔV\Delta V if allowed by the user.

Appendix B Processes and time line in MASKE

MASKE allows for both discrete and continuous processes to take place contextually. An example of discrete process may be the precipitation of a new solid particle, which occurs instantaneously after a time Δt\Delta t from a previous event, e.g. precipitation or dissolution of another particle. A continuous process, instead, advances gradually with time; examples may be the diffusion of molecules in solution, displacements being applied to certain particles with a given rate, or solid particles growing or dissolving only in part. Continuous processes are typically governed by differential equations that MASKE integrates over time, with a user-specified time step dtidt_{i} for the ithi^{th} process. The user also provides a number of integration steps nin_{i}, so that whenever the ithi^{th} continuous process is invoked, MASKE integrates it over a time period Δti=dtini\Delta t_{i}=dt_{i}\cdot n_{i} (future implementations may include adaptive dtidt_{i} and criteria to stop integrating processes that have reached equilibrium).

To stagger discrete and continuous processes, MASKE employs the concept of future time of occurrence, FOTFOT. For each ithi^{th} continuous process, FOTi=ti+ΔtiFOT_{i}=t_{i}+\Delta t_{i}, where tit_{i} is the last time that the process has reached through previous integration: see processes 1 and 2 in Fig. 11.a.

Refer to caption


Figure 11: Time line in MASKE with continuous processes 1 and 2, and with the discrete KMC processes grouped under the letter kk. The subfigures show three successive steps in MASKE, where the process to be carried out (in red) is the one with nearest future time of occurrence, FOT. (a) carries out continuous process 2, (b) carries out continuous process 1, and (c) carries out a discrete event. In (a) the current time tt^{*} was set by a discrete event that had just been carried out, hence the cumulative rate of discrete events Rk,jR_{k,j} was the first one to be calculated since accepting a discrete event, i.e. ncp=0n_{cp}=0 in Eq. 21. Subfigure (c) eventually brings back a scenario where a discrete event is accepted, hence ncpn_{cp} is reset after that and the following step will be analogous to the one in (a). Note how Δti\Delta t_{i} and FOTiFOT_{i} of continuous events remain constant (in the current implementation of MASKE), whereas Δtk\Delta t_{k} and FOTkFOT_{k} generally change whenever tt^{*} advances.

The FOTkFOT_{k} of discrete events, instead, is determined by a single Δtk\Delta t_{k} that accounts for all discrete events, in the spirit of rejection-free Kinetic Monte Carlo (KMC). Consider, for example, a simulation box containing NN solid particles and two, user-defined, possible discrete processes: dissolution of any of said NN particles, and nucleation of one new particle at MM possible locations; this means N+MN+M possible discrete events. MASKE computes a rate for each of these events, and cumulates them into a total KMC rate RkR_{k}. The time increment associated to one discrete event taking place is thus:

Δtk=Rk1ln(1u)\Delta t_{k}=R_{k}^{-1}\ln\left(\frac{1}{u}\right) (20)

where uu is a random number extracted with uniform probability in (0,1]. Eq. 20 is only correct if the rates of all the discrete events remain constant between two successive realizations of a discrete events; generally this is not the case in MASKE, since continuous processes taking place meanwhile might change the composition of the solution or the stress state, both of which can impact the rate of individual events. To account for this, a more general expression for Δtk\Delta t_{k} will be given shortly below.

Fig. 11 depicts how FOTFOTs are used to advance a simulation in MASKE. Without losing generality, assume that just before Fig. 11.a, a discrete event had taken place, determining the value of the current time in MASKE to be t=tkt^{*}=t_{k}. MASKE computes the Δti\Delta t_{i} and FOTiFOT_{i} of all continuous processes (i=1,2i=1,2 in the figure, with last occurrence times t1t_{1} and t2t_{2} respectively), and the Δtk\Delta t_{k} and FOTkFOT_{k} of a generic discrete event, using Eq. 20. In Fig. 11.a, the continuous process 2 has the smallest FOTFOT and is therefore carried out, setting the new tt^{*} and t2t_{2} in Fig. 11.b to coincide with FOT2FOT_{2} from Fig. 11.a. MASKE computes the new FOT2FOT_{2} in Fig. 11.b, but it must also update FOTkFOT_{k} to account for the change in rates that the execution of continuous process 2 might have caused. To this end MASKE employs a time-dependent formulation of KMC, whereby the remaining Δtk\Delta t_{k} follows the relation:

j=1ncpΔtjRk,j+ΔtkRk,ncp+1=ln(1u)\sum_{j=1}^{n_{cp}}{\Delta t^{*}_{j}R_{k,j}}+\Delta t_{k}R_{k,n_{cp}+1}=\ln\left(\frac{1}{u}\right) (21)

ncpn_{cp} is the number of time increments (Δtj\Delta t^{*}_{j}) that continuous processes have brought about since the last discrete event. For the scenario in Fig. 11.b, ncp=1n_{cp}=1 due to the continuous process that prevailed in Fig. 11.a, and the cumulative rate of all discrete events changed from Rk,1R_{k,1} in Fig. 11.a to Rk,2R_{k,2} in the current state. Therefore Eq. 21 yields Δtk=Rk,21[ln(1u)Δt1Rk,1]\Delta t_{k}=R_{k,2}^{-1}\left[\ln\left(\frac{1}{u}\right)-\Delta t^{*}_{1}R_{k,1}\right] as written in Fig. 11.b. In some cases Eq. 21 may return a negative Δtk\Delta t_{k}; when this happens MASKE issues a warning and approximates Δtk=0\Delta t_{k}=0, thus ensuring that a discrete event will be carried out next.

Going back to Fig. 11.b, FOT1FOT_{1} is now the smallest hence process 1 is carried out leading to a new tt^{*} and t1t_{1} in Fig. 11.c. In Fig. 11.c, FOT1FOT_{1} and FOTkFOT_{k} are updated and the latter happens to be the smallest one, hence a discrete event is carried. The individual discrete event to execute (e.g. removing or inserting one specific particle) is selected out of the list of all possible discrete events contributing to FOTkFOT_{k} with a probability that, for event ii out of the M+NM+N possible ones in our example, is:

Pij=1ncpΔtjrk,i,j+Δtkrk,ncp+1P_{i}\propto\sum_{j=1}^{n_{cp}}{\Delta t^{*}_{j}r_{k,i,j}}+\Delta t_{k}r_{k,n_{cp}+1} (22)

rk,i,jr_{k,i,j} is the rate of event ii when the jthj^{th} continuous process was executed since the last discrete event took place (i.e. since tt^{*} in Fig. 11.a). rk,i,ncp+1r_{k,i,n_{cp}+1} is the latest rate of the same event, which contributed to the cumulative Rk,ncp+1R_{k,n_{cp}+1} in Eq. 21 and that now gets multiplied times the Δtk\Delta t_{k} from Eq. 21.

The execution of a discrete event in Fig. 11.c brings back an analogous scenario as in Fig. 11.a. This, however, does not mean that the order in which processes are carried out will remain the same: for example, after Fig. 11.c, process 2 will be executed twice before calling again process 1.

Appendix C Code structure and input script

Fig. 12 shows the code structure of the MASKE software. MASKE features two levels of parallelization using the MPI library. The user decides how many processors to involve, npn_{p} and assigns them to nscn_{sc} different sub-communicators. This assignment is carried out by the MPI_Commm_Split command in the universe class. Each sub-communicator may be responsible for carrying out a subset of commands and for sampling a subset of all the discrete events and compute their individual rates rr. This is important because sampling discrete events is usually the most time-consuming task in MASKE. Furthermore, each sub-communicator may perform its tasks and sampling using multiple processors in parallel. For example, the user may use 12 processors in total for a simulation, assigning 8 to sub-communicator subAsubA and 4 to subBsubB. subAsubA may sample the deletion of NN particles, which entails computing per-particle interaction energy using LAMMPS; for this operation, LAMMPS can operate in parallel using the 8 processors in subAsubA. Meanwhile subBsubB may run a separate instance of LAMMPS using 4 processors to sample the creation of new particles at MM possible locations.

Refer to caption

Figure 12: Scheme of the classes forming MASKE and their main relationships to user commands in the input script.

The main class in the code is maske, which creates and eventually deletes all the other objects and which hosts several pointers to output files, flags, and parameters that are useful across the code: see Fig. 12. Another fundamental class is in pointers.h, where MASKE employs the same strategy as in LAMMPS to allow any object to directly include and access any other object. Several classes produce support objects that are used throughout the code: error logs error messages and stops a simulation when an error occurs; lammpsIO creates LAMMPS instances and calls LAMMPS operations via one-line strings like those in a LAMMPS input script; output creates MASKE output files (more details later) and features functions to write individual entries into them; randm features functions to generate pseudo-random sequences of numbers (based on user provided seeds) and to extract numbers from such sequences when needed (e.g. uu in Eq. 21).

The flow of user-defined operations is dictated by an input script, i.e. a text file that the object inputmsk reads and executes line by line. The two only exceptions to the line by line execution are the loop and the store multi commands. The loop command makes MASKE repeat multiple times a number of input lines: its working is not detailed here for brevity. The store multi command will be explained later.

The subcomm command is to create the desired number of sub-communicators and, for each of them, specify a name, assign a number of processors, create a LAMMPS instance if needed, and provide a seed for a sequence of pseudo-random numbers.

The chemDB command loads a text file with all the information required to describe the chemistry of the system and its chemical kinetics. This information includes data on individual species in solution or forming the solids, thermodynamic and kinetic parameters such as interfacial energies, activation energies, stoichiometric coefficients and equilibrium constants of possible chemical reactions, and mechanism according to which chemical reactions are combined together in the rate equations. A later dedicated section will provide more details on the structure and content of the file loaded by chemDB. The information gathered by chemDB is stored in the chemistry object.

The real_types and trial_types commands are for the user to list the LAMMPS particle types associated to real and trial particles. The latter are used for sampling the possible formation of new particles at various locations in the simulation box. The vectors of real and trial particle types are stored in the maske object.

The lammps command passes a string with LAMMPS syntax directly to LAMMPS for direct execution. This is a very important command to set up a simulation box, to decide the atom_style and units in LAMMPS, to create particles if needed or to import a configuration from a previous LAMMPS dump file, to set up the interaction potentials, to run any preliminary energy minimization, to set up LAMMPS variables, computes and output files, etc. The lammpslammps command allows specifying which sub-communicator should execute the line; if the keyword all is used, all the processors with an active LAMMPS instance will execute the line using LAMMPS. A type of LAMMPS command that are known not to work through single-line execution are those related to loops, hence a bespoke loop command has been implemented in MASKE, as already mentioned.

The kB and hpl commands specify the values of the Boltzmann and Planck constants in the units chosen by the user; these units should be consistent with those set in LAMMPS. The values of the constants are recorded in the maske object.

The sol_start command initializes the implicit solution in MASKE by listing the names and corresponding molar concentrations of the solvated species, as well as the of the solvent species. The names listed here must correspond to species that have been defined in the chemistry file previously read by the chemDB command. sol_start also provides the temperature of the solution in Kelvin degrees and the AA and BB constants of the solvent as per Debye-Hückel theory, in consistent units (e.g. A=0.51A=0.51 and B=3.29B=3.29 nm-1 for water). The command also assigns the initial volume of void space in the simulation box, the additional volume ΔV\Delta V of implicit solution, the volume of voids in ΔV\Delta V, and a unit conversion factor to convert the user-decided units of volume into liters (e.g. 10-24 if the user is working in nm). Having read these inputs, sol_start calls the solution object to compute the initial volume occupied by the solution in the simulation box and in ΔV\Delta V, respectively SVolSVol and dVSVoldVSVol. The former is obtained as SVol=VboxvoidVSolidVSVol=V_{box}-voidV-SolidV, where the volume of the simulation box VboxV_{box} and the volume occupied by solid particles SolidVSolidV are both extracted from LAMMPS, assuming spherical particles. This implies that, in the current version of MASKE, the user should not change the simulation box size nor insert, delete, or alter the radii of particles after using the sol_start command, or MASKE will return an inconsistent SVolSVol. Once SVolSVol is computed, the solution object employs the user-provided initial concentrations to compute the number of molecules in solution for each solvated species in the box and then, knowing the apparent volume of each solvated species including the solvent, the number of solvent molecules is obtained to match SVolSVol itself. An analogous process is followed to compute dVSVoldVSVol in ΔV\Delta V and the number of solvated molecules for each species there, except that there are no solid particles in ΔV\Delta V.

The store command stores information for later, repeated use. Five styles of storing are currently implemented: four of them store a one-line string each and are used by the fix_nucleate object, described later, when sampling the insertion of new particles. These four styles are: region and lattice, which stores the LAMMPS commands to create respectively a region and a lattice, DV which stores the LAMMPS command to create a variable quantifying the volume of a cell in the lattice, and minimize which stores parameters to perform energy minimization in LAMMPS using a new and bespoke minimizer that MASKE adds as a user-defined package to LAMMPS when compiling the code. The package is called USER-MASKE and can be found in the src folder of the LAMMPS compiled as a submodule of MASKE. This minimizer, called quickmaske, is analogous to quickmin in LAMMPS but it treats each particle separately when applying and damping their displacements. This overcomes a limitation of all the minimizers in LAMMPS, which perform poorly when some particles occupy positions with very high energy, e.g. largely overlapping with other particles. This is a frequent scenario when sampling insertion of many new particles at random places and running a single energy minimization for all of them, as the fix_nucleate object does in the current version of the code (more details later). The fifth and last store style is multi, which stores multiple strings for objects such as fix_CmstoreLMP and fix_EmstoreLMP, described later.

The fix command sets the various processes determining the evolution of the system in MASKE. Three types of fixes are currently implemented: KMC-free which sample and execute discrete events using the rejection-free KMC approach described above, Cont which integrate continuous processes, and Every which are invoked after nsn_{s} processes, either discrete or continuous, have been carried out (nsn_{s} is input by the user). Depending on the type of fix, MASKE expects a different set of parameters, which the user must provide in the input script and that MASKE records in the fix object. Two parameters that are common to all fixes are the name assigned to the fix and the name of the sub-communicator that is responsible for sampling and executing it, when needed. fix Every is the only type of fix which can, and often should, be run by all the sub-communicators via the all keyword.

Two types of fix KMC-free are currently implemented in MASKE: delete and nucleate, which respectively sample and execute the dissolution and precipitation of solid particles through the corresponding objects fix_delete and fix_nucleate. These objects are crucial in MASKE, hence they will be described in detail in later sections. For both of them, the user must specify: (i) the LAMMPS type of real particles that the fix would delete or create if an event of theirs is executed, (ii) a chemical mechanism from those defined in the chemistry file loaded by chemDB, to compute the rates of individual events; (iii) a sol_out option specifying whether the molecules released into the solution, or removed from it, after executing an event will be released or removed only in the simulation box (via the box option) or also in the additional volume ΔV\Delta V in proportion to the SVol/dVSVolSVol/dVSVol ratio (box+dV option). In addition to these, for the nucleate type, the user must also indicate the names of a stored region, lattice, and lattice cell size, as well as the LAMMPS type of trial particles for sampling precipitation, and the diameter of the particles that may precipitate (under the current assumption in MASKE of spherical particles).

Only one type of fix Cont and one type of fix Every are currently implemented, both of which simply run a sequence of LAMMPS commands previously stored using a store multi command. The LAMMPS commands are executed respectively by the fix_CmstoreLMP and fix_EmstoreLMP objects when appropriate.

The thermo command creates a text file to print output data every nn steps in MASKE, i.e. one entry is recorded whenever nn events (discrete or continuous) have been carried out (nn is user-defined, as is the file name). The thermo file records mm user-chosen quantities, organized in a table with m+2m+2 columns. The first two columns always record the MASKE step number and the MASKE time tt^{*} corresponding to the quantities in the current entry, i.e. in the rest of the row being recorded. The quantities in the other mm columns may be of three types: conc_name prints the concentration in solution of a molecule defined in the chemDB and called name (for example, name may be H2O or CaCO3); lmp_v_name prints the content of a scalar variable previously defined in LAMMPS and called name (for example, the user might have defined a variable called presspress in LAMMPS, monitoring the pressure in the box); lmp_c_name is analogous to lmp_v_name but it prints the scalar resulting from a compute in LAMMPS instead of a variable.

The dump command is the same as the dump command in LAMMPS, in that it creates a file recording the configuration of the system (i.e. particle positions and types) as well as various user-decided per-particle quantities such as radii, stress per atom, etc. The only difference here is that the user inputs the number of MASKE steps between two successive records of the configuration, as opposed to the dump command in LAMMPS which prints the configuration every so many steps in LAMMPS. Both the thermo and dump commands are carried out by the output object.

The Krun command invokes the krun object to launch a simulation, performing MASKE steps until covering a user-specified period of time. This means that the user does not decide how many steps MASKE will perform, but rather by how much the current Krun will advance tt^{*}.

Appendix D Chemical database

The previous section mentioned that the chemDB command loads a file containing data on the chemistry of the system. This file is loaded line by line, each line starting with a specific keyword.

The molecule keyword creates species that can be used to initiate the solution (see the sol_start command in the previous section) or to define chemical reactions later in the chemDB file. The keyword is followed by a user-defined name of the molecule, some quantities that are useful if the molecule is later associated to a solid phase (namely quantities that describe the size and shape of the molecule in a solid) and other quantities that are useful for molecules that are later associated to the solution: apparent volume in solution, hydrated radius, ionic charge, and the parameter bb used in the Debye-Hückel theory and discussed in the main body of this article.

The gammax keyword is to record a value for the activity coefficient of an activated complex in standard state, γ\gamma^{\ddagger}. The DGx keyword is to record the standard state activation free energy of an activated complex, ΔG\Delta G^{\ddagger}, as well as the concentration of said complex cc^{\ddagger}, and the dimensionality of the concentration: 2 if the per unit area, 3 if per unit volume. All quantities recorded via gammax and DGx can later be associated to certain chemical reactions, and will inform the rate equations from Transition State Theory described in the main body of the article.

The reax keyword defines a chemical reaction, assigning a user-defined name to it. The attribute simple indicates that a chemical reaction is just one-step (a chain attribute can also be used, to combine a series of simple reactions, but this will not be discussed here for brevity). Take for example the simple reaction of calcium hydroxide dissolution:

Ca(OH)2(s)Ca2+(aq)+2OH(aq)\mathrm{Ca(OH)_{2}(s)\rightarrow Ca^{2+}(aq)+2OH^{-}(aq)} (23)

The reax keyword imports previously recorded values of γ\gamma^{\ddagger}, ΔG\Delta G^{\ddagger}, and cc^{\ddagger} to associate to this reaction, as well as an input value for the equilibrium constant KeqK_{eq}. The stoichiometry in Eq. 23 is then recorded by assigning the molecule Ca(OH)2 to the solid (called ‘foreground’ in MASKE and assigned via the fgdfgd attribute) with a stoichiometric coefficient -1, because the reaction deletes one such molecule, and assigning the molecules Ca2+ and OH- to the solution (‘background’ in MASKE, via the bkgbkg attribute) with stoichiometric coefficients +1 and +2 respectively. An additional parameter is also needed: a real number χ\chi between 0 and 1 used in the rate equations to distribute the excess free energy from mechanical stress between forward and backward reactions.

The sen keyword records values of solid-solution interfacial energies that will later be associated to reaction mechanisms. Such mechanisms are defined using the mech keyword; they are the last set of entries needed in the chemDB file and they inform the fix commands of KMC-free type in the main input script, as discussed in the previous section. A mech keyword requires a user-defined name for the mechanism and the name of a previously-defined chemical reaction to attach to it. The user then specifies the type of mechanism, which is important to determine how a number of chemical reactions of specified time would assemble to generate (or dissolve) the target particle. For now, only one type of mechanism is implemented in MASKE, called allpar. This mechanism assumes that all the reactions required to delete or create a particle take place in parallel, hence the time to dissolve or form a new particle equals the time for a single unimolecular reaction to take place. This is exact only if the volume of a particle is the same as the volume of the individual molecules involved in a single reaction, e.g. the volume of one Ca(OH)2 solid molecule in the example above. The allpar mechanism also assumes that the reaction rates follow the modified version of Transition State Theory presented in the main body of this article. The last attribute to associate to a mechanism is whether, in calculating the rates, it should consider straight or net reactions, also discussed in the main body of the article.

Appendix E Krun

The main loop in MASKE, invoked by the Krun command, advances the timescale through a combination of discrete KMC events and stepwise integration of continuous processes. As an example, consider a system made of three particle types, AA, BB, and CC, whose deletion or nucleation are sampled as discrete, KMC-free events. Consider also that a continuous process (Cont type) is taking place, e.g. some particles are displaced with a given rate to apply strain. Finally, consider that after any process is executed, the interaction energy of all real particles in the system is minimized through a process of type Every. Let us then assume that two subcommunicators are employed, subAsubA and subBsubB, each running two processors, for a total of 4 processors being employed in the simulation. subAsubA is tasked to sample events for particles of types AA and CC, namely the deletion of NAN_{A} and NCN_{C} real particles and the nucleation of new particles of type AA only at MAM_{A} possible locations; let us call these events fix_delAfix\_delA, fix_delCfix\_delC, and fix_nucAfix\_nucA. Similarly, subBsubB samples NBN_{B} deletions and MBM_{B} nucleation sites for particles of type BB, through events fix_delBfix\_delB and fix_nucBfix\_nucB. Processes of Cont and Every type are also tasked to one subcommunicator (or to all of them) but now it is not important to specify which one(s) since MASKE eventually synchronizes all processors after a process is executed.

Fig. 3, in the main body of the article, shows a flow chart for the KrunKrun loop. The first step is for the fix_nucleatefix\_nucleate object to create trial particles at MM locations for each discrete KMC-free event of type nucleatenucleate being considered. In our example, subAsubA and subBsubB respectively create MAM_{A} and MBM_{B} trial particles at various locations. The creation of such particles is managed by the LAMMPS interface, which enables parallelization via domain decomposition; this means that, since each subcommunicator features two processors in our example, each processor will manage a subset of the trial particles, i.e. processors p1p1 and p2p_{2} forming subAsubA will respectively create and manage MA,1M_{A,1} and MA,2M_{A,2} trial particles with MA,1+MA,2=MAM_{A,1}+M_{A,2}=M_{A}, and analogously for p3p_{3} and p4p_{4} in subBsubB with its MBM_{B} trial particles. The KrunKrun loop then proceeds with sampling all the possible, discrete, KMC-free events to compute their rates. This is done by the fix_nucleatefix\_nucleate and fix_deletefix\_delete objects, which perform operations that depend on user-specified mechanisms and involve one particle per event. For example, to inform the rate of a deletedelete event involving particle ii of type AA the processor hosting it in subAsubA may compute the change in interaction energy associated to removing that particle. In this way, each processor computes the rates rk,ir_{k,i} of the events that are associated to the particles that LAMMPS hosts in that processor itself; Fig. 13 helps clarifying this, with p1p1 for example computing rates for the deletion of NA,1N_{A,1} and NC,1N_{C,1} particles and the nucleation of the MA,1M_{A,1} trial particles in it. Each processors stores these rates into two rates_eachrates\_each arrays, one in fix_deletefix\_delete and the other one in fix_nucleatefix\_nucleate, as also depicted in Fig. 13. The rates_eachrates\_each arrays in each subcommunicator are then assembled by the submaster processor in it, leading to two arrays per subcommunicator containing respectively the ratesrates of all deletedelete and nucleatenucleate events sampled there: see Fig. 13. The ratesrates arrays are sorted in increasing order of particle ID, these latter being defined in LAMMPS and extracted from there.

Refer to caption

Figure 13: Rate arrays for four discrete KMC-free processes (fix_delAfix\_delA, fix_delBfix\_delB, fix_nucAfix\_nucA, and fix_nucBfix\_nucB) distributed between two subcommunicators, subAsubA and subBsubB, and four processors, p1p4p1-p4. Processors p1p1 and p3p3 are the submasters of subAsubA and subBsubB; they gather and sort by particle ID all the rates coming from processor-specific rate_eachrate\_each arrays.

The cumulative of the ratesrates arrays across all subcommunicators is the Rk,ncp+1R_{k,n_{cp+1}} term in Eq. 21, which for the first step in the loop coincides with RkR_{k} in Eq. 20 hence suffices to compute Δtk\Delta t_{k} and thus the FOTkFOT_{k} of any one discrete event. The KrunKrun loop then samples the Δti\Delta t_{i} and thus FOTiFOT_{i} of all continuous processes, which simply consists in multiplying together the user-defined integration time step dtidt_{i} and number of integration steps nin_{i} of each ContCont process ii. The overall simulation time is thus advanced to t=mink,i(FOT)t^{*}=\min\limits_{k,i}(FOT), i.e. the smallest FOT out of FOTkFOT_{k} for a discrete event and FOTiFOT_{i} of all ii continuous processes. The process with smallest FOT is then carried out. If the process is of ContCont type, its execution simply entails the integration over nin_{i} steps with operations specified in an object that depends on the type of continuous process, e.g. fix_CmstoreLMPfix\_CmstoreLMP in Fig. 12. The execution of a continuous process is carried out either by one or by all subcommunicators; for example, processes of type fix_CmstoreLMPfix\_CmstoreLMP are always executed by all subcommunicators. Instead, when a process is executed only by one subcommunicator, MASKE synchronizes all the other processors to recover the same system before progressing with the loop.

When the chosen process is instead of KMC-free, discrete type, the krunkrun object first updates the ratesTratesT arrays. These arrays are similar to the ratesrates array, in that each subcommunicator has one stored for deletedelete events and one stored for nucleatenucleate events in its submaster processor: see Fig. 13. However, unlike the ratesrates arrays, the generic ithi^{th} entry in the ratesTratesT arrays is obtained by taking its current value and adding the product between rk,ir_{k,i} and Δtk\Delta t_{k}, where rk,ir_{k,i} is the corresponding rate value stored in the ratesrates array. In other words, the ratesTratesT arrays store the j=1ncpΔtjrk,i,j\sum_{j=1}^{n_{cp}}{\Delta t^{*}_{j}r_{k,i,j}} terms in Eq. 22, and now the latest contributions to them, Δtkrk,ncp+1\Delta t_{k}r_{k,n_{cp}+1} in Eq. 22, is being added. As a result, krunkrun can now select one discrete event to carry out with probability PiP_{i} as per Eq. 22.

The execution of a discrete event entails either the deletion or the creation of a particle, in the current version of MASKE. This is carried out by all subcommunicators at the same time. Following the stoichiometry specified in the chemDBchemDB file, the discrete event adds or removes molecules from the implicit solution (see the reaxreax keyword in Section LABEL:secChemDB, and specifically the bkgbkg attribute in it). Therefore the composition of the implicit solution is modified accordingly, recomputing the new concentrations of all the solvated molecules based on the new number of molecules in solution and on their corresponding apparent volumes, which change the total volume of the solution itself. Also this operation is carried out by all subcommunicators. After having executed a discrete, KMC-free event, the ratesTratesT arrays are zeroed across all subcommunicators, to restart the sums in Eqs. 21 and 22 (note that the term j=1ncpΔtjRk,j\sum_{j=1}^{n_{cp}}{\Delta t^{*}_{j}R_{k,j}} in Eq. 21 is just the cumulative of all ratesTratesT arrays).

After any process is executed, be it continuous or discrete, the trial particles associated to the various nucleation events (of KMC-free type) are brought back to their initial positions. Then processes of type EveryEvery are run, provided that the correct, user-specified number of loops have been completed since their last execution. Outputs are then printed out every so many (user-specified) number of loops; the outputs include MASKE’s thermothermo and dumpdump files described in C. This triggers the beginning of the next loop, and thus the next step in MASKE. The loop ends when the simulated time tt^{*} is greater than the end time specified by the user via the input command KrunKrun: seeC.

Appendix F Sampling deletion and nucleation rates

In the current version of MASKE, the sampling of discrete KMC-free events is limited to the possibility of deleting or creating (nucleating) a full particle. When prescribing a deletion or nucleation process in the main input script of MASKE, the user specifies a mechanism in the ChemDBChemDB file to attach to the process, which in turn invokes one of the user-specified chemical reactions. A reaction involves a number of molecules in solution (called ’background’, in the bkgbkg attribute of the reaction) and a number of molecules in the solid phase (called ’foreground’, via the fgdfgd attribute). The number of reactions to nucleate a generic particle jj is the closest integer to:

nr,j,nuc=Vp,jiνvm,i,fgdin_{r,j,nuc}=\frac{V_{p,j}}{\sum_{i}\nu{{}_{i}}v_{m,i,fgd}} (24)

where Vp,jV_{p,j} is the volume of particle jj and vm,i,fgdv_{m,i,fgd} is the volume of the ithi^{th} foreground molecule involved in the reaction, with νi\nu_{i} its stoichiometric coefficient. For particle dissolution, the expression is the same as in Eq. 24, except νi-\nu_{i} should replace νi\nu_{i}.

For now, MASKE only features one mechanism, called allparallpar, whereby the nucleation or deletion of an entire particle, irrespective of its size, is fully determined by one single chemical reaction, assumed to take place at the same time for all the solid molecules in the particle. This means that the time to fully dissolve a particle, Δtp,j\Delta t_{p,j} equals the time for one single chemical reaction to take place, r11r^{-1}_{1}, where r1r_{1} is the rate of that chemical reaction. This mechanism is correct when a particle is only as large as the sum of solid molecules involved in one reaction, i.e. Vp,j=iνvm,i,fgdiV_{p,j}=\sum\limits_{i}\nu{{}_{i}}v_{m,i,fgd} leading to nr,j,nuc=1n_{r,j,nuc}=1 in Eq. 24. For larger particles, the other extreme case would be to consider all reactions taking place in series, in which case the particle nucleation or dissolution time would be Δtp,j=s=1nr,jrs1\Delta t_{p,j}=\sum\limits_{s=1}^{n_{r,j}}r_{s}^{-1}, where rsr_{s} is the rate of the sths^{th} reaction in the series. More realistic mechanisms for larger particles would involve a combination of reactions taking place in series and in parallel, such as in classical and non-classical nucleation and growth/dissolution theories. The interested reader can find an example of such a mechanism in Shvab et al. (2017).

The allparallpar mechanism in MASKE uses a modified version of Transition State Theory (TST) for the rates of single dissolution/nucleation reactions, leading to the unit rate expressions in Eqs. 3 and 4 in the main body of this article. There it is pointed out how the coc^{o{\ddagger}} and ΔGo\Delta G^{o{\ddagger}} terms (standard concentration and activation free energy of the activated complex) are related to the reaction rate constant kk:

k=κkBThcoγdexp(ΔGokBT)k=\kappa\frac{k_{B}T}{h}\frac{c^{o{\ddagger}}}{\gamma^{\ddagger}_{d}}\exp\left(\frac{-\Delta G^{o{\ddagger}}}{k_{B}T}\right) (25)

Eq. 25 indicates that the arbitrary choice of coc^{o{\ddagger}} has an effect on the value of ΔGo\Delta G^{o{\ddagger}} to be employed. Consider a set of experiments of dissolution or precipitation conducted at different temperatures TT. The Gibbs free energy can be expressed from its enthalpy HH and entropy SS terms: ΔGo=ΔHoTΔSo\Delta G^{o{\ddagger}}=\Delta H^{o{\ddagger}}-T\Delta S^{o{\ddagger}}. One can thus rearrange Eq. 25 to obtain:

ln(kc0hγκkBT)=ΔSokBΔHokB1T\ln\left(\frac{k}{c^{0{\ddagger}}}\cdot\frac{h\gamma^{\ddagger}}{\kappa k_{B}T}\right)=\frac{\Delta S^{o{\ddagger}}}{k_{B}}-\frac{\Delta H^{o{\ddagger}}}{k_{B}}\frac{1}{T} (26)

If the exp(ΔHokBT)\exp\left(\frac{-\Delta H^{o{\ddagger}}}{k_{B}T}\right) term is assumed to lead the temperature dependence, a set of experimental data obtained at different TT would yield a linear plot of ln(kc0hγκkBT)\ln\left(\frac{k}{c^{0{\ddagger}}}\cdot\frac{h\gamma^{\ddagger}}{\kappa k_{B}T}\right) as a function of T1T^{-1}, with ΔSokB\frac{\Delta S^{o{\ddagger}}}{k_{B}} as the intercept when T10T^{-1}\rightarrow 0 and ΔHokB\frac{\Delta H^{o{\ddagger}}}{k_{B}} as the slope. Therefore, for a given choice of coc^{o{\ddagger}}, the linear plot provides the corresponding ΔGo\Delta G^{o{\ddagger}}. If cnewoc^{o{\ddagger}}_{new} is a new, different choice of coc^{o{\ddagger}}, the numerical value of kk expressed in this new units will change to knewk_{new} (note from Eq. 5 that the dimensionality of coc^{o{\ddagger}} determines that of kk; for example, if coc^{o{\ddagger}} is 1 mol/m2 then kk will be in mol/m2 too). This will lead to a new linear plot yielding different values of enthalpy and entropy, i.e. :

ln(knewcnew0hγκkBT)=ΔSnewokBΔHnewokB1T\ln\left(\frac{k_{new}}{c^{0{\ddagger}}_{new}}\cdot\frac{h\gamma^{\ddagger}}{\kappa k_{B}T}\right)=\frac{\Delta S^{o{\ddagger}}_{new}}{k_{B}}-\frac{\Delta H^{o{\ddagger}}_{new}}{k_{B}}\frac{1}{T} (27)

By writing knewcnew0=knewc0c0cnew0\frac{k_{new}}{c^{0{\ddagger}}_{new}}=\frac{k_{new}}{c^{0{\ddagger}}}\cdot\frac{c^{0{\ddagger}}}{c^{0{\ddagger}}_{new}}, one finds that the following relationships hold: ΔHnewo=ΔHo\Delta H^{o{\ddagger}}_{new}=\Delta H^{o{\ddagger}} and ΔSnewo=ΔSo+kBln(c0cnew0)\Delta S^{o{\ddagger}}_{new}=\Delta S^{o{\ddagger}}+k_{B}\ln\left(\frac{c^{0{\ddagger}}}{c^{0{\ddagger}}_{new}}\right). All this shows that the user must be careful to provide, as inputs, consistent values for coc^{o{\ddagger}} and ΔGo\Delta G^{o{\ddagger}}. The conversion of ΔGo\Delta G^{o{\ddagger}} values from its original coc^{o{\ddagger}} to a new cnew0c^{0{\ddagger}}_{new} requires an additional entropy term due to the difference in standard state concentrations:

ΔGnewo=ΔGo+kBln(c0cnew0)\Delta G^{o{\ddagger}}_{new}=\Delta G^{o{\ddagger}}+k_{B}\ln\left(\frac{c^{0{\ddagger}}}{c^{0{\ddagger}}_{new}}\right) (28)

Eq. 28 confirms the intuition that more concentrated standard states have higher entropy and thus lower Gibbs free energy. Furthermore, substituting Eq. 28 into Eq. 5 confirms that the value of the rate constant kk, and thus also the rates in Eqs. 3 and 4, do not depend on the arbitrary choice of standard state concentration for the activated complex.

Going back to the rates in Eqs. 3 and 4, the activity products of the reactants in dissolution and precipitation reactions, Qr,dQ_{r,d} and Qr,prQ_{r,pr}, can be defined more strictly than in the main body of this article. Since solids have unit activity, only the molecules in solution contribute to Q1Q\neq 1, and these molecules are assigned to the ’background’ in MASKE. More precisely, for the generic chemical reaction associated to the allparallpar deletion or nucleation process, all the background species ii featuring in the reaction with negative stoichiometric coefficient (i.e. consumed by the reaction) contribute to the activity product:

Qr=ibkg,νi<0(γici)νiQ_{r}=\prod_{i\in bkg\;,\;\nu_{i}<0}(\gamma_{i}c_{i})^{-\nu_{i}} (29)

where cic_{i} is the concentration in solution of the molecular species, νi\nu_{i} its stoichiometric coefficient in the reaction, and γi\gamma_{i} its activity coefficient. If a molecule is labelled as solventsolvent in the sol_startsol\_start command, the molecule is not included in the calculation of QrQ_{r}.

MASKE computes γi\gamma_{i} using the WATEQ Debye-Hückel formula discussed in the main body of this article, in Eq. 7. If the user does not know the value of aioa_{i}^{o} required there, by inputting a negative value in its place MASKE will use the Davies equation instead:

log10(γi)=zi2A(I1+I0.3I)log_{10}(\gamma_{i})=-z_{i}^{2}A\left(\frac{\sqrt{I}}{1+\sqrt{I}}-0.3I\right) (30)

For uncharged species, with zi=0z_{i}=0, Eq. 7 reduces to Setchenow equation log10(γi)=biIlog_{10}(\gamma_{i})=b_{i}I (Langmuir, 1997) ; if the user does not know the value of bib_{i}, inputting a negative value in the ChemDBChemDB file signals MASKE to employ bi=0.1b_{i}=0.1 by default.

The contribution of mechanical interactions to the reaction rates in Eqs. 3 and 4 come from their excess enthalpy terms, and specifically by the changes in total interaction energy ΔUd\Delta U_{d} and ΔUpr\Delta U_{pr} caused by the dissolution or nucleation of the particle being sampled. Fig. 14 shows how, for pairwise interactions, these energy changes can be split into two contributions: a bond term ε0\varepsilon_{0} which sets the local minimum between two neighbouring particles at their equilibrium distance r0r_{0}, and a strain energy term UsU_{s} that emerges when the local minimum resulting from multiple interactions leaves the sampled particle away from its equilibrium distance r0r_{0} from its neighbours: see Fig. 14c. For the example in Fig. 14, therefore, if the blue particle is being sampled for deletion, its ΔUd\Delta U_{d} would be 2|ε0|Us2|\varepsilon_{0}|-U_{s} for the scenario in Fig. 14c, whereas for nucleation ΔUpr=2|ε0|+Us\Delta U_{pr}=-2|\varepsilon_{0}|+U_{s}. As expected, a strong bond energy term (viz. a large, negative ε0\varepsilon_{0}) leads to a large negative ΔUpr\Delta U_{pr}, which increases the precipitation rate in Eq. 4, and to a large positive ΔUd\Delta U_{d}, which decreases the dissolution rate in Eq. 4. The opposite effect on rates comes from a large strain energy UsU_{s}, due to the local particle arrangement, which leads to a less negative ΔUpr\Delta U_{pr} and to a less positive ΔUd\Delta U_{d}.

Refer to caption

Figure 14: Changes in interaction energy accompanying the deletion or nucleation of a new particle, in blue, within a 1D array of other solid particles. (a) A typical pairwise potential of interaction between solid particles, here harmonic with cutoff. In the 1D array in (b) and (c), the change in interaction energy accompanying the deletion or nucleation of the blue particle comes from two contributions: ULU_{L} for the interaction with the black particle on the left, and URU_{R} with the black particle on the right. (b) Energy change from particle deletion or nucleation when the sampled particle perfectly fits the 1D array, and (c) when it does not fit the array perfectly hence it experiences a strain energy UsU_{s}.

Fig. 14 assumes that the sampled particle, in blue, sits in a local energy minimum resulting from the interactions with all its neighbours. In reality, if small nanoparticles are considered, thermal fluctuations will make the particle oscillate around its local energy minimum. For example, Fig. 15 shows the energy landscape for particle jj depending on its location rr within a simple system consisting of a 1D array of other particles and going from r=r=-\infty to r=rAr=r_{A}. Various local minima exist for particle jj, the rightmost being the most energetically favourable in this case. This rightmost basin extends from rAr_{A} to rB=rA+rcr_{B}=r_{A}+r_{c}, where rcr_{c} is the interaction cutoff distance from Fig. 14a. To account for thermal oscillations within a local energy basin, the rates in Eqs. 3 and 4 should feature interaction energies that are averaged over such oscillations (i.e. over all the possible configurations where the particle sits within the local energy basin, weighted by the corresponding Boltzmann factors).

Refer to caption

Figure 15: Energy change associated to the deletion or nucleation of particle jj, in blue, depending on its position rr in the semi-infinite 1D array (i.e. with no other particles on the right).

The allparallpar mechanism in MASKE uses the simplifying assumption that the local energy minimum dominates the average interaction, which is reasonable for strong bond energies ε0\varepsilon_{0}. This, however, means that the particles sampled for deletion or nucleation should occupy such local energy minima before computing the rates in Eqs. 3 and 4. When particle deletion is sampled, this requirement is not automatically satisfied by MASKE, but the user can easily ensure it by specifying a process of type EveryEvery that performs an energy minimization in LAMMPS every time a continuous or discrete process is carried out. When instead nucleation is sampled, MASKE automatically searches for local energy minima by creating MM trial particles on a user-specified lattice and by running an energy minimization for them. This energy minimization requires each trial particle to individually find a local minimum: none of the current minimization styles in LAMMPS allows for this convergence condition to be imposed, hence an additional, bespoke LAMMPS minimization style called quickmaskequickmaske is included in the MASKE distribution (it uses the same algorithm as the quickminquickmin style in LAMMPS ). During this minimization, all the particles in MASKE are fixed to their positions except the MM trial particles being sampled for nucleation. Furthermore, the only active interactions are those between the MM sampled trial particles and the other particles that already exist in MASKE, with real_typesreal\_types in the input script; all the interaction between trial particles are instead turned off. As a result, the MM trial particles effectively sample the energy landscape of a new particle nucleating at any generic position within a user-specified region, which may well be the entire simulation box. The resolution of this sampling depends on how small the cell of the user-specified lattice is; ΔV\Delta V in the precipitation rate in Eq. 4 is the volume of such lattice cell. For the example in Fig. 15, assume that a 1D lattice with MM positions defining small cells of size Δr\Delta r is used to sample possible nucleation sites between r=0r=0 and rBr_{B}. A number mm of such positions will fall within the ABA-B basin, i.e. between rAr_{A} and rBr_{B}. When running energy minimization on the trial particles, these mm particles will move to the local energy minimum, where the blue particle jj sits in Fig. 15. As a result, the nucleation of a particle in that energy minimum carries a weight equal to mΔrm\Delta r or, for a more general 3D case, mΔV=Vtm\Delta V=V_{t}. This tributary volume VtV_{t} is the volume of the energy basin, viz. the integral of all the locations rr pertaining to the basin (if sampled through infinitely small ΔV\Delta V). For the 1D case in Fig. 15, VtV_{t} would be simply rBrAr_{B}-r_{A}.

The tributary volume of the local energy basin being sampled, VtV_{t}, appears in both the dissolution and the precipitation rates in Eqs. 3 and 4. In the dissolution rate, VtV_{t} is raised to the power of α/3\alpha/3, where α\alpha is the spatial dimensionality of cdoc^{o{\ddagger}}_{d}, which in turn matches the spatial dimensionality of the rate constants measured during the experiments that are used to obtain ΔGdo\Delta G^{o{\ddagger}}_{d}. The α/3\alpha/3 exponent ensures that the event-specific rate r1,dr_{1,d} is overall in units of number of events per unit time. Dissolution and precipitation rate constants are typically expressed per unit surface, in which case α=2\alpha=2. The precipitation rate in Eq. 4 features a ΔVVtα/31\Delta V\cdot V_{t}^{\alpha/3-1} term instead. However, when all the mm trial particles pertaining to the same local energy basin are energy-minimised to the same local minimum, the cumulative rate of all these identical nucleation events (and thus the probability of selecting that site for nucleation, from Eq. 22) ends up scaling as mΔVVtα/31=VtVtα/31=Vtα/3m\Delta V\cdot V_{t}^{\alpha/3-1}=V_{t}\cdot V_{t}^{\alpha/3-1}=V_{t}^{\alpha/3}, which brings back the same factor as in the dissolution rate.

There is no easy way to compute VtV_{t}, which usually changes from one local basin to another. For example, the energetically favourable, rightmost basin in Fig. 15 has Vt=rcV_{t}=r_{c} (in 1D), the less energetically favourable basins to its left have Vt=r0<rcV_{t}=r_{0}<r_{c}, whereas the basins associated to the blue particle in Fig. 14 have Vt=2r0V_{t}=2r_{0} and Vt=2(r0+δr)V_{t}=2(r_{0}+\delta r) respectively in the stress-free system in Fig. 14b and in the stressed system in in Fig. 14c. Amorphous systems in 3D may also feature rugged energy landscapes, with narrow energy basins with Vt<r0V_{t}<r_{0}. The allparallpar mechanism in MASKE works under the approximation that one same representative value of VtV_{t} can be attributed to all basins; the user provides this value through scaling parameters attached to each moleculemolecule defined in the ChemDBChemDB file. As a result, for a particle whose deletion or nucleation features a given set of molecules in the foreground of its corresponding chemical reaction, VtV_{t} is obtained as the sum of the scaled volumes of all these foreground molecules in the particle. For example, for the rightmost basin in Fig. 15, the user may provide a scaling factor of rc/r0r_{c}/r_{0} to the molecular volumes, since r0r_{0} determines the volume that a particle in the array occupies, and rcr_{c} is the size of the basin. In a typical dissolution/precipitation process, if the interaction potentials are single-well and relatively short-range, such as in Fig. 14a, the most important events for the overall kinetics are particle deletions and nucleations on existing crystal surfaces, for which the scenario of the rightmost basin in Fig. 15, and thus the rc/r0r_{c}/r_{0} correction, are still relevant. This is because the volume that a particle occupies in a 3D crystal structure is still controlled by r0r_{0}, except that the interaction potential extends to rcr_{c} in the direction perpendicular to the surface.

For the ΔVVtα/31\Delta V\cdot V_{t}^{\alpha/3-1} term in Eq. 4 to return the desired Vtα/3V_{t}^{\alpha/3} weight factor after summing it over trial particles, the user must employ a sufficiently fine lattice, with small ΔV\Delta V, which may require a large number of trial particles MM to sample the nucleation region. For crystalline systems, the size of typical energy basins is in the range of a particle volume (e.g. in Fig. 15) and the results in the main body of this article have shown that ΔVVp/8\Delta V\approx V_{p}/8 already provide a satisfactory sampling of nucleation sites.

For the excess enthalpy in the allparallpar mechanism, Eq. 16 in the the main body of this articles has shown that a relationship must hold between the interaction energy of two bonded particles in stress-free conditions, ε0\varepsilon_{0}, and the solid-solution interfacial energy of a particle γΩ\gamma\Omega. Namely:

ε0=2γΩnb\varepsilon_{0}=\frac{2\gamma\Omega}{n_{b}} (31)

where nbn_{b} is the number of neighbours for a bulk particle. The user can manipulate the excess enthalpy term through their input of γ\gamma in the ChemDBChemDB file, and through their choice and parametrization of the interaction potentials in LAMMPS (via the MASKE input script). This can lead to a wide range of different system behaviours. For example, by setting γ=0\gamma=0 and an interaction potential where the bond energy ε0\varepsilon_{0} is set to zero as well, the user would create a simulation where particles would have the same probability of being deleted or nucleated irrespective of whether they sit next to other existing particles, or they are isolated in the solution, or even they completely overlap with other existing particles. This scenario is unphysical, hence the user must be careful in setting a meaningful relationship between γ\gamma and interaction potentials when preparing a simulation. Eq. 31 is valid only for particles interacting through single-well potentials and that can form an orderly lattice. Modifications of the equation or of the definition of excess enthalpy altogether are needed, for example when dealing with amorphous agglomerates of solid particles that feature eigenstresses Alex et al. (2023), or with larger particles that cannot be properly treated with the allparallpar mechanism.

The last term discussed in relation to the the rate equations, Eqs. 3 and 4, is the fraction χ\chi, of excess enthalpy affecting the precipitation rate. If χ\chi is set to zero, the excess enthalpy from solid-solid and solid-solution interactions only affects the dissolution rate. This is the usual assumption in Transition State Theory, where one assumes that the excess enthalpy raises the free energy level of the solid phases involved in the reaction and it is already fully lost in the activated complex state. As a result, with χ=0\chi=0 the excess enthalpy has no effect on the free energy barrier for precipitation, which involves solvated molecules as reactants and the activated complex. As noted in Shvab et al. (2017), however, χ=0\chi=0 entails that particle nucleation becomes position independent (under the current solution model in MASKE, where ion concentrations and temperature are assumed uniform everywhere in a simulation box). This leads to the computationally inefficient scenario whereby many nucleation events may be carried out in energetically very unfavourable locations, e.g. overlapping with other existing particles, just for the opposite deletion event to be carried out immediately afterwards due to the high excess enthalpy of the recently nucleated particle. Setting χ>0\chi>0 coincides with assuming that a fraction of the excess enthalpy is still present in the activated complex. If a dissolution event is being sampled and the excess enthalpy change is positive, i.e. the event is enthalpy-wise unfavourable (e.g. dissolving a well-connected particle in the bulk of a crystal), using χ>0\chi>0 reduces the activation energy for dissolution, thus increasing the dissolution rate. On the other hand, the opposite event of nucleating the same particle at the same site will also feature a lower activation energy compared to the χ=0\chi=0 case, because the activated complex now has a lower free energy due to its portion of favourable, i.e. negative, free energy on the way towards the solid state. Hence also the nucleation rate back to the same position will increase. The increase of both dissolution and precipitation rates produces a compensation effect on the probability of a particle actually existing in that site, with more likelihood of seeing a particle dissolving and reforming there compared to the χ=0\chi=0 case. The case of a deletion event with negative change in enthalpy instead, i.e. an event that is enthalpy-wise favourable (e.g. dissolving an particle under stress), will lead to a higher activation energy for dissolution and for precipitation back in the same site. As a result both dissolution and nucleation rates will decrease, once again producing a compensation effect on the probability of a particle existing in that site, but with less likelihood of seeing a particle dissolving and reforming there compared to the χ=0\chi=0 case. This mitigates the aforementioned issue of nucleating particles in sites that are so energetically unfavourable that a subsequent deletion event would immediately remove them.

Appendix G Net rates equations in allparallpar, and recovering Transition State Theory

In the main body of this articles, the expressions of reaction rates for dissolution and precipitation, Eqs. 3 and 4 (as per allparallpar mechanism in MASTKE), have been used to also derive net reaction rates, in Eqs. 9 and 10. A few considerations underpin the derivation of the net rate expressions. Starting with the net dissolution rate in Eq. 9, a first consideration is that in the backward reaction, viz. straight precipitation, all the trial particles sampling precipitation into the same energy basin will have identical straight rate r1,prr_{1,pr}. This leads to the Vtα/3V_{t}^{\alpha/3} term in Eq. 9, which comes from summing all the ΔVtα/31\Delta V_{t}^{\alpha/3-1} terms from r1,prr_{1,pr} pertaining to the same energy basin. Another consideration is the assumption that the activated state is identical for the forward (here, dissolution) and backward (here, precipitation) reactions, hence cdo=cproc^{o{\ddagger}}_{d}=c^{o{\ddagger}}_{pr} and γd=γpr\gamma^{\ddagger}_{d}=\gamma^{\ddagger}_{pr}. Since precipitation in this case is simply the reverse reaction of dissolution, nr,j,diss=nr,j,nucn_{r,j,diss}=n_{r,j,nuc} and Qr,prQ_{r,pr}, which is the activity product of the reactants in the precipitation reaction, has been re-labelled as Qp,dQ_{p,d}, i.e. the activity product of the products of the dissolution reaction. Lastly, Eq. 9 features the equilibrium constant of the dissolution reaction, Keq,d=(Qp,dQr,d)eqK_{eq,d}=\left(\frac{Q_{p,d}}{Q_{r,d}}\right)_{eq}, where the eqeq subscript indicates that the activity products are measured at equilibrium. Keq,dK_{eq,d} appears in the rate equation because of its relationship to the standard change in free energy for the dissolution reaction, ΔGdo\Delta G^{o}_{d}, i.e. Keq,d=exp(ΔGdokBT)K_{eq,d}=\exp\left(-\frac{\Delta G^{o}_{d}}{k_{B}T}\right). This ΔGdo\Delta G^{o}_{d} is the difference in standard free energy between products and reactants in the dissolution reaction, hence it determines the difference between forward and backward standard activation energies: ΔGpro+ΔGdo=ΔGdo\Delta G^{o{\ddagger}}_{pr}+\Delta G^{o}_{d}=\Delta G^{o{\ddagger}}_{d}.

All the terms in the net dissolution rate expression, in Eq. 9, ultimately relate only to quantities that are defined by the user when inputting the parameters in the ChemDBChemDB file, which that inform the chemical reactions associated to the dissolution itself. In evaluating the net dissolution rate, MASKE does not explicit sampling any nucleation event. Therefore, a simulation may sample exclusively particle deletion events, knowing that Eq. 9 will reduce the dissolution rate by the rate of the corresponding but reverse precipitation reactions. A limitation of Eq. 9 is that, if the contribution from the precipitation rate is greater than from the dissolution rate, then r1,dnetr_{1,d}^{net} will be zero and the dissolution event will never take place. This excludes the possibility of any energetically unfavourable fluctuation, which limits the ability to simulate some mechanisms such as crystal nucleation. This limitation has been addressed in the main body of this article.

Similar considerations as above apply to the derivation of the net precipitation rate, in Eq. 10. There the backward reaction, which is a straight dissolution, refers to a corresponding precipitation event that covers only a portion ΔV\Delta V of an energy basin with volume VtV_{t}. Hence r1,dr_{1,d} carries the same ΔVVtα/31\Delta V\cdot V_{t}^{\alpha/3-1} as the precipitation event which is actually being sampled. Indeed, all term in Eq. 10 ultimately only refer to a precipitation reaction being sampled, similar to how all terms in Eq. 9 only referred to the dissolution reaction. Qp,prQ_{p,pr} is the activity product of the products of the precipitation reaction, which replaces the activity product of the reactants of the dissolution reaction that, here, is just the reverse of the precipitation one. The equilibrium constant of the precipitation reaction, Keq,pr=(Qp,prQr,p)eqK_{eq,pr}=\left(\frac{Q_{p,pr}}{Q_{r,p}}\right)_{eq} emerges in a similar way as Keq,dK_{eq,d} in Eq. 9. Namely, ΔGpro\Delta G^{o}_{pr} is the standard change in free energy for the precipitation reaction, Keq,pr=exp(ΔGprokBT)K_{eq,pr}=\exp\left(-\frac{\Delta G^{o}_{pr}}{k_{B}T}\right) and ΔGdo+ΔGpro=ΔGpro\Delta G^{o{\ddagger}}_{d}+\Delta G^{o}_{pr}=\Delta G^{o{\ddagger}}_{pr}.

The net rate equations developed in this article are extensions of Transition State Theory (TST). TST ultimately leads to simple equations of net rate of the form Lasaga (2014):

1,dTST=k(1β)\mathcal{R}_{1,d}^{TST}=k(1-\beta) (32)

\mathcal{R} is the net rate of reaction per unit area or per unit volume, kk is the rate constant for the dissolution reaction, and β=Qp,d/Qr,dKeq,d\beta=\frac{Q_{p,d}/Q_{r,d}}{K_{eq,d}} is the saturation index of the dissolution reaction. For solid dissolution, since a stress-free solid is commonly assumed to be in its standard state, Qr,d=1Q_{r,d}=1 and thus β\beta simplifies to Qp,dKeq,d\frac{Q_{p,d}}{K_{eq,d}} or, that is the same if one considers the precipitation reaction opposite to the dissolution one, β=Qr,prKeq,d\beta=\frac{Q_{r,pr}}{K_{eq,d}}. The TST rate equation for the opposite precipitation reaction is obtained simply by detailed balance:

1,prTST=k(β1)\mathcal{R}_{1,pr}^{TST}=k(\beta-1) (33)

where kk and β\beta are still those for the dissolution reaction. Under a set of circumstances, the TST rates in Eqs. 32 and 33 are recovered from the allparallpar rates in MASKE, viz. from Eqs. 9 and 10. First of all, take χ=0\chi=0, meaning that any excess enthalpy from solid-solid and solid-solution interactions only exists in the solid and is fully lost already in the activated complex state. Let us then define:

k=κkBThcdoγdexp(ΔGdokBT)k=\kappa\frac{k_{B}T}{h}\frac{c^{o{\ddagger}}_{d}}{\gamma^{\ddagger}_{d}}\exp\left(\frac{-\Delta G^{o{\ddagger}}_{d}}{k_{B}T}\right) (34)

which has units of number of events per unit time, per unit area or volume (depending on the dimensionality α\alpha of cc^{\ddagger}). With this one can already rewrite the non-zero case in Eq. 9 as:

1,d=r1,dnetVtα/3=k{exp[ΔUdγΩkBT1nr,j,diss]Qr,dQp,dKeq,d}\mathcal{R}_{1,d}=\frac{r_{1,d}^{net}}{V_{t}^{\alpha/3}}=k\left\{\exp\left[-\frac{\Delta U_{d}-\gamma\Omega}{k_{B}T}\cdot\frac{1}{n_{r,j,diss}}\right]Q_{r,d}-\frac{Q_{p,d}}{K_{eq,d}}\right\} (35)

If the physically meaningful relationship between bond strength and surface energy in Eq. 16 is imposed, the excess enthalpy ΔUdγΩ\Delta U_{d}-\gamma\Omega in Eq. 35 is zero for a stress-free particle occupying a kink position in its crystal lattice. Noting then that Qr,d=1Q_{r,d}=1 for a dissolving solid and that Qp,dKeq,d\frac{Q_{p,d}}{K_{eq,d}} is indeed the definition of β\beta, one recovers indeed the TST net rate equation in Eq. 32. This means that the rate equation in MASKE is a more general form of Eq. 32, which reduces to the usual TST form for dissolution processes that are controlled by stress-free kink particles, if one assumes that excess enthalpy can only be present in the non-activated solid state. At the macroscopic level reaction rates are often expressed following Eq. 32; despite tempting, it would be incorrect to define a macroscopic rate constant kk as per Eq. 34. Indeed, a macroscopic rate constant implicitly accounts for morphological effect, such as for example the number of kink sites per unit area in a kink-controlled dissolution process, or for complex series of reactions all subsumed into a single, effective one (Cefis and Comi, 2017). Eq. 34 instead applies only to a one-step reaction and does not subsume any morphological effect, as in the allparallpar mechanism in MASKE they are accounted for through the excess enthalpy term in Eq. 9.

The TST precipitation rate in Eq. 33 is also a special case of MASKE’s rate from Eq. 10. To show this, let us first recall the common assumptions that cpro=cproc^{o{\ddagger}}_{pr}=c^{o{\ddagger}}_{pr} and γpr=d\gamma^{\ddagger}_{pr}={\ddagger}_{d}, and the following relationships: ΔGpro+ΔGdo=ΔGdo\Delta G^{o{\ddagger}}_{pr}+\Delta G^{o}_{d}=\Delta G^{o{\ddagger}}_{d} and Keq,d=exp(ΔGdokBT)K_{eq,d}=\exp\left(-\frac{\Delta G^{o}_{d}}{k_{B}T}\right). These lets us reformulate the prefactor in Eq. 10 (which one can identify as a precipitation rate constant kprk_{pr}) as:

kpr=κkBThcproγprexp(ΔGprokBT)=kexp(ΔGdokBT)=kKeq,dk_{pr}=\kappa\frac{k_{B}T}{h}\frac{c^{o{\ddagger}}_{pr}}{\gamma^{\ddagger}_{pr}}\exp\left(\frac{-\Delta G^{o{\ddagger}}_{pr}}{k_{B}T}\right)=k\exp\left(\frac{-\Delta G^{o}_{d}}{k_{B}T}\right)=\frac{k}{K_{eq,d}} (36)

where kk is the dissolution rate constant in Eq. 34. In fact, Eq. 36 simply states the well-known equilibrium condition whereby kkpr=Keq,d\frac{k}{k_{pr}}=K_{eq,d}. If one assumes again χ=0\chi=0 and stress-free kink particles with no excess enthalpy (from Eq. 16), Eq. 10 becomes:

1,pr=r1,prnetΔVVtα/31=kKeq,d(Qr,prQp,prKeq,pr)\mathcal{R}_{1,pr}=\frac{r_{1,pr}^{net}}{\Delta V\cdot V_{t}^{\alpha/3-1}}=\frac{k}{K_{eq,d}}\left(Q_{r,pr}-\frac{Q_{p,pr}}{K_{eq,pr}}\right) (37)

Noting finally that Qr,prKeq,d\frac{Q_{r,pr}}{K_{eq,d}} is the saturation index β\beta for the dissolution reaction, that Qp,pr=1Q_{p,pr}=1 when the products are solids, and that Keq,pr=Keq,d1K_{eq,pr}=K_{eq,d}^{-1}, one recovers the usual TST rate in Eq. 33.