  Context. Realistic 3D time-dependent simulations of stellar near-surface
convection employ the opacity binning method for efficient and accurate
computation of the radiative energy exchange. The method provides several
orders of magnitude of speed-up, but its implementation includes a number of
free parameters. Aims. Our aim is to evaluate the accuracy of the opacity
binning method as a function of the choice of these free parameters. Methods.
The monochromatic opacities computed with the SYNSPEC code are used to
construct opacity distribution function (ODF) that is then verified through
detailed comparison with the results of the ATLAS code. The opacity binning
method is implemented with the SYNSPEC opacities for four representative cool
main-sequence stellar spectral types (F3V, G2V, K0V, and M2V). Results. The
ODFs from SYNSPEC and ATLAS show consistent results for the opacity and
bolometric radiative energy exchange rate Q in case of the F, G, and K -- type
stars. Significant differences, coming mainly from the molecular line lists,
are found for the M -- type star. It is possible to optimise a small number of
bins to reduce the deviation of the results coming from the opacity grouping
with respect to the ODF for the F, G, and K -- type stars. In the case of the M
-- type star, the inclusion of splitting in wavelength is needed in the
grouping to get similar results, with a subsequent increase in computing time.
In the limit of a large number of bins, the deviation for all the binning
configurations tested saturates and the results do not converge to the ODF
solution. Due to this saturation, the Q rate cannot be improved by increasing
the number of bins to more than about 20 bins. The more effective strategy is
to select the optimal location of fewer bins.
