Code_Saturne:2.0.3, about filtered velocity for LES

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
youngzxlove

Code_Saturne:2.0.3, about filtered velocity for LES

Post by youngzxlove »

Hello,
I use Code_Saturne 2.0.3
I wish to use a subgrid model other than the given ones (dyanmic Smagorinsky model, DSM). The velocity and strain rate tensor with a test-filter is needed to perform my model. However, I cannot find the infomation about how to do a test-filter on a field in the user manual.

My question is if there is a subroutine which can be called to do a test-filter? Otherwise, how could I obtain a test-filtered field?

Regards,
Young
BLM
Posts: 11
Joined: Thu Oct 11, 2012 9:14 am

Re: Code_Saturne:2.0.3, about filtered velocity for LES

Post by BLM »

Hi Young,

If you want to perform a test-filtering of your field, you can use the 'cfiltr' subroutine. Exemples of usage of this subroutine are in the visdyn.f90 source file which computes the subgrid viscosity for the DSM.

The 'cfiltr' subroutine performs a (volume weighted) averaging of the field on the neighborhood of each cells. To do so, it is preferable to activate the extended neighborhood : neighbor cells are thus all cells sharing a vertex with the considered cell (by default, only the cells sharing a internal face are taken into account).
The extended neighborhood is automatically activated when imrgra = 2 or 3 or iturb = 41 (DSM). Thus, if you want to compute a subgrid viscosity which need a test-filtering on the extended neighborhood, I recommend you to overwrite the visdyn.f90 subroutine and select iturb = 41.

Best regards,
Benoît
Post Reply