|
[Sponsors] |
October 4, 2017, 08:03 |
perfect gas equation in rhoSimpleFoam
|
#1 |
Member
ff
Join Date: Feb 2010
Posts: 81
Rep Power: 16 |
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. |
|
October 4, 2017, 12:23 |
|
#2 |
Member
ano
Join Date: Jan 2017
Location: Delft
Posts: 58
Rep Power: 10 |
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); } If the pressure convergence is low, what did you specify in your fvSolution? And can you tell us something about your case? |
|
October 5, 2017, 05:14 |
|
#3 |
Member
ff
Join Date: Feb 2010
Posts: 81
Rep Power: 16 |
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. |
|
October 10, 2017, 06:59 |
|
#4 |
Member
ano
Join Date: Jan 2017
Location: Delft
Posts: 58
Rep Power: 10 |
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. |
|
|
|
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 06:21 |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
How can model a real gas(not a perfect gas?) | immortality | OpenFOAM | 7 | June 25, 2013 07:53 |
Real Gas Equation of State Used in Combustion? | Jake Cannon | Siemens | 0 | January 16, 2007 18:13 |
Gas diffusion equation!! | Arun | Siemens | 1 | April 23, 2004 06:48 |