Abstract We present chemical models of the envelope of a young stellar
object (YSO) exposed to a central X-ray source. The models are applied to the
massive star-forming region AFGL 2591 for different X-ray fluxes. Model
results for this region show that the X-ray ionization rate with and without
the effects of Compton scattering differs by only a few percent and the influence
of Compton scattering on the chemistry is negligible. The total X-ray
ionization rate is dominated by the "secondary" ionization rate of H2
resulting from fast electrons. The abundance profiles of several molecular and
atomic species are shown to depend on the X-ray luminosity and on the
distance from the source. The carbon, sulphur and nitrogen chemistries are
discussed. It is found that He+ and H3+ are enhanced and trigger a
peculiar chemistry. Several molecular X-ray tracers are found and compared to
tracers of the far ultraviolet (FUV) field. Like ultraviolet radiation fields,
X-rays enhance simple hydrides, ions and radicals. In contrast to ultraviolet
photons, X-rays can penetrate deep into the envelope and affect the chemistry
even at large distances from the source. Whereas the FUV enhanced species cover
a region of 200-300 AU, the region enhanced by X-rays is
1000 AU. We find that N2O, HNO, SO, SO+, HCO+, CO+,
OH+, N2H+, SH+ and HSO+ (among others) are more enhanced by
X-rays than by FUV photons even for X-ray luminosities as low as
erg s-1. CO2 abundances are reduced in the
gas-phase through X-ray induced FUV photons. For temperatures
K, H2O is destroyed by X-rays with luminosities
erg s-1. Best-fit models for AFGL 2591 predict an
X-ray luminosity
erg s-1 with a hard
X-ray spectrum
K. This is the first time
that the X-ray flux of a highly obscured source has been estimated by its
envelope chemistry. Furthermore, we find
. The chemistry of the bulk of the envelope mass is dominated
by cosmic-ray induced reactions rather than by X-ray induced ionization for
X-ray luminosities
erg s-1. The
calculated line intensities of HCO+ and HCS+ show that high-J lines are
more affected than lower J lines by the presence of X-rays due to their
higher critical densities, and that such differences are detectable even with
large aperture single-dish telescopes. Future instruments such as Herschel-HIFI
or SOFIA will be able to observe X-ray enhanced hydrides whereas the
sensitivity and spatial resolution of ALMA is well-suited to measure the size
and geometry of the region affected by X-rays.