#include "cs_defs.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <bft_mem.h>
#include <bft_printf.h>
#include "cs_array.h"
#include "cs_field_default.h"
#include "cs_physical_model.h"
#include "cs_reco.h"
#include "cs_syr_coupling.h"
#include "cs_thermal_system.h"
Macros | |
#define | CS_THERMAL_SYSTEM_DBG 0 |
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_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. More... | |
void | cs_thermal_system_destroy (void) |
Free the main structure related to the thermal system. More... | |
cs_equation_t * | cs_thermal_system_get_equation (void) |
Retrieve the main equation related to the thermal system. More... | |
cs_real_t * | cs_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_init_values (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *ts) |
Set an initial values for all quantities related to this module This is done after the setup step. 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 the quantities related to the thermal module. More... | |
void | cs_thermal_system_extra_op (const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *cdoq) |
Predefined extra-operations for the Navier-Stokes 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... | |
void | cs_thermal_system_cht_boundary_conditions_setup (void) |
Initialize structures and/or boundary conditions used for CHT coupling. More... | |
#define CS_THERMAL_SYSTEM_DBG 0 |
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.
[in] | model | model flag related to the thermal system |
[in] | numeric | (optional) numerical flag settings |
[in] | post | (optional) post-processing flag settings |
void cs_thermal_system_cht_boundary_conditions_setup | ( | void | ) |
Initialize structures and/or boundary conditions used for CHT coupling.
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.
[in] | cur2prev | true="current to previous" operation is performed |
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | time_step | pointer to a cs_time_step_t structure |
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.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | time_step | pointer to a cs_time_step_t structure |
void cs_thermal_system_destroy | ( | void | ) |
Free the main structure related to the thermal system.
void cs_thermal_system_extra_op | ( | const cs_cdo_connect_t * | connect, |
const cs_cdo_quantities_t * | cdoq | ||
) |
Predefined extra-operations for the Navier-Stokes system.
Predefined extra-operations for the thermal system.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | cdoq | pointer to a cs_cdo_quantities_t structure |
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)
[in,out] | input | pointer to a optional structure (here a cs_thermal_system_t structure) |
[in] | mesh_id | id of the output mesh for the current call |
[in] | cat_id | category id of the output mesh for this call |
[in] | ent_flag | indicate 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_cells | local number of cells of post_mesh |
[in] | n_i_faces | local number of interior faces of post_mesh |
[in] | n_b_faces | local number of boundary faces of post_mesh |
[in] | cell_ids | list of cells (0 to n-1) |
[in] | i_face_ids | list of interior faces (0 to n-1) |
[in] | b_face_ids | list of boundary faces (0 to n-1) |
[in] | time_step | pointer to a cs_time_step_t struct. |
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.
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | time_step | pointer to a cs_time_step_t structure |
cs_equation_t * cs_thermal_system_get_equation | ( | void | ) |
Retrieve the main equation related to the thermal system.
cs_real_t * cs_thermal_system_get_face_temperature | ( | void | ) |
Retrieve the current temperature at face values.
cs_flag_t cs_thermal_system_get_model | ( | void | ) |
Retrieve the model flag related to a thermal system.
cs_real_t cs_thermal_system_get_reference_temperature | ( | void | ) |
Retrieve the value of the reference temperature associated to a thermal system.
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.
void cs_thermal_system_init_values | ( | const cs_mesh_t * | mesh, |
const cs_cdo_connect_t * | connect, | ||
const cs_cdo_quantities_t * | quant, | ||
const cs_time_step_t * | ts | ||
) |
Set an initial values for all quantities related to this module This is done after the setup step.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | ts | pointer to a cs_time_step_t structure |
bool cs_thermal_system_is_activated | ( | void | ) |
Check if the resolution of the thermal system has been activated.
void cs_thermal_system_log_setup | ( | void | ) |
Summary of the main options related to cs_thermal_system_t structure.
bool cs_thermal_system_needs_navsto | ( | void | ) |
Does the thermal system rely on the advection field associated to the Navier-Stokes equations ?
void cs_thermal_system_set_reference_temperature | ( | cs_real_t | ref | ) |
Set the value of the reference temperature associated to the thermal system.
[in] | ref | value of the reference temperature |
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 the quantities related to the thermal module.
[in] | mesh | pointer to a cs_mesh_t structure |
[in] | connect | pointer to a cs_cdo_connect_t structure |
[in] | quant | pointer to a cs_cdo_quantities_t structure |
[in] | ts | pointer to a cs_time_step_t structure |
[in] | cur2prev | true or false |