Numerical simulations of the critical diameter and flame stability for hydrogen flames