Go to the source code of this file.
Data Structures | |
struct | cs_thermal_model_t |
Thermal model descriptor. More... | |
Enumerations | |
enum | cs_thermal_model_variable_t { CS_THERMAL_MODEL_INIT = -999 , CS_THERMAL_MODEL_NONE = 0 , CS_THERMAL_MODEL_TEMPERATURE , CS_THERMAL_MODEL_ENTHALPY , CS_THERMAL_MODEL_TOTAL_ENERGY , CS_THERMAL_MODEL_INTERNAL_ENERGY , CS_THERMAL_MODEL_N_TYPES } |
enum | cs_temperature_scale_t { CS_TEMPERATURE_SCALE_NONE = 0 , CS_TEMPERATURE_SCALE_KELVIN = 1 , CS_TEMPERATURE_SCALE_CELSIUS = 2 } |
Functions | |
cs_thermal_model_t * | cs_get_glob_thermal_model (void) |
cs_field_t * | cs_thermal_model_field (void) |
void | cs_thermal_model_log_setup (void) |
void | cs_thermal_model_init (void) |
Initialize thermal variables if needed. More... | |
void | cs_thermal_model_c_square (const cs_real_t cp[], const cs_real_t temp[], const cs_real_t pres[], const cs_real_t fracv[], const cs_real_t fracm[], const cs_real_t frace[], cs_real_t dc2[]) |
Compute the inverse of the square of sound velocity multiplied by gamma. More... | |
CS_F_HOST_DEVICE cs_real_t | cs_thermal_model_demdt (const cs_real_t pres, const cs_real_t temp, const cs_real_t yw, const cs_real_t rvsra, const cs_real_t cva, const cs_real_t cvv, const cs_real_t cpl, const cs_real_t l00) |
Compute the derivative of the internal energy related to the temperature at constant pressure. More... | |
CS_F_HOST_DEVICE cs_real_t | cs_thermal_model_demdt_ecsnt (const cs_real_t pres, const cs_real_t temp, const cs_real_t yw, const cs_real_t rvsra, const cs_real_t cva, const cs_real_t cvv, const cs_real_t cpl, const cs_real_t l00) |
Compute the derivative of the internal energy related to the temperature at constant internal energy. More... | |
void | cs_thermal_model_kinetic_st_prepare (const cs_real_t imasfl[], const cs_real_t bmasfl[], const cs_real_t vela[][3], const cs_real_t vel[][3]) |
First pass to compute the contribution of the kinetic energy based source term from the prediction step. More... | |
void | cs_thermal_model_kinetic_st_finalize (const cs_real_t cromk1[], const cs_real_t cromk[]) |
Finalize the computation of the kinetic energy based source term. More... | |
void | cs_thermal_model_add_kst (cs_real_t smbrs[]) |
Add the kinetic source term if needed. More... | |
void | cs_thermal_model_cflp (const cs_real_t croma[], const cs_real_t trav2[][3], const cs_real_t cvara_pr[], const cs_real_t imasfl[], cs_real_t cflp[]) |
Compute the CFL number related to the pressure equation. More... | |
void | cs_thermal_model_cflt (const cs_real_t croma[], const cs_real_t tempk[], const cs_real_t tempka[], const cs_real_t xcvv[], const cs_real_t vel[][3], const cs_real_t i_massflux[], const cs_real_t b_massflux[], cs_real_t cflt[]) |
Compute the CFL number related to the thermal equation. More... | |
void | cs_thermal_model_cv (cs_real_t *xcvv) |
Compute the isochoric heat capacity. More... | |
void | cs_thermal_model_dissipation (const cs_real_t vistot[], const cs_real_t gradv[][3][3], cs_real_t smbrs[]) |
Compute and add the dissipation term of the thermal equation to its right hand side. More... | |
void | cs_thermal_model_newton_t (int method, const cs_real_t *pk1, const cs_real_t th_scal[], const cs_real_t cvar_pr[], const cs_real_t cvara_pr[], const cs_real_t yw[], cs_real_t yv[], cs_real_t temp[]) |
Perform the Newton method to compute the temperature from the internal energy. More... | |
void | cs_thermal_model_pdivu (cs_real_t smbrs[]) |
Add the term pdivu to the thermal equation rhs. More... | |
Variables | |
const cs_thermal_model_t * | cs_glob_thermal_model |
cs_thermal_model_t * cs_get_glob_thermal_model | ( | void | ) |
void cs_thermal_model_add_kst | ( | cs_real_t | smbrs[] | ) |
Add the kinetic source term if needed.
[in,out] | smbrs | RHS of the thermal equation |
void cs_thermal_model_c_square | ( | const cs_real_t | cp[], |
const cs_real_t | temp[], | ||
const cs_real_t | pres[], | ||
const cs_real_t | fracv[], | ||
const cs_real_t | fracm[], | ||
const cs_real_t | frace[], | ||
cs_real_t | dc2[] | ||
) |
Compute the inverse of the square of sound velocity multiplied by gamma.
[in] | cp | array of isobaric specific heat values for dry air |
[in] | temp | array of temperature values |
[in] | pres | array of pressure values |
[in,out] | fracv | array of volume fraction values |
[in,out] | fracm | array of mass fraction values |
[in,out] | frace | array of energy fraction values |
[out] | dc2 | array of the values of the square of sound velocity |
void cs_thermal_model_cflp | ( | const cs_real_t | croma[], |
const cs_real_t | trav2[][3], | ||
const cs_real_t | cvara_pr[], | ||
const cs_real_t | i_massflux[], | ||
cs_real_t | cflp[] | ||
) |
Compute the CFL number related to the pressure equation.
[in] | croma | density values at the last time iteration |
[in] | trav2 | predicted velocity |
[in] | cvara_pr | pressure values at the last time iteration |
[in] | imasfl | face mass fluxes |
[in,out] | cflp | CFL condition related to the pressure equation |
[in] | croma | density values at the last time iteration |
[in] | trav2 | predicted velocity |
[in] | cvara_pr | pressure values at the last time iteration |
[in] | i_massflux | face mass fluxes |
[in,out] | cflp | CFL condition related to the pressure equation |
void cs_thermal_model_cflt | ( | const cs_real_t | croma[], |
const cs_real_t | tempk[], | ||
const cs_real_t | tempka[], | ||
const cs_real_t | xcvv[], | ||
const cs_real_t | vel[][3], | ||
const cs_real_t | i_massflux[], | ||
const cs_real_t | b_massflux[], | ||
cs_real_t | cflt[] | ||
) |
Compute the CFL number related to the thermal equation.
[in] | croma | array of density values at the last time iteration |
[in] | tempk | array of the temperature |
[in] | tempka | array of the temperature at the previous time step |
[in] | xcvv | array of the isochoric heat capacity |
[in] | vel | array of the velocity |
[in] | i_massflux | array of the inner faces mass fluxes |
[in] | b_massflux | array of the boundary faces mass fluxes |
[in] | cflt | CFL condition related to thermal equation |
void cs_thermal_model_cv | ( | cs_real_t * | xcvv | ) |
Compute the isochoric heat capacity.
[in] | xcvv | isobaric heat capacity |
CS_F_HOST_DEVICE cs_real_t cs_thermal_model_demdt | ( | const cs_real_t | pres, |
const cs_real_t | temp, | ||
const cs_real_t | yw, | ||
const cs_real_t | rvsra, | ||
const cs_real_t | cva, | ||
const cs_real_t | cvv, | ||
const cs_real_t | cpl, | ||
const cs_real_t | l00 | ||
) |
Compute the derivative of the internal energy related to the temperature at constant pressure.
[in] | pres | array of pressure values |
[in] | temp | array of temperature values (in Kelvin) |
[in] | yw | array of the total water mass fraction |
[in] | rvsra | ratio gas constant h2o / dry air |
[in] | cva | difference between heat capacity of the dry air and r_pg_const |
[in] | cvv | difference beteween heat capacity of the water in its gaseous phase and r_v_cnst |
[in] | cpl | heat capacity of the water in its liquid phase |
[in] | l00 | water latent heat |
CS_F_HOST_DEVICE cs_real_t cs_thermal_model_demdt_ecsnt | ( | const cs_real_t | pres, |
const cs_real_t | temp, | ||
const cs_real_t | yw, | ||
const cs_real_t | rvsra, | ||
const cs_real_t | cva, | ||
const cs_real_t | cvv, | ||
const cs_real_t | cpl, | ||
const cs_real_t | l00 | ||
) |
Compute the derivative of the internal energy related to the temperature at constant internal energy.
[in] | pres | array of pressure values |
[in] | temp | array of temperature values (in Kelvin) |
[in] | yw | array of the total water mass fraction |
[in] | rvsra | ratio gas constant h2o / dry air |
[in] | cva | difference between heat capacity of the dry air and r_pg_const |
[in] | cvv | difference beteween heat capacity of the water in its gaseous phase and r_v_cnst |
[in] | cpl | heat capacity of the water in its liquid phase |
[in] | l00 | water latent heat |
void cs_thermal_model_dissipation | ( | const cs_real_t | vistot[], |
const cs_real_t | gradv[][3][3], | ||
cs_real_t | smbrs[] | ||
) |
Compute and add the dissipation term of the thermal equation to its right hand side.
[in] | vistot | array for the total viscosity |
[in] | gradv | tensor for the velocity gradient |
[in,out] | smbrs | array of equation right hand side |
cs_field_t * cs_thermal_model_field | ( | void | ) |
void cs_thermal_model_init | ( | void | ) |
Initialize thermal variables if needed.
Finalize the computation of the kinetic energy based source term.
[in] | cromk1 | density values at time n+1/2,k-1 |
[in] | cromk | density values at time n+1/2,k |
void cs_thermal_model_kinetic_st_prepare | ( | const cs_real_t | i_massflux[], |
const cs_real_t | b_massflux[], | ||
const cs_real_t | vela[][3], | ||
const cs_real_t | vel[][3] | ||
) |
First pass to compute the contribution of the kinetic energy based source term from the prediction step.
[in] | imasfl | inner mass flux used in the momentum equation |
[in] | bmasfl | boundary mass flux used in the momentum equation |
[in] | vela | velocity at previous time step |
[in] | vel | velocity at iteration k |
[in] | i_massflux | inner mass flux used in the momentum equation |
[in] | b_massflux | boundary mass flux used in the momentum equation |
[in] | vela | velocity at previous time step |
[in] | vel | velocity at iteration k |
void cs_thermal_model_log_setup | ( | void | ) |
void cs_thermal_model_newton_t | ( | int | method, |
const cs_real_t * | pk1, | ||
const cs_real_t | th_scal[], | ||
const cs_real_t | cvar_pr[], | ||
const cs_real_t | cvara_pr[], | ||
const cs_real_t | yw[], | ||
cs_real_t | yv[], | ||
cs_real_t | temp[] | ||
) |
Perform the Newton method to compute the temperature from the internal energy.
[in] | method | method used to compute the temperature |
[in] | th_scal | internal energy values |
[in] | pk1 | pressure values at the last inner iteration |
[in] | cvar_pr | pressure values |
[in] | cvara_pr | pressure values at the last time iteration |
[in] | yw | total water mass fraction |
[in,out] | yv | vapor of water mass fraction |
[in,out] | temp | temperature values |
[in] | method | method used to compute the temperature |
[in] | pk1 | pressure values at the last inner iteration |
[in] | th_scal | internal energy values |
[in] | cvar_pr | pressure values |
[in] | cvara_pr | pressure values at the last time iteration |
[in] | yw | total water mass fraction |
[in,out] | yv | vapor of water mass fraction |
[in,out] | temp | temperature values |
void cs_thermal_model_pdivu | ( | cs_real_t | smbrs[] | ) |
Add the term pdivu to the thermal equation rhs.
[in,out] | smbrs | array of the right hand side |
|
extern |