The Flow of Foam Through Porous Media