Density values in fast chemistry combustion module

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Cbarnaud
Posts: 36
Joined: Tue Oct 22, 2019 10:28 am

Density values in fast chemistry combustion module

Post by Cbarnaud »

Hello All,

I was wondering about my RANS simulation with fast chemistry combustion module. Indeed, the output of density in the paraview render is clipped between 0.73 and 1.3. Theses values are not the ones I was expecting, I should have 0.88 and 4.5. I can get these values (or approximate) if I create a field with this equation:
(Pressure + Pref) /(r_fuel*mixture_fraction+r_ox*(1-mixture_fraction))/temperature

But my issue is: How the density computed in this configuration and which value used in the code? And is there documentation about it (other than user guide and theory guide)?

Thank you.
Best Regards,
Camille.
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: Density values in fast chemistry combustion module

Post by Yvan Fournier »

Hello,

For fast chemistry (3 point ?), I think the computation is done in src/cogz/d3pphy.f90.

I do not know of any documentation other than the ones you mention (the info might be spread out over older, separate docs, but that is notb guaranteed and would require quite a bit of "archeology").

So checking the source code is probably the best way to answer your question.

I hope this is not the case, but if you suspect clipping issues, or bounds outside the expected minimum and maximum, using least-squares gradient reconstruction instead of iterative reconstructions may be better if you have a tetrahedral mesh (but in your case, it seems they are not outside, but in a too narrow range, so it is probably a separate issue).

Best regards,

Yvan
Cbarnaud
Posts: 36
Joined: Tue Oct 22, 2019 10:28 am

Re: Density values in fast chemistry combustion module

Post by Cbarnaud »

Hello Yvan,

I found that the density outputted in .csv files is the rho used in the combustion module but its limits of variation corresponds to values obtained with pther=p0 with the state law, with pther the thermodynamic pressure, for my fuel and my oxydant.
But I wonder why pther is defined uniform on the whole domain and never change. And so, why it's not the total pressure which is used ? I think it will change a lot the geometry of the flow if it was the case.
I will do Moore archeology and come back with the answer.

Thank a lot,

Camille
Bertrand Sapa
Posts: 3
Joined: Fri Mar 16, 2012 6:12 pm

Re: Density values in fast chemistry combustion module

Post by Bertrand Sapa »

Hello Camille,

By default, density is computed at atmospheric pressure because of historic use of combustion module.

By checking "Uniform variable thermodynamic pressure in "Calculation features" (since 7.0) or using the keyword ipthrm = 1 in cs_user_parameters.f90, you can activate the calculation of a mean pressure based on a mass balance on the whole domain (performed by pthrbm.f90).

Regarding theory documentation, you can find the combustion model description in this thesis, section 4.3.

Regards,
Bertrand
Post Reply