Hot massive stars present strong stellar winds that are driven by absorption, scattering and re-emission of photons by the ions of the atmosphere (textit{line-driven winds}). A better comprehension of this phenomenon, and a more accurate calculation of hydrodynamics and radiative acceleration is required to reduce the number of free parameters in spectral fitting, to determine accurate wind parameters such as mass-loss rates and velocity profiles. We use the non-LTE model-atmosphere code CMFGEN to numerically solve the radiative transfer equation in the stellar atmosphere and to calculate the radiative acceleration $g_text{rad}(r)$. Under the assumption that the radiative acceleration depends only on the radial coordinate, we solve analytically the equation of motion by means of the Lambert $W$-function. An iterative procedure between the solution of the radiative transfer and the equation of motion is executed in order to obtain a final self-consistent velocity field that is no longer based on any $beta$-law. We apply the Lambert-procedure to three O supergiant stars ($zeta$-Puppis, HD~165763 and $alpha$-Cam) and discuss the Lambert-solutions for the velocity profiles. It is found that, even without recalculation of the mass-loss rate, the Lambert-procedure allows the calculation of consistent velocity profiles that reduce the number of free parameters when a spectral fitting using CMFGEN is performed. Synthetic spectra calculated from our Lambert-solutions show significant differences compared to the initial $beta$-law CMFGEN models. The results indicate the importance of consistent velocity profile calculation in the CMFGEN code and its usage in a fitting procedure and interpretation of observed spectra.