7.1
general documentation
cs_thermal_system.h File Reference

Functions to handle the cs_thermal_system_t structure. This module can be used stand alone or linked with another module such as Navier-Stokes, groundwater flows or Maxwell... The temperature field is automatically defined when this module is activated. More...

#include "cs_advection_field.h"
#include "cs_equation.h"
#include "cs_field.h"
#include "cs_property.h"
#include "cs_mesh.h"
#include "cs_source_term.h"
#include "cs_time_step.h"
#include "cs_xdef.h"
+ Include dependency graph for cs_thermal_system.h:

Go to the source code of this file.

Data Structures

struct  cs_thermal_system_t
 

Macros

#define CS_THERMAL_EQNAME   "thermal_equation"
 
#define CS_THERMAL_CP_NAME   "thermal_capacity"
 
#define CS_THERMAL_LAMBDA_NAME   "thermal_conductivity"
 
Flags specifying automatic post-processing for the thermal module
#define CS_THERMAL_POST_ENTHALPY   (1 << 0) /* 1 */
 Create a field storing the enthalpy for post-processing and extra-operation. More...
 

Typedefs

typedef cs_flag_t cs_thermal_model_type_t
 

Enumerations

enum  cs_thermal_model_type_bit_t {
  CS_THERMAL_MODEL_STEADY = 1<<0, CS_THERMAL_MODEL_NAVSTO_ADVECTION = 1<<1, CS_THERMAL_MODEL_USE_TEMPERATURE = 1<<2, CS_THERMAL_MODEL_USE_ENTHALPY = 1<<3,
  CS_THERMAL_MODEL_USE_TOTAL_ENERGY = 1<<4, CS_THERMAL_MODEL_ANISOTROPIC_CONDUCTIVITY = 1<<5, CS_THERMAL_MODEL_IN_CELSIUS = 1<<7
}
 Bit values for physical modelling related to thermal system. More...
 

Functions

cs_real_t cs_thermal_system_get_reference_temperature (void)
 Retrieve the value of the reference temperature associated to a thermal system. More...
 
void cs_thermal_system_set_reference_temperature (cs_real_t ref)
 Set the value of the reference temperature associated to the thermal system. More...
 
cs_flag_t cs_thermal_system_get_model (void)
 Retrieve the model flag related to a thermal system. More...
 
bool cs_thermal_system_needs_navsto (void)
 Does the thermal system rely on the advection field associated to the Navier-Stokes equations ? More...
 
bool cs_thermal_system_is_activated (void)
 Check if the resolution of the thermal system has been activated. More...
 
cs_thermal_system_tcs_thermal_system_activate (cs_flag_t model, cs_flag_t numeric, cs_flag_t post)
 Allocate and initialize the thermal system. More...
 
void cs_thermal_system_destroy (void)
 Free the main structure related to the thermal system. More...
 
cs_equation_tcs_thermal_system_get_equation (void)
 Retrieve the main equation related to the thermal system. More...
 
cs_real_tcs_thermal_system_get_face_temperature (void)
 Retrieve the current temperature at face values. More...
 
void cs_thermal_system_init_setup (void)
 Start setting-up the thermal system At this stage, numerical settings should be completely determined but connectivity and geometrical information is not yet available. More...
 
void cs_thermal_system_finalize_setup (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
 Last step of the setup of the thermal system. More...
 
void cs_thermal_system_compute_steady_state (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
 Build and solve a steady-state thermal system. More...
 
void cs_thermal_system_compute (bool cur2prev, const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
 Build and solve the thermal system. More...
 
void cs_thermal_system_update (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts, bool cur2prev)
 Update/initialize the thermal module according to the settings. More...
 
void cs_thermal_system_extra_op (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq)
 Predefined extra-operations for the thermal system. More...
 
void cs_thermal_system_extra_post (void *input, int mesh_id, int cat_id, int ent_flag[5], cs_lnum_t n_cells, cs_lnum_t n_i_faces, cs_lnum_t n_b_faces, const cs_lnum_t cell_ids[], const cs_lnum_t i_face_ids[], const cs_lnum_t b_face_ids[], const cs_time_step_t *time_step)
 Predefined post-processing output for the thermal system. The prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t) More...
 
void cs_thermal_system_log_setup (void)
 Summary of the main options related to cs_thermal_system_t structure. More...
 

Detailed Description

Functions to handle the cs_thermal_system_t structure. This module can be used stand alone or linked with another module such as Navier-Stokes, groundwater flows or Maxwell... The temperature field is automatically defined when this module is activated.

Moreover, one considers according to the modelling rho the volumetric mass (mass density) Cp the heat capacity lambda the heat conductivity

Macro Definition Documentation

◆ CS_THERMAL_CP_NAME

#define CS_THERMAL_CP_NAME   "thermal_capacity"

◆ CS_THERMAL_EQNAME

#define CS_THERMAL_EQNAME   "thermal_equation"

◆ CS_THERMAL_LAMBDA_NAME

#define CS_THERMAL_LAMBDA_NAME   "thermal_conductivity"

◆ CS_THERMAL_POST_ENTHALPY

#define CS_THERMAL_POST_ENTHALPY   (1 << 0) /* 1 */

Create a field storing the enthalpy for post-processing and extra-operation.

Typedef Documentation

◆ cs_thermal_model_type_t

Enumeration Type Documentation

◆ cs_thermal_model_type_bit_t

Bit values for physical modelling related to thermal system.

Enumerator
CS_THERMAL_MODEL_STEADY 
CS_THERMAL_MODEL_NAVSTO_ADVECTION 
CS_THERMAL_MODEL_USE_TEMPERATURE 
CS_THERMAL_MODEL_USE_ENTHALPY 
CS_THERMAL_MODEL_USE_TOTAL_ENERGY 
CS_THERMAL_MODEL_ANISOTROPIC_CONDUCTIVITY 
CS_THERMAL_MODEL_IN_CELSIUS 

Function Documentation

◆ cs_thermal_system_activate()

cs_thermal_system_t* cs_thermal_system_activate ( cs_thermal_model_type_t  model,
cs_flag_t  numeric,
cs_flag_t  post 
)

Allocate and initialize the thermal system.

Parameters
[in]modelmodel flag related to the thermal system
[in]numeric(optional) numerical flag settings
[in]post(optional) post-processing flag settings
Returns
a pointer to a new allocated cs_thermal_system_t structure

◆ cs_thermal_system_compute()

void cs_thermal_system_compute ( bool  cur2prev,
const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step 
)

Build and solve the thermal system.

Parameters
[in]cur2prevtrue="current to previous" operation is performed
[in]meshpointer to a cs_mesh_t structure
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]time_steppointer to a cs_time_step_t structure

◆ cs_thermal_system_compute_steady_state()

void cs_thermal_system_compute_steady_state ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step 
)

