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
Remaining initialization
Get the density array in cpro_rom
Get the array of the current turbulent variable and its name
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",
st_exp[i] = -cpro_rom[i] * cell_f_vol[i] *
ff;
st_imp[i] = -cpro_rom[i] * cell_f_vol[i] / tau;
}
}