Theory of pore formation in glass under tensile stress: Generalized Gibbs approach