Fluid Dynamics Demo 2:
A 2-D incompressible CFD problem using triangles and a projection time integration method


The main program

We present an program that solves the 2-D time-dependent incompressible Navier-Stokes equations. For this demo, we solve these equations by a time integration projection method. Space discretisation is handled by a triangular finite element method.


An example

Let us run this program with the data presented in the following project file:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<Project name="cavity">
   <time_step value="0.01"/>
   <max_time value="0.5"/>
   <verbose value="1"/>
   <plot value="10"/>
   <mesh_file value="cavity-30.m"/>
   <parameter label="Reynolds" value="1"/>
   <parameter label="v_file" value="cavity.v"/>
   <parameter label="p_file" value="cavity.p"/>
   <BoundaryCondition code="2" dof="1">1</BoundaryCondition>

Note that we have also a section describing prescription data where a boundary condition is given: We impose the value 1.0 to the horizontal velocity dof="1" for nodes with a code equal to 2. All other data that are not given are by default set to 0.

Copyright © 1998-2022 Rachid Touzani