Thermodynamically-consistent phase-field models for solidification