Discretization of Navier–Stokes equations

Discretization of the Navier–Stokes equations is a reformulation of the equations in such a way that they can be applied to computational fluid dynamics. Several methods of discretization can be applied.

Finite volume method

Main article: Finite volume method

Incompressible flow

Main article: Incompressible flow

We begin with the incompressible form of the momentum equation. The equation has been divided through by the density (P = p/ρ) and density has been absorbed into the body force term.

 \frac{\partial u_i}{\partial t} + \frac{\partial u_i u_j}{\partial x_j} = -\frac{\partial P}{\partial x_i} + \nu \frac{\partial^2 u_i}{\partial x_j\partial x_j} + f_i

The equation is integrated over the control volume of a computational cell.

\iiint_V \left[ \frac{\partial u_i}{\partial t} + \frac{\partial u_i u_j}{\partial x_j} \right] dV = \iiint_V \left[ -\frac{\partial P}{\partial x_i} + \nu \frac{\partial^2 u_i}{\partial x_j\partial x_j} + f_i \right] dV

The time-dependent term and the body force term are assumed constant over the volume of the cell. The divergence theorem is applied to the advection, pressure gradient, and diffusion terms.

 \frac{\partial u_i}{\partial t} V + \iint_A u_i u_j n_j dA = - \iint_A P n_i dA + \iint_A \nu \frac{\partial u_i}{\partial x_j} n_j dA + f_i V

where n is the normal of the surface of the control volume and V is the volume. If the control volume is a polyhedron and values are assumed constant over each face, the area integrals can be written as summations over each face.

 \frac{\partial u_i}{\partial t} V + \sum_{nbr} \left( u_i u_j n_j A \right)_{nbr} = - \sum_{nbr} \left( P n_i A \right)_{nbr} + \sum_{nbr} \left( \nu \frac{\partial u_i}{\partial x_j} n_j A \right)_{nbr} + f_i V

where the subscript nbr denotes the value at any given face.

Two-dimensional uniformly-spaced Cartesian grid

For a two-dimensional Cartesian grid, the equation can be expanded to

 
\begin{align}
& \frac{\partial u_i}{\partial t} \Delta x \Delta y
- \left( u_i u \Delta y \right)_w + \left( u_i u \Delta y \right)_e - \left( u_i v \Delta x \right)_s + \left( u_i v \Delta x \right)_n = \\
& - \left( P n_i \Delta y \right)_{w} - \left( P n_i \Delta y \right)_{e} - \left( P n_i \Delta x \right)_{s} - \left( P n_i \Delta x \right)_{n} \\
& - \left( \nu \frac{\partial u_i}{\partial x} \Delta y \right)_{w}
+ \left( \nu \frac{\partial u_i}{\partial x} \Delta y \right)_{e}
- \left( \nu \frac{\partial u_i}{\partial y} \Delta x \right)_{s}
+ \left( \nu \frac{\partial u_i}{\partial y} \Delta x \right)_{n} + f_i
\end{align}

On a staggered grid, the x-momentum equation is

 
\begin{align}
& \frac{\partial u}{\partial t} \Delta x \Delta y
- \left( u u \Delta y \right)_w + \left( u u \Delta y \right)_e - \left( u v \Delta x \right)_s + \left( u v \Delta x \right)_n = \\
& + \left( P \Delta y \right)_{w} - \left( P \Delta y \right)_{e}
- \left( \nu \frac{\partial u}{\partial x} \Delta y \right)_{w}
+ \left( \nu \frac{\partial u}{\partial x} \Delta y \right)_{e}
- \left( \nu \frac{\partial u}{\partial y} \Delta x \right)_{s}
+ \left( \nu \frac{\partial u}{\partial y} \Delta x \right)_{n} + f_x
\end{align}

and the y-momentum equation is

 
\begin{align}
& \frac{\partial v}{\partial t} \Delta x \Delta y
- \left( v u \Delta y \right)_w + \left( v u \Delta y \right)_e - \left( v v \Delta x \right)_s + \left( v v \Delta x \right)_n = \\
& + \left( P \Delta x \right)_{s} - \left( P \Delta x \right)_{n}
- \left( \nu \frac{\partial v}{\partial x} \Delta y \right)_{w}
+ \left( \nu \frac{\partial v}{\partial x} \Delta y \right)_{e}
- \left( \nu \frac{\partial v}{\partial y} \Delta x \right)_{s}
+ \left( \nu \frac{\partial v}{\partial y} \Delta x \right)_{n} + f_y
\end{align}

The goal at this point is to determine expressions for the face-values for u, v, and P and to approximate the derivatives using finite difference approximations. For this example we will use backward difference for the time derivative and central difference for the spatial derivatives. For both momentum equations, the time derivative becomes


\frac{ \partial u_i }{ \partial t } = \frac{ u_i^n - u_i^{n-1} }{ \Delta t }

where n is the current time index and Δt is the time-step. As an example for the spatial derivatives, derivative in the west-face diffusion term in the x-momentum equation becomes


\left( \frac{ \partial u }{ \partial x } \right)_w = \frac{ u_{I,J} - u_{I-1,J} }{ \Delta x }

where I and J are the indices of the x-momentum cell of interest.

This article is issued from Wikipedia - version of the Wednesday, March 30, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.