CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

NSEs with Incompressible Ideal gas as buoyancy term

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By LuckyTran
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2023, 17:03
Default NSEs with Incompressible Ideal gas as buoyancy term
  #1
New Member
 
Join Date: Nov 2023
Posts: 8
Rep Power: 2
Memet1c is on a distinguished road
Hi all,

I would like to know if the following formulation is correct.
I am trying to express the NSEs in conservative form using the incompressible ideal gas model as the buoyancy term.

Incompressible ideal gas assumes:

\rho = \frac{p_{op}}{RT}

Where the density only varies with temperature and not pressure.

The NSEs expressed in conservative form:

\partial_{t}(\rho) + \partial_{x_{i}}(\rho u_{i}) = 0 - Continuity
\partial_{t}(\rho u_{i}) + \partial_{x_{j}}(\rho u_{i}u_{j}) = -\partial_{x_{i}}(p) + \mu \partial_{x_{k}x_{k}}(u_{i}) + \rho g_{i} - Momentum
c_{p}[ \partial_{t}(\rho T) + \partial_{x_{i}}(\rho u_{i} T)]= \kappa \partial_{x_{i}x_{i}}(T) + \dot{q} - Energy

Note that the viscous dissipation and pressure work terms have been omitted from the energy equation.

My question from here is, how do I proceed to solve this system of equations numerically?

Given that I have expressed the density as a function of purely temperature, do I substitute it into my continuity, momentum, and energy equations? Or do I solve my system of equations separately from my equation of state, only updating the density field after marching forward in time.

Any literature recommendations explaining the incompressible ideal gas model in detail, and especially its numerical implementation would be greatly appreciated.
Memet1c is offline   Reply With Quote

Old   November 27, 2023, 17:37
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,746
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You certainly can substitute the equation of state directly and eliminate density if this is the only CFD you will ever do.

General purpose solvers will use various approaches because they want their code to solve many different types of problems, i.e. they want the same code to be easily switchable from incompressible idea gas to classical ideal gas with just the push of a button.
arjun likes this.
LuckyTran is offline   Reply With Quote

Old   November 27, 2023, 17:50
Default
  #3
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Memet1c View Post
Hi all,

I would like to know if the following formulation is correct.
I am trying to express the NSEs in conservative form using the incompressible ideal gas model as the buoyancy term.

Incompressible ideal gas assumes:

\rho = \frac{p_{op}}{RT}

Where the density only varies with temperature and not pressure.

The NSEs expressed in conservative form:

\partial_{t}(\rho) + \partial_{x_{i}}(\rho u_{i}) = 0 - Continuity
\partial_{t}(\rho u_{i}) + \partial_{x_{j}}(\rho u_{i}u_{j}) = -\partial_{x_{i}}(p) + \mu \partial_{x_{k}x_{k}}(u_{i}) + \rho g_{i} - Momentum
c_{p}[ \partial_{t}(\rho T) + \partial_{x_{i}}(\rho u_{i} T)]= \kappa \partial_{x_{i}x_{i}}(T) + \dot{q} - Energy

Note that the viscous dissipation and pressure work terms have been omitted from the energy equation.

My question from here is, how do I proceed to solve this system of equations numerically?

Given that I have expressed the density as a function of purely temperature, do I substitute it into my continuity, momentum, and energy equations? Or do I solve my system of equations separately from my equation of state, only updating the density field after marching forward in time.

Any literature recommendations explaining the incompressible ideal gas model in detail, and especially its numerical implementation would be greatly appreciated.



Do you have some specific reason for that formulation? For small temperature variation, the Bousinnesq model works fine.


Otherwise have a look to the low Mach formulations.
FMDenaro is online now   Reply With Quote

Old   November 27, 2023, 19:56
Default
  #4
New Member
 
Join Date: Nov 2023
Posts: 8
Rep Power: 2
Memet1c is on a distinguished road
The code available to me uses the Boussinesq model, but the temperature range I encounter in my scenario is very large. From what I understand, Boussinesq assumes the density variation due to temperature is small, and thus approximately linear. This is not the case for me.


I chose to use the incompressible ideal gas model instead, as the pressure variation in my problem is very small.
Memet1c is offline   Reply With Quote

Old   November 27, 2023, 20:03
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,746
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
I am confused why you are asking how to numerically solve something if you already have a working code. What even is the question? I can't validate the performance of your code for you.
LuckyTran is offline   Reply With Quote

Old   November 27, 2023, 20:05
Default
  #6
New Member
 
Join Date: Nov 2023
Posts: 8
Rep Power: 2
Memet1c is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
You certainly can substitute the equation of state directly and eliminate density if this is the only CFD you will ever do.

General purpose solvers will use various approaches because they want their code to solve many different types of problems, i.e. they want the same code to be easily switchable from incompressible idea gas to classical ideal gas with just the push of a button.

Apart from the versatility of being able to switch between models, what are other benefits with applying the EOS separately from the NSEs? Is the implementation in the main solving loop more straightforward?


Also, are there any additional modelling errors as opposed to substituting the EOS directly?


Thanks,
Memet1c is offline   Reply With Quote

Old   November 27, 2023, 20:09
Default
  #7
New Member
 
Join Date: Nov 2023
Posts: 8
Rep Power: 2
Memet1c is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
I am confused why you are asking how to numerically solve something if you already have a working code. What even is the question? I can't validate the performance of your code for you.

The current code I have is purely incompressible, density is constant. I am not sure if I can include density as a field straight away, especially during the step which solves for pressure as a Poisson equation. I am still looking into this.
Memet1c is offline   Reply With Quote

Old   November 27, 2023, 20:30
Default
  #8
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,746
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
What you have is constrained coupled system of equations. You have your transport equations plus the EOS (the constraint).


When you hard-code the constraint into the transport equation you also force the errors/correctors to be forcibly propagated. When these correctors are large, they can cause the problem to diverge. A similar issue also occurs in the pressure-velocity coupling problem when you solve a Poisson problem for pressure. Not propagating them can mean you need more sweeps to converge (until the correctors are propagated throughout the domain). There is always a tradeoff between stability and convergence rate. Hence, there are endless permutations of solvers available.


For example, sometimes you start cranking and end up with a negative temperature, now you have a negative density and you're screwed.
LuckyTran is offline   Reply With Quote

Old   November 27, 2023, 21:02
Default
  #9
New Member
 
Join Date: Nov 2023
Posts: 8
Rep Power: 2
Memet1c is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
What you have is constrained coupled system of equations. You have your transport equations plus the EOS (the constraint).


When you hard-code the constraint into the transport equation you also force the errors/correctors to be forcibly propagated. When these correctors are large, they can cause the problem to diverge. A similar issue also occurs in the pressure-velocity coupling problem when you solve a Poisson problem for pressure. Not propagating them can mean you need more sweeps to converge (until the correctors are propagated throughout the domain). There is always a tradeoff between stability and convergence rate. Hence, there are endless permutations of solvers available.


For example, sometimes you start cranking and end up with a negative temperature, now you have a negative density and you're screwed.

I will have to look further into this.
Thanks for your advice
Memet1c is offline   Reply With Quote

Old   November 28, 2023, 04:40
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Memet1c View Post
The current code I have is purely incompressible, density is constant. I am not sure if I can include density as a field straight away, especially during the step which solves for pressure as a Poisson equation. I am still looking into this.
Starting from your code, it is suitable to use the low Mach formulation. That is largely used for combustion problems. This way you take into account larghe temperature gradient.
Memet1c likes this.
FMDenaro is online now   Reply With Quote

Old   November 29, 2023, 08:54
Default
  #11
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by Memet1c View Post
Hi all,

I would like to know if the following formulation is correct.
I am trying to express the NSEs in conservative form using the incompressible ideal gas model as the buoyancy term.

Incompressible ideal gas assumes:

\rho = \frac{p_{op}}{RT}

Where the density only varies with temperature and not pressure.

The NSEs expressed in conservative form:

