Written by Allan Leal (ETH Zurich) on Jan 14th, 2022

\n", "\n", "```{attention}\n", "Always make sure you are using the [latest version of Reaktoro](https://anaconda.org/conda-forge/reaktoro). Otherwise, some new features documented on this website will not work on your machine and you may receive unintuitive errors. Follow these [update instructions](updating_reaktoro_via_conda) to get the latest version of Reaktoro!\n", "```\n", "\n", "In this tutorial, we will demonstrate how you create your own thermodynamic databases in Reaktoro's YAML format. In these databases, you will have blocks of data for each species (and possibly elements as well, if they are not standard chemical elements from the periodic table).\n", "\n", "It is important to understand that Reaktoro expects each chemical species to know how to calculate its own *standard thermodynamic properties* at a given temperature $T$ and pressure $P$. The following standard thermodynamic properties of a species are expected as output in a standard thermodynamic model in Reaktoro:\n", "\n", "* its standard molar Gibbs energy of formation $G^{\\circ}$ (in J/mol)\n", "* its standard molar enthalpy of formation $H^{\\circ}$ (in J/mol)\n", "* its standard molar volume $V^{\\circ}$ (in m³/mol)\n", "* its standard molar isobaric heat capacity $C_{P}^{\\circ}$ (in J/(mol·K))\n", "* the temperature derivative of $V^{\\circ}$ at constant pressure $(\\partial V^{\\circ}/\\partial T)_P$ of the species (in m³/(mol·K))\n", "* the pressure derivative of $V^{\\circ}$ at constant temperature $(\\partial V^{\\circ}/\\partial P)_T$ (in m³/(mol·Pa))\n", "\n", "After computing these properties for a given $(T,P)$, several others can be easily obtained using thermodynamic relationships (e.g. $U^{\\circ} = H^{\\circ} - PV^{\\circ }$).\n", "\n", "Reaktoro already implements several standard thermodynamic models for you:\n", "\n", "* `StandardThermoModelConstant`\n", "* `StandardThermoModelInterpolation`\n", "* `StandardThermoModelHKF`\n", "* `StandardThermoModelMineralHKF`\n", "* `StandardThermoModelWaterHKF`\n", "* `StandardThermoModelMaierKelley`\n", "* `StandardThermoModelHollandPowell`\n", "* `StandardThermoModelNasa`\n", "\n", "We understand that thermodynamic data are not always formulated and organized in terms of standard thermodynamic properties of species. Many thermodynamic databases exist in which reaction properties are given (e.g., equilibrium constant of reaction, enthalpy of reaction, etc.). Reaktoro also implements several *standard thermodynamic models for reactions* to meet this need:\n", "\n", "* `ReactionStandardThermoModelConstLgK`\n", "* `ReactionStandardThermoModelVantHoff`\n", "* `ReactionStandardThermoModelPhreeqcLgK`\n", "* `ReactionStandardThermoModelGemsLgK`\n", "\n", "These models also expect temperature $T$ and pressure $P$ as inputs, and their output should be:\n", "\n", "* the standard molar Gibbs energy of the reaction $\\Delta G^{\\circ}$ (in J/mol)\n", "* the standard molar enthalpy of the reaction $\\Delta H^{\\circ}$ (in J/mol)\n", "\n", "```{note}\n", "In the background, Reaktoro will convert your *thermodynamic reaction model* assigned to a species into a *standard thermodynamic model* for the same species.\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## A very simple custom thermodynamic database in YAML format\n", "\n", "Let's consider fictitious gaseous species A