Air guns are widely used as artificial seismic sources in the exploration of seabed resources. The pressure wave emitted from an air gun reflects from different seabed media, and the reflected wave carries basic information about the seabed structure, which is useful for determining the location and burial depth of resources. This paper presents a compressible air gun bubble model implemented in OpenFOAM and considers the influence of the gun body structure. The bubble pulsation of air guns under different boundary conditions is investigated using the finite volume method (FVM) combined with the volume of fluid method (VOF). We analyze how the opening height, opening position, and air gun length affect fluid pressure. The results show that, when the opening position is below the middle of the air gun, the primary pulse decreases due to a decrease in the mass-transfer rate, and the weakened boundary effect reduces the period and bubble pulse of the pressure wave. Increasing the opening height of the air gun increases the main pulse and bubble pulse, which facilitates the gas motion from the chamber of the air gun to the bubble. When the maximum radius Rm of the bubble is shorter than the length L of the gun body, the gun body has negligible influence on the pressure wave, but in the opposite case, the breakup of the bubble consumes part of the energy, which slightly decreases the bubble pulse.