  Using radiation magnetohydrodynamic simulations of the solar atmospheric
layers from the upper convection zone to the lower corona, we investigate the
self-consistent excitation of slow magneto-acoustic body waves (slow modes) in
a magnetic flux concentration. We find that the convective downdrafts in the
close surroundings of a two-dimensional flux slab "pump" the plasma inside it
in the downward direction. This action produces a downflow inside the flux
slab, which encompasses ever higher layers, causing an upwardly propagating
rarefaction wave. The slow mode, excited by the adiabatic compression of the
downflow near the optical surface, travels along the magnetic field in the
upward direction at the tube speed. It develops into a shock wave at
chromospheric heights, where it dissipates, lifts the transition region, and
produces an offspring in the form of a compressive wave that propagates further
into the corona. In the wake of downflows and propagating shock waves, the
atmosphere inside the flux slab in the chromosphere and higher tends to
oscillate with a period of $\nu\approx 4$~mHz. We conclude that this process of
"magnetic pumping" is a most plausible mechanism for the direct generation of
longitudinal chromospheric and coronal compressive waves within magnetic flux
concentrations, and it may provide an important heat source in the
chromosphere. It may also be responsible for certain types of dynamic fibrils.
