Most seismic imaging applications still consider the subsurface as a perfect acoustic or elastic medium, ignoring the viscosity of rocky materials. That viscosity converts part of the mechanical energy of seismic waves into heat, affecting the amplitude and phase of the wavefield when propagating through the physical medium. In this work, we derive, implement and analyze a set of forward and adjoint viscoacoustic equations based on the Maxwell, Kelvin-Voigt (KV), and standard linear solid (SLS) rheological models. These equations are described in the time–space domain allowing us to solve with the finite difference method. For this implementation, we used Devito - a domain-specific language (DSL) and code generation framework to design highly optimized finite difference kernels for use in inversion methods. We analyzed the attenuating behavior, comparing each equation’s dissipation and dispersion effects in these models, both forward modeling equations through comparisons between snapshots, seismograms, and traces, and adjoint equations through RTM images.