# DNS

### Continuity

$$
\frac{\partial \rho }{\partial t} + \frac{\partial \rho u_j }{\partial x_j} = 0
$$

### Momentum

$$
\frac{\partial \rho u_i }{\partial t} + \frac{\partial \rho u_i u_j}{\partial x_j} = -\frac{\partial p}{\partial x_i} + \frac{\partial \tau_{ij}}{\partial x_j}
$$

### Chemical species transport

$$
\frac{\partial \rho Y_k }{\partial t} + \frac{\partial \rho u_j Y_k}{\partial x_j} = \frac{\partial J_j^k}{\partial x_j} + \rho \dot{\omega}_k
$$

The code solves for the partial densities $$\rho_k = \rho Y_k$$

$$
\frac{\partial \rho_k }{\partial t} + \frac{\partial  \rho_k u_j }{\partial x_j} = \frac{\partial J_j^k}{\partial x_j} + \rho \dot{\omega}_k
$$

### Total Energy

$$
\frac{\partial E_t }{\partial t} + \frac{\partial (E_t + p) u_j}{\partial x_j} = \frac{\partial u_i \tau_{ij}}{\partial x_j} - \frac{\partial q_j }{\partial x_j} + \sum_k \frac{ \partial h_k J_j^k}{\partial x_j}
$$

where $$E_t = \rho e + \rho k$$ is the total energy plus kinetic energy.

## Closures

### Transport fluxes

The main closures assume Newtonian flows, Fourier heat transfer and Fickian diffusion and also (optionally) Soret diffusion. The **shear stress** is given by

$$
\tau_{ij} = 2 \mu S_{ij} + (\mu_b - \frac{2}{3} \mu)\nabla \cdot \vec{v} \; \delta_{ij}
$$

where $$\mu$$ and $$\mu_b$$ are the dynamic viscosity (or coefficient of shear viscoisty) and coefficient of bulk viscosity respectively. The **heat flux** follows Fourier's law

$$
q_j = -\lambda \frac{\partial T }{\partial x_j}
$$

where $$\lambda$$ is the conductivity.

In the **diffusion flux** is common to use the _Hirschfelder-Curtiss approximation_ that simplifies the Maxwell-Stefan equation by introducing an effective diffusion coefficient of specie-k in a mixture of gases. The molar flux is (neglecting pressure and temperature gradients)

$$
\overline{J}_j^k = - D_k \frac{\partial X_k }{\partial x_j}
$$

and in mass fraction

$$
J_j^k = \rho \frac{M_k}{M} \overline{J}_j^k =
- \rho \frac{M_k}{M} D_k \frac{\partial X_k }{\partial x_j}
$$

If the mean molecular weight does not vary greatly in space, this simplifies to _Ficks law_ :

$$
J_j^k = - \rho D_k \frac{\partial Y_k }{\partial x_j}
$$

The diffusion coefficient of specie-k in the mixture is

$$
D_k = \frac{1 - Y_k}{\sum_j X_j/\mathcal{D}_{jk}}
$$

based on binary diffusion coefficients $$\mathcal{D}_{ij}$$

## Equations of state

The equations of state are of the form

$$
p = f(\rho,T,Y_k) \; \mbox{ and } \; e_i = f(\rho,T,Y_k)
$$

### Ideal gas

For a mixture of ideal gases

$$
p = \rho \frac{R}{M} T   \; \mbox{ with  } \; M = \sum_k X_k M_k
$$

and the mass specific enthalpy

$$
h = h_k^0 Y_k + \int_{T^0}^T C_p dT
$$

and the specific internal energy can be directly obtained by $$e = h - p/\rho$$. The current implementations include **perfect gas**, i**deal gas** and **Soave-Redlich-Kwong** (through PelePhysics), including mixtures.
