Background: The actual problem for calculating a shape of free surface of the melt when analyzing the processes of wire-based electron-beam surfacing on the substrate, being introduced into additive manufacturing, is the development of adequate mathematical models of heat and mass transfer. The paper proposed a formulation of the problem of melt motion in the framework of the Lagrangian description. The mathematical statement includes the balance equations for mass, momentum and energy, and physical equations for describing heat and mass transfer. Methods: The smoothed particle hydrodynamics method was used for numerical simulation of the process of wirebased electron-beam surfacing on the substrate made from same materials (titanium or steel). A finite-difference analog of the equations is given and the algorithm for solving the problem is implemented. To integrate the discretized equations Verlet method was utilized. Algorithms are implemented in the open software package LAMMPS. Results: The numerical simulation results allow the estimation of non-stationary volume temperature distributions, melt flow velocities and pressures, and characteristics of process. Conclusion: The possibility of applying the developed mathematical model to describe additive production is shown. The comparison of numerical calculations with experimental studies showed good agreement.