Build and solve a steady-state thermal system.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]time_steppointer to a cs_time_step_t structure

◆ cs_thermal_system_destroy()

void cs_thermal_system_destroy ( void  )

Free the main structure related to the thermal system.

◆ cs_thermal_system_extra_op()

void cs_thermal_system_extra_op ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t cdoq 
)

Predefined extra-operations for the thermal system.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure

Predefined extra-operations for the thermal system.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]cdoqpointer to a cs_cdo_quantities_t structure

◆ cs_thermal_system_extra_post()

void cs_thermal_system_extra_post ( void *  input,
int  mesh_id,
int  cat_id,
int  ent_flag[5],
cs_lnum_t  n_cells,
cs_lnum_t  n_i_faces,
cs_lnum_t  n_b_faces,
const cs_lnum_t  cell_ids[],
const cs_lnum_t  i_face_ids[],
const cs_lnum_t  b_face_ids[],
const cs_time_step_t time_step 
)

Predefined post-processing output for the thermal system. The prototype of this function is fixed since it is a function pointer defined in cs_post.h (cs_post_time_mesh_dep_output_t)

Parameters
[in,out]inputpointer to a optional structure (here a cs_thermal_system_t structure)
[in]mesh_idid of the output mesh for the current call
[in]cat_idcategory id of the output mesh for this call
[in]ent_flagindicate global presence of cells (ent_flag[0]), interior faces (ent_flag[1]), boundary faces (ent_flag[2]), particles (ent_flag[3]) or probes (ent_flag[4])
[in]n_cellslocal number of cells of post_mesh
[in]n_i_faceslocal number of interior faces of post_mesh
[in]n_b_faceslocal number of boundary faces of post_mesh
[in]cell_idslist of cells (0 to n-1)
[in]i_face_idslist of interior faces (0 to n-1)
[in]b_face_idslist of boundary faces (0 to n-1)
[in]time_steppointer to a cs_time_step_t struct.

◆ cs_thermal_system_finalize_setup()

void cs_thermal_system_finalize_setup ( const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step 
)

Last step of the setup of the thermal system.

Parameters
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]time_steppointer to a cs_time_step_t structure

◆ cs_thermal_system_get_equation()

cs_equation_t* cs_thermal_system_get_equation ( void  )

Retrieve the main equation related to the thermal system.

◆ cs_thermal_system_get_face_temperature()

cs_real_t* cs_thermal_system_get_face_temperature ( void  )

Retrieve the current temperature at face values.

Returns
the pointer to the array of face values.

◆ cs_thermal_system_get_model()

cs_flag_t cs_thermal_system_get_model ( void  )

Retrieve the model flag related to a thermal system.

Returns
a flag

◆ cs_thermal_system_get_reference_temperature()

cs_real_t cs_thermal_system_get_reference_temperature ( void  )

Retrieve the value of the reference temperature associated to a thermal system.

Returns
the value of the reference temperature

◆ cs_thermal_system_init_setup()

void cs_thermal_system_init_setup ( void  )

Start setting-up the thermal system At this stage, numerical settings should be completely determined but connectivity and geometrical information is not yet available.

◆ cs_thermal_system_is_activated()

bool cs_thermal_system_is_activated ( void  )

Check if the resolution of the thermal system has been activated.

Returns
true or false

◆ cs_thermal_system_log_setup()

void cs_thermal_system_log_setup ( void  )

Summary of the main options related to cs_thermal_system_t structure.

◆ cs_thermal_system_needs_navsto()

bool cs_thermal_system_needs_navsto ( void  )

Does the thermal system rely on the advection field associated to the Navier-Stokes equations ?

Returns
true or false

◆ cs_thermal_system_set_reference_temperature()

void cs_thermal_system_set_reference_temperature ( cs_real_t  ref)

Set the value of the reference temperature associated to the thermal system.

Parameters
[in]refvalue of the reference temperature

◆ cs_thermal_system_update()

void cs_thermal_system_update ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t ts,
bool  cur2prev 
)

Update/initialize the thermal module according to the settings.

Parameters
[in]meshpointer to a cs_mesh_t structure
[in]connectpointer to a cs_cdo_connect_t structure
[in]quantpointer to a cs_cdo_quantities_t structure
[in]tspointer to a cs_time_step_t structure
[in]cur2prevtrue or false