TY - JOUR A1 - Vrijmoed, J. C. A1 - Podladchikov, Y. Y. T1 - Thermolab: A Thermodynamics Laboratory for Nonlinear Transport Processes in Open Systems Y1 - 2022-03-31 VL - 23 IS - 4 JF - Geochemistry, Geophysics, Geosystems DO - 10.1029/2021GC010303 PB - N2 - We developed a numerical thermodynamics laboratory called “Thermolab” to study the effects of the thermodynamic behavior of nonideal solution models on reactive transport processes in open systems. The equations of the state of internally consistent thermodynamic data sets are implemented in MATLAB functions and form the basis for calculating Gibbs energy. A linear algebraic approach is used in Thermolab to compute Gibbs energy of mixing for multicomponent phases to study the impact of the nonideality of solution models on transport processes. The Gibbs energies are benchmarked with experimental data, phase diagrams, and other thermodynamic software. Constrained Gibbs minimization is exemplified with MATLAB codes and iterative refinement of composition of mixtures may be used to increase precision and accuracy. All needed transport variables such as densities, phase compositions, and chemical potentials are obtained from Gibbs energy of the stable phases after the minimization in Thermolab. We demonstrate the use of precomputed local equilibrium data obtained with Thermolab in reactive transport models. In reactive fluid flow the shape and the velocity of the reaction front vary depending on the nonlinearity of the partitioning of a component in fluid and solid. We argue that nonideality of solution models has to be taken into account and further explored in reactive transport models. Thermolab Gibbs energies can be used in Cahn‐Hilliard models for nonlinear diffusion and phase growth. This presents a transient process toward equilibrium and avoids computational problems arising during precomputing of equilibrium data. N2 - Plain Language Summary: The behavior of Earth materials, rocks, minerals, melts, fluids, and gases is important to predict physical processes in the Earth with computer models. The purpose of this is to study how the changes of variables such as fluid and solid composition influence the diffusion, fluid flow, and reaction in rocks. Here, we present a set of computer codes, called Thermolab, to calculate important physical properties such as density and chemical composition of solids, fluids, and melts in chemical equilibrium. The calculations are based on the Gibbs energy that exists for every material. We use computer codes, written in MATLAB/OCTAVE language, to show how this Gibbs energy is calculated and used to compute chemical equilibrium and find the physical properties such as density and chemical composition. We discuss techniques for accurate calculation of chemical equilibrium and physical properties in real rocks. Finally, we use Thermolab to formulate a computer model of fluids reacting with rocks. We find that chemical composition of the fluid and rock strongly affects the speed and shape of the boundary between reacted and unreacted rock. Thermolab can be used in phase growth models to investigate the way in which rocks develop toward equilibrium. N2 - Key Points: Thermolab: a set of MATLAB codes is presented to perform equilibrium and nonequilibrium thermodynamic calculations. Local thermodynamic equilibrium is used to study effects of nonideality of solution models on nonlinear transport processes. Nonlinear diffusion processes are investigated with Thermolab providing a transient natural physical process toward equilibrium. UR - http://resolver.sub.uni-goettingen.de/purl?gldocs-11858/10001 ER -