# Turbulence viscosity SPS

Dear all,

I am trying to modify the DSPH code implementing a Dynamic Smagorinsky viscosity model.

I see in the literature that the kernel function serves as a grid filter. At the standard Smagorinsky model

in the DSPH code I see:

const float pow1=gradvel.xx*gradvel.xx + gradvel.yy*gradvel.yy + gradvel.zz*gradvel.zz;

const float prr=pow1+pow1 + gradvel.xy*gradvel.xy + gradvel.xz*gradvel.xz + gradvel.yz*gradvel.yz;

Where is the influence of the kernel function in this? When I search definition for the gradvel.* I do not find the influence of the kernel.

And I need this, to take an influence of 2h for the test filter.

Any help would be appreciated.