8.0
general documentation
cs_cdo_turbulence.c File Reference

Functions to handle the resolution of the turbulence modelling within the CDO framework. More...

#include "cs_defs.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <bft_mem.h>
#include "cs_post.h"
#include "cs_turbulence_model.h"
#include "cs_reco.h"
#include "cs_cdo_turbulence.h"
+ Include dependency graph for cs_cdo_turbulence.c:

Macros

#define CS_CDO_TURBULENCE_DBG   0
 

Functions

cs_turbulence_param_tcs_turbulence_param_create (void)
 Allocate the structure storing the set of parameters for the turbulence modelling. More...
 
cs_turbulence_tcs_turbulence_create (cs_turbulence_param_t *tbp)
 Allocate the structure managing the turbulence modelling. More...
 
void cs_turbulence_free (cs_turbulence_t **p_turb_struct)
 Free the structure managing the turbulence modelling. More...
 
void cs_turbulence_init_setup (cs_turbulence_t *tbs, cs_equation_t *mom_eq)
 Initialize the structure managing the turbulence modelling. More...
 
void cs_turbulence_finalize_setup (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, cs_turbulence_t *tbs)
 Finalize the setup of the turbulence modelling and especially the equations/properties and other related quantities. More...
 
void cs_turbulence_init_values (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, cs_turbulence_t *tbs)
 Initialize the values of quantities related to a turbulence model. More...
 
void * cs_turb_init_k_eps_context (const cs_turb_model_t *tbm)
 Allocate and initialize the context structure related to the k-epsilon turbulence model. More...
 
void * cs_turb_free_k_eps_context (void *tbc)
 Free the context structure related to the k-epsilon turbulence model. More...
 
void cs_turb_update_k_eps (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, const cs_turbulence_t *tbs)
 Update for the current time step the new state for the turbulence model. This is used to update the turbulent viscosity. More...
 
void cs_turb_compute_k_eps (const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, cs_turbulence_t *tbs)
 Compute for the current time step the new state for the turbulence model. This means that all related equations are built and then solved. More...
 

Detailed Description

Functions to handle the resolution of the turbulence modelling within the CDO framework.

Macro Definition Documentation

◆ CS_CDO_TURBULENCE_DBG

#define CS_CDO_TURBULENCE_DBG   0

Function Documentation

◆ cs_turb_compute_k_eps()

void cs_turb_compute_k_eps ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
cs_turbulence_t tbs 
)

Compute for the current time step the new state for the turbulence model. This means that all related equations are built and then solved.

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_stepstructure managing the time stepping
[in,out]tbspointer to turbulence structure

◆ cs_turb_free_k_eps_context()

void* cs_turb_free_k_eps_context ( void *  tbc)

Free the context structure related to the k-epsilon turbulence model.

Parameters
[in,out]tbcpointer to a structure context cast on-the-fly
Returns
a NULL pointer

◆ cs_turb_init_k_eps_context()

void* cs_turb_init_k_eps_context ( const cs_turb_model_t tbm)

Allocate and initialize the context structure related to the k-epsilon turbulence model.

Parameters
[in]tbmstructure which defines the turbulence model
Returns
a pointer to a new allocated context structure

◆ cs_turb_update_k_eps()

void cs_turb_update_k_eps ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
const cs_turbulence_t tbs 
)

Update for the current time step the new state for the turbulence model. This is used to update the turbulent viscosity.

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_stepstructure managing the time stepping
[in]tbspointer to a cs_turbulence_t structure

◆ cs_turbulence_create()

cs_turbulence_t* cs_turbulence_create ( cs_turbulence_param_t tbp)

Allocate the structure managing the turbulence modelling.

Parameters
[in]tbppointer to a cs_turbulence_param_t structure
Returns
a pointer to a new allocated cs_turbulence_t structure

◆ cs_turbulence_finalize_setup()

void cs_turbulence_finalize_setup ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
cs_turbulence_t tbs 
)

Finalize the setup of the turbulence modelling and especially the equations/properties and other related quantities.

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
[in,out]tbspointer to the turbulence main structure

◆ cs_turbulence_free()

void cs_turbulence_free ( cs_turbulence_t **  p_turb_struct)

Free the structure managing the turbulence modelling.

Parameters
[in,out]p_turb_structpointer to the structure to free

◆ cs_turbulence_init_setup()

void cs_turbulence_init_setup ( cs_turbulence_t tbs,
cs_equation_t mom_eq 
)

Initialize the structure managing the turbulence modelling.

Parameters
[in,out]tbspointer to the structure to initialize
[in]mom_eqpointer to the structure mom_eq

◆ cs_turbulence_init_values()

void cs_turbulence_init_values ( const cs_mesh_t mesh,
const cs_cdo_connect_t connect,
const cs_cdo_quantities_t quant,
const cs_time_step_t time_step,
cs_turbulence_t tbs 
)

Initialize the values of quantities related to a turbulence model.

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
[in,out]tbspointer to the turbulence main structure

◆ cs_turbulence_param_create()

cs_turbulence_param_t* cs_turbulence_param_create ( void  )

Allocate the structure storing the set of parameters for the turbulence modelling.

Returns
a pointer to a new allocated cs_turbulence_param_t structure