Additional right_hand side source terms for turbulence models
Turbulence source terms may be modified using the cs_user_source_terms user-defined function.
Local variables
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
cs_mesh_quantities_t * cs_glob_mesh_quantities
double precision, dimension(:), pointer cell_f_vol
fluid volume of each cell
Definition: mesh.f90:156
cs_real_t * cell_vol
Definition: cs_mesh_quantities.h:97
cs_lnum_t n_cells
Definition: cs_mesh.h:97
Remaining initialization
Get the density array in cpro_rom
@ rho
Definition: cs_field_pointer.h:97
#define CS_F_(e)
Macro used to return a field pointer by its enumerated value.
Definition: cs_field_pointer.h:51
Get the array of the current turbulent variable and its name
cs_field_t * cs_field_by_id(int id)
Return a pointer to a field based on its id.
Definition: cs_field.c:2316
const cs_equation_param_t * cs_field_get_equation_param_const(const cs_field_t *f)
Access a field's equation parameters for read only.
Definition: cs_field_default.c:312
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:192
Field descriptor.
Definition: cs_field.h:130
Example
Example of arbitrary additional source term for turbulence models (Source term on the TKE "k" here).
Source term for
with
= 3.0
an
= 4.0
Body
- Note
- The turbulence variable names are:
- 'k' and 'epsilon' for the k-epsilon models
- 'rij' and 'epsilon' for the Rij-epsilon LRR and S SG
- 'rij', 'epsilon' and 'alpha' for the EBRSM
- 'k', 'epsilon', 'phi' and 'f_bar' for the phi-model
- 'k', 'epsilon', 'phi' and 'alpha' for the Bl-v2-k model
- 'k' and 'omega' for the k-omega turbulence model
- 'nu_tilda' for the Spalart Allmaras model
Calculation of the explicit and implicit source terms
bft_printf(
" User source terms for turbulence variable %s\n",
}
}
int bft_printf(const char *const format,...)
Replacement for printf() with modifiable behavior.
Definition: bft_printf.c:140
const char * cs_field_get_label(const cs_field_t *f)
Return a label associated with a field.
Definition: cs_field.c:4365
@ k
Definition: cs_field_pointer.h:70
double precision, dimension(nmaxfm), save ff
Definition: coincl.f90:86
int verbosity
Definition: cs_equation_param.h:212