## 2 Materials and Methods
### Mathematical Model
#### 2.2.2 Two-Phase Flow of Miscible Fluids  
In this study, the bentonite hydration was modelled assuming that CO2 will be insignificant in the total gas phase and the gas phase will be mainly water vapour and air. Then, the mass and energy balance over unit volume equations were defined for each component (water, air, and enthalpy) of this type:  
\[\frac{\partial m_{*}}{\partial t}+\
abla\overset{\rightarrow}{l}_{*}=Q,\ m_{*}=m_{w},m_{A},h \tag{15}\]The mass of water, air, and enthalpy were defined the following [29; 30]:  
\[m_{w}=m_{L}+m_{V}=\rho_{w}\frac{eS_{w}}{1+e}+\rho_{V}\frac{e(1-S_{w})}{1+e} \tag{16}\]  
\[m_{A}=m_{AL}+m_{AG}=\rho_{A}n(1-S_{w}(1-H))\]  
\[h=\frac{\rho_{s}h_{s}}{1+e}+m_{L}h_{w}+m_{V}h_{V}+m_{A}h_{A}\]  
where \(m_{w}\) is the total mass of water as a sum of liquid water and vapour (kg/m\({}^{3}\)); \(m_{A}\) is the total mass of air as a sum of dissolved air and air in the gas phase (kg/m\({}^{3}\)); \(e\) is the void ratio; \(h_{w},h_{V},\ h_{A}\) is the enthalpy of water, vapour, and air (J/m\({}^{3}\)); \(\rho_{w}\) is water density (kg/m\({}^{3}\)); \(\rho_{V}\) is vapour density (kg/m\({}^{3}\)); \(\rho_{A}\) is air density(kg/m\({}^{3}\)); \(S_{w}\) is water saturation (m\({}^{3}\)/m\({}^{3}\)); and \(H\) is dimensionless Henry's constant for air.  
Fluxes of water, air (kg/(m\({}^{2}\)-s)) and enthalpy (W/m\({}^{2}\)) were defined considering advective diffusive transport in both phases:  
\[\overset{\rightarrow}{l}_{w}=(\rho_{w}\mathbf{q_{L}})+(\rho_{v}\mathbf{q_{G} })+\mathbf{i_{v}} \tag{17}\]  
\[\overset{\rightarrow}{l}_{A}=(\rho_{A}H\mathbf{q_{L}})+(\rho_{A}\mathbf{q_{G }})+\mathbf{i_{A}}\]  
\[\overset{\rightarrow}{l}_{h}=\rho_{W}\mathbf{h_{L}q_{L}}+h_{V}(\rho_{V}\mathbf{ q_{G}}+\mathbf{i_{v}})+h_{A}(\rho_{A}\mathbf{q_{G}}+\mathbf{i_{A}}+\rho_{A}H \mathbf{q_{L}})-\Lambda\
abla T\]  
where \(\lambda\) is material thermal conductivity.  
\[\lambda=nS_{w}\lambda_{w}+X_{AL}nS_{w}\lambda_{A}+n(1-S_{w})(\lambda_{A}+ \lambda_{v})+(1-n)\lambda_{s} \tag{18}\]  
\[X_{AL}=\frac{m_{AL}}{m_{AL}+m_{L}} \tag{19}\]  
where \(\lambda_{s}\), \(\lambda_{W}\), \(\lambda_{v}\), \(\lambda_{A}\) are the thermal conductivities of solid, water, vapour, and air, respectively (W/(m\(\cdot\)K)).  
The advective flow rate for liquid and gas phases (m/s) was described by the extended Darcy law:  
\[\mathbf{q_{L}}=-\frac{k_{L}k_{rL}}{\mu_{w}}(\
abla P_{L}+\rho_{w}\mathbf{g}) \tag{20}\]  
\[\mathbf{q_{G}}=-\frac{k_{C}k_{rG}}{\mu_{G}}(\
abla P_{G}) \tag{21}\]  
where \(k_{L}\) is the intrinsic permeability of a porous medium (m\({}^{2}\)); \(k_{rL}\) is relative permeability of the material for the liquid phase, respectively (unitless); \(k_{C},\ k_{rG}\) are intrinsic permeability (m\({}^{2}\)) and relative permeability (unitless) of the material for the gas phase, respectively; \(\mu_{w}\), \(\mu_{g}\) are the dynamic viscosity of liquid and gas phases (Pa\(\cdot\)s); \(P_{L}\), \(P_{G}\)--liquid and gas pressures (Pa).  
Diffusive fluxes (kg/(m\({}^{2}\cdot\)s)) were described [29]:  
\[\mathbf{i_{v}}=-\rho_{G}\tau_{V}n(1-S_{w})D_{V}\
abla\left(\frac{\rho_{V}}{ \rho_{G}}\right) \tag{22}\]  
\[\mathbf{i_{A}}=-\mathbf{i_{v}} \tag{23}\]  
where \(\tau_{V}\) is vapour tortuosity (unitless) and \(D_{V}\) is the vapour diffusion coefficient (m\({}^{2}\)/s).  
Substituting all the terms (Equations (17)-(23)) in to the Equation (16) and differentiating left hand side of the Equation (16) with respect of selected primary variables (liquid pressure, gas pressures and temperature), the governing equations for miscible fluid flow under non isothermal conditions were derived, which then need to be solved over finite element mesh.