Page 1 of 1

Modifying the turbulent viscosity in k-epsilon models

Posted: Sun Jan 02, 2022 2:36 pm
by kkumar20
Hello,

I need to make a light modification to the prescription for turbulent viscosity in the k-epsilon model. The new formula should be used for the calculation of total viscosity in Navier-Stokes and k-epsilon in every time step. It is just a minor change to the existing formula; However, I am not able to find where in the code I can accomplish the task.. I am using version 7.0.

Interestingly enough, in version 7.1 I find the function:

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)

which modifies the turbulent viscosity, mu_t and the total viscosity, mu_t_tot.

Can anyone point me to the right code snippet in version 7.0 please? Thanks,

-Kumar

Re: Modifying the turbulent viscosity in k-epsilon models

Posted: Sun Jan 02, 2022 2:38 pm
by kkumar20
Just forgot to add that the above function cs_turb_update_k_eps(....) is in the file src/cdo/cs_cdo_turbulence.c

Re: Modifying the turbulent viscosity in k-epsilon models

Posted: Mon Jan 03, 2022 12:51 pm
by Yvan Fournier
Hello,

The CDO algorithms are work in progress, and the turbulence part might not yet be finished.

In the "legacy" part of the code, you have a "usvist" subroutine in the cs_user_physical_properties.f90 user source file, which you can use for this (it does not sem there is a C function for this yet, so we will need to add one also).

Best regards,

Yvan

Re: Modifying the turbulent viscosity in k-epsilon models

Posted: Mon Jan 03, 2022 2:28 pm
by kkumar20
Thanks very much Yvan! This is enough for me now.