We investigate compaction due to tapping in two-dimensional granular columns computationally with the discrete element method (DEM) in two dimensions. We compare the compaction in dry granulates with the compaction of the system immersed in a viscous fluid. We use polygons as particle shapes, so that the resulting pore-space can be triangulated for a finite element method (FEM) for an incompressible fluid. We investigate the competition between a slowing-down of the dynamics due to the viscous forces of the fluid and the improved transmission of the tapping pulses through the fluid in the pore space. For the system immersed in water, the propagation of the shocks due to the tapping of the floor is faster than in the corresponding dry system. The center of mass of a nearly square system drops faster for the dry case than for immersed particles. For a system twice as high and half as wide, for the same vibration, for the dry system, the center of mass rises, while for the immersed particles there is hardly any change.