One of the first tasks while designing pistons is to ensure the reliable engine operation with minimal friction losses. This is possible by ensuring the liquid friction in the piston-cylinder junction during the entire operating cycle. Therefore, it is important to assess the nature of friction in the piston-cylinder conjunction. This task can be broken down into a number of interrelated subtasks: determining the characteristics of the piston lateral movement, determining the piston deformations under thermal and mechanical loads, and calculating the hydrodynamic forces acting from the side of the oil layer in the conjunction. The use of software packages that solve these problems separately and their inclusion in the iterative process will lead to huge expenditures of computing time and is difficult to implement in carrying out design optimization problems. The authors have developed a mathematical model for the joint solution of the above problems, and carried out computational studies based on program codes developed by the authors. The main focus of this work is on solving the elastic-hydrodynamic problem. The solving of the Reynolds equation in a two-dimensional formulation, taking into account the change in the thickness of the oil layer from deformations caused by the effect of hydrodynamic pressures, after finite-difference approximation is reduced to solving a system of nonlinear equations by Newton's method. The effect of a change in the viscosity of the lubricant in the conjunction is taken into account. In the event of a contact between the piston and the cylinder, the contact area is excluded from consideration while determining the hydrodynamic pressure. In the contact area, a system of linear equations is solved that describes the elastic deformations of the piston. The influence of the finite-difference mesh size on the accuracy of the results is estimated. An important element in the effective implementation of the model was the specification of the compliance matrix only for the nodes of the friction surface of the skirt that coincide with the nodes of the finite-difference mesh, which can be obtained from the volumetric model of the piston structure, implemented using a software package. The developed mathematical model makes it possible to investigate the effect on the hydrodynamic friction characteristics and the dynamics of piston movement of the main parameters characterizing the design of the crank mechanism parts, the profile of the piston skirt, the mounting gap, the viscosity-temperature properties of the engine oil, and the engine operating modes. The results were obtained for a two-piece piston with a diameter of 130 mm. The study of the influence of the two-piece piston skirt profile on the hydrodynamic characteristics and lateral movement of the piston is carried out, the results for the investigated structure and recommendations for profiling are presented.