Generalized entering coefficients: a criterion for foam stability against oil in porous media | Synapse