.. role:: raw-latex(raw) :format: latex .. _`chapter:FluidModel`: Fluid Model =========== | The **basicFluidModel** class creates the control of the fluid region by reading the *regionProperties* file. The *makeFluidModel.C* creates the fluid models based on the **basicFluidModel** class. The fluid models are described below. The **fvPatches** directory contains the boundary conditions for the fluid side. The **thermos** directory contains the fluid thermodynamics models. .. container:: float :name: dirtree:FluidModel **FluidModel directory overview.** *(Placeholder content — add a figure or tree here if desired.)* .. _`sec:FluidModel:types`: types ----- .. _`subsec:FluidModel:noFluidModel`: noFluidModel Type ~~~~~~~~~~~~~~~~~ The **no** type is empty and serves as a place holder when the **FluidModel** is not used. .. _`subsec:FluidModel:pureThermo`: pureThermo Type ~~~~~~~~~~~~~~~ The **pureThermo** type updates the following thermodynamics properties using the model given by the user and writes them in the output directory. - Temperature, :math:`T` - Pressure, :math:`p` - Density, :math:`\rho` - Compressibility, :math:`\psi` - Internal energy, :math:`e` - Thermal diffusivity, :math:`\alpha` - Effective thermal diffusivity, :math:`\alpha_{eff}` - Electrical conductivity, :math:`\sigma` - Heat capacity ratio, :math:`\gamma` - Dynamic viscosity, :math:`\mu` - Effective dynamic viscosity, :math:`\mu_{eff}` - Species and elements mass fraction, :math:`y_i` - Heterogeneous production rate, :math:`\Omega_h` .. _`subsec:FluidModel:simpleFoam`: simpleFoam Type ~~~~~~~~~~~~~~~ The **simpleFoam** type is a steady state fluid solver for incompressible, turbulent flow, using the SIMPLE algorithm. It is based on the OpenFOAM **simpleFoam** solver extended for multiple regions. .. _`subsec:FluidModel:pimpleFoam`: pimpleFoam Type ~~~~~~~~~~~~~~~ The **pimpleFoam** type is a transient solver for incompressible, turbulent flow of Newtonian fluid, with optional mesh motion and mesh topology changes. It is based on the OpenFOAM **pimpleFoam** solver extended for multiple regions. .. _`subsec:FluidModel:reactingFoam`: reactingFoam Type ~~~~~~~~~~~~~~~~~ The **reactingFoam** type is a transient solver for combustion with chemical reactions. It is based on the OpenFOAM **reactingFoam** solver extended for multiple regions. .. _`subsec:FluidModel:fireFoam`: fireFoam Type ~~~~~~~~~~~~~ The **fireFoam** type is a transient solver for fires and turbulent diffusion flames with reacting particle clouds, surface film and pyrolysis modelling. It is based on the OpenFOAM **fireFoam** solver extended for multiple regions. .. _`subsec:FluidModel:chtMultiRegionFoam`: chtMultiRegionFoam Type ~~~~~~~~~~~~~~~~~~~~~~~ The **chtMultiRegionFoam** type is a solver for steady or transient fluid flow and solid heat conduction, with conjugate heat transfer between regions, buoyancy effects, turbulence, reactions and radiation modelling. .. _`subsec:FluidModel:rhoCentralFoam`: rhoCentralFoam Type ~~~~~~~~~~~~~~~~~~~ The **rhoCentralFoam** type is a density-based compressible flow solver based on central-upwind schemes of Kurganov and Tadmor with support for mesh-motion topology changes. It is based on the OpenFOAM **rhoCentralFoam** solver extended for multiple regions and time stitching. Time stitching is a method to update the fluid region only if the variation of the coupled wall temperature is greater than a user defined tolerance (**tol**). The stitching is only available with **PATOxs** (or PATOx stitching), a solver under development. .. math:: \max\left(\Delta T_w \right) = \max\left(\left\lVert \frac{T_w^n - T_w^{n-1}}{\Delta t} \right\rVert \right) > \mathrm{tol} .. _`subsec:FluidModel:rhoCentralFoamUserThermo`: rhoCentralFoamUserThermo Type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The **rhoCentralFoamUserThermo** type is based on the **rhoCentralFoam** type using thermodynamics models defined in **UserThermo** directory, where the user can put its own thermodynamics types. .. _`sec:FluidModel:fvPatches`: fvPatches --------- Figure `1.2 <#dirtree:FluidModel_fvPatches>`__ shows the architecture of the **fvPatches** in **FluidModel**. The **fvPatches** directory contains the boundary conditions. The **BCs** are the boundary conditions specific to **rhoCentralFoam** model. .. container:: float :name: dirtree:FluidModel_fvPatches **fvPatches directory overview.** *(Placeholder content — add a figure or tree here if desired.)* .. _`subsec:FluidModel:mixedFixedValueSlip`: mixedFixedValueSlip BC ~~~~~~~~~~~~~~~~~~~~~~ The **mixedFixedValueSlip** is a BC specialized for supersonic fluid. It is a mixed boundary type that blends between **fixedValue** and **slip**, as opposed to the standard mixed condition that blends between **fixedValue** and **fixedGradient**; required to implement **maxwellSlipU** BC. It is based on the OpenFOAM **mixedFixedValueSlip** BC. .. _`subsec:FluidModel:rho`: fixedRho BC ~~~~~~~~~~~ The **fixedRho** is a BC specialized for supersonic fluid. This BC provides a fixed density inlet condition for compressible solvers. It is based on the OpenFOAM **fixedRho** BC. .. _`subsec:FluidModel:T`: smoluchowskiJumpT BC ~~~~~~~~~~~~~~~~~~~~ The **smoluchowskiJumpT** is a BC specialized for supersonic fluid. This BC provides a Smoluchowski temperature jump BC for compressible solvers. It is based on the OpenFOAM **smoluchowskiJumpT** BC. .. _`subsec:FluidModel:U`: maxwellSlipU BC ~~~~~~~~~~~~~~~ The **maxwellSlipU** is a BC specialized for supersonic fluid. This BC provides a Maxwell slip BC including thermal creep and surface curvature terms that can be optionally switched off. It is based on the OpenFOAM **maxwellSlipU** BC. .. _`subsec:FluidModel:fixedValueToNbrValue`: fixedValueToNbrValue BC ~~~~~~~~~~~~~~~~~~~~~~~ The **fixedValueToNbrValue** BC fixes the value of the field on the patch :math:`\Phi_{own}` equal to the value of the neighboring patch :math:`\Phi_{nei}`. .. math:: \Phi_{own} = \Phi_{nei} .. _`subsec:FluidModel:heterogeneousReaction`: heterogeneousReaction BC ~~~~~~~~~~~~~~~~~~~~~~~~ The **heterogeneousReaction** BC calculates the heterogeneous production rate at the boundary with a fixed first order reaction parameter :math:`k_y`. .. math:: \partial_{\boldsymbol{x}} y_i = k_y \, y_i .. _`sec:FluidModel:thermos`: thermos ------- Figure `1.3 <#dirtree:FluidModel_thermos>`__ shows the architecture of the **thermos** in **FluidModel**. The **thermos** directory contains the fluid thermodynamic models specific to PATO. Modified thermodynamics models from OpenFOAM are available in **PATOthermophysicalModels**. The *makeUserThermo.C* file creates the **UserThermo** types based on the **basicUserThermo** class. It allows PATO users to create their own thermophysical model. The user thermodynamics types are described below. Turbulence models from OpenFOAM are handled in the **turbulence** directory. .. container:: float :name: dirtree:FluidModel_thermos **thermos directory overview.** *(Placeholder content — add a figure or tree here if desired.)* .. _`subsec:FluidModel:PATOthermophysicalModels`: PATOthermophysicalModels ~~~~~~~~~~~~~~~~~~~~~~~~ A single model is available in the current version of PATO. This model insures the implementation of the equilibrium chemistry thermophysical property. It reads :math:`\left(p,T \right)` tables of thermophysical properties of the mixture and interpolates values between points. The **hePsiThermoFrozen** is used for chemically frozen flow, and the temperature is calculated through a Newtonian method. The **tabularThermo** basic model updates the density by reading a table. .. _`subsec:FluidModel:Mutation`: UserThermo: Mutation ~~~~~~~~~~~~~~~~~~~~ This module utilizes the :raw-latex:`\cite{Scoggins2020, Scoggins_2014}` library to calculate mixture composition and thermophysical properties. The library has been built to centralize data and algorithms and provide accurate physico-chemical properties to CFD solvers. In this subsection, we describe the physico-chemical models implemented in the library that has been used in PATO. Physico-chemical models for gas phase ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The energy per unit volume is written as .. math:: \rho e = \sum_{i \in \hset} \rho_i e_i(T) + \rho_e e_e\super{T}(T), % e = \sum_{i \in \hset } y_i \left[e_i^{T}(T) + \delta_{i,k} e_k^{R}(T) + \delta_{i,k} e_k^{V}(T\super{ve}) +e_i^{E}(T\super{ve}) + e_i^F \right] + y_e e_e^{T}(T\super{ve}), \quad \forall k \in \mset \label{eq:massEnergy} with :math:`\rho` being the mixture mass density, :math:`\rho_e` and :math:`e_e\super{T}` are respectively the electron density and the electron internal energy. The internal energy for the heavy species :math:`\hset` is defined as, .. math:: \begin{cases} e_i\super{T}(T) + e_i\super{E}(T)+ e_i\super{F}, \qquad \forall i \in \aset, \\ e_i\super{T}(T) + e_i\super{R}(T) + e_i\super{V}(T) +e_i\super{E}(T) + e_i\super{F}, \qquad \forall i \in \mset, \end{cases} \label{eq:energyEqSpecies} where the superscripts T, V, R, and E represent the translational, vibrational, rotational, and electronic modes, :math:`\aset` represents the set of atoms, and :math:`\mset` is the set of molecules. The term :math:`e_i\super{F}` represents the formation energy of the species :math:`i` at 298 K. The pressure is retrieved with the perfect gas law as :math:`p = \sum_{i \in \hset} \rho_i R_i T + \rho_e R_e T`, where :math:`R_i` is the perfect gas constant of the species :math:`i`. The viscous stress tensor reads .. math:: \tensor{\tau} = \shearvisc \left[ \grad{u}+(\grad{u})^{T}-\frac{2}{3} \div{u} \identity \right]. where :math:`\shearvisc` is the multicomponent shear viscosity. The heat flux yields, .. math:: \vector{q}=\sum_{j \in \sset} \vector{J}_i h_{j} + \left(\lambda\super{T_h} + \lambda\super{R}+\lambda\super{V}+ \lambda\super{E}+\lambda\super{T_e}\right) \grad{T} \label{eq:totalHeatFLux} where the diffusion flux of species :math:`i` is .. math:: \vector{J}_i = \density_{i} \Velocity_{i} and :math:`\Velocity` is the diffusion velocity. Thermodynamic properties '''''''''''''''''''''''' | | The thermodynamic properties are computed with the RRHO model or NASA-9 database. The RRHO model allows one to express translational, rotational, vibrational, electronic and formation thermodynamic properties for each species where specific data for each species can be found in :raw-latex:`\cite{Gurvich1989_V1P1}`. The NASA-9 database of :raw-latex:`\cite{MacBride2001}` comprises the thermodynamic data of several species in the form of 9-coefficient polynomials. This data is accurate up to :math:`\SI{20000}{\kelvin}` for the majority of the species and includes vibration-rotation coupling effects as well as anharmonicity corrections. Transport properties '''''''''''''''''''' | | The transport properties such as shear viscosity :math:`\shearvisc`, diffusion velocity :math:`\Velocity` and thermal conductivity :math:`\lambda` are derived through a multiscale Chapman–Enskog perturbative solution of the Boltzmann equation :raw-latex:`\cite{Vincenti1965,Ferziger1972}`. The interested reader is directed to :raw-latex:`\cite{Magin2004}` and :raw-latex:`\cite{Magin2004b}` for a more thorough discussion. The multicomponent shear viscosity :math:`\shearvisc` is a solution of the following linear system, .. math:: \begin{aligned} \sum_{j \in \hset} G^{\mu}_{ij} \alpha^{\mu}_j &= \molefrac_{i}, \qquad \forall i \in \hset,\\ \shearvisc &= \sum_{j \in \hset} \alpha^{\mu}_j x_j, \end{aligned} where :math:`x` is the species mole fraction. Similarly to the shear viscosity, the thermal conductivity of the heavy particle translational mode is a solution of the following system, .. math:: \begin{aligned} \sum_{j \in \hset} G^{\lambda}_{ij} \alpha^{\lambda}_j &= x_i, \qquad \forall i \in \hset,\\ \lambda\super{T_h} &= \sum_{j \in \hset} \alpha^{\lambda}_j x_i. \end{aligned} The thermal conductivity for each internal mode is given by the Eucken correction, .. math:: \begin{aligned} \lambda\super{R} &= \sum_{j \in \mset} \frac{\rho_i c_i^{R}}{\sum_{j \in \hset} x_j/\bindiff_{ij}},\\ \lambda\super{V} &= \sum_{j \in \mset} \frac{\rho_i c_i^{V}}{\sum_{j \in \hset} x_j/\bindiff_{ij}},\\ \lambda\super{E} &= \sum_{j \in \hset} \frac{\rho_i c_i^{E}}{\sum_{j \in \hset} x_j/\bindiff_{ij}}, \end{aligned} where :math:`c_i^R`, :math:`c_i^V` and :math:`c_i^E` are the rotational, vibrational, and electronic species specific heats per particle, respectively. The diffusion velocity vector :math:`\Velocity` is given by the generalized Stefan–Maxwell system that can be written as .. math:: \sum_{j \in \gset} G^{V}_{ij} \Velocity{_j} = \vector{d}_i^{\Theta'} + k_i^{\Theta}\vector{E} \label{eq:StefanMaw} where :math:`\vector{d}_i^{\Theta'} = \vector{d}'_i \Theta_i`, :math:`k_i^{\Theta} =k_i\Theta_i`, :math:`\Theta_i = T_h/T_i`, :math:`i \in \gset`. The grouping parameter :math:`k` is .. math:: \begin{aligned} k_j &= \frac{x_j q_j}{\kB T_h} - \frac{y_i q}{\kB T_h},\quad \forAllGases{j}, \\ q & = \sum_{ i \in \gset} x_i q_i, \end{aligned} where the last equation refers to the mixture charge. Neglecting thermo- and baro-diffusion, the modified driving force follows .. math:: % \vector{d}'_i = \frac{\grad p_j}{n \kB T_h} - \frac{y_i p}{n \kB T_h} \grad p \vector{d}'_i = \frac{p}{n \kB T_h} \grad x_i, \quad \forAllGases{i}. Details on transport algorithms to solve the linear systems are provided in :raw-latex:`\cite{Magin2004a}`, and more details on the transport properties expressions and models are provided by :raw-latex:`\cite{Magin2004}` and :raw-latex:`\cite{Scoggins2017}`. Chemical kinetic '''''''''''''''' | | A reversible chemical reaction :math:`r\in\mathcal{R}` can be expressed as .. math:: \sum_{i \in \mathcal{G}} \nu^{'}_{ir} X_i \rightleftharpoons \sum_{i \in \mathcal{G}} \nu^{''}_{ir} X_i, \quad \forall r \in \mathcal{R} where :math:`X_i` is the chemical symbol for species :math:`i\in\mathcal{G}`, and :math:`\nu^{'}_{ir}` and :math:`\nu^{''}_{ir}` are the forward and backward stoichiometric coefficients for species :math:`i` in reaction :math:`r`. From the Law of Mass Action, the chemical production rate is given by .. math:: \mathbf{\dot{\omega}}\super{chem}_i = M_i\sum_{r \in \mathcal{R}} \nu_{ir} \mathfrak{R}_{r}, \forAllGases{i} where :math:`\nu_{ir} = \nu^{''}_{ir}-\nu^{'}_{ir}` and the symbol :math:`M_i` stands for the species molar mass. The rate of progress for reaction :math:`r` is given by .. math:: \mathfrak{R}_{r} = k_{r}^f\prod_{i \in \mathcal{G}}\left(\frac{\rho_i}{M_i}\right)^{\nu^{'}_{ir}} - k_{r}^b\prod_{i \in \mathcal{G}}\left(\frac{\rho_i}{M_i}\right)^{\nu^{''}_{ir}}, \quad \forall r \in \mathcal{R}, \label{eq:RateOfProgress} where :math:`k_{r}^f` is the forward rate that follows an Arrhenius-type and :math:`k_{r}^b` is the backward rate. A zero rate of progress means a chemical equilibrium condition which leads to :math:`\mathbf{\dot{\omega}}\super{chem}_i = 0`. Chemical equilibrium '''''''''''''''''''' | | At equilibrium, the species mole fractions are obtained with a Gibbs minimization method :raw-latex:`\cite{Scoggins2015}`, and are functions of the mixture temperature, pressure, and elemental mole fraction :math:`x_e` .. math:: x_{i}=x_{i}\left(T, p, x_{e}\right) \qquad \forall i \in \gset leading to the species mole fraction gradient as .. math:: \partial_{x} x_{i}=\frac{\partial x_{i}}{\partial p} \partial_{x} p+\frac{\partial x_{i}}{\partial T} \partial_{x} T+\sum_{e \in \eset} \frac{\partial x_{i}}{\partial w} \partial_{x} x_{e}, where :math:`\eset` is the set of elements. The elemental diffusion flux yields .. math:: \vector{J}_{e}^{*}=\mathcal{F}_{e}^{p} \partial_{x} p+\mathcal{F}_{e}^{T} \partial_{x} T+\sum_{e \in \eset} \mathcal{F}_{e}^{X_{e}} \partial_{x} x_{e} and the diffusive energy fluxes are obtained by multiplying the species mass fluxes by the mass enthalpy such that .. math:: \sum_{i \in \gset}\left(\vector{J}_i h_i \right)=\mathcal{F}_{h}^{p} \partial_{x} p+\mathcal{F}_{h}^{T} \partial_{x} T+\sum_{e \in \eset} \mathcal{F}_{h}^{X_{e}} \partial_{x} x_{e} where :math:`\mathcal{F}_{e}^{p}`, :math:`\mathcal{F}_{e}^{T}`, :math:`\mathcal{F}_{e}^{X_{l}}`, :math:`\mathcal{F}_{h}^{p}`, :math:`\mathcal{F}_{h}^{T}`, and :math:`\mathcal{F}_{h}^{x_{l}}` are driving forces provided by and their expressions can be found in :raw-latex:`\cite{Lachaud2017}`. basicMutation ^^^^^^^^^^^^^ This class is the mother class of all Mutation sub-models. Three sub-models are available: - FiniteRateMutation - PTEquilMutation - PTXEquilMutation FiniteRateMutation '''''''''''''''''' | | This class updates the cells’ and boundaries’ thermodynamic and transport properties for finite-rate chemistry flows based on the different thermochemical state-vector :math:`(\rho_i, \rho e)`, :math:`(\rho_i, T)`, or :math:`(y_i, T, p)`. PTEquilMutation ''''''''''''''' | | This class updates the cells’ and boundaries’ thermodynamic and transport properties for chemically equilibrium flows based on the different thermochemical state-vector :math:`(\rho, \rho e)`, or :math:`(p, T)` where the elemental composition is taken by default from the mixture file. PTXEquilMutation '''''''''''''''' | | This class updates the cells’ and boundaries’ thermodynamic and transport properties for chemically equilibrium flows based on the different thermochemical state-vector :math:`(x_e, \rho, \rho e)`, or :math:`(y_e, p, T)` where the elemental composition is a solution of the elemental mass continuity. .. _`subsec:FluidModel:Tabulated`: UserThermo: Tabulated ~~~~~~~~~~~~~~~~~~~~~ The **basicTabulated** class is the mother class of all Tabulated sub-models. Two sub-models are available: - PTEquilTabulated - PTXEquilTabulated PTEquilTabulated: ^^^^^^^^^^^^^^^^^ | | This class updates the cells’ and boundaries’ thermodynamic and transport properties for chemically equilibrium flows. It pre-generates and stores tables for a range of pressures and temperatures utilizing *(specify tool/library)*. PTXEquilTabulated: ^^^^^^^^^^^^^^^^^^ | | This class updates the cells’ and boundaries’ thermodynamic and transport properties for chemically equilibrium flows. It pre-generates and stores tables for a range of pressures, temperatures and elemental composition utilizing *(specify tool/library)*.