perfect gas equation in rhoSimpleFoam
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. |
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> If the pressure convergence is low, what did you specify in your fvSolution? And can you tell us something about your case? |
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. |
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. |
All times are GMT -4. The time now is 12:48. |