A Mechanistic Foam Simulator Incorporating Systematic Dependencies of Various Foam Properties on Permeability