# How to Solve Isothermal Incompressible Navier-Stokes for Compressible Fluid?

• A
• mrBart
In summary, an incompressible fluid can be compressible if the Mach number is low. To close the system of equations we probably need to introduce an equation of state relating the existing variables with each other somehow.
mrBart
I did a lot of googling but could not find a satisfying answer to my question, hence a post here.

Question:
How to solve (or close) the isothermal incompressible Navier-Stokes equations for an isothermal compressible fluid?

Situation:
We have a compressible fluid, for example a gas.
The flow of this compressible fluid is in the incompressible regime (i.e. it has low Mach number)

Context:
In three-dimensional space the isothermal incompressible Navier-Stokes equations consists of four equations:
1 mass equation
3 momentum equations (one for each for spatial dimension)

There are five variables:
Mass density rho
Pressure P
Velocity (u_x, u_y, u_z)

So, to close the system of equations we need additional information. The simplest approach is to assume we are dealing with an incompressible fluid:
Mass density rho then becomes a user-specifiable constant, i.e. constant over space and time.
This assumption is acceptable if we are dealing with a liquid, since liquids are generally considered incompressible fluids. The remaining variables are then the pressure and velocity. The pressure is usually computed by solving the Poisson equation for the pressure.

However, if we are dealing with an isothermal compressible fluid (e.g. a gas), then we generally cannot assume the mass density is constant over space and time. We can assume the flow of this compressible fluid is incompressible if the Mach number is low. To close the system of equations here we probably need to introduce an equation of state relating the existing variables with each other somehow. But which equation of state is generic? That is, is there an equation of state valid for many gases? Would it also be valid for liquids? And do we still solve the pressure from the Poisson equation for pressure? Questions I hope one of you guys can answer, even a partial answer is welcome.

Last edited:
Bit confused about the question - a fluid can't be incompressible and compressible at the same time .

For a specific gas there are tables of values for density over a wide range of pressure and temperature conditions . There are also quite accurate curve fit formulas for many gasses .

For a useful general formula have a look at the Van der Waals equation .

Last edited:
The fluid is compressible, for example a gas.
But the flow of the fluid is in the incompressible regime (i.e. low Mach number).
This is a valid situation.
(updated my question to make this more clear)

Last edited:
mrBart said:
This is a valid situation.

Actually it is a very well known and understood situation .

If gas is in the incompressible region then it is incompressible - density is constant .

In studying thermodynamics, there are many different equations of state that we use to describe the density of a fluid as a function of temperature and pressure. One example is the ideal gas law. Of course, at higher pressures, one needs to take into account non-ideal gas behavior. For liquids, a good choice is to express the specific volume in terms of the bulk compressibility and the coefficient of thermal expansion.

mrBart
Nidum said:
If gas is in the incompressible region then it is incompressible - density is constant .
No, a simple counter example can demonstrate that, illustrated as follows

Say we have a piston filled with a gas at time t0. Next we push the piston downwards and the gas compresses, say this is time t1. So, the mass density of the gas increases over time, ##\frac{\partial \rho(x,t)}{\partial t} \neq 0##. The piston goes downwards with very low velocity, so the Mach number is very low, so the gas' flow is still in the incompressible regime. A liquid on the other hand would not compress, and for a liquid ##\frac{\partial \rho(x,t)}{\partial t} = 0## holds.

mrBrat: Were you not able to follow what I said in my post #5?

Typically, flow where density varies but the fluid motions still behave largely like incompressible flows due to the low velocity are termed variable density flows to distinguish them from truly incompressible flows. If you truly want to capture all of their behavior, you still need to solve the compressible Navier-Stokes equations. It is fairly common to make a number of assumptions similar to incompressibility, though, in which case you run into the closure problem discussed here. Many times this involves invoking the Boussinesq approximation and an equation of state as @Chestermiller suggested. This can allow the energy equation to remain decoupled, if I am not mistaken. There are other methods as well. It all depends on your situation and how accurate you need your result to be based on the assumptions you make.

bigfooted said:
Thanks I already knew, still, it feels good to read a post from someone who also mentions an incompressible *fluid* is not the same as an incompressible *flow*.

