When the compressible module is activated, it is recommended to:
With the compressible algorithm, the specific total energy is a new solved variable CS_F_(e_tot). The temperature variable deduced from the specific total energy variable is CS_F_(t_kelvin) for the compressible module.
Initialization of the options of the variables, boundary conditions, initialization of the variables and management of variable physical properties can be done with the GUI. We describe below the functions the user has to fill in without the GUI.
When the GUI is not being used, the function cs_user_parameters in cs_user_parameters.c must be completed by the user.
This function allows to activate the compressible (see Base model related options (cs_user_model)) module and to specify the molecular viscosity (ivivar see Fluid properties.),
When running the compressible module without a GUI, the cs_user_boundary_conditions function can be used to define specific boundary conditions (see the Local variables to be added file for examples of boundary conditions with the compressible module).
With the compressible module, the following types of boundary condition are avaliable:
When the GUI is not used, the function cs_user_initialization is used to initialize the velocity, turbulence and passive scalars (see the Compressible example for examples of initializations with the compressible module). Concerning pressure, density, temperature and specific total energy, only 2 variables out of these 4 are independent. The user may then initialize the desired variable pair (apart from temperature-energy) and the two other variables will be calculated automatically by giving the right value to the variable ithvar see user_initialization_comp_s_init for example.
Without the GUI, all of the laws governing the physical properties of the fluid (molecular viscosity, molecular volumetric viscosity, molecular thermal conductivity and molecular dynamic diffusivity of the user-defined scalars) can be specified in the function cs_user_physical_properties of the cs_user_physical_properties.c file.
The user should check that the defined laws are valid for the whole variation range of the variables. Moreover, as only the perfect gas with a constant adiabatic coefficient equation of state is available, it is not advised to give a law for the isobaric specific heat without modifying the equation of state in the function cs_cf_thermo which is not a user function.
For some examples we can see: