How should I apply boundary conditions to a pressure field in a 2D cfd simulation?

58 Views Asked by At

I'm coding a 2D incompressible unsteady Navier-Stokes solver to compute airflow over and under a shape. The program uses MAC method with a staggered grid with ghost cells on boundary conditions for velocities and I set all values to zero within the boundary conditions(the shape). The problem is that the boundary conditions aren't applying correctly. None of the iterations show inside the boundary to be 0 pressure (but shows expected results for x velocity outside the shape) and eventually all iterations show all cells to have all values set to zero.

Additionally, continuity isn't met when for most cells after 9th iteration.

I tried to set the pressure to be 0 for within the shape as well as all other values. The boundary of the shape averaged out the velocities before/after it to enforce no slip condition.

The continuity was supposed to be met for all cells except for those within the shape but it isn't being met for most cells(only 30/3300)

0

There are 0 best solutions below