The Method of Characteristics Applied to Oil Displacement by Foam