A detailed numerical investigation of thermocapillary effects during the melting of phase-change materials in microgravity is presented. The phase-change transition is analysed for the high-Prandtl-number material n-octadecane, which is enclosed in a two-dimensional rectangular container subjected to isothermal conditions along the lateral walls. The progression of the solid/liquid front during the melting leaves a free surface, where the thermocapillary effect acts driving convection in the liquid phase. The nature of the flow found during the melting depends on the container aspect ratio,
$\varGamma$, and on the Marangoni number,
$Ma$. For large
$\varGamma$, this flow initially adopts a steady return flow structure characterised by a single large vortex, which splits into a series of smaller vortices to create a steady multicellular structure (SMC) with increasing
$Ma$. At larger values of
$Ma$, this SMC undergoes a transition to oscillatory flow through the appearance of a hydrothermal travelling wave (HTW), characterised by the creation of travelling vortices near the cold boundary. For small
$\varGamma$, the thermocapillary flow at small to moderate
$Ma$ is characterised by an SMC that develops initially within a thin layer near the free surface. At larger times, the SMC evolves into a large-scale steady vortical structure. With increasing applied
$Ma$, a complex oscillatory mode is observed. This state, referred to as an oscillatory standing wave (OSW), is characterised by the pulsation of the vortical structure. Finally, for an intermediate
$\varGamma$ both HTW and OSW modes can be found depending on
$Ma$.