![]() |
programmer's documentation
|
Define thermodynamic laws (especially for the compressible flow scheme). More...
Functions/Subroutines | |
subroutine | cfther (nvar, iccfth, imodif, rtp, output1, output2, bval) |
This subroutine is a driver allowing to call the appropriate thermodynamicalfunctions depending on the quantities provided by the user. Hence it is only used during the initialization step and at the boundaries of type supersonic inlet. It is described in the following how to select the quantity to be returned. More... | |
subroutine | cf_set_thermo_options |
Set variability of isobaric specific heat and isochoric specific heat according to the chosen thermodynamic law. More... | |
subroutine | cf_get_molar_mass (xmasml) |
Retrieve molar mass. More... | |
subroutine | cf_thermo_gamma (gamma) |
Compute ![]() | |
subroutine | cf_thermo_default_init (ncel, ncelet, rtp) |
Initialize density, total energy and isochoric specific heat according to the chosen thermodynamic law using the default parameters. More... | |
subroutine | cf_check_pressure (pres, l_size) |
Check positivity of the pressure. More... | |
subroutine | cf_check_internal_energy (ener, l_size, vel) |
Check strict positivity of the internal energy. More... | |
subroutine | cf_check_density (dens, l_size) |
Check strict positivity of the density given by the user. More... | |
subroutine | cf_check_temperature (temp, l_size) |
Check strict positivity of the temperature (Celsius) given by the user. More... | |
subroutine | cf_thermo_te_from_dp_ni (pres, dens, temp, ener, velx, vely, velz, l_size) |
Compute temperature and total energy from density and pressure. More... | |
subroutine | cf_thermo_te_from_dp (pres, dens, temp, ener, vel, l_size) |
Compute temperature and total energy from density and pressure. More... | |
subroutine | cf_thermo_de_from_pt_ni (pres, temp, dens, ener, velx, vely, velz, l_size) |
Compute density and total energy from pressure and temperature. More... | |
subroutine | cf_thermo_de_from_pt (pres, temp, dens, ener, vel, l_size) |
Compute density and total energy from pressure and temperature (interleaved version). More... | |
subroutine | cf_thermo_dt_from_pe_ni (pres, ener, dens, temp, velx, vely, velz, l_size) |
Compute density and temperature from pressure and total energy. More... | |
subroutine | cf_thermo_dt_from_pe (pres, ener, dens, temp, vel, l_size) |
Compute density and temperature from pressure and total energy (interleaved version). More... | |
subroutine | cf_thermo_pe_from_dt_ni (dens, temp, pres, ener, velx, vely, velz, l_size) |
Compute pressure and total energy from density and temperature. More... | |
subroutine | cf_thermo_pe_from_dt (dens, temp, pres, ener, vel, l_size) |
Compute pressure and total energy from density and temperature (interleaved version). More... | |
subroutine | cf_thermo_pt_from_de_ni (dens, ener, pres, temp, velx, vely, velz, l_size) |
Compute pressure and temperature from density and total energy. More... | |
subroutine | cf_thermo_pt_from_de (dens, ener, pres, temp, vel, l_size) |
Compute pressure and temperature from density and total energy. More... | |
subroutine | cf_thermo_c_square (pres, dens, c2, l_size) |
Compute square of sound velocity: More... | |
subroutine | cf_thermo_beta (dens, beta, l_size) |
Compute ![]() | |
subroutine | cf_thermo_cv (cp, cv, l_size) |
Compute the isochoric specific heat: More... | |
subroutine | cf_thermo_s_from_dp (dens, pres, entr, l_size) |
Compute entropy from pressure and density: More... | |
subroutine | cf_thermo_wall_bc (rtp, wbfb, ifac) |
Compute wall boundary conditions. More... | |
subroutine | cf_thermo_subsonic_outlet_bc (rtp, bval, ifac) |
Compute subsonic outlet boundary conditions. More... | |
subroutine | cf_thermo_ph_inlet_bc (rtp, bval, ifac) |
Compute inlet boundary condition with total pressure and total enthalpy imposed. More... | |
subroutine | cf_thermo_eps_sup (output, l_size) |
Compute epsilon sup: More... | |
Define thermodynamic laws (especially for the compressible flow scheme).
Only the perfect gas law is available for now. The molar mass has to be provided either in the GUI or in cs_user_parameters.f90.
subroutine cf_check_density | ( | double precision, dimension(*) | dens, |
integer | l_size | ||
) |
Check strict positivity of the density given by the user.
[in] | dens | array of density values |
[in] | l_size | l_size of the array |
subroutine cf_check_internal_energy | ( | double precision, dimension(*) | ener, |
integer | l_size, | ||
double precision, dimension(3,*) | vel | ||
) |
Check strict positivity of the internal energy.
[in] | ener | array of total energy values |
[in] | l_size | l_size of the array |
[in] | vel | array of velocity values |
subroutine cf_check_pressure | ( | double precision, dimension(*) | pres, |
integer | l_size | ||
) |
Check positivity of the pressure.
[in] | pres | array of pressure values |
[in] | l_size | l_size of the array |
subroutine cf_check_temperature | ( | double precision, dimension(*) | temp, |
integer | l_size | ||
) |
Check strict positivity of the temperature (Celsius) given by the user.
[in] | temp | array of temperature values |
[in] | l_size | l_size of the array |
subroutine cf_get_molar_mass | ( | double precision | xmasml | ) |
Retrieve molar mass.
[out] | xmasml | molar mass |
subroutine cf_set_thermo_options | ( | ) |
Set variability of isobaric specific heat and isochoric specific heat according to the chosen thermodynamic law.
subroutine cf_thermo_beta | ( | double precision, dimension(*) | dens, |
double precision, dimension(*) | beta, | ||
integer | l_size | ||
) |
Compute :
for a perfect gas, the explicit formula is:
[in] | dens | array of density values |
[out] | beta | array of beta values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_c_square | ( | double precision, dimension(*) | pres, |
double precision, dimension(*) | dens, | ||
double precision, dimension(*) | c2, | ||
integer | l_size | ||
) |
Compute square of sound velocity:
for perfect gas, the explicit formula is:
[in] | pres | array of pressure values |
[in] | dens | array of density values |
[out] | c2 | array of the values of the square of sound velocity |
[in] | l_size | l_size of the array |
subroutine cf_thermo_cv | ( | double precision, dimension(*) | cp, |
double precision, dimension(*) | cv, | ||
integer | l_size | ||
) |
Compute the isochoric specific heat:
[in] | cp | array of isobaric specific heat values |
[in] | cv | array of isochoric specific heat values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_de_from_pt | ( | double precision, dimension(*) | pres, |
double precision, dimension(*) | temp, | ||
double precision, dimension(*) | dens, | ||
double precision, dimension(*) | ener, | ||
double precision, dimension(3,*) | vel, | ||
integer | l_size | ||
) |
Compute density and total energy from pressure and temperature (interleaved version).
[in] | pres | array of pressure values |
[in] | temp | array of temperature values |
[out] | dens | array of density values |
[out] | ener | array of total energy values |
[in] | vel | array of velocity component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_de_from_pt_ni | ( | double precision, dimension(*) | pres, |
double precision, dimension(*) | temp, | ||
double precision, dimension(*) | dens, | ||
double precision, dimension(*) | ener, | ||
double precision, dimension(*) | velx, | ||
double precision, dimension(*) | vely, | ||
double precision, dimension(*) | velz, | ||
integer | l_size | ||
) |
Compute density and total energy from pressure and temperature.
[in] | pres | array of pressure values |
[in] | temp | array of temperature values |
[out] | dens | array of density values |
[out] | ener | array of total energy values |
[in] | velx | array of velocity x-component values |
[in] | velz | array of velocity y-component values |
[in] | vely | array of velocity z-component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_default_init | ( | integer | ncel, |
integer | ncelet, | ||
double precision, dimension(ncelet,nflown:nvar) | rtp | ||
) |
Initialize density, total energy and isochoric specific heat according to the chosen thermodynamic law using the default parameters.
[in] | ncel | number of cells |
[in] | ncelet | total number of cells on the local rank |
[in,out] | rtp | calculated variables at cell centers (at current time step) |
subroutine cf_thermo_dt_from_pe | ( | double precision, dimension(*) | pres, |
double precision, dimension(*) | ener, | ||
double precision, dimension(*) | dens, | ||
double precision, dimension(*) | temp, | ||
double precision, dimension(3,*) | vel, | ||
integer | l_size | ||
) |
Compute density and temperature from pressure and total energy (interleaved version).
[in] | pres | array of pressure values |
[in] | ener | array of total energy values |
[out] | dens | array of density values |
[out] | temp | array of temperature values |
[in] | vel | array of velocity component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_dt_from_pe_ni | ( | double precision, dimension(*) | pres, |
double precision, dimension(*) | ener, | ||
double precision, dimension(*) | dens, | ||
double precision, dimension(*) | temp, | ||
double precision, dimension(*) | velx, | ||
double precision, dimension(*) | vely, | ||
double precision, dimension(*) | velz, | ||
integer | l_size | ||
) |
Compute density and temperature from pressure and total energy.
[in] | pres | array of pressure values |
[in] | ener | array of total energy values |
[out] | dens | array of density values |
[out] | temp | array of temperature values |
[in] | velx | array of velocity x-component values |
[in] | velz | array of velocity y-component values |
[in] | vely | array of velocity z-component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_eps_sup | ( | double precision, dimension(*) | output, |
integer | l_size | ||
) |
Compute epsilon sup:
for perfect gas:
[out] | output | output work array |
[in] | l_size | l_size of the array |
subroutine cf_thermo_gamma | ( | double precision | gamma | ) |
Compute .
[out] | gamma | ratio of specific heat |
subroutine cf_thermo_pe_from_dt | ( | double precision, dimension(*) | dens, |
double precision, dimension(*) | temp, | ||
double precision, dimension(*) | pres, | ||
double precision, dimension(*) | ener, | ||
double precision, dimension(3,*) | vel, | ||
integer | l_size | ||
) |
Compute pressure and total energy from density and temperature (interleaved version).
[in] | dens | array of density values |
[in] | temp | array of temperature values |
[out] | pres | array of pressure values |
[out] | ener | array of total energy values |
[in] | vel | array of velocity component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_pe_from_dt_ni | ( | double precision, dimension(*) | dens, |
double precision, dimension(*) | temp, | ||
double precision, dimension(*) | pres, | ||
double precision, dimension(*) | ener, | ||
double precision, dimension(*) | velx, | ||
double precision, dimension(*) | vely, | ||
double precision, dimension(*) | velz, | ||
integer | l_size | ||
) |
Compute pressure and total energy from density and temperature.
[in] | dens | array of density values |
[in] | temp | array of temperature values |
[out] | pres | array of pressure values |
[out] | ener | array of total energy values |
[in] | velx | array of velocity x-component values |
[in] | velz | array of velocity y-component values |
[in] | vely | array of velocity z-component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_ph_inlet_bc | ( | double precision, dimension(ncelet,nflown:nvar) | rtp, |
double precision, dimension(nfabor,*) | bval, | ||
integer | ifac | ||
) |
Compute inlet boundary condition with total pressure and total enthalpy imposed.
[in] | rtp | calculated variables at cell centers (at current time step) |
[in,out] | bval | variable values at boundary faces |
[in] | ifac | boundary face indice |
subroutine cf_thermo_pt_from_de | ( | double precision, dimension(*) | dens, |
double precision, dimension(*) | ener, | ||
double precision, dimension(*) | pres, | ||
double precision, dimension(*) | temp, | ||
double precision, dimension(3,*) | vel, | ||
integer | l_size | ||
) |
Compute pressure and temperature from density and total energy.
[in] | dens | array of density values |
[in] | temp | array of temperature values |
[out] | pres | array of pressure values |
[out] | ener | array of total energy values |
[in] | vel | array of velocity component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_pt_from_de_ni | ( | double precision, dimension(*) | dens, |
double precision, dimension(*) | ener, | ||
double precision, dimension(*) | pres, | ||
double precision, dimension(*) | temp, | ||
double precision, dimension(*) | velx, | ||
double precision, dimension(*) | vely, | ||
double precision, dimension(*) | velz, | ||
integer | l_size | ||
) |
Compute pressure and temperature from density and total energy.
[in] | dens | array of density values |
[in] | temp | array of temperature values |
[out] | pres | array of pressure values |
[out] | ener | array of total energy values |
[in] | velx | array of velocity x-component values |
[in] | velz | array of velocity y-component values |
[in] | vely | array of velocity z-component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_s_from_dp | ( | double precision, dimension(*) | dens, |
double precision, dimension(*) | pres, | ||
double precision, dimension(*) | entr, | ||
integer | l_size | ||
) |
Compute entropy from pressure and density:
[in] | dens | array of density values |
[in] | pres | array of pressure values |
[out] | entr | array of total energy values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_subsonic_outlet_bc | ( | double precision, dimension(ncelet,nflown:nvar) | rtp, |
double precision, dimension(nfabor,*) | bval, | ||
integer | ifac | ||
) |
Compute subsonic outlet boundary conditions.
[in] | rtp | calculated variables at cell centers (at current time step) |
[in,out] | bval | variable values at boundary faces |
[in] | ifac | boundary face indice |
subroutine cf_thermo_te_from_dp | ( | double precision, dimension(*) | pres, |
double precision, dimension(*) | dens, | ||
double precision, dimension(*) | temp, | ||
double precision, dimension(*) | ener, | ||
double precision, dimension(3,*) | vel, | ||
integer | l_size | ||
) |
Compute temperature and total energy from density and pressure.
[in] | pres | array of pressure values |
[in] | dens | array of density values |
[out] | temp | array of temperature values |
[out] | ener | array of total energy values |
[in] | vel | array of velocity component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_te_from_dp_ni | ( | double precision, dimension(*) | pres, |
double precision, dimension(*) | dens, | ||
double precision, dimension(*) | temp, | ||
double precision, dimension(*) | ener, | ||
double precision, dimension(*) | velx, | ||
double precision, dimension(*) | vely, | ||
double precision, dimension(*) | velz, | ||
integer | l_size | ||
) |
Compute temperature and total energy from density and pressure.
[in] | pres | array of pressure values |
[in] | dens | array of density values |
[out] | temp | array of temperature values |
[out] | ener | array of total energy values |
[in] | velx | array of velocity x-component values |
[in] | velz | array of velocity y-component values |
[in] | vely | array of velocity z-component values |
[in] | l_size | l_size of the array |
subroutine cf_thermo_wall_bc | ( | double precision, dimension(ncelet,nflown:nvar) | rtp, |
double precision, dimension(nfabor) | wbfb, | ||
integer | ifac | ||
) |
Compute wall boundary conditions.
[in] | rtp | calculated variables at cell centers (at current time step) |
[in,out] | wbfb | output work array |
[in] | ifac | boundary face indice |
subroutine cfther | ( | integer | nvar, |
integer | iccfth, | ||
integer | imodif, | ||
double precision, dimension(ncelet,nflown:nvar) | rtp, | ||
double precision, dimension(*) | output1, | ||
double precision, dimension(*) | output2, | ||
double precision, dimension(nfabor,nvar) | bval | ||
) |
This subroutine is a driver allowing to call the appropriate thermodynamicalfunctions depending on the quantities provided by the user. Hence it is only used during the initialization step and at the boundaries of type supersonic inlet. It is described in the following how to select the quantity to be returned.
When calling the user subroutine, the integer 'iccfth' specifies which calculation has to be performed (and which quantity has to be returned). The values for 'iccfth' for each case are provided below.
The variables are referred to using a different index i:
iccfth is as follows, depending on which quantity needs to be computed:
Detailed values of iccfth and corresponding computations:
Values at the cell centers:
Values at the faces for boundary conditions:
[in] | nvar | total number of variables |
[in] | iccfth | id of computation |
[in] | imodif | modification indicator
|
[in,out] | rtp | calculated variables at cell centers (at current time step) |
[out] | output1 | computed therm. property 1 at cell centers |
[out] | output2 | computed therm. property 2 at cell centers |
[in,out] | bval | variable values at boundary faces |