CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

perfect gas equation in rhoSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By ano
  • 1 Post By fxzf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2017, 07:03
Default perfect gas equation in rhoSimpleFoam
  #1
Member
 
ff
Join Date: Feb 2010
Posts: 81
Rep Power: 16
fxzf is on a distinguished road
Hi,

I am trying to figure out how rhoSimpleFoam algorithm is working,especially when it is calculating density rho.

In my case, I have a very bad convergence on pressure P. However, the Temperature, velocity and density field are closed to what I want. The problem is I found the pressure P is clearly not obey perfect gas state equation which I specified in thermophysicalproperty.

I thought pressure or density is alway obey perfect gas state equation P=rho*R*T. But it looks like when pressure is not converged, there is violation.

So I want to know how the density is calculated in rhoSimpleFoam. Is it calculated from pressure when this line

rho = thermo.rho()

is called in pcEqu ?

Thanks very much.
fxzf is offline   Reply With Quote

Old   October 4, 2017, 11:23
Default
  #2
ano
Member
 
ano
Join Date: Jan 2017
Location: Delft
Posts: 58
Rep Power: 10
ano is on a distinguished road
Hi fxzf,

You can find the function thermo.rho() for your perfect gas in
src/thermophysicalModels/specie/equationOfState/perfectGas/perfectGasI.H
Code:
template<class Specie>
inline Foam::scalar Foam::perfectGas<Specie>::rho(scalar p, scalar T) const
{
    return p/(this->R()*T);
}
so it is as you assumed. So after this step the fields match the perfect gas law. Then the rest of the pressure coupling is applied.

If the pressure convergence is low, what did you specify in your fvSolution? And can you tell us something about your case?
lpz456 likes this.
ano is offline   Reply With Quote

Old   October 5, 2017, 04:14
Default
  #3
Member
 
ff
Join Date: Feb 2010
Posts: 81
Rep Power: 16
fxzf is on a distinguished road
Hi Ano,

Thanks very much for your reply.

In my case, I have a low speed aircraft with jet engine. I need to simulate the engine jet flow out of the exhaust pipe. In the exhause pipe, it has high temperature and high velocity when high massflow is applied. At low speed jet flow out (low mass flow) the rhoSimpleFoam is fine.

However, when there is high velocity from engine (200m/s local Mach around 0.3 due to high temperature), the pressure is very oscillating and T max (max temperature) is very oscillating (about 100K up and low) as well. The solver is crashed often, so I have to make under relax factor for rho 0.01, pressure 0.01 to make rhoSimpleFoam working.

I think I noticed is when rhoSimpleFoam solve pcEqu, it called perfect gas equation to calculate a rho. This rho is satisfy the perfect gas equation. However, afterward, there is rho.relax(). Because my under relaxation factor for rho is only 0.01. Then, the new rho is only based on relaxation which is not satisfy perfect gas equation. If pressure is well converged, this is not problem, but when pressure is not converged, we see this violation. Correct me if I am wrong for anything.

So my problem is how to improve pressure and energy equation convergence in this case.

At the moment, I use under relaxation for rho 0.01, pressure 0.01, U 0.5 to 0.7, e 0.2 to 0.6. If I use higher pressure, I saw more oscilation and solver crash sometimes. Are there anything else I can change to improve convergence?

Thanks so much.
lpz456 likes this.
fxzf is offline   Reply With Quote

Old   October 10, 2017, 05:59
Default
  #4
ano
Member
 
ano
Join Date: Jan 2017
Location: Delft
Posts: 58
Rep Power: 10
ano is on a distinguished road
Hi fxzf,

I am not an expert myself. Generally I would see the point from the code like you described. What I would try to increase convergence:
1. If Ma approximately equal to 0.3, did you try to initialise with simpleFoam/pimpleFoam?
2. Switch the solver from smoothSolver/PCG to BiCGStab. This solver In a case I had to do it increased the convergence. You can find the forum discussion on BiCGStab and links for the code here.
ano is offline   Reply With Quote

Reply


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
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
How can model a real gas(not a perfect gas?) immortality OpenFOAM 7 June 25, 2013 06:53
Real Gas Equation of State Used in Combustion? Jake Cannon Siemens 0 January 16, 2007 17:13
Gas diffusion equation!! Arun Siemens 1 April 23, 2004 05:48


All times are GMT -4. The time now is 10:01.