bigfooted said:
You need an extra equation for pressure. The closure method is called the SIMPLE algorithm (other algorithms are SIMPLER and PISO) and they are used in numerical solvers, see e.g.
https://web.stanford.edu/class/me469b/handouts/incompressible.pdf
Yes, it was also my hunch I need some equation of state from which I can compute the pressure. I went through the document but noticed there SIMPLE, SIMPLER and PISO compute the velocity and the pressure from the Poisson equation, no word about computing mass density. I think these algorithms are not closure methods, they are algorithms to compute the velocity and pressure, each algorithm having different numerical properties.

Chestermiller said:
mrBrat: Were you not able to follow what I said in my post #5?
Yes I was, but yesterday I had to rush, so I could not find the time to also write an answer to your post. And I prefer to think a bit before I write something down :)

Ok, so let me get this straight.
Say we want to solve/simulate just ordinary daily flows of water and air at low Mach numbers (i.e. incompressible flows) and at a temperature of 293 K.
First for water, an incompressible fluid. We may assume the mass density is constant in space and in time. So, the mass density in the Navier-Stokes equations becomes equal to the constant mass density of water at 293 K. Then we have four equations and four variables: pressure P and velocity (u_x, u_y, u_z). We can compute the velocity and the pressure, the latter by using the Poisson equation for the pressure. So, no problem here. I see this practice done most often, so I guess those people want to simulate a liquid, although they often do not mention that explicitly.
Chestermiller said:
For liquids, a good choice is to express the specific volume in terms of the bulk compressibility and the coefficient of thermal expansion.
Okay, so for a liquid it is also possible to derive the mass density from an equation of state. Two sidenotes why I think your proposed equation of state is not suitable for my purposes:
1) it uses a temperature change, whereas I would like solve/simulate an isothermal flow
2) my flow is incompressible, so the bulk compressibility is always negligible in my case

Now, for air, a compressible fluid. Then we may not assume the mass density is constant in space and in time. So, at first glance we have four equations and five variables: pressure P, velocity (u_x, u_y, u_z), and mass density rho. We assume air more or less behaves as an ideal gas in our case. With the ideal gas law we can close the system of equations by expressing the mass density as ##\rho = \frac{P}{R_{specific} T}##, where ##R_{specific}## is the specific gas constant and temperature T = 293 K. Next we can compute the velocity and pressure, although it probably will be somewhat different than simply rho being a constant, since rho is now expressed in terms of pressure.

Does my reasoning make sense, or am I making mistakes?
Is the ideal gas law the most common equation of state for ordinary fluids in the incompressible flow regime?

mrBart said:
Okay, so for a liquid it is also possible to derive the mass density from an equation of state. Two sidenotes why I think your proposed equation of state is not suitable for my purposes:
1) it uses a temperature change, whereas I would like solve/simulate an isothermal flow
2) my flow is incompressible, so the bulk compressibility is always negligible in my case
I have no problem with treating the fluid as incompressible. But understand that, in this case, the pressure in the rheological equation for a Newtonian fluid is determined only up to an arbitrary constant value. The value of the constant has to be established by applying the boundary conditions on the flow.

Now, for air, a compressible fluid. Then we may not assume the mass density is constant in space and in time. So, at first glance we have four equations and five variables: pressure P, velocity (u_x, u_y, u_z), and mass density rho. We assume air more or less behaves as an ideal gas in our case. With the ideal gas law we can close the system of equations by expressing the mass density as ##\rho = \frac{P}{R_{specific} T}##, where ##R_{specific}## is the specific gas constant and temperature T = 293 K. Next we can compute the velocity and pressure, although it probably will be somewhat different than simply rho being a constant, since rho is now expressed in terms of pressure.

Does my reasoning make sense, or am I making mistakes?
Sure. Here's a problem for you to solve to see how this plays out. Consider isothermal air flow in the turbulent regime in a pipe of constant cross section, with an inlet absolute pressure of ##P_0## and an outlet absolute pressure of ##P_1##, a length L, and a mass flow rate of W. To do this, you need to know friction factor Reynolds number relationship. Are you familiar with this?
Is the ideal gas law the most common equation of state for ordinary fluids in the incompressible flow regime?
Please don't use the term incompressible for an actually compressible flow like this. Please use the term low-Mach-number.

The ideal gas law is often used for flows up to moderate pressures (say, about 10 bars).

