July 18, 2014

12 Steps to Navier Stokes Equations

18.7.14 Posted by Florin No comments

In the following posts I'll be showing the work I've done in Python to solve numerically the Navier Stokes equations.
The idea came from Lorena Barba's blog  and her IPython Notebook; this was a challenge for me and I decided to do this work in order to understand better the CFD solvers.

Basically, I have written the code from scratch using the mentioned sources; I have used the Canopy release of Python which has a lot of pre-installed modules. All the codes are also available
on GitHub on my profile.

The objective was to create a simple solver which can be used to solve the incompressible flow equations in two dimensions:
ut+uux+vuy=1ρpx+ν(2ux2+2uy2)
vt+uvx+vvy=1ρpy+ν(2vx2+2vy2)

2px2+2py2=ρ(uxux+2uyvx+vyvy)

The processes of creating this solver has 12 steps in which every component of the Navier Stokes equations (accumulation, convection, diffusion and source) is computed first in 1D and afterwards in 2D.

Doing this, the behavior of each component is understood. In the end, all these are coupled in one code and two simple problems are solved: cavity flow and channel flow.

0 comments:

Post a Comment