We use numerical library DEAL.II and Discontinuous Galerkin FEM to model MHD processes in stallar atmospheres, notably behaviour of MHD turbulence in a stratified atmosphere.