The paper deals with the convergence problem of the SPH (Smoothed Particle Hydrodynamics) meshfree method for the solution of fluid dynamics tasks. In the introductory part, fundamental aspects of meshfree methods, their definition, computational approaches and classification are discussed. In the following part, the methods of local integral representation, where SPH belongs are analyzed and specifically the method RKPM (Reproducing Kernel Particle Method) is described. In the contribution, also the influence of boundary conditions on the SPH approximation consistence is analyzed, which has a direct impact on the convergence of the method. A classical boundary condition in the form of virtual particles does not ensure a sufficient order of consistence near the boundary of the definition domain of the task. This problem is solved by using ghost particles as a boundary condition, which was implemented into the SPH code as part of this work. Further, several numerical aspects linked with the SPH method are described. In the concluding part, results are presented of the application of the SPH method with ghost particles to the 2D shock tube example. Also results of tests of several parameters and modifications of the SPH code are shown.