  The ultraviolet (UV) bright accretion disc in active galactic nuclei (AGN)
should give rise to line driving, producing a powerful wind which may play an
important role in AGN feedback as well as in producing structures like the
broad line region. However, coupled radiation-hydrodynamics codes are complex
and expensive, so we calculate the winds instead using a non-hydrodynamical
approach (the Qwind framework). The original Qwind model assumed the initial
conditions in the wind, and had only simple radiation transport. Here, we
present an improved version which derives the wind initial conditions and has
significantly improved ray-tracing to calculate the wind absorption self
consistently given the extended nature of the UV emission. We also correct the
radiation flux for relativistic effects, and assess the impact of this on the
wind velocity. These changes mean the model is more physical, so its
predictions are more robust. We find that, even when accounting for
relativistic effects, winds can regularly achieve velocities $\simeq$ (0.1-0.5)
$c$, and carry mass loss rates which can be up to 30% of the accreted mass for
black hole masses of $10^{7-9}$ $\mathrm{M}_\odot$, and mass accretion rates of
50% of the Eddington rate. Overall, the wind power scales as a power law with
the black hole mass accretion rate, unlike the weaker scaling generally assumed
in current cosmological simulations that include AGN feedback. The updated
code, Qwind3, is publicly available in GitHub