Chestermiller said:
I have no problem with treating the fluid as incompressible. But understand that, in this case, the pressure in the rheological equation for a Newtonian fluid is determined only up to an arbitrary constant value. The value of the constant has to be established by applying the boundary conditions on the flow.
I am not entirely sure whether I am following you here. Do you mean that pressure can only be determined up to an arbitrary constant because the Navier-Stokes equations only depend on the pressure gradient? (gradient of a constant is zero) And hence they only depend on the fluctuating part of the pressure and not on the pressure base/constant around which the fluctuations happen? And to determine the pressure base/constant we need additional information, e.g. via the boundary conditions on the flow?

Chestermiller said:
Sure. Here's a problem for you to solve to see how this plays out. Consider isothermal air flow in the turbulent regime in a pipe of constant cross section, with an inlet absolute pressure of P0P_0 and an outlet absolute pressure of P1P_1, a length L, and a mass flow rate of W. To do this, you need to know friction factor Reynolds number relationship. Are you familiar with this?
Is that a 'sure' that my reasoning makes sense or that I am making mistakes? :)
I am not familiar with a friction factor Reynolds number relationship. I do not consider myself a novice in CFD but also not an expert.

Chestermiller said:
Please don't use the term incompressible for an actually compressible flow like this. Please use the term low-Mach-number.
Fair enough. I took the term from the CFD literature, in which flows below a Mach number of 0.3 are called incompressible. I often add the word 'regime' to make this somewhat more clear. Low-Mach-number flow or nearly-incompressible flow would indeed be a more accurate term.

Chestermiller said:
The ideal gas law is often used for flows up to moderate pressures (say, about 10 bars).
Okay, thanks, I think that will suffice for my purpose of simulating flows as seen in daily life.

mrBart said:
I am not entirely sure whether I am following you here. Do you mean that pressure can only be determined up to an arbitrary constant because the Navier-Stokes equations only depend on the pressure gradient? (gradient of a constant is zero) And hence they only depend on the fluctuating part of the pressure and not on the pressure base/constant around which the fluctuations happen? And to determine the pressure base/constant we need additional information, e.g. via the boundary conditions on the flow?
Yes. Correct. Basically, if you double the pressure, the incompressible fluid doesn't deform.

Is that a 'sure' that my reasoning makes sense or that I am making mistakes? :)
The former.

Thanks all for your contributions.
One final request. I am currently looking into how a variable mass density is incorporated into numerical algorithms which solve an incompressible flow using the Poisson equation for the pressure, e.g. the SIMPLE or SIMPLER algorithm. However I cannot find a text that explains this stuff in rather basic language, the texts I read so far assume the reader already knows these algorithms well. Anyone knows a good text for me? Or perhaps he can write down the steps in basic language here?

Do you have access to any introductory texts on CFD, e.g. through a university library?

Not to the physical university library at the moment, but I can access the electronic university library. Maybe the CFD text(s) you have in mind also exist in e-book format.

I will preface this with the statement that I am not a CFD guy. I do experiments. However, like any good experimentalist, I work with a number of computational people, and I've had various people recommend one or both of the following textbooks on methods of formulating CFD problems. They should hopefully give you the sort of information you are seeking here.
Computational Fluid Mechanics and Heat Transfer by Pletcher, Tannehill, and Anderson
Computational Fluid Dynamics: Principles and Applications by Blazek

Thanks for the references. Unfortunately I was unable to find the case of variable mass density in both books. The first book does discuss the SIMPLE algorithms but assumes constant mass density. For some reason (which is not entirely clear to me) very few people discuss the case of incompressible flow with variable mass density, even though I would think many practical problems concern low Mach number flows of gases.

The good news is that after some more searching I found the following MSc thesis which discusses it: https://brage.bibsys.no/xmlui/handle/11250/234395
And https://en.wikipedia.org/wiki/SIMPLE_algorithm outlines the steps of the SIMPLE algorithm, with the last step mentioning an update of the mass density :)

Things are clear now.

One approach for small variation s in density and low Mach number is the Boussinesq approximation. That's the most common approach I've seen. Beyond that you either need a more complex model for larger variations or else you just have to suck it up and solve the full compressible equations.

Variable density flows are not truly incompressible no matter how low the Mach number. That's the fundamental problem here. Any attempt to treat them as such is an approximation.

