Misplaced Pages

Discretization of Navier–Stokes equations

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Discretization of Navier–Stokes equations" – news · newspapers · books · scholar · JSTOR (February 2014) (Learn how and when to remove this message)

Discretization of the Navier–Stokes equations of fluid dynamics 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
  • Finite elements method
  • Finite difference method

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. u i t + u i u j x j = P x i + ν 2 u i x j x j + f i {\displaystyle {\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. V [ u i t + u i u j x j ] d V = V [ P x i + ν 2 u i x j x j + f i ] d V {\displaystyle \iiint _{V}\leftdV=\iiint _{V}\leftdV}

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. u i t V + A u i u j n j d A = A P n i d A + A ν u i x j n j d A + f i V {\displaystyle {\frac {\partial u_{i}}{\partial t}}V+\iint _{A}u_{i}u_{j}n_{j}dA=-\iint _{A}Pn_{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. u i t V + n b r ( u i u j n j A ) n b r = n b r ( P n i A ) n b r + n b r ( ν u i x j n j A ) n b r + f i V {\displaystyle {\frac {\partial u_{i}}{\partial t}}V+\sum _{nbr}\left(u_{i}u_{j}n_{j}A\right)_{nbr}=-\sum _{nbr}\left(Pn_{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 u i t Δ x Δ y ( u i u Δ y ) w + ( u i u Δ y ) e ( u i v Δ x ) s + ( u i v Δ x ) n = ( P n i Δ y ) w ( P n i Δ y ) e ( P n i Δ x ) s ( P n i Δ x ) n ( ν u i x Δ y ) w + ( ν u i x Δ y ) e ( ν u i y Δ x ) s + ( ν u i y Δ x ) n + f i {\displaystyle {\begin{aligned}&{\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(Pn_{i}\Delta y\right)_{w}-\left(Pn_{i}\Delta y\right)_{e}-\left(Pn_{i}\Delta x\right)_{s}-\left(Pn_{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{aligned}}}

On a staggered grid, the x-momentum equation is u t Δ x Δ y ( u u Δ y ) w + ( u u Δ y ) e ( u v Δ x ) s + ( u v Δ x ) n = + ( P Δ y ) w ( P Δ y ) e ( ν u x Δ y ) w + ( ν u x Δ y ) e ( ν u y Δ x ) s + ( ν u y Δ x ) n + f x {\displaystyle {\begin{aligned}&{\frac {\partial u}{\partial t}}\Delta x\Delta y-\left(uu\Delta y\right)_{w}+\left(uu\Delta y\right)_{e}-\left(uv\Delta x\right)_{s}+\left(uv\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{aligned}}} and the y-momentum equation is v t Δ x Δ y ( v u Δ y ) w + ( v u Δ y ) e ( v v Δ x ) s + ( v v Δ x ) n = + ( P Δ x ) s ( P Δ x ) n ( ν v x Δ y ) w + ( ν v x Δ y ) e ( ν v y Δ x ) s + ( ν v y Δ x ) n + f y {\displaystyle {\begin{aligned}&{\frac {\partial v}{\partial t}}\Delta x\Delta y-\left(vu\Delta y\right)_{w}+\left(vu\Delta y\right)_{e}-\left(vv\Delta x\right)_{s}+\left(vv\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{aligned}}}

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 u i t = u i n u i n 1 Δ t {\displaystyle {\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 ( u x ) w = u I , J u I 1 , J Δ x {\displaystyle \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.

Finite elements method

Main article: Finite element method

Finite difference method

Main article: Finite difference method Category: