CemGEMS – an easy-to-use web application for thermodynamic modeling of cementitious materials

Thermodynamic equilibrium calculations for cementitious materials enable predictions of stable phases and solution composition. In the last two decades, thermodynamic modelling has been increasingly used to understand the impact of factors such as cement composition, hydration, leaching, or temperature on the phases and properties of a hydrated cementitious system. General thermodynamic modelling codes such as GEM-Selektor have versatile but complex user interfaces requiring a considerable learning and training time. Hence there is a need for a dedicated tool, easy to learn and to use, with little to no maintenance efforts. CemGEMS (https://cemgems.app) is a free-to-use web app developed to meet this need, i.e. to assist cement chemists, students and industrial engineers in easily performing and visualizing thermodynamic simulations of hydration of cementitious materials at temperatures 0-99 °C and pressures 1-100 bar. At the server side, CemGEMS runs the GEMS code (https://gems.web.psi.ch) using the PSI/Nagra and Cemdata18 chemical thermodynamic data-bases (https://www.empa.ch/cemdata). 
The present paper summarizes the concepts of CemGEMS and its template data, highlights unique features of value for cement chemists that are not available in other tools, presents several calculated examples related to hydration and durability of cementitious materials, and compares the results with thermodynamic modelling using the desktop GEM-Selektor code.


Introduction
Thermodynamic equilibrium calculations of cementitious systems have gained increased visibility in the last twenty years. Using this modelling method, the consequences of changing cement composition or temperature of interactions with the environment or of cement in hydration or degradation processes can be evaluated [1][2][3][4][5][6][7][8][9]. Thermodynamic calculations have been proven to be a valuable addition to experimental studies deepening our understanding of the processes governing cementitious systems, supporting the interpretation of experimental observations, improving the understanding of modern hydraulic binders, and enabling an efficient development of alternative binders (e.g. [10]). They have been applied to Portland cements, blended cements, calcium sulfoaluminate, calcium aluminate cement and alkali activated systems as well as helped to understand the determining factors governing sulfate, chloride and carbonate attack [1][2][3][4][5][6][7][8][9].
Thermodynamic equilibrium calculations are based on the knowledge of the thermodynamic data (e.g. solubility or complex formation) of all solids, aqueous and gaseous species which can form in a chemical system. These thermodynamic data, valid for a wide range of geochemical and chemical engineering systems, are compiled in different chemical thermodynamic databases (TDB), such as e.g. the Cemdata18 [11] TDB, the zeolite2020 [12,13] and phosphate [14][15][16] TDBs that have been developed specifically for modelling hydrated Portland, calcium aluminate, calcium sulfoaluminate, phosphate and blended cements, as well as alkali-activated materials. Available from https://www.empa.ch/cemdata, these popular TDBs contain standard thermodynamic data for cement hydrates such as C-S-H, AFm and AFt phases, hydrogarnet, hydrotalcite, phosphates, zeolites, and M-S-H, valid for temperature range from 0 to 100 °C.
Geochemical modelling codes such as PHREEQC [17] or GEMS [18,19] compute the equilibrium phase assemblage and speciation in a complex system from its total bulk elemental composition and its state variables, i.e. pressure and temperature. The use of different modelling software leads to very minor differences in the results [11,20], provided that the same TDB is used.
Typically, before performing thermodynamic calculations with GEMS or a comparable chemical speciation package, the user has to spend considerable time to put together a cement recipe based on clinker contents, composition of supplementary cementitious materials (SCMs), water/binder mass ratio, and defining what fraction (reaction extent or degree) of the initial mass of clinker and/or SCMs will actually react, while the actual calculation of equilibrium is then a matter of seconds. Likewise, setting up a simulation of cement hydration, even if assisted by a "process wizard" in GEM-Selektor, requires a considerable effort and expert knowledge to write a process control script and to arrange the necessary control data, as well as to write a script for collecting and plotting the results. The actual process simulation and plotting is then a matter of minutes.
A different approach is taken in the newly developed CemGEMS web app presented here, where, using the provided templates for the different main types of cement recipes and different types of processes, the user can efficiently model hydration, blending and degradation processes, thus saving many hours of diligent work. CemGEMS is supported by a detailed Tutorial site (https://cemgems.org) and a YouTube channel (https://www.youtube.com/channel/UCoKikRCou9npMcXjw6n hjxg) for posting training screencasts, which adds a value for education in cement chemistry. It is important, however, to point out that, even though CemGEMS is user-friendly and its templates are based on reasonable expert assumptions on which phases can form in hydrated cements, CemGEMS (as any other thermodynamic modelling tool) should not be used blindly as a "push-the-button application". The user has to be aware that any mistake or wrong assumption made during the model setup will lead to unrealistic and wrong results. In particular, the assumptions which stable phases (e.g. thaumasite, gibbsite, goethite, siliceous hydrogarnet, etc.) might form, and whether their formation is kinetically limited, can have a major effect on the calculated hydrate-and pore solution composition. In many cases, this can only be elucidated based on a careful comparison of modelling and experimental results.
The present paper gives a brief description of CemGEMS web app, emphasizing its innovative concepts and features of value for cement chemists that are not available in other tools; and compares the results obtained by using CemGEMS with the results obtained by thermodynamic modelling with GEM-Selektor code, exemplified for hydration of (blended) Portland cements, carbonation of hydrated cements, and the effect of limestone addition on hydrated calcium sulfoaluminate cement.

Background of CemGEMS
CemGEMS is a web application aimed at assisting cement chemists and engineers to rapidly create easy-to-use thermodynamic models of hydration and chemical degradation of cementitious materials in research and practice. CemGEMS runs 24/7 and is accessible via https://cemgems.app from any modern web browser, with the overview and the tutorial available at https://cemgems.org. As a web app, CemGEMS consists of two parts: front-end and back-end.
-Front-end is the code running in the client web browser and interacting with the user via control widgets, tables and plots.
-Back-end is the code constantly running on the server and communicating with the front-end, with the serverside database, and with the server-side GEMSW code for processing cement recipe calculations and process simulations.
The GEMSW code, in turn, executes the GEMS3K code, which is the numerical engine also used in the GEM-Selektor (GEMS) desktop software for thermodynamic modelling by Gibbs energy minimization (GEM) [18,19] (https://gems.web.psi.ch). The GEM method and codes are described in more detail in Supplementary Material, Part A. The chemical system is set up using the PSI/Nagra [21] chemical TDB extended with the Cemdata18 [11], the zeolite2020 [12,13] and the phosphate [14][15][16] TDBs. These TDBs are expected to get updated or merged along with the progress of research, with their GEMS variants updated and exported into CemGEMS accordingly. Comments in the tutorial web site will reflect whether and how the TDB updates affect the equilibration results.

Fundamentals of CemGEMS
In comparison with the GEM-Selektor code, CemGEMS keeps all the algorithmic and TDB "machinery" under the hood, exposing to the user just three types of data objects: -Cement recipe with all the inputs for computing a partial equilibrium state in hydrated cement, with associated volume changes and heat effects at given temperature and pressure.
-Process definition that uses the recipe to simulate cement hydration (vs time or process step), blending, leaching, carbonation or salt addition as a sequence of partial equilibria.
-Plot image and table (with underlying definition document) rendering the results of process simulation in several possible choices of abscissa and ordinate for plotting and/or exporting into CSV (comma-separated values) files.
In GEM-Selektor or similar chemical speciation packages, a considerable amount of work is usually spent, and a steep learning curve is needed for putting together the cement recipe, the process control script, and the script for collecting and plotting the results. Some users may just give up on tools that they cannot easily use. The barrier could be much lower if most of the recipe and process definition content is pre-set, so the user only has to adjust some of the recipe and process input variables.
To save user's time on complex, diligent and slow preparations, a different approach is taken in CemGEMS web app workflow, based on recipe, process and plot templates. A large part of the work done within the CemGEMS project was dedicated to creating and refining these templates for 10 main types of cement and 5 main types of hydration, blending and degradation processes. Templates are the provided JSON (JavaScript Object Notation, an open language-independent standard format for file and data interchange) documents stored in the server-side database and available to every user when creating cement recipes and processes to simulate. The templates should be considered as a key asset of CemGEMS web app because using a template can save the user many hours of tedious work requiring a considerable expertise.
Recipe templates contain industry-accepted cement recipes that can be saved as recipes and used as such, easily modified, or extended for GEM calculations of partial equilibria, in which some phases are prevented from appearing in equilibrium amounts by the kinetic restrictions set in the recipe from "phaseAliases" template or by the user.
Process templates provide the setup of main types of processes of cement hydration, blending and degradation, to be saved into process documents and used as such to perform stepwise simulations as a sequence of automatically modified recipe equilibrations. Process parameters can be edited or extensions can be added to process documents, if needed.
Plot templates provide typical selections of output data from process simulations that can be tabulated, exported to CSV file, or plotted onto meaningful process diagrams. A plot template is automatically saved into a plot document connected to a simulated process and can be modified, if needed.

Cement recipe equilibration workflow
The cement recipe workflow is defined by controls and options shown in Figure 1. A new recipe can only be created after selecting the desired "Cement type", the "Data type", and optionally entering a "Recipe name". The web app combines selections in "Cement type" and "Data type" fields into one key of the recipe template document. Compared to the GEM-Selektor code, a far more advanced concept is implemented in the CemGEMS web app. In this concept, the cement recipe is made of a list of minimum four materials: "Cement" (clinker); "SCM" (supplementary cementitious material); "Water" (to be mixed with cement and/or SCM to hydrate); and "Salt" (for simulating carbonation or salt addition effects). New entries for materials can be added after "Salt". Each material can be given zero or non-zero quantity (in selectable units of mass, %mass, moles, %moles, etc.) and a reaction extent (a number between 0 and 1). Other physical properties of a material, such as density, volume, specific enthalpy, specific heat capacity, etc. can be automatically calculated from such properties of constituents of this material (or in their absence, provided in the template or entered by the user).  Figure 1. Controls of the "Recipe" workflow of CemGEMS web app. Controls shown on the shaded background appear only when "Recipe" is set to a "__New Recipe__" value. For an existing recipe, the name, the "Delete" and "Clone" buttons are visible instead.
A material usually contains a list of one or more constituents. In "Cement", these are clinker phases (minerals); in "SCM", constituents are limestone, silica fume, blast furnace slag, calcined clay, gypsum and other solid products used in production of blended cements. In "Water", constituents are pure water, river water, etc. to represent real composition of waters mixed with binder for hydration or in leaching cement or concrete. In "Salt", constituents are CO2, sea-salt, NaCl, Na2SO4 and other salts that take part in salt addition to simulate cement degradation. In addition to input quantity, reaction extent, density, specific enthalpy, specific heat capacity, any constituent is defined by a list of chemical formulae with their respective amounts or concentrations (set in selectable units).
Amounts, properties and compositions of materials and constituents define the initial state of cement recipe. The reaction extent (default value 1.0) set for each constituent determines the fraction of mass of its bulk chemical composition transferred to the equilibrated part system, in which the equilibrium speciation will be computed. The remaining fraction (of the constituent mass and composition of "Cement" and "SCM" materials that did not react) will be kept in the residual part of the recipe, along with their respective volume, specific enthalpy and other physical properties. The "Water" and "Salt" materials (and their constituents) will always fully react and thus completely go into the equilibrated part, regardless of values of reaction extents; hence, they never appear in the residual part. Note that if the reaction extent of the over-arching material is set to a value < 1.0 then the effective reaction extent of each constituent will be multiplied by that of the whole material (except "Water" and "Salt").
Along with the reaction extents for constituents and/or materials, a recipe-top-level "WB_ratio" (water-to-binder mass ratio, W/B) parameter is another CemGEMS control highly demanded by cement chemists, but not available in GEM-Selektor. "WB_ratio" defines the ratio of "Water" mass to the sum of "Cement" and "SCM" masses. The default W/B ratio is 0.4, the minimum value possible to set is 0.2 (with the currently used thermodynamic dataset, GEMS calculation may fail at this or lower W/B ratios). W/B can be changed any time before the next equilibration of the recipe, upon which the "WB_ratio" parameter is automatically checked, and the quantity of "Water" and of the whole recipe is adjusted for consistency according to rules described in the Tutorial site (https://cemgems.org/tutorial/level-expert/). Bulk properties of the equilibrated recipe are calculated from properties of all phases appearing in the equilibrated part plus properties of constituents in the residual part. Subtraction of an initial state property from the final state property of (equilibrated) cement recipe yields the equilibration effect (for instance, the chemical shrinkage volume; the enthalpy change).
This hierarchical arrangement of cement recipes allows a detailed account for a cement hydration process as function of time because the reaction extent (degree) of any constituent can be independently controlled by the hydration process simulator (see Section 2.3), for instance, by implementing the modified Parrot & Killoh hydration model [6,22]. Representation of each constituent as a list of formulae allows the user to easily modify composition of that constituent as needed for a particular application. Formulae and constituents can be edited, deleted or duplicated (cloned) using the JSON editor widget in CemGEMS front-end at any desired level, if necessary. Recipe templates arranged as described above belong to "min" (minerals) data type and allow the most sophisticated hydration process simulations.
Often, a cement chemist or engineer cannot provide such a detailed picture of the cement clinker, split to all relevant clinker minerals as constituents with their own real compositions, because this needs expensive laboratory quantitative X-ray diffraction (QXRD) and wet-chemical studies of limited availability. Instead, only a bulk X-ray fluorescence (XRF) chemical analysis of cement or clinker (powder) is available, with measurements of (dry) density and sometimes specific surface area, but with no separate data on composition and properties of clinker mineral phases. To accommodate this "xrf" type of input recipe data, it is possible in CemGEMS to delete the whole constituents list, and use only a formula list to set up the chemical composition of some or all "Cement", "Water", "Salt" or "SCM" materials (some recipe templates without constituents at all are provided under the cement type "Minimal").
In the case of "xrf" input recipe data type, all physical properties of each material (density, specific enthalpy, etc.) must be provided; the reaction extent can only be set for the whole "Clinker" or "SCM" material. The absence of "Clinker" constituents does not allow the use of modified Parrot & Killoh model [6,22] or 4PL hydration fit [23,24] versus time. Nevertheless, a recipe of "xrf" data type can still be quite useful if containing real XRF analysis data for cement or SCM from a specific location or production site. This can make such a recipe more accurate than a generic recipe made of the "min" type template regarding the simulated effects of temperature, blending, leaching, carbonation and salt addition on hydrated cements.
In a radically simple case, a cement recipe may not even contain the list of materials, but only a list of formulae providing the bulk chemical composition of cement including water. In that case, also the initial physical properties should be provided for the whole recipe. Recipe templates of this kind belong to a cement type "Primitive". Note that shortcut recipe and material formula lists can be used along with the materials and constituents lists at their respective level, with some limitations and precautions. Overall, the extremely flexible structure of recipe documents allows the user to accommodate almost any imaginable set of input data describing composition of hydrated (blended) cement, depending on the available original data.
The currently available set of recipe templates covers 10 cement types, from Portland cement via blended cements to CSA (calcium-sulfoaluminate) cements and CAC (calcium aluminate cements). More templates (as JSON documents) can be uploaded in the future, if needed, because this does not require any re-programming of the web app. Each of the 10 cement types is available in two variants, indicated as "min" (minerals data) or "xrf" (XRF or other chemical analysis data) types described above. These 20 recipe templates, compiled from the literature by the authors of this paper, are described in more detail, with references to data sources, in the online tutorial: https://cemgems.org/tutorial/templates/recipe-templates/.
These descriptions are periodically updated when the respective recipe templates get updated.

Process simulation workflow
The process workflow is defined by controls and options shown in Figure 2. A new process definition can be created after selecting the desired "Process type", "Process lead" and optionally entering a "Process name". The web app combines the parent recipe document key with the selections in "Process type" and "Process lead" fields and with the "Process name" into a unique key of this process document. Upon clicking the "Simulate Process" button, the CemGEMS finds the suitable process template, saves it under the process document name (key), and executes the process simulation (typically in 101 partial equilibration steps). This normally takes 10 to 20 seconds. When finished, the web app creates a "default" plot document for this process simulation, loads the results from all generated step recipes, and displays a stacked-area plot of volumes of phases against the lead process variable. The plots can be changed, viewed and adjusted, as described in the next section.
In a similar fashion as for cement recipes, the user is relieved of the workload of setting up process simulations by process templates, which are JSON documents containing one or more process control spans and optionally, a time iterator allowing for typical simulations to be run immediately, producing meaningful plots for almost any recipe created from a template. Figure 2 shows all possible options; in the CemGEMS front-end, a sophisticated algorithm is implemented that eliminates most of meaningless recipe and process combinations, offering only compatible options in drop-down selectors. For example, the "Hydration-MPK" process type for the built-in modified Parrot & Killoh model [6,22] can only be used when a recipe is made of data type "min" and any cement type starting with "CEM". The "Hydration-5PL" process type can be used with recipes of data type "min" and cement types "CSA-C", "BYF-C" and "CAC-Fe" and other cement types e.g. starting with "CEM", except "Primitive" and "Minimal". Usually, parameters of 4PL/5PL equation are derived from time-resolved quantitative XRD data on how the amount of a constituent changes with time during cement hydration. This change is then converted into a degree of reaction (ReactExtent) using the constituent initial amount at time 0, fitted to obtain 5PL equation parameters, and used in this form in the "Hydration-5PL" type process built in CemGEMS (see Section 3.1).
Any recipe of data type "xrf" is compatible only with "Hydration" process type. The "Hydration::Change-WB" process template defines a direct stepwise change of "WB_ratio", whereas the "Hydration::Change-Rxt" process template sets a stepwise change of "Cement" and "SCM" reaction extents. The available process templates and their operation are described in more detail in the tutorial (https://cemgems.org/tutorial/templates/process-templates/).
Note that mP&K hydration model and 5PL hydration fit can be applied to different constituents in the same process definition (see Figure 6 below as an example of this).
Of course, it is not possible to provide process templates for any imaginable situation. The template of process type "Other" (optionally with process lead "Arbitrary") is supposed to serve as a blueprint for experienced users to modify and make a process that was not foreseen as a template. However, in most cases it is easy in CemGEMS to clone the process document and modify it for the user's needs, for instance to change the number of process steps or the range in the process span. A typical need is for blending or carbonation (salt ingress) for a given cement recipe, where it is hardly possible to figure out the maximum amount of addition of SCM constituent or of CO2 ("Salt") of interest for the user. The required modification in the process document can be done by editing it in the JSON editor widget, as described in the tutorial chapter at: https://cemgems.org/tutorial/enhanced/redefining-processes/.
For publication or reporting, it may be desirable to produce smoother, better resolved areas and curves in the plots. For that, the process document can be cloned under a different name and edited by setting in each process span the "step" to auto and "nsteps" to a desired number of steps (in templates, usually 101). Note that setting too many steps (e.g. 601) will proportionally increase the calculation waiting time to one minute or more, and the plot tables sampling time and size will increase too.

Plotting and data tabulation workflow
In CemGEMS, the plot object comparing the initial and final (hydrated) states of the cement recipe is created automatically as a horizontal bar chart when a new recipe is created, and a second bar chart for results is added after the recipe is equilibrated. For this plot object, the colors are taken from the legend template; the names of equilibrated phases are aliases taken from the phaseAliases part of the recipe object (can be edited in the phaseAliases table); the names of residual constituents or materials are taken from the recipe document (these names can be edited in the tree-like table, although this may break the linkage with legend colors). Stepwise Hydration-4PL Arbitrary Figure 2. Controls of the "Process" workflow of CemGEMS web app. Controls shown on the shaded background appear only when "Process" is set to a "__New Process__" value. For an existing process, the process name, "Delete" and "Clone" buttons are visible instead. In <Ptype> and <Plead> selectors, only compatible entries are visible. Obsolete process types are shown in italic (temporarily retained for the backward compatibility).  To present results of a process simulation, another, large plot and table data object in browser memory is automatically created after the process simulation is completed, which triggers the data collection for all abscissas and ordinates for all generated and saved process step calculation results, followed by displaying the plot as a widget in the browser page of CemGEMS. The plotting controls shown in Figure 3 are always available for the user; a change of any of the three controls results in automatic re-plotting, and re-sampling of the data table widget located below the plot.
As in the case of processes, the CemGEMS web app front-end automatically checks the consistency between the process type, abscissas and ordinates of the plot. For this reason, not all options shown above may be available in a particular plot. For example, only "Composite lines" chart type can be chosen for ordinates such as "Aqueous totals", "Aqueous pH-pe-Eh-IS", "ReactExtents", "HeatRates" and "HeatCumulative". Afterwards, the Chart type selector remains on "Composite lines" when the user chooses "Volumes" or "Masses" ordinate, and "StackedBars" or "StackedAreas" should be chosen, if desired. Sometimes, after the process simulation, a different Abscissa needs to be selected to see reasonable plots (e.g. "Time-linear" instead of "Time-log"). The plot title and the legends can be edited in the plot object using the JSON editor, as described in the Tutorial (https://cemgems.org/tutorial/enhanced/redefining-plots/).
Currently, the access to composition of solid solutions in terms of C/S ratio or mole fractions, which can be a potentially important information, is possible by expanding the "equilibrated" section of the tree-like table for the recipe equilibration results. Providing this access at the level of process diagrams can be implemented partially by adding more plot ordinate types and plot templates. This is a topic for further development of CemGEMS.

User profile
To use CemGEMS web app, one needs to have her/his user's profile uniquely identified by the user's ID such as "goodme" (created once during the registration process and linked to the user's email address). The user's ID defines an area in the remote database where the recipe, process and plot JSON documents created by this user will be saved, forming the user's profile. Upon a log-in from the web browser, all templates and all the JSON documents from the user's profile will be automatically loaded into the browser internal indexed database. This makes it possible for one user to work with the same profile from different browsers and devices, and for different CemGEMS users to login and work from the same web browser.
When the user creates a new recipe document, it will be saved in the remote database, where it can be modified by a GEM calculation and loaded again to be updated in the client browser database. When the user creates a new process document, it will be saved to the remote database and used by the GEMSW code to perform a GEM calculation of the initial recipe and then to clone it to generate all process steps, temporary saved in the user profile. When the process simulation is finished, CemGEMS will create a "$default" plot object, read and sample results from all process steps into the plot document, load it to the client browser database, display the plot, and delete the previously generated process steps. The data behind plots can be viewed in a data table and exported into local files in CSV format, for further processing in spreadsheets etc. Saving plot images into graphical format files, as well as the import/export functionality for recipe, process and plot documents, will be eventually added / extended.
All JSON documents created in the user's profile will have the user's ID as part of the name, hence CemGEMS can separate the user's data and ensure that the user sees her/his data only. The user can clone any recipe, process and plot definition document and modify it, or delete any her/his previously created document. The deletion is deep, for example, if a recipe is deleted then all process and plot documents that were generated involving this recipe will be deleted; if a process is deleted then all plots generated for this process will be deleted. The database operations automatically propagate from the currently active web browser client to the user's remote database profile.

Examples
As described in Section 2, the architecture and design of CemGEMS allows efficient and intuitive workflows. For instance, after the first login, the diagram of volumes of hydrated and residual solids for ordinary Portland cement (OPC) can be computed and plotted against the logarithm of hydration time just in one mouse click, and the simulation results can be exported into a .csv table file with a second mouse click. The plot ordinate can be changed in one click, another diagram is then plotted automatically. In the recipe, the W/B ratio, temperature or pressure can be changed per one click/edit, and the whole sequence of recipe equilibration and process simulation can be re-computed and re-plotted in one more mouse click. At the same time, quite a lot of options and compositions are accessible to the user for modifications via the tree-like tables, or underlying JSON sub-documents using the JSON editor (see more details in the Tutorial site). All this helps achieving an unmatched productivity. However, to convince a thoughtful user, it is necessary to provide clear answers to these questions in the context of validation of results: -Do I obtain correct results and diagrams for various cement and process types?
-Are these results the same as that from GEM-Selektor or other speciation codes using the same input compositions, temperatures and pressures?
The examples based on real experimental data, considered below, provide the justified positive answers to these questions. This paper is not a complete benchmarking or validation exercise. Nevertheless, we believe that the visual comparison of diagrams obtained using CemGEMS and GEM-Selektor own plotting tools can bring a sufficient confidence in the web app.
Three calculated examples will be considered:

Hydration of Portland and blended cements;
2. Blending of calcium sulfoaluminate cements with limestone; 3. Carbonation of hydrated Portland cements.

Hydration of Portland and blended cements
The constituents of Portland cement (PC) start to react in contact with water, forming various hydration products such as C-S-H (calcium silicate hydrate), portlandite, ettringite, monosulfate or monocarbonate. The composition of the cement, the interacting solution and the reaction time determine which hydrates can form over time. By applying thermodynamic modelling, one implicitly assumes that the liquid (pore solution) and the solid phases are in equilibrium. Many precipitation and dissolution processes are sufficiently fast so that the assumption of a thermodynamic equilibrium can be justified at least for aqueous solution and solid hydrates. An important exception is the dissolution of the clinker phases and of many SCMs such as fly ash, blast furnace slags or metakaolin, whose reactions are kinetically retarded under the conditions present in Portland cements, and depend on the composition of the aqueous solution [25][26][27]. The dissolution of clinkers and SCMs can be described by empirical equations; in combination with thermodynamic modelling, assuming the equilibrium between the solution and the solid hydrates, the kind and quantities of hydrates formed can be described as a function of time [6,[28][29][30].
The reaction of cement clinkers can be modelled e.g. by the mP&K model, a set of kinetic equations originally developed by Parrot and Killoh [22] and later adapted with some modifications e.g. in [6,30]. This set of equations (see Supplementary Material B) describes the general progress of the clinker reaction after one day and longer in most PCs relatively well (Figure 4,A), although some of the parameters might have to be adapted, in particular, in the presence of SCMs which can affect the reaction kinetics strongly [8,27,30]. The mP&K model, however, does not capture well the very early reactions during the first hours as it has been developed based on long-term XRD data only, where other models (such as 5PL logistic equations fitted against the timeresolved QXRD data) should be used instead.
The reaction of SCMs is generally slower than that of cement, and can be described with an empirical non-linear regression equation such as the four-parameter logistic (4PL) fit which is a special case of the more general five-parameter logistic (5PL) fit [31]: where DoR is the degree of reaction (reaction extent) in percent, t is the hydration time in days, a is the asymptote minimum DoR value (usually 0), d is the asymptote maximum DoR value (≤ 100%), b is the maximum steepness (b > 0 for reaction degree, b < 0 for the fraction of unreacted solid), c is the (time) position of the inflection point, and g is the asymmetry parameter (g = 1 for the 4PL equation). More about such empirical fits can be found in [31]. This simple logistic fit describes well the reaction of constituents of calcium sulfoaluminate cements [23,24], of SCMs (see Figure  4,B for the case of fly ash), and also of PC clinker phases (as exemplified in Figure 4,A for belite). While the mP&K model can be used as is to predict PC hydration reaction (although a further fitting step gives better results), the 4PL or 5PL fit always needs first a fitting step against the measured reaction data (e.g. amounts of clinker constituents at different times) at the present state of knowledge. The reaction of the clinkers described using the mP&K model as shown in Figure 4,A has been used as an input to model the hydration of a PC containing 5% limestone, based on the cement composition and the mP&K parameters given by De Weerdt et al. [30]. The resulting diagram computed in CemGEMS is shown in Figure 5,A.
The combination of calculated hydration rates of the clinker with thermodynamic modelling in CemGEMS predicts the slow depletion of gypsum within the first day of hydration due to the reaction of aluminate ( Figure 5,A) leading to formation of ettringite. After the depletion of gypsum, monocarbonate starts forming, consuming a part of the calcite. After 28 days (672 hours), the main hydrates predicted are C-S-H, portlandite, ettringite, monocarbonate, siliceous hydrogarnet, hydrotalcite and calcite, which agree with the hydrates observed experimentally [30], plus the residual (unhydrated) constituents of clinker. With the exception of ettringite, the amount of different hydration products continues to slowly increase with time, while the amount of pore solution and porosity decreases, as shown in Figure 5. A comparison of the CemGEMS results in Figure 5,A with the results of an analogous calculation in GEM-Selektor ( Figure  5,B) shows an identical picture, as expected.
Also the reaction of the fly ash can be accounted for by using e.g. the 4PL fits as shown in Figure 4,B to model the combined hydration of a PC containing 5% limestone and 30% of fly ash based on the cement composition and mP&K parameters given by De Weerdt et al. [30]. The combination of calculated hydration rates of the clinker and fly ash reaction predicts similar phase changes as above, albeit a lower volume of hydrates due to the dilution of the cement by the fly ash and the relatively slow reaction of the fly ash ( Figure 6). After 1 month and longer (> 700 hours) time, a clear increase in the amount of C-S-H and monocarbonate is calculated, as well as a decrease in the amount of portlandite from approximately 11 g/100g anhydrous cement after 7 days to 6.5 g portlandite per 100g anhydrous cement after 180 days, which is in good agreement with the experimentally obtained results reported in [30]. It should be noted that the reaction of Si-rich SCMs such as silica fume, fly ash or metakaolin can lower the Ca/Si in C-S-H [30,32,33], although portlandite is still present due to inhomogeneities in the hydrated cement, which is not reproduced in GEM-Selektor or CemGEMS, where inherently a uniform distribution of cements is calculated. This can lead to lower amount of portlandite calculated than that observed experimentally.
Also the effect of replacing a fraction of PC with limestone, fly ash or metakaolin can efficiently be calculated, as illustrated for limestone and metakaolin-limestone blend in Figure 7.
The results are comparable to those obtained in GEM-Selektor, cf. [11] for the effect of limestone or [32,34] for metakaolin-limestone blends. The diagram shown in Figure  7,B was calculated using a recipe based on the "CEM-II-BV::xrf" template, where the composition of the "SCM" material was set to 33% limestone and 67% of metakaolin. Volumes of the residual clinker constituents (Figure 7,A) or clinker material (Figure 7,B) correspond to the degree of hydration at 28 days.   [30] using CemGEMS at a water/solid ratio w/b = 0.5 and a temperature of 20°C (screen image). CemGEMS users can get a similar diagram by creating a new recipe of "CEM-II-BV" cement type and "min" data type, creating a new process of "Hydration-MPK" process type and "Time-log" lead, and simulating the process. Figure 7. Thermodynamic modelling of the effect of blending PC A) with limestone [6,9] or B) with 67 mass-% metakaolin (reaction degree 0.33) and 33 mass-% limestone [32] at w/b = 0.5 and temperature of 20°C calculated using CemGEMS. Only volumes of solids are shown. The abscissa shows the addition of dry SCMs in grams in exchange to dry PC so that the mass of the binder remains constant at 100 g. Figures 5 and 6 also include the estimated isothermal and adiabatic heat effects of hydration as function of time. This is an advanced feature of CemGEMS because heat generation curves can be directly compared with calorimetric data, and they are sensitive to hydration kinetics of clinker and SCM constituents. The description and verification of input data and calculation methods implemented in CemGEMS to compute isothermal heat generation curves and to estimate the adiabatic temperature rise go beyond the limits of the present paper and will be considered in a separate publication.

Calcium sulfoaluminate cements in the presence of limestone
Calcium sulfoaluminate (CSA) cements are a class of alternative cements, containing ye'elimite (C4A3S� ) as the principal phase [35][36][37][38]. They are made by blending the CSA clinker with a calcium sulfate source. Depending on the molar ratio of calcium sulfate to ye'elimite (M-ratio) [39], various amounts of monosulfate and/or ettringite form together with microcrystalline aluminum hydroxide according to Eq. 3 and 4. Pure ye'elimite hydrates in water to monosulfate according to eq. 3. At an M-ratio of 2, ettringite forms according to Eq. 4. If 0 < M < 2, first ettringite forms according to Eq. 4 until the calcium sulfate is consumed. Afterwards, monosulfate forms according to Eq. 3. At M-ratios beyond 2, the surplus calcium sulfate is present in the hydrate assemblage.
C4A3S� + 2 CS� Hx + 38-x H → C3A•3CS� •32H + 2 AH3 ; x=0, 0.5, 2 (4) The hydration of ye'elimite without the addition of calcium sulfate may follow during early hydration an alternative hydration path, leading to the formation of ettringite and CAH10, see Eq. 5 [40,41]. It has been suggested that the occurrence of CAH10 is linked to the solubility of AH3, which decreases with time due to an increase of its crystallinity [40][41][42]. At later ages (e.g. beyond 28 days of hydration), CAH10 and ettringite decompose to monosulfate, see Eq. 6. A theoretical solid volume decrease by 43% is associated with this reaction, and recently it has been shown that this conversion leads to a significant strength drop [41]. In industrial CSA cements, other phases are present, which contribute to the hydration reactions, such as belite, ternesite, ferrite or calcium aluminates (mostly C12A7). Belite hydration in CSA primarily leads to the formation of strätlingite, see Eq. 7.
CSA cements can be blended with supplementary cementitious materials (SCMs) such as slag, fly ash or limestone, which are able to take part in the hydration reactions as well. While the siliceous part of slag and fly ash contribute to strätlingite and C-(A)-S-H formation, the addition of limestone leads to the formation of carbonatecontaining AFm phases, as discussed below.

Thermodynamic modelling using CemGEMS and GEM-Selektor
As an example of thermodynamic modelling of CSA-based systems, the impact of limestone on the hydrate assemblages of a CSA cement was calculated. The composition of the CSA clinker reported in [24,59], the anhydrite composition reported in [59] and the limestone composition reported in [59] were used. The CSA cement contains ye'elimite as principal phase (68.1 mass-%). Three different CSA systems were selected, the plain CSA clinker, and the CSA clinker blended with anhydrite with two different M-ratios of M = 1.1 (86.2 mass-% CSA clinker and 13.8 mass-% anhydrite) and M = 2.1 (75.8 mass-% CSA clinker and 24.2% anhydrite) according to [59]. The phase assemblages of the three CSA systems were calculated with CemGEMS and GEM-Selektor depending on the limestone replacement (0-20 mass-% limestone) using a water/binder ratio of 0.74 and a temperature of 20°C. Hydration degrees approximately resembling the values after 90 days of hydration in [24] were used. Ye'elimite hydration and hydration of the calcium aluminates were assumed to be complete, while for belite, gehlenite and periclase, hydration degrees of 30% were used. Detailed chemical and mineralogical compositions, as well as assumed hydration degrees of the phases present, are reported in Table SC1 in the Supplementary Material.
Identical setups for phase compositions were used for both CemGEMS and GEM-Selektor. In CemGEMS, the default compositions of the CSA clinker and the limestone were modified using the JSON editor to match the phase compositions given in Table SC1 in the Supplementary Material. For belite, the composition given by Taylor [70] was used, while for the other phases the ideal stoichiometric compositions were used. Phases such as gibbsite and thaumasite, which are unlikely to form at room temperature, were not allowed to form.

Results and comparison to experimental data
CemGEMS (Figure 8,A) and GEM-Selektor (Figure 8,B) provide the same results regarding the phase assemblages of the three modelled systems.  (8) When approximately 8 mass-% of CSA clinker is replaced by limestone, monosulfate disappears, and a surplus of calcite is present. This point shows the highest volume of solids and the lowest total volume of solid plus pore solution. A previous study [58] has shown the beneficial effect of limestone filler compared to quartz filler in terms of compressive strength.
Beyond addition of 8 mass-%, limestone does not take part in reactions and acts as a filler only.
The modelled data generally agree well with experimental data obtained by XRD after 90 d of hydration, see Figure 8,C. At M = 0, a low amount of monosulfate (both 12-and 14hydrate), an AFm solid solution [71,72], and low amounts of ettringite and strätlingite are present, see also Figure SD2 in the Supplementary Material. With increasing amounts of limestone, more ettringite forms. Instead of monocarbonate, hemicarbonate is detected as carbonate-bearing AFm phase, probably due to a slow formation kinetics of monocarbonate [73]. At an M ratio of 1.1, ettringite is already present without the addition of limestone, as the binder contains anhydrite (Figure 9,A). Thus, the amount of monosulfate is lower than in the case of M = 0, and only about 4 mass-% of limestone is able to take part in the reactions. The same results have been obtained using GEM-Selektor ( Figure SD1,A in the Supplementary Material). The XRD data ( Figure SD2,B in the Supplementary Material) confirm that at M = 1.1, higher amounts of ettringite are present in all three samples than in the corresponding samples at M = 0. Both ye'elimite and anhydrite have not fully reacted. While monosulfate is present in the sample without limestone addition, it is absent in the samples containing limestone in agreement with the modelling. Strätlingite cannot be detected, probably due to its low amount and/or poor crystallinity. According to [42,52], strätlingite preferentially forms in CSA cements with a low Mvalue. with CoKα radiation. The diffraction angles 2ϴ were recalculated to CuKα radiation. The plain CSA clinker was also spiked with CaF2 as internal standard (reflection at 28.2° 2ϴ; marked by "*"). Details of the XRD pattern of the sample with plain CSA clinker and without limestone between 6 and 12° 2ϴ CuKα are provided in Figure SC1 in Supplementary Material.  (Figure 9,B). The reason is the presence of C12A7, CA and CA2 in the clinker, which also require calcium sulfate to form ettringite. Less than 1 mass-% of limestone are able to react in this system, and a surplus of limestone acts as a filler. Again, CemGEMS calculations are identical to the GEM-Selektor calculations shown in Figure SD1,B in Supplementary Material. The XRD data in Figure SD2,B in Supplementary Materials indicate that no monosulfate is detected at M = 2.1. The absence of hemi-and monocarbonate confirms the finding from thermodynamic modelling that limestone does not react in case sufficient calcium sulfate is present to convert all ye'elimite to ettringite.

Carbonation of Portland cement
The interaction with the environment influences the kind and amounts of hydrates formed. In the presence of sulfate or chloride, the formation of ettringite or Friedel's salt can be expected [3,74]. If hydrated cement is exposed to the air, it can react with the CO2 in the air, which affects compositions of hydrates and pore solution chemistry as discussed in [75,76] [77].
Thermodynamic equilibria modelling of the interaction of a white Portland cement [75] with CO2 is shown in Figure 10: A) simulated with CemGEMS, B) calculated with GEM-Selektor for comparison. The simple batch process used here simulates carbonation or the ingress of aggressive fluids not as accurately as a reactive transport model, which includes additional processes such as out-diffusion of cement solutes, moving fronts, etc., as discussed in more details in [78]. The simple batch model, however, reproduces the expected sequence of phases generally well. Figure 10 shows volumes of solid phases as a function of the amount of CO2 in grams that has reacted with the cement paste. The main carbonation reaction product is calcium carbonate; calcite is the most stable polymorph under ambient conditions, while metastable phases including amorphous calcium carbonate, vaterite and aragonite can also form. . Thermodynamic modelling of the equilibrium phase assemblage during carbonation of a white PC at W/B = 0.5, 20°C and degree of hydration 90%: A) with CemGEMS and B) using GEM-Selektor (adapted from [75]). In both diagrams, the undegraded cement paste is shown on the left-hand side, while moving to the right, more and more CO2 (mass in grams) reacts with the hydrates.
Carbonation is calculated to proceed with a fixed sequence.
Monosulfate and hemicarbonate will destabilize to monocarbonate, followed by portlandite, which decomposes to calcium carbonate. Once all accessible portlandite is consumed, C-S-H starts to decalcify, which decreases the volume of C-S-H while more calcium carbonate forms. Later monocarbonate decomposes to strätlingite while C-S-H continues to be decalcified. At higher amounts of CO2, also strätlingite, ettringite and hydrotalcite decompose to aluminum hydroxide, magnesium silicate hydrates (M-S-H), and gypsum. Finally, the remaining decalcified C-S-H is decomposed into calcite and hydrated amorphous silica, and the pH drops below pH 10 [75,76]. In addition to the changes in the solid phases, also the liquid phase composition upon equilibration can be calculated. A strong decrease of the pH value from 13.2 down to below 7 is predicted. Sulfate concentrations increase strongly during carbonation, once ettringite is destabilized ( Figure SE1 in the Supplementary Material), while the concentrations of the other elements show a more complex behavior upon carbonation, as discussed in detail in [77]. In the calculation presented in Figure 10 and in Figure SE1 in the Supplementary Material, the possible formation of zeolitic phases is suppressed due to kinetic reasons. Thus, an increase of alkali concentration is predicted, while if zeolite formation would be allowed, a decrease in alkali concentration would be predicted [77], underlining the importance of assumptions on which phases can reasonably form.
The total amount of CO2 which can be bound is around 40 to 50 g CO2/ 100 g Portland cement, as predicted by CemGEMS or GEM-Selektor in Figure 10.
Experimentally, the different steps might occur simultaneously in cements exposed to carbonation, and/or the carbonation may stop due to kinetic reasons or due to the absence of sufficient water for the reaction to occur.
Also the interaction with alkali activated slag cements [79], calcium sulfoaluminate cements [67] or any other cement as well as the combined interaction with chloride, sulfate, seawater [80,81] or any other salt can be simulated with GEM-Selektor as well as CemGEMS. Details on setting up and running such process simulations can be found in the tutorial (https://cemgems.org).

Conclusions and outlook
General thermodynamic modelling codes such as GEM-Selektor or PHREEQC are very versatile and offer many expert options, but their complexity requires an advanced level of understanding of chemical thermodynamics, and a dedicated training on efficiently using the codes. This motivated the development of CemGEMS web app (https://cemgems.app), an easy to learn and use tool aimed at assisting cement chemists, students, and industrial engineers in rapidly performing and visualizing thermodynamic simulations of partial equilibration, hydration, blending and chemical degradation of cementitious materials at temperatures 0-99 °C and pressures 1-100 bar. The CemGEMS app implements cutting-edge web technologies and uses the GEMS codes (https://gems.web.psi.ch) along with the PSI/Nagra-GEMS and Cemdata18 chemical thermodynamic databases (https://www.empa.ch/cemdata).
This paper presents the main features of CemGEMS and several calculated examples on hydration, blending and carbonation of cementitious materials, comparing the results with the experimental data and with the results of chemical thermodynamic modelling using the desktop GEM-Selektor code. The comparison shows the excellent agreement when identical inputs are used.
The CemGEMS app captures the full complexity of thermodynamic modelling in a simple-to-use web app that works 24/7 through the web browser and does not require installation or upgrades. CemGEMS offers easy-to-modify recipe templates for 10 main types of cements that can be combined with 5 main types of processes, covering a large number of predefined cases of simulations. This makes it, in particular, well suited to get a fast overview of: the phases and pore solution composition in hydrated cements their changes and the associated heat generation over time interactions with the environment (carbonation, salt attack, leaching etc.) the effect of temperature or blending on the hydrated phase assemblage Compared with the GEM-Selektor, a far more advanced concept of cement "recipe" is implemented in CemGEMS: the recipe is composed of materials (e.g. "Cement", "SCM") that, in turn, are composed of constituents (e.g. "Alite", "Fly_ash"), whose composition is set as a list of chemical formulae with their quantities. At levels of constituent, material, and recipe, the amount, reaction extent, and specific physical properties (density, enthalpy, heat capacity, surface area, …) can be provided. This allows the user for a very easy setup of partial equilibrium (by suppressing or allowing some phases to equilibrate in the phaseAliases table), clear separation of results into equilibrated and residual part, and simple controls of hydration, blending and degradation process simulations. This also makes the evaluation of isothermal and adiabatic heat effects of hydration possible, which will be discussed in a separate publication. All these things are less straightforward and more time-consuming in generic modelling codes such as GEM-Selektor or PHREEQC.
However, the use of generic thermodynamic modelling codes (e.g. GEM-Selektor) is recommended in cases where cement chemists want to perform advanced studies by adding additional mineral phases, aqueous complexes, elements not covered by the Cemdata18 TDB, or modify the existing thermodynamic data for substances, or add/change/test solid solution models, including the calculation of saturation indices of solids in pore solutions, and so on. In this sense, the use of both tools (CemGEMS and GEM-Selektor) sharing the same numerical method and code GEMS3K, can and should be complementary.
Overall, the CemGEMS web app can also be regarded as a proof-of-concept related to mastering modern information technologies by chemists and engineers, which liberate them from spending time on tasks such as installation, configuration and upgrading the software or adapting it to different operation systems, which would be the case for desktop or batch applications. The web app is the best way for better and convenient user community education and collaboration. User feedback is the most valuable asset in prioritizing and performing the development roadmap, promoting and educating CemGEMS within a future research network.