  As the amount of asteroseismic data available continues to grow, the
inability to accurately model observed oscillation frequencies is becoming a
critical problem for interpreting these frequencies. A major component of this
problem is the modeling of the near-surface layers. Our aim is to develop a
method to estimate the effect of the near-surface layers on oscillation
frequencies. In the proposed method we numerically estimate eigenfunctions in
3D hydrodynamic simulations. We match those to the eigenfunctions calculated
from the classic equations applied to the horizontal averages of the structure
variables. We use this procedure to calculate the frequency perturbation
resulting from the dynamical part of the interaction of the oscillations with
near-surface convection. As the last step we scale the numbers to the Sun. To
provide a qualitative test of our method we performed a series of simulations,
calculated the perturbations using our procedure, and compared them to
previously reported residuals relative to solar models. We find that we can
largely reproduce the observed frequency residuals without resorting to poorly
justified theoretical models. We find that, while the calculations of Houdek et
al. (2017, MNRAS, 464, L124) produce similar frequency perturbations, the
density-pressure phase differences computed here do not match those of that
work.
