3D Finite element simulation of a material accumulation process including phase transitions and a capillary surface