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

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.

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

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.

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.

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

On a staggered grid, the x-momentum equation is

and the y-momentum equation is

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

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

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

gollark: I suppose frequency-hopping GEORGEnet could probably be done.
gollark: For example, no encryption, no music and stuff too, I think the US limits you to 9600 baud (!!!) on some bands, and also you probably can't run tons of traffic over it or someone will be annoyed.
gollark: There are annoying constraints.
gollark: GEORGEnet should obviously run over arbitrary IRC networks, apian carriers, bouncing signals off GTech™ lunar stations, amplitude modulated earthquakes, or ultra-high-intensity transplanetary gamma ray transceivers.
gollark: Perhaps we can somehow partner with OpenNIC?
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.