anisotropic turbulent eddy viscosity

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
vshinde
Posts: 31
Joined: Fri Jan 04, 2013 9:36 am

anisotropic turbulent eddy viscosity

Post by vshinde »

Dear CS team,

I was wondering about the way to incorporate the turbulent eddy viscosity in the vector form into the laminar solver of CS. For the moment, I compute its norm and provide it as an isotropic value to cpro_visct(iel) array. Please suggest.

Many thanks in advance for your time.

Vilas
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: anisotropic turbulent eddy viscosity

Post by Martin FERRAND »

Hello,
At least for the term "mu_T grad u" you can have an idea of how to do so by greping iporos.eq.2 in the code. Unfortunately the brick to code "mu_T transpose(grad u)" does not exist yet for a tensor mu_T, even if it is not that difficult to adapt it from the scalar brick. It might be something doable in 4.3 version.
I hope it helps,
Best regards,
Martin
vshinde
Posts: 31
Joined: Fri Jan 04, 2013 9:36 am

Re: anisotropic turbulent eddy viscosity

Post by vshinde »

Dear Martin,
Thanks for the suggestion.
Mean while I was thinking to make changes in cfdivs.f90. I am not sure yet. Any thoughts? warnings ? :?
Thanks a lot for your time.

Vilas
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: anisotropic turbulent eddy viscosity

Post by Martin FERRAND »

Hello,
Which version do you use? Cfdivs is used only for the compressible module to add explicitly div(sigma.u) in the total energy equation. Which equation would you like to solve?
If you want to solve momentum, look at predvv.f90, and the convection diffusion step is done in cs_convection_diffusion.c.
Best regards
vshinde
Posts: 31
Joined: Fri Jan 04, 2013 9:36 am

Re: anisotropic turbulent eddy viscosity

Post by vshinde »

Hello Martin,
I use the latest version, CS 4.1.1. Thanks for the info on cfdivs. I like to modify the viscous diffusion term of the momentum in an incompressible formulation for now, by simply adding the three components of turbulent viscosity to the molecular viscosity.

Many thanks,
Vilas
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: anisotropic turbulent eddy viscosity

Post by Martin FERRAND »

Hello,
Do you want to add "div(R)" explicitly (if yes the routine divrij already do that) or do you have a constitutive law stating "R =-2 nu Grad u +..." With nu a tensor (if yes you can use directly bilscv subroutine and specify the option on the variable "idften(ivar)=6". If you want to do something else please tell me.
Cheers
Martin
vshinde
Posts: 31
Joined: Fri Jan 04, 2013 9:36 am

Re: anisotropic turbulent eddy viscosity

Post by vshinde »

Hello Martin,
Thanks for the possibilities you suggested. Actually, I externally compute mu_T(1), mu_T(2) and mu_T(3) for the three components of velocity respectively. Now instead of assigning the value of norm(mu_T) to the cpro_visct(iel) array, I prefer to use each component of mu_T for the respective velocity components. Something like Large Eddy Simulations but in anisotropic way, hence not concerned with the Reynolds stress tensor R or any transport equations for the turbulence scales.

Sorry if I am not clear enough. Many thanks !

Vilas
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: anisotropic turbulent eddy viscosity

Post by Martin FERRAND »

Hello Vilas,
Ok now I understand what you try to do. You can already do that specifying idften(iu)=6 in cs_user_parameters.f90 (let say in usipsu subroutine), and by computing your mu_T in phyvar (see in src/base). Then mu_T is a 6*ncelet array (the components are [mu_T(11), mu_T(22), mu_T(33), mu_T(12), mu_T(23), mu_T(13)]).
So if you specify the 12, 23 and 13 components to be 0, it will do what you want.
By the way, your model is not reference frame invariant if you use an orthotropic diffusion...
Cheers
Martin
vshinde
Posts: 31
Joined: Fri Jan 04, 2013 9:36 am

Re: anisotropic turbulent eddy viscosity

Post by vshinde »

Hello Martin,

Thanks for your suggestions there.
Recently, I have been trying to implement what you had suggested. I ran some simple tests, for implementation of tensorial subgrid turbulent viscosity by defining idften(iu)=6. The results (velocity, pressure) show quite a lot differences between simulations with and without this parameter. The simulations were run for zero subgrid turbulent viscosity.

So, is there anything else that I should take care of, in addition to just setting idften(iu)=6?

Many many thanks in advance for your time.

Vilas
Post Reply