Modifying the turbulent viscosity in k-epsilon models

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
kkumar20
Posts: 12
Joined: Fri Jun 12, 2020 12:03 pm

Modifying the turbulent viscosity in k-epsilon models

Post 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
kkumar20
Posts: 12
Joined: Fri Jun 12, 2020 12:03 pm

Re: Modifying the turbulent viscosity in k-epsilon models

Post 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
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Modifying the turbulent viscosity in k-epsilon models

Post 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
kkumar20
Posts: 12
Joined: Fri Jun 12, 2020 12:03 pm

Re: Modifying the turbulent viscosity in k-epsilon models

Post by kkumar20 »

Thanks very much Yvan! This is enough for me now.
Post Reply