Modeling gas-solid phase transition