Computational Fluid Dynamics (CFD)

Navier-Stokes + Incompressible + Finite difference method

Discretization methods for approximating the Partial Differential Equations (PDEs):

  1. Finite Difference (FD) \checkmark
  2. Finite Elements (FE)
  3. Finite Volume (FV)

Finite Difference (FD)

Taylor’s polynomial

    \[f(x_0 + h) = f(x_0) + \frac{f'(x_0)}{1!}h + \frac{f^{(2)}(x_0)}{2!}h^2 + \cdots + \frac{f^{(n)}(x_0)}{n!}h^n + R_n(x) \]

    \[f'(a)\approx {f(a+h)-f(a)\over h}. \]

    \[f'(a)\approx{f(a+h)+f(a-h)-2f(h)\over \Delta h^2 \]

Incompressible 2D \frac{\partial \rho}{\partial t}=0

  1. \frac{\partial \Vec{V}}{\partial t} + (\Vec{V}\cdot \nabla)\Vec{V}=- \frac{1}{\rho}\nabla P + \nu \nabla^2 \vec{V}^2
  2. \nabla \vec{V}=0

3 equations propto u, v, P

We obtain \vec{V} by transposing the equation and we obtain the explicit form of the equation:

    \[ \frac{\partial u}{\partial t}=-u\frac{\partial u}{\partial x}-v\frac{\partial u}{\partial y}-\frac{1}{\rho}\frac{\partial P}{\partial x}+\nu(\frac{\partial^2u}{\partial x^2}+\frac{\partial^2u}{\partial y^2}) \]

    \[\frac{\partial v}{\partial t}=-u\frac{\partial v}{\partial x}-v\frac{\partial v}{\partial y}-\frac{1}{\rho}\frac{\partial P}{\partial y}+\nu(\frac{\partial^2v}{\partial x^2}+\frac{\partial^2v}{\partial y^2}) \]

P is obtained by multiplying the Navier Stokes equations by \nabla, then we sum them:

    \[ -\frac{1}{\rho}(\frac{\partial^2 P}{\partial x^2}+\frac{\partial^2 P}{\partial y^2})=(\frac{\partial u}{\partial x})^2+(\frac{\partial v}{\partial y})^2+2\frac{\partial u}{\partial y}\frac{\partial v}{\partial x} \]

We have a Poisson equation:

    \[\nabla^2 P=-f\]

An iterative method can solve this equation:

    \[P_{ij}=\frac{\Delta x^2(P^n_{i,j+1}+P^n_{i,j-1}) + \Delta y^2(P^n_{i+1,j}+P^n_{i-1,j}) + \Delta x^2\Delta y^2 f_{ij}}{2(\Delta x^2+\Delta y^2)} \]

There are several algorithms that were designed to solve Poisson equation, it can be discretised as a tridiagonal block matrix:

  • Thomas algorithm \mathcal{O}(n^{2.5})
  • Successive overrelaxation \mathcal{O}(n^{1.5})
  • Fast Furier transforms \mathcal{O}(n \log(n))
  • multigrid methods \mathcal{O}(n)
#1 Cavity Flow

#2 Cavity Flow + Obstacle

Leave a Reply

Your email address will not be published. Required fields are marked *