A phase transition model with the entropy balance