2D Lid-Driven Cavity Problem using Artificial Compressibility Method on incompressible Newtontian fluid in MATLAB

Job ID: 32031256

Budget: $30 – $250 USD

Hi, I would like to test the Artificial Compressibility Method in MATLAB. It should be quite straightforward to do using collocated mesh, since I would like to use explicit time integration (Explicit Euler). For spatial derivatives, I would like to use central differences. If you feel it is necessary, you can use staggered mesh. I have attached what I believe are the three governing equations from continuity and x,y momentum.

I think the procedure should be as follows:
- initial velocity zero everywhere
- solve three equations (continuity, x, and y momentum) simultaneously for one artificial "timestep", update velocity and pressure fields, move to the next "timestep" -> in the comments please briefly explain the convergence / steady state criteria selected.
- do central difference for spatial integration, but explicit time integration is the really critical component.
- **** explicit euler (important: not implicit!) ******* for time integration
- BC are U = 0 on bottom, left, right side of cavity and U = 1 on top of cavity (everything is in nondimensional form). Please see attached schematic.

Some questions to answer in comments of code, and with graphs please:
- compute and visualize steady state streamlines for Reynolds number (Re) of 100 and 400.
- also graphically compare x and y components of velocity along the steady state horizontal and vertical centerlines.
- Try doubling the grid resolution (3 different grids) and ensure that velocity profiles are converging to those seen in literature.
- Please compute the spatial convergence rate of the overall scheme (attached reference may be helpful to see how they are doing this: p222, 256). This information can be extracted from the previous three grid resolutions mentioned above.

Please let me know if you have further questions!
- You can validate results using
Ghia, U. K. N. G., Kirti N. Ghia, and C. T. Shin. "High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method." Journal of computational physics 48.3 (1982): 387-411.

Please let me know if I can clarify anything further!