We discuss the results of our studies of the dynamics and structure of extended envelopes of hot Jupiters. For calculations we used 3D numerical model, based on the approximation of multicomponent magnetohydrodynamics and allowing calculate the super-Alfven, sub-Alfven, and trans-Alfven regimes of the stellar wind flow around the planet. The main attention in the work is paid to aspects of further development and testing of the model. Thus, the analysis of the calculation results taking into account magnetic viscosity showed that at short times of the order of the orbital period, the effects of magnetic field diffusion are insignificant and can be excluded from the calculations of fast-flowing processes associated with the impact of coronal mass ejections on the envelope. To take into account the processes occurring in the inner parts of the atmosphere, a modification of the code for the case of a spherical mesh was carried out, and 1D aeronomic model was developed. This provides a more correct specification of the initial and boundary conditions in the upper atmosphere of hot Jupiter and opens up new possibilities for obtaining a self-consistent solution that includes both the inner atmosphere and the exoplanet's envelope. In general, the developed tools create a good basis for interpreting observations of the planned space mission "Spektr-UF/WSO-UV" and, in the long term, will allow determining the parameters of the stellar wind and coronal mass ejections from the host stars of these exoplanets.