gamma, Cv, and Cp

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
stefann
Posts: 25
Joined: Fri Oct 10, 2014 7:49 pm

gamma, Cv, and Cp

Post by stefann »

Hello:

With other CFD solvers, we are normally able to input two of the three: gamma (Cp/Cv), isobaric specific heat Cp, and/or isochoric specific heat Cv.

In the GUI I only see the ability to input Cp.


1) Feature request: Can the GUI be updated to allow gamma and/or Cv?

2) Can someone provide an example how to use the user functions to be able to modify these variables?

3) What is the default value assumed for the compressible model perfect gas with constant gamma?


Thanks


Stefan
Brian Angel

Re: gamma, Cv, and Cp

Post by Brian Angel »

Hello,

Concerning point 2), you can use cs_user_physical_properties to set the value of Cp. For point 3), §8.7 of the V3.0 user guide details of what physical properties can be modified using the routines uscfx1 and uscfx2.

More information on points 3) and 1) may also be provided by others on this forum.

Regards,

Brian Angel.
Erwan Le Coupanec
Posts: 45
Joined: Sun Sep 08, 2013 8:50 pm

Re: gamma, Cv, and Cp

Post by Erwan Le Coupanec »

Hello,

When using the compressible module,

is computed as follows:



where is the universal gas constant,
is the gas molar mass (you can set it through the GUI or in a user subroutine),
is the reference specific heat at constant pressure (that you can also set).

is as follows:
.

For now, the compressible module is only available for perfect gas law with constant , hence implementing an other state law is not straightforward (can not be done through user subroutines) and requires to modify the file src/cfbl/cfther.f90.

Regards,

Erwan.
stefann
Posts: 25
Joined: Fri Oct 10, 2014 7:49 pm

Re: gamma, Cv, and Cp

Post by stefann »

This is a really great explaination. Thank you!

Stefan
Post Reply