Numerical simulation of free-surface thermally influenced flows for nonhomogeneous fluids