Simulation of the Bulk Modulus of Porous Media