Modern computers allow solutions of the radiative transfer problem at
a large number of frequencies during the iterative process of computin
g a detailed line-blanketed hydrostatic model atmosphere. However, the
computing time increases approximately linearly with the number of fr
equency points. For computationally more complex and time-consuming pr
oblems, such as dust driven winds or pulsating AGB stars, it is theref
ore often not feasible to solve the radiative transfer problem for mor
e than a single (i.e. mean or constant opacity) or a very modest numbe
r of frequencies. This paper analyzes how to optimize the selection of
frequency points in particular when solving the radiative transfer pr
oblem at a very small number of points. We compute opacity sampled hyd
rostatic model atmospheres based on a large number of opacity sampling
frequency points (of the order of 10.000), and successively reduce th
e number of frequencies in order to quantify the statistical error in
the model structure introduced by a too coarse sampling. The results a
re compared to hydrostatic model atmospheres obtained by using other o
pacity approximations (Rosseland mean, straight means, constant opacit
y). We conclude that a considerable improvement in the accuracy of the
model structure over such approximations can be achieved with a very
modest number (20 - 50) of sampling frequencies, and give recommendati
ons on how to choose the frequencies optimally.