Preparation of graphitic carbon foam using size-restriction method under atmospheric pressure