Artificial compressibility method for the simulation of fluid flow

Flow is all around as well as inside us. Air, water, blood, these are the most common types of fluid we can witness easily. But how are they governed? What makes them flow the way they do? Motion of rigid bodies can be governed by the laws of motion but how are they applied to something like a fluid? The answer lies in the fundamental process of flow. Whenever a flow happens, mass and momentum are conserved. WHY? If you have one glass of water, then you can always drink a maximum of one glass of water, not more or less than that. Similar goes with the momentum according to what Newton had said. No external force acting implies no change in momentum.

So what do I get after all this conservation thing? From conservation of mass, I got what is called as continuity equation. And from momentum conservation, I get Navier-stokes equations. Let’s consider water for further considerations. Water is more or less incompressible. In incompressible case, these equations tend to be a little dramatic. HOW? Before that, we need to know that the parameters of our interest are pressure and the components of velocity. So, in a three dimensional case, we have four unknowns: pressure and three velocities. On the other hand, we have four equations: one for continuity and three for Navier-stokes equation. Then where lies the problem? A little trouble happens because pressure does not appear in the continuity equation for incompressible fluids. We have four equations and four unknowns but one unknown does not appear in an equation at all. That is why incompressible case is considered to be difficult than the compressible flow case where we don’t face such problem.

Artificial compressibility method was developed in 1967 by A.J. Chorin. He tweaked the continuity equation to include pressure such that in the steady case, this equation does not get affected by pressure while till then, pressure can play it’s part. THAT SIMPLE! This method is a beauty of science and mathematics as this looks mathematically beautiful and physically easy to grasp. I have recently used this method to solve the case of a lid-driven cavity flow and this is my code.


3 thoughts on “Artificial compressibility method for the simulation of fluid flow

  1. Diego Vaca March 3, 2016 / 12:39 PM

    The link to the code is broken. Could you upload it again or send me the code?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s