Page 1 of 1

Post-processing Pressure variables definition

Posted: Thu Dec 02, 2021 11:29 am
by Quentin01
Hello,

Could someone help me to understand the differences between both code_saturne output variables named : pressure and total_pressure ?

As I noticed, Pressure seems to be a relative static Pressure.


I would like to create a new variable, using Paraview, based on Pressure to obtain the same values as total_pressure.

If we check on code_saturne theory guide p.16 there is the following definition : P*=P − ρgx + 2/3ρk, where P* is the dynamic pressure field. I need some explanations because all these pressure definitions are not clear to me. Is P code_saturne computed static pressure :?: ?

The aim of such topic is to understand each variables in order to create good additionnal pressure variables ( absolute pressure, dynamic pressure, etc.)

I want to define, for instance, the following variables :
*Relative Static Pressure
*Absolute Static Pressure
*Relative Dynamic pressure ( ρ*V²*0.5)
*Absolute Dynamic pressure ( ρ*V²*0.5)
*Relative Hydrostatic Pressure (ρ*g*h)
*Absolute Hydrostatic Pressure (ρ*g*h)


Thank you in advance for your help,

Re: Post-processing Pressure variables definition

Posted: Thu Dec 02, 2021 8:29 pm
by Yvan Fournier
Hello,

Clarifying this, at least in the documentation and variable names, would certainly be a good idea, as we have recurring questions on this subject.

If I remember correctly, the total pressure includes the hydrostatic pressure component, while the main (solved) pressure variable does not.

There are also some terms related to turbulence in one of the pressures (I don't remember which) that you can check when you look in the code how the total pressure is computed from the pressure. The theory manual might mention them, but I always trust the source code more than the documentation as regards being "up to date", so checking the code itself is a good additional precaution. For this, tools such as "grep" are your friends.

The solved pressure (and I believe the total pressure) include the dynamic part as far as I know (or it certainly seems to be the case when visualizing the pressure field for a tube bundle crossflow).

I do not think we currently have an extraction of the static pressure in the code, so you probably need to roll your own (I guess we don't need it often, but that is certainly application dependent).

Best regards,

Yvan

Re: Post-processing Pressure variables definition

Posted: Mon Dec 06, 2021 10:49 am
by Quentin01
Hello Yvan,

Thank you for your reply.

Could you give me file names on which I can use grep tool related to this subject ?

Thank you in advance,

Re: Post-processing Pressure variables definition

Posted: Tue Dec 07, 2021 7:01 pm
by Yvan Fournier
Hello,

You can look for "iprtot" or "cpro_prtot" in src/*/*.

The interesting parts are probably in navstv.f90, tridim.f90, and typecl.f90.

Best regards,

Yvan