Page 1 of 1
LES: SGS Viscosity at previous timestep
Posted: Thu Feb 18, 2016 8:07 pm
by philippks
Hi,
I would like to retrieve the SGS viscosity from the previous timestep in LES mode. The variable ivista doesn't seem to be calculated in LES, and field_get_val_prev_s is also not working for ivisct. Do you have any hint how to solve my problem?
Many thanks in advance.
Re: LES: SGS Viscosity at previous timestep
Posted: Thu Feb 18, 2016 9:39 pm
by Yvan Fournier
Hello,
Could you provide the recommened usage info (i.e. at least the version you're using) ?
Yes, in src/base/varpos.f90 (in the code sources), you'll find:
Code: Select all
if (iviext.gt.0) then
nproce = nproce + 1
ivisla = nproce
call field_set_n_previous(iprpfl(iviscl), 1)
nproce = nproce + 1
ivista = nproce
call field_set_n_previous(iprpfl(ivisct), 1)
endif
Removing the test on iviext should do the trick.
For user code, the cleanest solution would be to add:
Code: Select all
nproce = nproce + 1
ivisla = nproce
call field_set_n_previous(iprpfl(iviscl), 1)
nproce = nproce + 1
ivista = nproce
call field_set_n_previous(iprpfl(ivisct), 1)
In you user subroutines, in a case's SRC/cs_user_parameters.f90 in the usipsu subroutine. If this fails, modifying varpos.f90 should work.
Regards,
Yvan
Re: LES: SGS Viscosity at previous timestep
Posted: Thu Feb 18, 2016 10:30 pm
by philippks
Hi Yvan,
Many thanks for your fast reply! My CS version is 4.0.4. Both methods work, however, it seems that in LES mode, ivisla and ivista are not created somewhere else in the source code. (I grepped for ivista and only found it for RANS turbulence models.) Thus, I only used the parts
Code: Select all
call field_set_n_previous(iprpfl(iviscl), 1)
call field_set_n_previous(iprpfl(ivisct), 1)
Thanks again,
Philipp