8.1
general documentation
cs_thermal_model.h File Reference
#include "cs_defs.h"
#include "cs_field.h"
+ Include dependency graph for cs_thermal_model.h:

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_NONE , 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_tcs_get_glob_thermal_model (void)
 
cs_field_tcs_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_real_t cs_thermal_model_demdt (cs_real_t pres, cs_real_t temp, cs_real_t yw)
 Compute the derivative of the internal energy related to the temperature at constant pressure. More...
 
cs_real_t cs_thermal_model_demdt_ecsnt (cs_real_t pres, cs_real_t temp, cs_real_t yw, cs_real_t cpa, cs_real_t cpv, cs_real_t cpl, 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 imasfl[], cs_real_t cflt[restrict])
 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[restrict])
 Add the term pdivu to the thermal equation rhs. More...
 

Variables

const cs_thermal_model_tcs_glob_thermal_model
 

Enumeration Type Documentation

◆ cs_temperature_scale_t

Enumerator
CS_TEMPERATURE_SCALE_NONE 
CS_TEMPERATURE_SCALE_KELVIN 
CS_TEMPERATURE_SCALE_CELSIUS 

◆ cs_thermal_model_variable_t

Enumerator
CS_THERMAL_MODEL_NONE 
CS_THERMAL_MODEL_TEMPERATURE 
CS_THERMAL_MODEL_ENTHALPY 
CS_THERMAL_MODEL_TOTAL_ENERGY 
CS_THERMAL_MODEL_INTERNAL_ENERGY 
CS_THERMAL_MODEL_N_TYPES 

Function Documentation

◆ cs_get_glob_thermal_model()

cs_thermal_model_t* cs_get_glob_thermal_model ( void  )

◆ cs_thermal_model_add_kst()

void cs_thermal_model_add_kst ( cs_real_t  smbrs[])

Add the kinetic source term if needed.

Parameters
[in,out]smbrsRHS of the thermal equation

◆ cs_thermal_model_c_square()

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.

Parameters
[in]cparray of isobaric specific heat values for dry air
[in]temparray of temperature values
[in]presarray of pressure values
[in,out]fracvarray of volume fraction values
[in,out]fracmarray of mass fraction values
[in,out]fracearray of energy fraction values
[out]dc2array of the values of the square of sound velocity

◆ cs_thermal_model_cflp()

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.

Parameters
[in]cromadensity values at the last time iteration
[in]trav2predicted velocity
[in]cvara_prpressure values at the last time iteration
[in]imasflface mass fluxes
[in,out]cflpCFL condition related to the pressure equation

◆ cs_thermal_model_cflt()

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  imasfl[],
cs_real_t  cflt[restrict] 
)

Compute the CFL number related to the thermal equation.

Parameters
[in]cromaarray of density values at the last time iteration
[in]tempkarray of the temperature
[in]tempkaarray of the temperature at the previous time step
[in]xcvvarray of the isochoric heat capacity
[in]velarray of the velocity
[in]imasflarray of the faces mass fluxes
[in]cfltCFL condition related to thermal equation

◆ cs_thermal_model_cv()

void cs_thermal_model_cv ( cs_real_t xcvv)

Compute the isochoric heat capacity.

Parameters
[in]xcvvisobaric heat capacity

◆ cs_thermal_model_demdt()

cs_real_t cs_thermal_model_demdt ( cs_real_t  pres,
cs_real_t  temp,
cs_real_t  yw 
)

Compute the derivative of the internal energy related to the temperature at constant pressure.

Parameters
[in]presarray of pressure values
[in]temparray of temperature values (in Kelvin)
[in]ywarray of the total water mass fraction

◆ cs_thermal_model_demdt_ecsnt()

cs_real_t cs_thermal_model_demdt_ecsnt ( cs_real_t  pres,
cs_real_t  temp,
cs_real_t  yw,
cs_real_t  cpa,
cs_real_t  cpv,
cs_real_t  cpl,
cs_real_t  l00 
)

Compute the derivative of the internal energy related to the temperature at constant internal energy.

Parameters
[in]presarray of pressure values
[in]temparray of temperature values (in Kelvin)
[in]ywarray of the total water mass fraction
[in]cpaheat capacity of the dry air
[in]cpvheat capacity of the water in its gaseous phase
[in]cplheat capacity of the water in its liquid phase
[in]l00water latent heat

◆ cs_thermal_model_dissipation()

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.

Parameters
[in]vistotarray for the total viscosity
[in]gradvtensor for the velocity gradient
[in,out]smbrsarray of equation right hand side

◆ cs_thermal_model_field()

cs_field_t* cs_thermal_model_field ( void  )

◆ cs_thermal_model_init()

void cs_thermal_model_init ( void  )

Initialize thermal variables if needed.

◆ cs_thermal_model_kinetic_st_finalize()

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.

Parameters
[in]cromk1density values at time n+1/2,k-1
[in]cromkdensity values at time n+1/2,k

◆ cs_thermal_model_kinetic_st_prepare()

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.

Parameters
[in]imasflinner mass flux used in the momentum equation
[in]bmasflboundary mass flux used in the momentum equation
[in]velavelocity at previous time step
[in]velvelocity at iteration k

◆ cs_thermal_model_log_setup()

void cs_thermal_model_log_setup ( void  )

◆ cs_thermal_model_newton_t()

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.

Parameters
[in]methodmethod used to compute the temperature
[in]th_scalinternal energy values
[in]pk1pressure values at the last inner iteration
[in]cvar_prpressure values
[in]cvara_prpressure values at the last time iteration
[in]ywtotal water mass fraction
[in,out]yvvapor of water mass fraction
[in,out]temptemperature values
[in]methodmethod used to compute the temperature
[in]pk1pressure values at the last inner iteration
[in]th_scalinternal energy values
[in]cvar_prpressure values
[in]cvara_prpressure values at the last time iteration
[in]ywtotal water mass fraction
[in,out]yvvapor of water mass fraction
[in,out]temptemperature values

◆ cs_thermal_model_pdivu()

void cs_thermal_model_pdivu ( cs_real_t  smbrs[restrict])

Add the term pdivu to the thermal equation rhs.

Parameters
[in,out]smbrsarray of the right hand side

Variable Documentation

◆ cs_glob_thermal_model

const cs_thermal_model_t* cs_glob_thermal_model
extern