Go to the source code of this file.
Data Structures | |
struct | cs_inflow_sem_t |
Typedefs | |
typedef struct _cs_inlet_t | cs_inlet_t |
Enumerations | |
enum | cs_les_inflow_type_t { CS_INFLOW_LAMINAR, CS_INFLOW_RANDOM, CS_INFLOW_BATTEN, CS_INFLOW_SEM } |
Functions | |
void | synthe (const cs_real_t *const ttcabs, const cs_real_t dt[], cs_real_t rcodcl[]) |
void | cs_les_inflow_initialize (void) |
Creation of structures for the LES inflows. More... | |
void | cs_les_inflow_finalize (void) |
Finalize turbulent inflow generation API. More... | |
void | cs_les_inflow_add_inlet (cs_les_inflow_type_t type, bool volume_mode, const cs_zone_t *zone, int n_entities, int verbosity, const cs_real_t *vel_r, cs_real_t k_r, cs_real_t eps_r) |
Add an inlet definition for synthetic turbulence inflow generation. More... | |
void | cs_les_synthetic_eddy_restart_read (void) |
void | cs_les_synthetic_eddy_restart_write (void) |
void | cs_les_synthetic_eddy_method (cs_lnum_t n_points, const cs_lnum_t elt_ids[], const cs_real_3_t point_coordinates[], const cs_real_t *point_weight, int initialize, int verbosity, cs_inflow_sem_t *inflow, cs_real_t t_cur, const cs_real_3_t vel_m_l[], const cs_real_6_t rij_l[], const cs_real_t eps_l[], cs_real_3_t fluctuations[]) |
Generation of synthetic turbulence via the Synthetic Eddy Method (SEM). More... | |
void | cs_les_rescale_fluctuations (cs_lnum_t n_points, const cs_real_6_t statistics[], cs_real_3_t fluctuations[]) |
Rescale fluctuations by statistics following the Lund method. More... | |
void | cs_les_synthetic_eddy_set_n_restart_structures (int n_structures) |
Set number of structures used for volume SEM when restarting from another turbulence model. More... | |
int | cs_les_synthetic_eddy_get_n_restart_structures (void) |
Return number of structures used for volume SEM when restarting from another turbulence model. More... | |
void | cs_les_inflow_get_restart (bool *allow_read, bool *allow_write) |
Query behavior of the LES inflow module in case of restart. More... | |
void | cs_les_inflow_set_restart (bool allow_read, bool allow_write) |
Define behavior of the LES inflow module in case of restart. More... | |
void | cs_user_les_inflow_define (void) |
Define parameters of synthetic turbulence at LES inflow. More... | |
void | cs_user_les_inflow_update (const cs_zone_t *zone, cs_real_t vel_r[3], cs_real_t *k_r, cs_real_t *eps_r) |
Update of the characteristics of a given synthetic turbulence inlet. More... | |
void | cs_user_les_inflow_advanced (const cs_zone_t *zone, cs_real_3_t vel_l[], cs_real_6_t rij_l[], cs_real_t eps_l[]) |
Definition of mean velocity, Reynolds stresses and dissipation rate for each boundary face of the given synthetic turbulence inlet. More... | |
typedef struct _cs_inlet_t cs_inlet_t |
enum cs_les_inflow_type_t |
void cs_les_inflow_add_inlet | ( | cs_les_inflow_type_t | type, |
bool | volume_mode, | ||
const cs_zone_t * | zone, | ||
int | n_entities, | ||
int | verbosity, | ||
const cs_real_t * | vel_r, | ||
cs_real_t | k_r, | ||
cs_real_t | eps_r | ||
) |
Add an inlet definition for synthetic turbulence inflow generation.
[out] | type | type of inflow method at the inlet |
[out] | volume_mode | if true, generate turbulence over the whole domain (only if type is CS_INFLOW_SEM) |
[in] | zone | pointer to associated boundary zone |
[out] | n_entities | number of structures or modes |
[out] | verbosity | verbosity level |
[out] | vel_r | reference mean velocity |
[out] | k_r | reference turbulent kinetic energy |
[out] | eps_r | reference turbulent dissipation |
void cs_les_inflow_finalize | ( | void | ) |
Finalize turbulent inflow generation API.
void cs_les_inflow_get_restart | ( | bool * | allow_read, |
bool * | allow_write | ||
) |
Query behavior of the LES inflow module in case of restart.
See cs_les_synthetic_eddy_set_restart for details.
[out] | allow_read | pointer to read flag, or NULL |
[out] | allow_write | pointer to write flag, or NULL |
void cs_les_inflow_initialize | ( | void | ) |
Creation of structures for the LES inflows.
void cs_les_inflow_set_restart | ( | bool | allow_read, |
bool | allow_write | ||
) |
Define behavior of the LES inflow module in case of restart.
By default, a restart file is read if present, and a checkpoint written. If not read, synthetic fluctuations are re-initialized.
[in] | allow_read | allow reading a relevant checkpoint if present |
[in] | allow_write | allow writing a relevant checkpoint if present |
By default, a specific file is read if present in the restart folder, and files written in the checkpoint folder at global checkpoint intervals.
If not read, synthetic fluctuations are re-initialized.
[in] | allow_read | allow reading a relevant checkpoint if present |
[in] | allow_write | allow writing a relevant checkpoint if present |
void cs_les_rescale_fluctuations | ( | cs_lnum_t | n_points, |
const cs_real_6_t | statistics[], | ||
cs_real_3_t | fluctuations[] | ||
) |
Rescale fluctuations by statistics following the Lund method.
One assumes that the statistics are interlaced and ordered as follows: <u'u'> <v'v'> <w'w'> <u'v'> <v'w'> <u'w'>
[in] | n_points | local number of points where turbulence is generated |
[in] | statistics | statistics (i.e. Reynolds stresses) |
One assumes that the statistics are interlaced and ordered as follows: <u'u'> <v'v'> <w'w'> <u'v'> <v'w'> <u'w'>
[in] | n_points | local number of points where turbulence is generated |
[in] | statistics | statistics (i.e. Reynolds stresses) |
int cs_les_synthetic_eddy_get_n_restart_structures | ( | void | ) |
Return number of structures used for volume SEM when restarting from another turbulence model.
void cs_les_synthetic_eddy_method | ( | cs_lnum_t | n_points, |
const cs_lnum_t | elt_ids[], | ||
const cs_real_3_t | point_coordinates[], | ||
const cs_real_t * | point_weight, | ||
int | initialize, | ||
int | verbosity, | ||
cs_inflow_sem_t * | inflow, | ||
cs_real_t | t_cur, | ||
const cs_real_3_t | vel_m_l[], | ||
const cs_real_6_t | rij_l[], | ||
const cs_real_t | eps_l[], | ||
cs_real_3_t | fluctuations[] | ||
) |
Generation of synthetic turbulence via the Synthetic Eddy Method (SEM).
[in] | n_points | local number of points where turbulence is generated |
[in] | elt_ids | local id of inlet elements |
[in] | point_coordinates | point coordinates |
[in] | point_weight | point weights (surface, volume or NULL) |
[in] | initialize | initialization indicator |
[in] | verbosity | verbosity level |
[in] | inflow | pointer to structure for Batten method |
[in] | t_cur | current time |
[in] | vel_m_l | mean velocity at each point |
[in] | rij_l | reynolds stresses at each point |
[in] | eps_l | dissipation rate at each point |
[out] | fluctuations | velocity fluctuations at each point |
[in] | n_points | local number of points where turbulence is generated |
[in] | elt_ids | local id of inlet boundary faces |
[in] | point_coordinates | point coordinates |
[in] | point_weight | point weights (surface, volume or NULL) |
[in] | initialize | initialization indicator |
[in] | verbosity | verbosity level |
[in] | inflow | pointer to structure for Batten method |
[in] | t_cur | current time |
[in] | vel_m_l | mean velocity at each point |
[in] | rij_l | Reynolds stresses at each point |
[in] | eps_l | dissipation rate at each point |
[out] | fluctuations | velocity fluctuations at each point |
void cs_les_synthetic_eddy_restart_read | ( | void | ) |
void cs_les_synthetic_eddy_restart_write | ( | void | ) |
void cs_les_synthetic_eddy_set_n_restart_structures | ( | int | n_structures | ) |
Set number of structures used for volume SEM when restarting from another turbulence model.
By default, a restart file is read if present, and a checkpoint written. If not read, synthetic fluctuations are re-initialized.
[in] | n_structures | number of structures for initialization |
void cs_user_les_inflow_advanced | ( | const cs_zone_t * | zone, |
cs_real_3_t | vel_l[], | ||
cs_real_6_t | rij_l[], | ||
cs_real_t | eps_l[] | ||
) |
Definition of mean velocity, Reynolds stresses and dissipation rate for each boundary face of the given synthetic turbulence inlet.
Accurate definition of mean velocity, Reynolds stresses and dissipation rate for each boundary face of the given synthetic turbulence inlet
Rij components are ordered as usual: XX, YY, ZZ, XY, YZ, XZ
Arrays are pre-initialized before this function is called (see cs_user_les_inflow_define).
vel_l[face_id][coo_id] = vel_r[coo_id]
rij_l[face_id][0] = 2./3. * k_l rij_l[face_id][1] = 2./3. * k_l rij_l[face_id][2] = 2./3. * k_l rij_l[face_id][3] = 0 rij_l[face_id][4] = 0 rij_l[face_id][5] = 0
eps_l[face_id] = eps_r
[in] | zone | pointer to associated boundary zone |
[in,out] | vel_l | velocity a zone faces |
[in,out] | rij_l | reynods stresses at zone faces |
[in,out] | eps_l | reference turbulent dissipation |
void cs_user_les_inflow_define | ( | void | ) |
Define parameters of synthetic turbulence at LES inflow.
void cs_user_les_inflow_update | ( | const cs_zone_t * | zone, |
cs_real_t | vel_r[3], | ||
cs_real_t * | k_r, | ||
cs_real_t * | eps_r | ||
) |
Update of the characteristics of a given synthetic turbulence inlet.
[in] | zone | pointer to associated boundary zone |
[out] | vel_r | reference mean velocity |
[out] | k_r | reference turbulent kinetic energy |
[out] | eps_r | reference turbulent dissipation |