\partial_{t}(\rho) + \partial_{x_{i}}(\rho u_{i}) = 0 - Continuity
\partial_{t}(\rho u_{i}) + \partial_{x_{j}}(\rho u_{i}u_{j}) = -\partial_{x_{i}}(p) + \mu \partial_{x_{k}x_{k}}(u_{i}) + \rho g_{i} - Momentum
c_{p}[ \partial_{t}(\rho T) + \partial_{x_{i}}(\rho u_{i} T)]= \kappa \partial_{x_{i}x_{i}}(T) + \dot{q} - Energy

Note that the viscous dissipation and pressure work terms have been omitted from the energy equation.

My question from here is, how do I proceed to solve this system of equations numerically?

Given that I have expressed the density as a function of purely temperature, do I substitute it into my continuity, momentum, and energy equations? Or do I solve my system of equations separately from my equation of state, only updating the density field after marching forward in time.

Any literature recommendations explaining the incompressible ideal gas model in detail, and especially its numerical implementation would be greatly appreciated.
I think you may need to use Dalton's law of partial pressure to formulate a multiple component fluid, one which is a viscous fluid and the other is an incompressible gas.
hunt_mat is offline   Reply With Quote

Old   November 29, 2023, 16:42
Default
  #12
New Member
 
Join Date: Nov 2023
Posts: 8
Rep Power: 2
Memet1c is on a distinguished road
Quote:
Originally Posted by hunt_mat View Post
I think you may need to use Dalton's law of partial pressure to formulate a multiple component fluid, one which is a viscous fluid and the other is an incompressible gas.
Sorry I'm confused, why would the incompressible fluid be inviscid? And how exactly does this help?
Memet1c is offline   Reply With Quote

Old   November 29, 2023, 17:18
Default
  #13
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4
hunt_mat is on a distinguished road
I never said anything about inviscid.
hunt_mat is offline   Reply With Quote

Old   November 29, 2023, 18:08
Default
  #14
New Member
 
Join Date: Nov 2023
Posts: 8
Rep Power: 2
Memet1c is on a distinguished road
Quote:
Originally Posted by hunt_mat View Post
I think you may need to use Dalton's law of partial pressure to formulate a multiple component fluid, one which is a viscous fluid and the other is an incompressible gas.
Quote:
Originally Posted by hunt_mat View Post
I never said anything about inviscid.
Sorry, I thought by specifically describing one of the fluids as viscous the other would not be so (I guess both fluids are viscous then?). In any case, my working fluid is air, I don't see how breaking it down to its constituents helps me here.

My scenario is boundary layer flow over a flat surface, with temperature dependent heat release. I am not simulating combustion with species transport.
Memet1c is offline   Reply With Quote

Old   December 1, 2023, 05:43
Default
  #15
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by Memet1c View Post
Sorry, I thought by specifically describing one of the fluids as viscous the other would not be so (I guess both fluids are viscous then?). In any case, my working fluid is air, I don't see how breaking it down to its constituents helps me here.

My scenario is boundary layer flow over a flat surface, with temperature dependent heat release. I am not simulating combustion with species transport.
So your heat source is a z=0(say), and you want to understand the heat induced flow in an incompressible gas?
hunt_mat is offline   Reply With Quote

Old   December 2, 2023, 10:31
Default
  #16
New Member
 
Join Date: Nov 2023
Posts: 8
Rep Power: 2
Memet1c is on a distinguished road
Quote:
Originally Posted by hunt_mat View Post
So your heat source is a z=0(say), and you want to understand the heat induced flow in an incompressible gas?
Correct. If I could, I would simply use the Boussinesq approximation with the incompressible NS, but my temperature range is very large. I can expect a deltaT of the order of 1000 K
Memet1c is offline   Reply With Quote

Reply

Tags
buoyancy, convection, ideal gas, temperature and density


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How does Fluent calculate the specific enthalpy for incomp. ideal gas? brunolago FLUENT 0 October 7, 2022 07:08
Incompressible ideal gas Nadaaaa22 FLUENT 5 September 8, 2019 21:27
Energy equation - Incompressible Ideal Gas? Wingman ANSYS 3 April 9, 2017 01:49
difference between ideal gas and incompressible? Ric Main CFD Forum 1 March 24, 2007 13:07
Gas pressure question Dan Moskal Main CFD Forum 0 October 24, 2002 23:02


All times are GMT -4. The time now is 18:45.