Unconstrained melting and solidification inside rectangular enclosure