#include "cdo/cs_cdo_connect.h"#include "cdo/cs_cdo_quantities.h"#include "cdo/cs_equation.h"#include "base/cs_field.h"#include "mesh/cs_mesh.h"#include "cdo/cs_property.h"#include "base/cs_time_step.h"#include "turb/cs_turbulence_model.h"
Include dependency graph for cs_cdo_turbulence.h:Go to the source code of this file.
Classes | |
| struct | cs_turbulence_param_t |
| Structure storing the parameters related to the resolution of the turbulence modelling. Several members are structures defined in cs_turbulence_model.h as a global variable. The purpose of this structure is to store all parameters in one place. More... | |
| struct | cs_turbulence_t |
Macros | |
| #define | CS_NAVSTO_TOTAL_VISCOSITY "total_viscosity" |
| #define | CS_NAVSTO_LAM_VISCOSITY "laminar_viscosity" |
| #define | CS_NAVSTO_TURB_VISCOSITY "turbulent_viscosity" |
Typedefs | |
| typedef void *() | cs_turb_init_context_t(const cs_turb_model_t *tbm) |
| Allocate and initialize the context structure related to a given turbulence modelling. More... | |
| typedef void *() | cs_turb_free_context_t(void *turb_context) |
| Free the context structure related to a given turbulence modelling. More... | |
| typedef void() | cs_turb_compute_t(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... | |
| typedef void() | cs_turb_update_t(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 properties, arrays related to the turbulent variables. More... | |
Functions | |
| cs_turbulence_param_t * | cs_turbulence_param_create (void) |
| Allocate the structure storing the set of parameters for the turbulence modelling. More... | |
| cs_turbulence_t * | cs_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_set_shared_from_fv (cs_turbulence_t *tbs, bool is_shared) |
| Indicate whether use Legacy solved turbulent viscosity. 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_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... | |
| 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_update_shared_legacy (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. directly update the turbulent viscosity from Legacy. More... | |
| void | cs_turb_compute_wall_bc_coeffs (const cs_equation_param_t *eqp, const double nu, const double k, const double hfc, const double uct, cs_real_t *res) |
| Function used to define the exchange coefficients for tangential and normal components. More... | |
| bool | cs_turb_wall_functions_is_activated (const cs_turbulence_param_t *turbulence) |
| Return true if a wall function is used for turbulence. More... | |
| #define CS_NAVSTO_LAM_VISCOSITY "laminar_viscosity" |
| #define CS_NAVSTO_TOTAL_VISCOSITY "total_viscosity" |
| #define CS_NAVSTO_TURB_VISCOSITY "turbulent_viscosity" |
| typedef void() cs_turb_compute_t(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.
| [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 | structure managing the time stepping |
| [in,out] | tbs | pointer to turbulence structure |
| typedef void *() cs_turb_free_context_t(void *turb_context) |
Free the context structure related to a given turbulence modelling.
| [in,out] | tbc | pointer to a structure cast on-the-fly to free |
| typedef void *() cs_turb_init_context_t(const cs_turb_model_t *tbm) |
Allocate and initialize the context structure related to a given turbulence modelling.
| [in] | tbm | pointer to a cs_turb_model_t structure |
| typedef void() cs_turb_update_t(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 properties, arrays related to the turbulent variables.
| [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 | structure managing the time stepping |
| [in] | tbs | pointer to a cs_turbulence_t structure |
| 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.
| [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 | structure managing the time stepping |
| [in,out] | tbs | pointer to turbulence structure |
| void cs_turb_compute_wall_bc_coeffs | ( | const cs_equation_param_t * | eqp, |
| const double | nu, | ||
| const double | k, | ||
| const double | hfc, | ||
| const double | uct, | ||
| cs_real_t * | res | ||
| ) |
Function used to define the exchange coefficients for tangential and normal components.
| [in] | eqp | pointer to a cs_equation_param_t |
| [in] | cm | pointer to a cs_cell_mesh_t structure |
| [in] | nu | laminar kinematic viscosity |
| [in] | k | turbulent kinetic energy |
| [in] | hfc | distance from cell center to the wall |
| [in] | uct | norm of tangential components of cell velocity |
| [in,out] | retval | exchange coefficients result |
| void * cs_turb_free_k_eps_context | ( | void * | tbc | ) |
Free the context structure related to the k-epsilon turbulence model.
| [in,out] | tbc | pointer to a structure context cast on-the-fly |
| 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.
| [in] | tbm | structure which defines the turbulence model |
| 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.
| [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 | structure managing the time stepping |
| [in] | tbs | pointer to a cs_turbulence_t structure |
| void cs_turb_update_shared_legacy | ( | 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. directly update the turbulent viscosity from Legacy.
| [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 | structure managing the time stepping |
| [in] | tbs | pointer to a cs_turbulence_t structure |
| bool cs_turb_wall_functions_is_activated | ( | const cs_turbulence_param_t * | turbulence | ) |
Return true if a wall function is used for turbulence.
| [in] | turbulence | pointer to a cs_turbulence_param_t |
| [out] | retval | use or nor a wall function |
| cs_turbulence_t * cs_turbulence_create | ( | cs_turbulence_param_t * | tbp | ) |
Allocate the structure managing the turbulence modelling.
| [in] | tbp | pointer to a cs_turbulence_param_t structure |
| 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.
| [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 |
| [in,out] | tbs | pointer to the turbulence main structure |
| void cs_turbulence_free | ( | cs_turbulence_t ** | p_turb_struct | ) |
Free the structure managing the turbulence modelling.
| [in,out] | p_turb_struct | pointer to the structure to free |
| void cs_turbulence_init_setup | ( | cs_turbulence_t * | tbs, |
| cs_equation_t * | mom_eq | ||
| ) |
Initialize the structure managing the turbulence modelling.
| [in,out] | tbs | pointer to the structure to initialize |
| [in] | mom_eq | pointer to the structure mom_eq |
| 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.
| [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 |
| [in,out] | tbs | pointer to the turbulence main structure |
| cs_turbulence_param_t * cs_turbulence_param_create | ( | void | ) |
Allocate the structure storing the set of parameters for the turbulence modelling.
| void cs_turbulence_set_shared_from_fv | ( | cs_turbulence_t * | tbs, |
| bool | is_shared | ||
| ) |
Indicate whether use Legacy solved turbulent viscosity.
| [in,out] | tbs | pointer to the turbulence main structure |
| [in] | is_shared | boolean parameter to set |