Based on poroelasticity analysis, we developed a new concept of frequency-dependent dynamic fluid modulus (DFM) to understand the velocity dispersion and wave attenuation due to wave-induced fluid flow. Conventional applications of Gassmann’s equation require a complete homogeneity inside the porous media (or equivalently, at zero frequency) and closed boundary condition. We first analyzed the fluid effect on the bulk modulus in homogeneous porous media with a nonclosed condition. The partial drainage of pore fluid causes additional pore volume change under applied stress. An incoming fluid flow stiffens the porous system, and an outgoing flow softens it. Such a phenomenon can still be effectively formulated as a closed system with Gassmann’s equation, by introducing a DFM, which adds a flow term into the original fluid modulus. We further proved that in heterogeneous porous media, the wave-induced internal fluid flow caused additional bulk volume deformation. It equals the amount of the fluid flow from a soft phase to a stiff phase times the difference of Skempton coefficients between the two phases. Again, with a frequency-dependent complex number DFM, the use of Gassmann’s equation can be extended into heterogeneous porous media at nonzero frequencies to fully characterize its viscoelastic behavior on rock’s bulk modulus. We evaluated three examples to show how to model the P-wave attenuation and velocity dispersion in porous media due to microscopic and mesoscopic scale heterogeneities, as well as in the presence of multiple sets of heterogeneities. Finally, we demonstrated that the DFM can be conveniently and deterministically inverted from the measured lab data. The inverted results can be used to identify the possible mechanisms behind the observed wave attenuation and velocity dispersion, and they were good indicators of the degree and distribution of heterogeneities inside the rocks.