boneh3ad said:
One approach for small variation s in density and low Mach number is the Boussinesq approximation. That's the most common approach I've seen. Beyond that you either need a more complex model for larger variations or else you just have to suck it up and solve the full compressible equations.
I never gave the Boussinesq approximation much attention because it involves temperature changes, whereas I want to solve the isothermal Navier-Stokes. Thanks for the hint though.

boneh3ad said:
Variable density flows are not truly incompressible no matter how low the Mach number. That's the fundamental problem here. Any attempt to treat them as such is an approximation.
I disagree here. A proof that a flow's compressibility is proportional to the squared Mach number of the flow can be found in several CFD textbooks, e.g. in Applied Gas Dynamics (Rathakrishnan). Consequently a zero Mach number implies true incompressibility.
In a truly incompressible flow the mass density ##\rho## is constant of a fluid element which moves at the flow velocity ##\mathbf{u}##. Mathematically spoken:
$$\frac{\partial \rho(x,t)}{\partial t} + \mathbf{u}(x,t) \, \nabla \cdot \rho(x,t) = 0$$.
The above equation can be simplified to ##\nabla \cdot \mathbf{u}(x,t) = 0##, a proof can be found at https://en.wikipedia.org/wiki/Incompressible_flow, that webpage also explains incompressible flow in more detail.
This does not imply: constant mass density over time, ##\frac{\partial \rho(x,t)}{\partial t} = 0##, or constant mass density over space, ##\nabla \rho(x,t) = 0##.
I am well aware that truly incompressible flows do not exist in practice, but in mathematically solving or numerically simulating fluid flows the truly incompressible flow condition is very useful and can be fulfilled.

Sidenote for interested readers:
I did a lot of reading now into this topic and noticed the terms 'incompressible flow' and 'incompressible fluid' are often used interchangeably, yet they are not the same. An 'incompressible flow' is a statement about the motion of a fluid, whereas 'incompressible fluid' is a statement about the material of the fluid. In a truly incompressible fluid the mass density does not change when the pressure changes, i.e. ##\frac{d \rho}{d P} = 0## holds.

Go grab a copy of Introduction to Fluid Dynamics by Batchelor. He has a pretty substantial discussion on the actual meaning of incompressibility, I covered it (in brief) in this thread.

A fluid can behave nearly incompressibly while still having changes in density, but it is still not truly incompressible. It still technically would require the full compressible Navier-Stokes equations to solve such a flow without using any assumptions, as you should have noted by the fact that the equations are not closed if you straight up assume incompressibility.

## 1. What is the difference between isothermal and compressible fluids?

Isothermal fluids are those that maintain a constant temperature throughout a process, while compressible fluids are those that can change in volume under pressure.

## 2. What is the Navier-Stokes equation and how does it relate to fluid dynamics?

The Navier-Stokes equation is a set of partial differential equations that describe the motion of fluid particles, taking into account factors such as viscosity and pressure. It is a fundamental equation in fluid dynamics and is used to model a wide range of fluid behaviors.

## 3. Why is it important to solve the Navier-Stokes equation for compressible fluids?

Compressible fluids, such as air and gases, are commonly encountered in many real-world applications, including aerodynamics and combustion. Solving the Navier-Stokes equation for these fluids allows us to accurately predict their behavior and make informed decisions in engineering and scientific fields.

## 4. What is the significance of the incompressible assumption in solving the Navier-Stokes equation?

The incompressible assumption is often used in solving the Navier-Stokes equation for practical reasons. It simplifies the equations and allows for easier numerical calculations. However, it is not always an accurate assumption, and in some cases, the compressibility of a fluid must be taken into account for more precise results.

## 5. How do you solve the Navier-Stokes equation for compressible fluids?

Solving the Navier-Stokes equation for compressible fluids involves utilizing advanced mathematical techniques, such as finite difference or finite element methods, to discretize the equation and solve it numerically. This requires a thorough understanding of fluid dynamics, numerical methods, and computer programming skills.

Replies
18
Views
1K
Replies
4
Views
2K
Replies
10
Views
3K
Replies
1
Views
1K
Replies
22
Views
4K
Replies
2
Views
7K
Replies
6
Views
776
Replies
6
Views
2K
Replies
48
Views
3K
Replies
17
Views
2K