9.0
general documentation
Loading...
Searching...
No Matches
cs_thermal_system.cpp File Reference
#include "base/cs_defs.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "bft/bft_mem.h"
#include "bft/bft_printf.h"
#include "base/cs_array.h"
#include "base/cs_field_default.h"
#include "pprt/cs_physical_model.h"
#include "cdo/cs_reco.h"
#include "base/cs_syr_coupling.h"
#include "cdo/cs_thermal_system.h"
Include dependency graph for cs_thermal_system.cpp:

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.
void cs_thermal_system_set_reference_temperature (cs_real_t ref)
 Set the value of the reference temperature associated to the thermal system.
cs_flag_t cs_thermal_system_get_model (void)
 Retrieve the model flag related to a thermal system.
bool cs_thermal_system_needs_navsto (void)
 Does the thermal system rely on the advection field associated to the Navier-Stokes equations ?
bool cs_thermal_system_is_activated (void)
 Check if the resolution of the thermal system has been activated.
cs_thermal_system_tcs_thermal_system_activate (cs_thermal_model_type_t model, cs_flag_t numeric, cs_flag_t post)
 Allocate and initialize the thermal system.
void cs_thermal_system_destroy (void)
 Free the main structure related to the thermal system.
cs_equation_tcs_thermal_system_get_equation (void)
 Retrieve the main equation related to the thermal system.
cs_real_tcs_thermal_system_get_face_temperature (void)
 Retrieve the current temperature at face values.
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_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.
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.
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.
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.
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.
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.
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)
void cs_thermal_system_log_setup (void)
 Summary of the main options related to cs_thermal_system_t structure.
void cs_thermal_system_cht_boundary_conditions_setup (void)
 Initialize structures and/or boundary conditions used for CHT coupling.

Macro Definition Documentation

◆ CS_THERMAL_SYSTEM_DBG

#define CS_THERMAL_SYSTEM_DBG   0

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_cht_boundary_conditions_setup()

void cs_thermal_system_cht_boundary_conditions_setup ( void )

Initialize structures and/or boundary conditions used for CHT coupling.

◆ 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 Navier-Stokes system.

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_init_values()

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.

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

◆ 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 the quantities related to the thermal module.

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