  A simple procedure to approximate the noncommutation terms that arise
whenever it is necessary to use a variable scale filtering of the motion
equations and to compensate directly the flow solutions from the commutation
error is here presented. Such a situation usually concerns large eddy
simulation of nonhomogeneous turbulent flows. The noncommutation of the average
and differentiation operations leads to nonhomogeneous terms in the motion
equations, that act as source terms of intensity which depend on the gradient
of the filter scale and which, if neglected, induce a systematic error
throughout the solution. Here the different noncommutation terms of the motion
equation are determined as functions of the \delta-gradient and of the
\delta-derivatives of the filtered variables. It is shown here that
approximated noncommutation terms of the fourth order of accuracy, with respect
to the filtering scale, can be obtained using series expansions in the filter
width of approximations based on finite differences and introducing successive
levels of filtering, which makes it suitable to use in conjunction with dynamic
or mixed subgrid models. The procedure operates in a way which is independent
of the type of filter in use and without increasing the differential order of
the equations, which, on the contrary, would require additional boundary
conditions. It is not necessary to introduce a mapping function of the
nonuniform grid in the physical domain into a uniform grid in an infinite
domain. A priori}tests on the turbulent channel flow (Re_\tau=180 and 590)
highlight the approximation capability of the present procedure. A numerical
example is given, which draws attention to the nonlocal effects on the solution
due to the lack of noncommutation terms in the motion equation and to the
efficiency of the present procedure in reducing the commutation error on the
solution.
