We considered the Navier Stokes equations, used to model the mechanics of fluids, whose numerical solution is universally believed to be a serious and difficult task. For sake of simplicity, we decided to focus on planar, stationary and incompressible fluid motions disregarding turbulence.
We worked out some Scilab functions which opportunely called allowed us to solve three different benchmarks proposed very often in literature to test solvers. The agreement between the obtained results and the reference solutions is always very good, showing the reliability of our solver.
For the model set-up (geometry, construction, meshing, managing boundary conditions, etc…) we used gmsh (http://geuz.org/gmsh/), another useful open source software.
Nonlinear system to solve:
- is the diffusivity contribution, a (6 x 6) symmetric matrix
The matrix Q(2 x 6) collects the first derivatives in the two directions of the quadratic
- is the convective non-linear contribution, a (6 x 6) unsymmetric matrix. The vector N collects the quadratic shape functions.
- is the pressure contribution, a (6 x 3) matrix. The vector L collects the first derivatives of the linear shape functions in the specified direction.
- is the term coming from the incompressibility condition, a (3 x 6) matrix. The vector M collects the linear shape functions while Q collects the first derivatives of the quadratic shape functions in the specified direction.
The six-noded finite element used to discretize the fluid domain. The velocity field is modeled using quadratic shape functions and two unknowns at each black node are considered (Vx and Vy), while the pressure (P) is modeled using linear shape functions and only three unknowns are used at the corner nodes (the red ones).