Constraining the accretion flow density profile near Sgr A* using the $L'$-band emission of the S2 star

The density profile of the ambient medium around a supermassive black hole plays an important role in understanding the inflow-outflow mechanisms in the Galactic Centre. We constrain the spherical density profile using the stellar bow shock of the star S2 which orbits the supermassive black hole at the Galactic Centre with the pericentre distance of 14.4 mas ($\sim$ 1500 R$_\text{s}$). Assuming an elliptical orbit, we apply celestial mechanics and the theory of bow shocks that are at ram pressure equilibrium. We analyse the measured infrared flux density and magnitudes of S2 in the L'-band (3.8 micron) obtained over seven epochs in the years between 2004-2018. We detect no significant change in S2 flux density until the recent periapse in May 2018. The intrinsic flux variability of S2 is at the level of 2 - 3%. Based on the dust-extinction model, the upper limit on the number density at the S2 periapse is $\sim$1.87$\times$10$^9$ cm$^{-3}$, which yields a density slope of at most 3.20. Using the synchrotron bow-shock emission, we obtain an ambient density of $\leq$ 1.01$\times$10$^5$ cm$^{-3}$ and a slope of $\leq$ 1.47. These values are consistent with a wide variety of media from hot accretion flows to potentially colder and denser media comparable in properties to broad-line region clouds. A standard thin disc can be, however, excluded at the distance of the S2 pericentre. Based on our sensitivity of 0.01 mag, we can distinguish between hot accretion flows and thin, cold discs, where the latter can be excluded at the scale of the S2 periapse. Future observations of stars with smaller pericentre distances in the S cluster using instruments such as METIS@ELT with a photometric sensitivity of as much as 10$^{-3}$ mag will allow to probe the Galactic Centre medium at intermediate scales at densities as low as $\sim$ 700 cm$^{-3}$ in case of non-thermal bow-shock emission.


Introduction
The Galactic Centre is a unique astrophysical setting where one can study the dynamical effects in one of the densest stellar clusters (Alexander 2005;Merritt 2013;Schödel et al. 2014) and the mutual interaction of stars, gaseous-dusty structures, the magnetic field, and the supermassive black hole (hereafter SMBH) (Genzel et al. 2010;Eckart et al. 2017). The dynamical centre traced by orbiting stars coincides with the non-thermal compact and variable radio source Sgr A* within 0.03 (Menten et al. 1997). Because of its well-constrained mass of M BH = (4.15 ± 0.13 ± 0.57) × 10 6 M (Parsa et al. 2017) based mainly on monitoring of fast-moving S stars (see also Schödel et al. 2002;Ghez et al. 2008;Gillessen et al. 2009;Boehle et al. 2016;Gillessen et al. 2017), Sgr A* is associated with the SMBH, leaving only a little space for alternative scenarios of its compact nature . Given its distance of 8.1 kpc (Eisenhauer et al. 2003;Reid et al. 2003;Gravity Collaboration et al. 2019), it is the nearest SMBH, which allows to perform high-precision astrometric and interferometric observations of Sgr A* and its immediate surroundings. In recent years, this allowed to confirm general relativistic predictions by measuring the gravitational redshift (Gravity Collaboration et al. 2018a;Do et al. 2019a) as well as the Schwarzschild precession (Gravity Collaboration et al. 2020) by monitoring the bright S2 star (also referred to as S0-2) that orbits Sgr A* with a period of 16.2 years.
Sgr A* belongs to extremely low-luminous sources, with its bolometric luminosity eight to nine orders of magnitude below its Eddington limit (Narayan et al. 1998;Yuan & Narayan 2014). Its broadband spectral energy distribution is best described by a class of radiatively inefficient accretion flows (RIAFs; Yuan et al. 2003). To better comprehend its low-luminous, diluted accretion flow, it is of a prime importance to constrain its density at large, intermediate, and eventually small spatial scales. This has been done by analysing radiative properties of its surroundings. At larger scales, the analysis of the X-ray bremsstrahlung emissivity profile of 1.3 keV plasma in the central hot bubble yielded the number density of n B ≈ 26 η −1/2 f cm −3 (with η f being Article number, page 1 of 17 arXiv:2010.00530v1 [astro-ph.GA] 1 Oct 2020 A&A proofs: manuscript no. aS2photometry the filling factor) close to the Bondi radius (Baganoff et al. 2003;Wang et al. 2013), which lies at r B ≈ 4 (T a /10 7 K) −1 ≈ 0.16 pc given the plasma temperature T a (Wang et al. 2013). The density constraints at the scale of 10-100 Schwarzschild radii (hereafter denoted as r s ) were obtained by analysing the polarised millimeter and submillimeter emission, which implies non-thermal selfabsorbed synchrotron radiation in the millimeter domain that becomes optically thin at submillimeter wavelengths (Aitken et al. 2000;Agol 2000;Bower et al. 2003). Marrone et al. (2006Marrone et al. ( , 2007 detected the Faraday rotation of the polarised submillimeter emission, based on which they constrain the accretion-rate of Sgr A* toṀ ∼ 2 × 10 −9 − 2 × 10 −7 M yr −1 that corresponds to the maximum number density of n max a < 1.4×10 7 cm −3 close to the event horizon. Generally, the hot accretion flow in the Galactic Centre is described by a power-law density profile n ∝ r −γ , where the power-law slope is typically inferred to be γ ∼ 0.5 − 1.0 (Wang et al. 2013) in agreement with the RIAF-type flows. Spherical Bondi-type flow with γ ∼ 3/2 is also consistent with the X-ray surface brightness profile up to 3" from Sgr A* (Różańska et al. 2015). Hence, the number densities of the ambient flow and the corresponding slopes are still quite uncertain, especially at intermediate spatial scales where the fast-moving S stars are located. This uncertainty was further enhanced by the possible detection of a cooler (∼ 10 4 K) and a denser disc with the number density of ∼ 10 5 − 10 6 cm −3 at the radius of ∼ 0.004 pc comparable to the semi-major axis of the bright S2 star (Murchikova et al. 2019). However, the detection by Murchikova et al. (2019) is questionable, especially the association of the recombination double-peak line of H30α at 1.3 mm with the gaseous material at milliparsec spatial scales. It is especially controversial since near-infrared line maps, e.g., of recombination Brγ line that can trace ionised material of 10 4 K, do not seem to imply any existence of such a compact disc-like structure. On the other hand, there are indications of denser material traced by Brγ line (Peißker et al. 2020b) and the blueshifted H30α line (Royster et al. 2019) at larger spatial scales closer to the Bondi radius, which the study of Murchikova et al. (2019) could be associated with. This underlines the need for better and independent constraints on the accretion-flow density at the intermediate range of radii.
The fast-moving stars of the S cluster could in principle be used to constrain the accretion flow density at intermediate scales. As fast-moving probes, they drive shocks into the ambient medium and provide radiative energy that can temporarily affect the radiative properties of the accretion flow as well as form localized density and extinction enhancements. Any detected flares linked to an orbiting star would thus provide a way to infer density and other properties of the intercepted ambient medium. Quataert & Loeb (2005) analysed the possibility that the stellar wind shocks in the central arcsecond could contribute to the ambient TeV and nonthermal broadband emission. It was predicted that the interaction of the fastmoving B-type S2 star with the ambient hot accretion flow is expected to form a bow shock, which should result in a monthlong thermal X-ray bremsstrahlung flare with the peak luminosity of L X = 4 × 10 33 erg s −1 Christie et al. 2016). The contribution to the emerging X-ray flux is also expected to come from UV and optical photons of S2 that are Compton-upscattered by electrons of the inner hot RIAF (Nayakshin 2005). According to these models, the S2 bow-shock X-ray luminosity is in principle comparable to the quiescent Xray emission of Sgr A* and hence could be detected with the current X-ray instruments. The non-detection of any significant X-ray flare around the pericentre crossings of S2 star in 2002 and 2018 is consistent with a diluted hot RIAF flow in the central arcsecond (Yuan et al. 2003). The low X-ray flux from the bow shock is also in agreement with numerical 3D adaptive mesh refinement simulations of the motion of S2 through the RIAF (Schartmann et al. 2018).
The detection and the monitoring of the dusty G2 source or the Dusty S-cluster Object (hereafter DSO; Gillessen et al. 2012;Eckart et al. 2013;Witzel et al. 2014;Ciurlo et al. 2020) triggered an effort to predict and observe its potential interaction with the ambient environment. Narayan et al. (2012) predicted the radio synchrotron emission from the DSO bow-shock to be comparable to the quiescent radio emission of Sgr A*. In theory, electrons in the ambient accretion flow are expected to be accelerated in the bow-shock region. The main sources of uncertainty are the bow-shock size, which depends on the stellar-wind characteristics and the ambient density, and the magnetic field strength that is enhanced in the bow-shock. For the more realistic estimates of the DSO/G2 bow-shock size, assuming the low-mass star model, the radio synchrotron emission was calculated to be well below the radio emission of Sgr A*, hence no detectable flare was expected (Crumley & Kumar 2013;Zajaček et al. 2016). This was observationally confirmed by the non-detection of any enhanced radio and millimeter emission in Bower et al. (2015) and Borkar et al. (2016), who constrain the DSO/G2 cross-section to < 2 × 10 29 cm 2 .
The bow-shock synchrotron emission can be generalized to the S stars, predicting their broad-band synchrotron spectrum with the peak close to 1 GHz and associated monochromatic light-curves (Ginsburg et al. 2016). Ginsburg et al. (2016) estimated that the synchrotron emission from S-star bow shocks can be comparable to the Sgr A* radio (10 GHz) and infrared flux densities (10 14 GHz) for rather extreme combinations of the wind mass-loss rate and its terminal velocity -(ṁ w , v w ) = (10 −5 M yr −1 , 10 3 km s −1 ) and (ṁ w , v w ) = (10 −6 M yr −1 , 4 × 10 3 km s −1 ). These values deviate from those inferred for S2 (Martins et al. 2008;Habibi et al. 2017): (ṁ w , v w ) = (< 3 × 10 −7 M yr −1 , 10 3 km s −1 ). For these observationally inferred values, the S star nonthermal flux densities are below those of Sgr A*. Another, independent way to constrain the density of the ambient medium is the detection of deviation from the Keplerian ellipse due to hydrodynamic drag force. Gillessen et al. (2019) claimed to detect a significant deviation for DSO/G2 object due to the drag force, from which they inferred the density of 4 × 10 3 cm −3 at the DSO/G2 pericentre close to 1000 r s .
Here we report about the near-infrared L -band emission of one of the brightest members of the S cluster -star S2. Close to its first observed pericentre passage in 2002, Clénet et al. (2004) report a brightening of S2 in L -band, which could be associated with its interaction with the ambient medium at the scale of 1500 Schwarzschild radii 1 . Based on our reanalysis of 2002 epoch and additional seven epochs, including close to the subsequent pericentre passage in 2018, we can exclude any significant brightening related to the pericentre passage of S2 in L -band. The intrinsic fractional variability of the S2 lightcurve is only ∼ 2.5%. Using the model of the thermal dust emission in the shocked ambient medium, we place an upper limit on the ambient density of 10 9 cm −3 , which can accommodate a wide variety of ambient media at the S2 pericentre distance of 1500 Schwarzschild radii, except for a standard thin cold disc. The bow-shock synchrotron model gives a tighter upper limit of ∼ 10 5 cm −3 . An improved photometric sensitivity of the next-generation of instruments, in particular METIS@ELT, will help to further constrain the density at intermediate scales.
The paper is structured as follows. Section 2 describes the observations and data reduction methods used for this work. Then, we briefly discuss the photometry and its results for S2 in Section 2.1 and Section 2.2, respectively. In Section 3 we constrain the slope and density of the ambient accretion flow using S2 star observations in L band. Subsection 3.1 is dedicated to the exploration of the extinction caused by the ambient gas and dust inside the Bondi radius. In subsection 3.2, the upper limit of the ambient density is inferred based on the thermal bow-shock emission. Then in section 3.3, we constrain the ambient density based on the non-thermal bow-shock emission. We discuss the obtained density values in the broader context of the accretion flows and the Galactic Centre gaseous-dusty structures in section 4. Finally, in section 5 we summarise the main results.

Observations and data reduction
Observations of the Galactic Centre in the near-infrared (NIR) were carried out with the European Southern Observatory (ESO) Very Large Telescope (VLT) UT1-YEPUN on Paranal, Chile. The data was obtained from the infrared (IR) camera CONICA and the NAOS adaptive optics (AO) module, briefly NACO. The central parsec of the Galactic Centre has been frequently observed with the VLT in the L -band (3.8 µm, 0.0271 /pixel).
In Table 1, we summarise the obtained data that will be further analysed in this study. The total time-coverage of the data set is from April 2004 till April 2018. The only applied criterion on the epoch selection is the imaging quality since a large number of the available data sets in the archive were observed during poor atmospheric conditions, in particular bad and fast seeing. We used the standard data reduction process that consists of the sky subtraction, flat-fielding and bad pixel correction for all imaging data and combined them via a shift-add algorithm to obtain the final array size of 28 × 28 for all epochs.
The first observed periapse of S2 occurred in 2002. The spatial resolution of NACO at 3.8 µm is 0.096 , while the distance between Sgr A* and S2 in 2002 is approximately 0.040 , therefore it is impossible to obtain the emission of S2 from the images completely separated from Sgr A* emission. Furthermore, we know that Sgr A* is flaring in the observation which is done in 2002 , and in 2002 and 2003 the NIR-excess extended source denoted as G1 is close enough to the S2-Sgr A* system so that it cannot be disentangled from the Sgr A*-S2 system (Clénet et al. 2004;. We show the superposition of S2 and G1 in Fig. 1, where we plot the projected orbits of S2, G1, and DSO/G2. Right before the pericentre passage around 2002, the mutual separation between S2 and G1 was less than 0.1 arcsec, see Fig. 1 (left panel). The G1 cloud is currently going to larger distances from Sgr A* (more than 0.2 arcsec, see Fig. 1, right panel), hence potential changes of the brightness of S2 after 2002 pericentre passage would be due to other effects, most likely due to bow-shock emission that we analyse in this contribution. Hence, to prevent further uncertainties in our analysis, we excluded the first observed periapse of S2.

Photometry
Flux densities of S2 and calibrators were determined via aperture photometry, using a circular aperture of 82 mas in L -band.
Dereddened fluxes have been computed with the extinction of A L = 1.09 ± 0.13 (Fritz et al. 2011) and a zero magnitude value of F 0 (L) = 249 Jy.
The magnitude calibration is done by considering S26, S30 and S35 as calibrators using their known brightness from Gillessen et al. (2009). These S-stars are chosen because of being isolated enough over the epochs of our study. In Fig. 2, we show the surroundings of S2 within about ±1 on 9 May 2013.
In general, the grainy background at the centre of our Galaxy is variable due to the proper motion of the stars (Sabha et al. 2012). Therefore, to correct for background brightness, we used five apertures with the same size as our photometric apertures close enough to the calibrators and S2 to get an appropriate representative of the existing background. Because of the highvelocity S-stars, the background is highly variable, therefore background apertures are not located at the same position for all the epochs considered in this study.

Photometry results
S2 is an early B-type dwarf of spectral type B0-B2.5 V with a stellar wind of estimated velocity v w ∼ 1000 km s −1 and a massloss rate ofṁ w 3 × 10 −7 M yr −1 (Martins et al. 2008). We did the aperture photometry with local background subtraction for seven selected epochs from 2004 to 2018. S65 flux and magnitude was also studied in order to be a test star to reveal any meaningful changes in S2 flux or magnitude.
The photometry results are presented in Table 1. As it is shown in Fig. 3, there is essentially no change detected in the measured flux density of S2 within the uncertainties over the seven epochs. The total coverage is 15 years, which is close to the S2 orbital period around Sgr A*, including epochs close to the pericentre passages of S2. The light curve has the mean value of the flux density of F = 8.88 ± 0.33 mJy, with the difference of maximum and minimum values of 0.90 mJy. In terms of the L -band magnitude, the mean magnitude of S2 in the L -band is 11.12 ± 0.04. The intrinsic variability of S2 is characterised by a normalized excess variance (Nandra et al. 1997), where f i are individual flux measurements, f = 1/N N i=1 f i is the mean flux density, and σ i are individual measurement errors. We obtain the value of the fractional variability F var = σ 2 rms = 2.52% in terms of the flux density and M var = 0.22% in terms of the magnitude. For the control star S65, we obtain F var = 4.53%, which is almost a factor of two larger than S2. These values are fully consistent with no intrinsic changes in the L -band flux density of S2 within measurement uncertainties. For completeness, the mean, the maximum difference, and the fractional variability F var are listed in Table 1 for both S2 and S65.
In order to study the S2 flux and magnitude closely during its periapse in May 2018 at around 1500 R s distance from Sgr A*, we did the aperture photometry on all single exposures from the observation on April 22, 2018 on the position of S2 and the infrared counterpart of radio source Sgr A*. The physical separation of S2 and Sgr A* was only 1.38 mpc corresponding to 34.6 mas, while the angular resolution is 99.5 mas in L -band. The photometry results are shown in Fig. 4. As it can be seen there is no sudden increase in the received flux from the position, therefore Sgr A* is in its quiescent state in L -band over  For the 2002.663 epoch we measure 17.41 ± 1.18 mJy at the -at that time -combined position of S2, G1 and L -band counterpart of Sgr A*. Taking into account the S2's mean stellar flux density is 8.88 ± 0.33 mJy ( dreddened with A L = 1.09) , the G1 L -band flux density of ∼ 2.58 ± 1.40 mJy close to 2002 epoch , the flux of Sgr A* ends up to be around 6.03 ± 0.52 mJy. Schödel et al. (2011) obtains the mean flux of Sgr A* in the L -band as 4.33 ± 0.18 mJy, which leads us to 1.70 mJy surplus in the measured flux density. However, due to the lack of a longer (at least days) light curve time coverage during the S2 periapse passage of the variable source black hole counterpart SgrA* in 2002, it is not possible to safely state that this flux density excess is due to a Sgr A* flare or the S2 stellar bowshock effect. However, since during the subsequent pericentre passage in 2018 the flux density of S2 is within the uncertainty comparable to its mean value (see Table 1), the excess can be attributed to the Sgr A* flare, unless the accretion flow density changes dramatically by several orders of magnitude from one periapse to another. The flux excess of 1.70 mJy that corresponds to the magnitude change of ∼ 0.19 mag would require the pericentre number density of ∼ 4.2×10 10 cm −3 according to the dustextinction model we present in Subsection 3.2. Considering the synchrotron bow-shock emission (see Subsection 3.3), the required density at the pericentre is smaller, n a ∼ 2.1 × 10 5 cm −3 , but still larger by two orders of magnitude than expected for the RIAF density profile with γ ≈ 1, n a ∼ 7.2 × 10 3 cm −3 . Such a large density present only for epoch 2002 is unlikely. The excess flux of 1.70 mJy can thus be attributed to the L -band flare of Sgr A*. In the L -band, Sgr A* is permanently variable (Schödel et al. 2011) with the flux densities in the range between 1 mJy and 10 mJy (Ghez et al. 2005;Eckart et al. 2008;Dodds-Eden et al. 2009).

Constraining the slope and density of the ambient accretion flow using S2's L -band emission
In this section, we develop a simple method of inferring the density slope and the maximum density at the pericentre of a wind-blowing star using the observed light curve and an analytical dust extinction model. This method is suitable for stars whose bow shock is unresolved. For a fully resolved bow shock at at least two positions of a star along an elliptical orbit, one can infer the density slope from the bow-shock size ratio and an orbital eccentricity, see Appendix B for more details. Furthermore, we also consider the non-thermal bow-shock emission as an independent way of constraining the ambient density. The S2 star is currently intensively monitored by the Very-Large-Telescope Interferometer GRAVITY, as well as the NIRimager NACO and SINFONI@VLT, which is capable of per-   forming integral field spectroscopy. Using the data over the past 25 years, post-Newtonian effects were measured, including the gravitational redshift (Gravity Collaboration et al. 2018a) and the Schwarzschild precession (Gravity Collaboration et al. 2020; Parsa et al. 2017), which are consistent with general relativity so far. Its highly eccentric orbit (e = 0.885) implies that the ambient gas density is expected to change along its orbit -it is expected to be the smallest close to its apocentre and the largest close to the pericentre due to the radial power-law profile of the hot X-ray atmosphere (Wang et al. 2013). The dust component is expected to coexist to a certain extent in this hot environment, which is also manifested by the presence of L -band dusty sources in the central ∼ 0.04 pc, namely DSO/G2, G1, and several other dusty and bow-shock sources in the central arcsecond (Gillessen et al. 2012;. In particular, for the orbital solutions and radiative properties of the dustenshrouded objects, see  and Ciurlo et al. (2020). An increase in the ambient gas-and-dust density along Fig. 5. An illustrative figure of the S2-star motion through the hot flow around Sgr A* of variable density. The density may change by as much as an order of magnitude from the apocentre to the pericentre, from several hundred particles per cubic centimetre to several thousand particles per cubic centimetre, respectively, depending on the power-law slope of the radial number density distribution. For the exemplary calculation, we used n a = n B (r/r B ) −1 , where n B = 20.3 cm −3 is the particle density at the Bondi radius. The white circle in the bottom left corner depicts the L -band point spread function (PSF) corresponding to 8-m class telescopes, from which it is apparent that the S2 bow-shock remains unresolved, especially close to the pericentre.
with the change in the orbital velocity are expected to lead to a larger local extinction around S2 star due to the formation of a bow shock, and hence to a change in the NIR magnitudes and corresponding colour indices. We considered here in particular the NIR L -band emission of S2, which can trace such a change as S2 moves through the accretion flow of different gas and dust density, see Fig. 5 for an illustration. A potential formation of a stellar bow-shock associated with S2 can enhance the colour change despite no sufficient capability of current NIR instruments to resolve the bow-shock structure, see Fig. 5. Both the detection as well as the non-detection of the L -band magnitude can be used to constrain the density as well as the slope of the gas-and-dust density distribution. The density changes along the S2 orbit depends on the density slope γ. Assuming the radial gas distribution, n a ≈ n 0 (r/r 0 ) −γ , where γ > 0, the density ratio between the pericentre and the apocentre can be estimated as, Since the orbital eccentricity is well constrained for S2, e = 0.885, the ratio can be estimated to be n a,P /n a,A ∼ 4.05, 16.39, and 66.36 for the plausible density slopes of 0.5, 1.0, and 1.5, where the first two values represent the radiatively inefficient accretion flow (see e.g. Xu et al. 2006;Wang et al. 2013) and the last value corresponds to the spherical steady Bondi flow (Różańska et al. 2015). Since the variation in density is large (by a factor of 16.4) for a rather small variation in the density slope (by a factor of three), the L -band observations of S2 can be used to constrain the density distribution of the hot accretion flow close to Sgr A* at the length-scales of the order of 1500 Schwarzschild radii, where there are essentially no constraints for the ambient density (see, however, Gillessen et al. 2019).
In the further model, we approximate the orbit of S2 with an ellipse with the semimajor axis of 0.12538 ≈ 5 mpc and the eccentricity of 0.88473 according to recent GRAVITY measurements (Gravity Collaboration et al. 2018a). These orbital elements imply that S2 covers a large distance range, with the pericentre distance of r p = 119.2 AU = 1512 r s and the apocentre distance of r a = (1 + e)/(1 − e)r p = 16.35r p = 24724 r s . The power-law density distribution is adopted according to the Fig. 6. Temporal evolution of the number density of the ambient medium for the three different density slopes of the radial density profile, n a = n 0 (r/r 0 ) −γ , where γ is equal to 0.5, 1.0, and 1.5, see the plot legend. The dashed red lines stand for the number densities that were observationally inferred by Baganoff et al. (2003)  Chandra X-ray studies of the extended emission of Sgr A* in the X-ray domain (Baganoff et al. 2003;Wang et al. 2013). The density distribution can be scaled with respect to the Bondi capture radius, n a ≈ n a,B (r/r B ) −γ , where n a,B ≈ 26η −1/2 f cm −3 and r B ≈ 4 (T a /10 7 K) −1 = 0.16 pc (Baganoff et al. 2003;Wang et al. 2013). In Fig. 6, we show the number gas density per cubic centimeter that is expected to be intercepted by S2 star during its entire orbit (zero time stands for the orbit periapse). Different lines stand for different density slopes (0.5; 1.0; 1.5) according to the key. The bottom dashed red line depicts the inferred number density close to the Bondi radius according to X-ray observations of Baganoff et al. (2003), while the upper dashed red line stands for the number density of n DS O/G2 a ∼ 4×10 3 cm −3 inferred for the periapse of the DSO/G2 object (Gillessen et al. 2019).
We see that due to an eccentric orbit, S2 can in principle serve as a good probe of the ambient gaseous-dusty medium. For the S2 stellar blackbody emission, we adopt the stellar parameters that can reproduce the L flux density of ∼ 9 mJy. For the model with log (L S2 /L ) = 4.54, T S2 = 26800 K, R S2 = 6 R , we obtain the L flux density of F L = 8.9 mJy, see also Fig. 7 for the spectral energy distribution (SED) of S2 around L -band.

Extinction estimate inside the Bondi radius
We assume that the ambient gas inside the Bondi radius has a power-law profile, n a ≈ n a,B (r/r B ) −γ , which we scaled to the number density at the Bondi radius r B . To estimate the local extinction due to the gas and dust inside the Bondi radius, we calculate the local column density of hydrogen, where we integrated from a certain inner radius associated with S2 star, in this case its pericentre distance of r P = a S2 (1 − e S2 ) ≈ 0.577 mpc, up to the Bondi radius. The column density estimate for the number density of n B ≈ 26 cm −3 (Baganoff et al. 2003) at the Bondi radius and the maximum density power-law slope of γ ≈ 1.5 for the Bondi-type flow is N h (γ = 1.5) = 4.02 × 10 20 cm −2 , whereas for the flat slope of γ = 0.5, we get N h (γ = 0.5) = 2.41×10 19 cm −2 . The visual extinction due to the ambient gas inside the Bondi radius for the steep density profile (γ = 1.5) is given by Reina & Tarenghi 1973;Gorenstein 1975;Predehl & Schmitt 1995), which corresponds to the extinction A K ∼ 0.1 A V = 0.023 mag in the NIR K-band and A L ≈ 0.5 A K = 0.012 mag in the NIR Lband (see Schödel et al. 2010, for the extinction analysis towards the Galactic Centre), in which our observations were carried out. For the flat density profile of γ = 0.5, we get A L ≈ 0.0007 mag. Hence, no increase in the L -band magnitude within uncertainties is expected from the S2 plunging in deeper towards higher ambient densities. In summary, the upper limit on the ambient extinction inside the Bondi radius is A L 0.012 mag. The only substantial increase at longer NIR wavelengths can be produced locally due to the bow-shock formation characterised by its density, radial scale, and thickness, which allows us to estimate the extinction.

Constraining the ambient density based on the thermal bow-shock emission
The S2 bow shock is modelled using a two shock scenario (Dyson 1975), where one shock is driven into the ambient medium (ambient shock) and the other is formed from the shocked stellar wind (stellar-wind shock). These two layers are separated by a contact discontinuity at the distance approximately given by the stagnation radius, see Eq. (B.1). This treatment is based on the analytical theory of Dyson (1975), who modelled an interaction of a fast stellar wind with an expanding gas globule. In the first approximation, two layers (warm and cold) mix to form one shocked layer. In the second approximation, two layers are separated by a contact discontinuity. We apply the second approximation in a similar way as Scoville & Burkert (2013) did for the Galactic Centre NIR-excess source DSO/G2 interacting with the ambient diluted medium (see also their Fig. 3 for the illustration). The extinction estimate is based on the number density of gas and dust inside the shock and its characteristic length-scale -thickness. At the stagnation point, the ambient shock is characterised by the number density n ams = 4n a and the thickness of t ams = 0.65R 0 . The stellar wind shock has a characteristic number density of n sws = n w v 2 w /c 2 s , where n w =ṁ w /4πR 2 0 v w µm H is the stellar wind number density with the mean molecular weight of µ = 0.5 (ionised gas) and the hydrogen mass of m H and the sound speed of the stellar wind gas c s = (k B T sw /µm H ) 1/2 is evaluated for the temperature of T sw = 10 4 K. The thickness of the stellar wind is given by t sws = 2.3(c s /v w ) 2 R 0 . We show both the number density and the thickness of both shocks in Fig. 8 as a function of the distance of S2 from Sgr A* in Schwarzschild radii. We see that the ambient shock is thicker and less dense than the stellar wind shock for all ambient density profiles considered in the legend.
In our model, we further consider that the dust is more likely to exist in the ambient medium through which S2 moves along its orbit, hence the ambient shock is expected to be more relevant in terms of the localized extinction and its contribution in the L -band. The B-type stars typically do not contain dust in their stellar winds, hence the stellar wind shock is not likely to contribute to L -band emission. However, for completeness, we consider both shock layers in assessing the constraints on the ambient number density. This is also due to the complex dynamics of dust grains and their potential of being dragged by a denser material in the stellar-wind shock, especially smaller grains may be affected (see e.g. van Marle et al. 2011). During the motion of S2, the two shock layers are affected by hydrodynamic instabilities that lead to the mixing of both layers (Schartmann et al. 2018), which is likely to lead to the exchange of material and the actual density of the gaseous-dusty mixed layer may be closer to the denser stellar-wind shock.
We calculate the limits on the ambient number density at the S2 periapse as well as the limits for the density slope γ. The upper limit is obtained if we associate the upper limit for the extinction with the standard deviation, A shock 0.04 mag. Another estimate is based on the fractional variability with A shock ∼ 0.02 mag. The values of the density and the slope are inferred from the extinction-column density relation A V ≈ 5.6 × 10 −22 N h (cm −2 ), where N h ∼ n shock t shock with the shock number density n shock and the shock thickness t shock for each shock layer as explained above. The extinction in L -band is approximately given by A L = 0.5 × 0.1 × A V (Schödel et al. 2010). This model allows us to compute the whole light curve along the S2 trajectory. In Table 2, we list the density slope and the number density constraints for each extinction value as well as the shock layer taken into account. For the ambient shock, which is more likely to lead to an increased dust emission, the upper limits on the number density are in the range n ams a 7.15 × 10 8 − 1.87 × 10 9 cm −3 with the density slope γ 3.03 − 3.20. For the stellar-wind shock, the number densities are smaller by four orders of magnitude and the density slope is smaller by a factor of two, n sws a 7.53 × 10 4 − 1.86 × 10 5 cm −3 and γ 1.41 − 1.57. The comparison of model light curves with the actual Lband data is in Fig. 9, with the upper panels representing the larger extinction value of A = 0.04 based on the standard deviation of the light curve points and the lower panels standing for the smaller extinction of A = 0.02 based on the fractional variability. The peak of the observed light curve has an apparent offset from the peak of the modelled light curves (at the periapse), which is most likely a systematic effect, not an intrinsic brightening.

Constraining the ambient density based on the non-thermal bow-shock emission
The thermal bow-shock emission in L -band is clearly affected by the presence of dust along the S2 orbit. While on one hand the dust is clearly present in dusty objects whose orbits lie in the S cluster, the hot ambient medium likely destroys the dust particles continually. In case the presence of dust is diminished along the S2 orbit, then the thermal emission of the bow shock in L -band is even smaller than we predicted in Subsection 3.2. Another way to constrain the ambient density at the S2 pericentre is to take into consideration the broadband non-thermal synchrotron emission of the bow shock, which does not depend on the presence of dust. When the bow shock develops ahead of the star, it provides a volume where electrons can be accelerated by the enhanced magnetic field. Subsequently, they cool off by emitting synchrotron emission. Ginsburg et al. (2016) used the same mechanism to claim that the non-thermal emission of stellar bow shocks in the S cluster may be comparable to the radio and near-infrared emission of Sgr A*, and hence could be detected.
One can reverse the task and instead constrain the upper limit of the ambient density based on the statistical variations we detect in the L -band light curve of S2. According to Table 1, the maximum flux difference in our light curve is 0.90 mJy, while the rms fractional variability is at the level of 0.2 mJy. Hence, the maximum contribution of the bow-shock synchrotron emission in L -band can only be at this flux density level, which allows us to place an upper limit on the ambient density. ambient shock, = 0.5 ambient shock, = 1.0 ambient shock, = 1.5 stellar-wind shock, = 0.5 stellar-wind shock, = 1.0 stellar-wind shock, = 1.5 Fig. 8. Number density and thickness of the two shock layers in the two-shock approximation model as a function of the distance from Sgr A* (in Schwarzschild radii). Left figure: Number density (expressed in cm −3 ) of the shock driven into the ambient medium (red lines) and of the shocked stellar wind (blue lines) calculated for three specific values of the ambient density slope: γ = 0.5, 1.0, and 1.5. Right panel: Thickness (expressed in cm) of the stellar-wind (blue lines) and ambient shock layers (red lines) calculated for the three different density slopes as in the left figure.
Thermal emission -upper limit power-law slope ambient number density (periapse) ambient shock (A = 0.04) 3.20 1.87 × 10 9 cm −3 stellar-wind shock (A = 0.04) 1.57 1.86 × 10 5 cm −3 Thermal emission -upper limit power-law slope ambient number density (periapse) ambient shock (A = 0.02) 3.03 7.15 × 10 8 cm −3 stellar-wind shock (A = 0.02) 1.41 7.53 × 10 4 cm −3 Non-thermal emission -upper limit power-law slope ambient number density (periapse) peak flux density of 0.91 mJy (maximum flux difference) 1.47 1.01 × 10 5 cm −3 peak flux density of 0.22 mJy (fractional variability) 1.17 1.88 × 10 4 cm −3 Table 2. Summary of constraints for the ambient density close to the Galactic Centre at the S2 periapse based on the two extinction limits, 1σ and fractional variability, and analytical bow-shock models for both the ambient shock and the stellar-wind shock thermal emission. In addition, we include the ambient density upper limit for the non-thermal synchrotron emission based on the maximum flux difference of 0.90 mJy and the fractional variability of 0.2 mJy.
For the calculation of the bow-shock synchrotron light curve and broad-band spectrum, we follow the model of Sądowski et al. (2013), originally developed for the estimate of the bowshock emission of the DSO/G2 object, see also Zajaček et al. (2016). As in Sądowski et al. (2013) and Zajaček et al. (2016), for calculating synchrotron light curves and spectra, we use the temperature profile of the ADAF, T a = 9.5 × 10 10 (r/r s ) −1 (Yuan et al. 2003), with the ratio between the magnetic and the gas pressure of χ = P mag /P gas = 0.3, and the Mach number of the star at the pericentre distance of S2, M = 2.6. Other relevant parameters were adopted from particle-in-cell simulations performed by Sądowski et al. (2013), specifically the slope of the high-energy power-law electron distribution, p = 2.4, the minimum Lorentz factor, ζ = 7.5, and the fraction of accelerated electrons to high energies, η = 0.05. Specifically for S2, we used its mass-loss rateṁ w 3 × 10 −7 M yr −1 and the terminal wind velocity v w ∼ 10 3 km s −1 inferred from spectroscopy (Martins et al. 2008;Habibi et al. 2017).
In contrast to Sądowski et al. (2013), we perform only the plowing synchrotron model, in which the accelerated electrons are kept in the shocked region and radiate in the shocked magnetic field. The plowing model is more likely to contribute in Lband than the local model, in which accelerated electrons leave the shock and radiate in the unshocked magnetic field. Due to the short cooling time for the near-infrared L -band synchrotron emission, t cool ≈ 0.25(B/0.08 G) −3/2 (ν c /8 × 10 13 Hz) −1/2 yr, the local model would have a negligible contribution.
In Fig. 10 (left panel), we plot the L -band synchrotron light curve for the peak flux density of 0.91 mJy, which corresponds to the maximum flux difference, and the light curve with the peak flux density of 0.22 mJy, which corresponds to the fractional variability. The non-thermal bow-shock emission is also compared with the Sgr A* mean flux density in L -band (Schödel et al. 2011), the S2 total flux, and the actual S2 measured flux density from April 22, 2018, which are all larger by at least a factor of a few in comparison with the bow-shock non-thermal emission. In the right panel of Fig. 10, we plot the SED of the S2 bow-shock synchrotron emission calculated for the pericentre for both L -band flux density values (maximum difference and fractional variability). We also compare the synchrotron bowshock SED with the SED of Sgr A* calculated using the advection dominated accretion flow model (ADAF; Yuan et al. 2003;Yuan & Narayan 2014). Taking into account the maximum flux difference as an upper limit for the L -band synchrotron contribution, we get the pericentre number density of n a = 1.01 × 10 5 cm −3 (the slope of 1.47). The fractional variability flux limit yields the number density of 1.88 × 10 4 cm −3 (the density slope of 1.17). Both limiting cases are summarised in Table 2  GHz frequencies, where the peak of its SED occurs. To separate Sg A* and the predicted S2 bow-shock emission is challenging as it requires highly sensitive measurements at cm-to dm-wavelengths with an angular resolution of a tenth of an arcsecond or better. However, around the time of the periapse passage longterm (weeks to a few months) light curves should reveal an overall increase of the spatially unresolved emission of both sources. Such a data set is not available at present. VLBI measurements at GHz frequencies (or cm wavelengths) could in principle be possible due to the high brightness temperature of the S2 bow-shock emission at its pericentre. We outline here a few basic estimates. For the assumed maximum non-thermal excess in L -band of ∼ 1 mJy, the calculated peak of the bow-shock synchrotron spectrum is at 4.61 GHz. The peak flux density is expected to be 0.86 Jy at the S2 pericentre, which is comparable to or even larger than the flux density of Sgr A* at cm wavelengths. The bow-shock characteristic size given by the stagnation distance would be R 0 ∼ 5.6 × 10 13 cm at the pericentre, which gives the angular scale of ∼ 0.5 mas that is below the res-olution capabilities of the cm VLBI, which is at best ∼ 1 mas. The angular distance between S2 radio source and Sgr A* at the pericentre is ∼ 14.4 mas, which is smaller than the intrinsic size of Sgr A* at 6 cm (∼ 20 mas) due to λ 2 scatter-broadening of the size of Sgr A* Doeleman et al. 2008). The brightness temperature 2 of the S2 bow shock at its pericentre would be large, T B ∼ 8.5 × 10 10 K, comparable to that of Sgr A*, 2 × 10 10 K (Krichbaum et al. 1998;Doeleman et al. 2008). However, before and after the S2 pericentre, its brightness temperature is expected to drop rather fast, remaining above 10 6 K from the epoch 2017.08 up to 2020.54, with the peak at the pericentre in 2018.38. Taking into account the smaller contribution of S2 bow-shock non-thermal emission at L -band at the level of ∼ 0.2 mJy, which results from a smaller ambient den-2 We estimate the brightness temperature using the standard relation derived from the Rayleigh-Jeans approximation in the radio domain,

Fν
Ων 2 , where the solid angle Ω ≈ πR 2 0 /d 2 GC with R 0 being the stagnation radius of the bow shock. sity, mainly the characteristic size is affected. It gets larger to R 0 = 1.29 × 10 14 cm, which corresponds to the angular scale of 1.1 mas that is at the limit of the resolving power of cm VLBI. However, since for a lower density the resulting spectrum of the S2 bow shock is shifted towards the lower frequency at 1.5 GHz, see Fig. 10, the bow-shock size is actually smaller than the typical VLBI beam FWHM of ∼ 3 . With the peak flux of 435 mJy, the brightness temperature of T B ∼ 7 × 10 10 K is again comparable to that of Sgr A* and stays above 10 6 K in the time window between 2016.98 and 2020.90. In general, the cm VLBI observations could reveal a deviation from the Gaussian core of Sgr A* in the epochs of ∼ 1.5 years before and after the pericentre when the brightness temperature is still above 10 6 K. At the pericentre, the S2 bow-shock emission is not possible to resolve out due to the scatter-broadening of Sgr A* as well as of the bow-shock source. Only the flux excess could be detected, however, in that case a corresponding light curve at cm wavelengths would need to be analysed to distinguish the long-term bow-shock excess from the short-term stochastic radio flares. Based on the upper limit inferred from the maximum synchrotron constribution to the L -band emission of S2, accretion flows exceeding the particle density of ∼ 10 5 cm −3 at ∼ 1500 r s are unlikely. On the other hand, the presence of the Bondi-type flow with γ ∼ 3/2 cannot be excluded based on our L -band light-curve analysis.

Discussion
Our observational analysis of the L -band emission of the S2 star yielded a light curve that is essentially flat within uncertainties and intrinsic flux variations due to the interaction of the S2 star with the ambient medium or due to intrinsic stellar variability are at the level of ∼ 2.5% only, as given by the fractional variability. Using the theory of two-layer bow-shock (Dyson 1975), we are thus only able to place the upper limit on the ambient density at the S2 periapse as well as the upper limit on the den-sity slope. The upper limit considering the contribution of the ambient bow shock, which is more likely to contain dust, is n a 1.87 × 10 9 cm −3 and the upper limit for the slope is γ 3.20. These values change only slightly when one considers the smaller extinction of (A = 0.02) as indicated by the excess variance, n a ∼ 7.15 × 10 8 cm −3 and γ = 3.03. In case the stellar-wind shock layer would contain dust, which would require the turbulence and the mixing of shocked layers, then the density and the slope constraints decrease to n a = 7.53×10 4 −1.86×10 5 cm −3 and γ = 1.41 − 1.57. The non-thermal synchrotron emission of the bow-shock appears to put tighter constraints on the S2 pericentre density, n a 1.01 × 10 5 cm −3 for the maximum flux difference and n a 1.88 × 10 4 cm −3 for the fractional variability. For the slope, we obtain γ 1.47 for the maximum flux difference and γ 1.17 for the fractional variability.
Therefore, the L -band data is consistent with the S2 star interacting with the hot, diluted ambient flow with the power-law density slope of γ ∼ 0.5 (generally the Advection Dominated flow -ADAF, Wang et al. 2013) as well as with the spherical Bondi-type solution with the density slope of γ ∼ 1.5 (also consistent with the Convection Dominated flow -CDAF, Różańska et al. 2015). Moreover, we cannot exclude the possibility that S2 would interact with an even denser and colder type of the medium, such as the proposed cool disc with densities in the interval of n CD ∼ 10 5 − 10 6 cm −3 (Murchikova et al. 2019). In fact, the uppermost limit for the density n a < 1.87 × 10 9 cm −3 is well in the range for the number density of broad-line region (BLR) clouds n BLR ∼ 10 8 − 10 11 cm −3 (Gaskell 2009). Although we do not expect the presence of BLR clouds in such a low-luminosity nucleus as Sgr A* (see, however, Bianchi et al., 2019 for the discovery of the compact BLR in the low-luminosity Seyfert galaxy NGC3147 with L/L Edd ∼ 10 −4 ), one cannot exclude the presence of denser gaseous-dusty structures, with which stars can occasionally interact, such as dust-enshrouded objects monitored in the S-cluster Ciurlo et al. 2020). This is also supported by the multiphase medium of Sgr A* on the scale of one parsec (Moser et al. 2017), which could also be present on smaller scales due to e.g., thermal instability (Różańska et al. 2017). In particular, Peißker et al. (2020a) report a detection of the proper motion of a Brγ filament, whose estimated distance is close to the Bondi radius at ∼ 0.2 pc. At the comparable scales, Royster et al. (2019) detected a blue-shifted, ionised gas traced using H30α line with the velocity between −480 and −300 km s −1 that appears to be outflowing. Hence, the environment close to the Bondi radius is complex in terms of both kinematics and density.
Based on the flat L -band light curve and the upper limits on the density, we can exclude the presence of a cold, thin accretion disc (Shakura & Sunyaev 1973), whose number densities close to the periapse of S2 at ∼ 1500 r s can be estimated using the relation for the number density as given by the standard accretion disc theory; see also Frank et al. (2002). Using the mean atomic weight of µ = 0.615 for the fully ionised gas, we obtain, where the factor f stands for f = [1 − (r s /R) 1/2 ] 1/4 . We calculate the number density range of n disc = 7.6 × 10 11 − 9.6 × 10 12 cm −3 for the accretion rate betweenṁ = 10 −9 − 10 −7 M yr −1 and the viscous parameter of α = 0.1 for the S2 pericentre distance. In Fig. 11, we plot the thin disc density profiles up to 100 r s , since the density profile below this radius is rather uncertain and the accretion flow likely breaks up due to the accumulation of poloidal magnetic flux, which results in the magnetically arrested disc (MAD; Narayan et al. 2003). This transition occurs where the magnetic energy density and the gravitational potential energy are at balance, B 2 /8π = GM • ρ flow /R m , from which we can simply derive the magnetospheric radius, where the poloidal magnetic field is scaled to 10 G and the number density of the flow to 10 6 cm −3 according to the synchrotron models of the Sgr A* flares (Yusef-Zadeh et al. 2006;Eckart et al. 2012). The putative MAD part of the flow is highlighted by the blue vertical line in Fig. 11. The thin disc is expected to contain dust from the sublimation radius towards larger distances. If we associate the effective thin disc temperature, T eff = [3GM •ṁ /(8πr 3 σ B )] 1/4 , with the dust sublimation temperature of T sub = 1000 K, we get a relation for the dust sublimation radius (see also Czerny & Hryniewicz 2011) We obtain the range of r sub = 35 − 163 r s for the accretion rate range ofṁ = 10 −9 − 10 −7 M yr −1 . Hence, the dusty bow-shock layer should be formed when the S2 would plunge through the disc midplane close to its periapse at ∼ 1500 r s . The formation of the shock in the disc material would lead to the extinction increase in L -band magnitude by 0.65 mag for the density of 4.9 × 10 11 cm −3 and by as much as 2.30 mag for the density of 6.13 × 10 12 cm −3 . We can therefore exclude the possibility that the S2 star crosses a thin, dense and cold disc.
Although the comparison with the thin disc density in Fig. 11 may seem purely academic for the Sgr A* environment, it is still instructive to compare our upper limits with the thin-disc density for two reasons. First, although the presence of a thin disc was implicitly excluded already based on X-ray and mm observations (Yuan et al. 2003;Baganoff et al. 2003;Dexter et al. 2010), the upper density limit inferred from the stellar bow shock is independent from these previous measurements. Second, the transition between the hot advection dominated accretion flows (ADAFs) and thin discs at such low accretion-rate values as for Sgr A* is still not well understood. For α discs, the viscously stable branch at lowṁ exists in the stability curve of surface density-accretion rate or Σ-ṁ plot and these discs would be both geometrically thin and optically thin; see e.g. Frank et al. (2002). They would primarily cool via the free-free emission instead of blackbody radiation (Tylenda 1981) and one of the main reasons why such a disc is likely not present for Sgr A* is the short time for plasma to cool down via bremsstrahlung due to the lowangular momentum of the flow. On the other hand, they are low accretion-rate systems where the thin disc was detected, e.g. the maser source NGC4258 (Gammie et al. 1999) and NGC3147 (Bianchi et al. 2019). Most likely the boundary conditions of the flow, i.e., either feeding by stellar winds or the inflow of gas from larger scales, determine the transition between the ADAF and the thin disc at lowṁ and vice versa. In addition, hybrid models of discs have been suggested -with the outer thin disc part and the inner hot ADAF part, with the transition at 10-100 gravitational radii (Gammie et al. 1999).
In order to better constrain the density and lower the upper density limit and the slope, the photometry precision needs to improve below 0.01 mag. Also, a more precise theory for the bow shock formation and its corresponding NIR emission needs to be taken into account. However, the current methodology that we provide here can be directly transferred to the more precise photometry.
From future instruments, the Mid-infrared ELT Imager and Spectrograph (METIS) at the Extremely Large Telescope (ELT) will be in particular suited for high-precision photometry in near-and mid-infrared domains. All observing modes of METIS will initially work with a single conjugate adaptive optics (SCAO) system at or close to the diffraction limit of the 39-meter ELT. At a wavelength of 3.5 µm, the ELT will allow operation at an angular resolution of 23 milliarcseconds. Here, METIS will have a point source sensitivity (10-σ in 1 hour) of 21.2 mag (or about 1 µJy) (Brandl et al. 2018a,b). In the N band at a wavelength around 10 µm, the point-source sensitivity can be expected to be about 1.6 orders of magnitude lower. The field of view of about 10 × 10 in imaging and 1.0 × 0.5 in IFU (Integral Field Unit) spectroscopy mode at L-and M-bands is ideally suited for the densely populated Galactic Centre region. However, the limiting sensitivity for flux density measurements in this field will be determined by confusion due to source crowding. Hence, the effective sensitivity available to determine flux densities and to establish light curves can safely be assumed to be an order of magnitude lower than the nominal point-source sensitivity, but will still be about an order of magnitude better than the currently reached sensitivity. For specific estimates of the potentially probed density range, we consider the limiting flux density value for the bow-shock emission in the L -band to be 0.01 mJy, which corresponds to ∼ 10 −3 mag difference in the   Fig. 11. Comparison of the upper density limits that are marked as downward arrows inferred from the L -band light curve of the S2 star based on modelling ambient and stellar-wind shocks for the dust-extinction values of 0.04 and 0.02 mag with different density profiles and structures according to the plot legend and the description. Alongside the density limit based on the thermal bow-shock emission, we also depict the limit based on the non-thermal bow-shock emission (bluish downward arrows). For comparison, we show the density limit of 26 cm −3 inferred by Baganoff et al. (2003) based on the analysis of the X-ray thermal bremsstrahlung profile. Then we show the density constraint of (5 ± 3) × 10 3 cm −3 inferred from the potential hydrodynamic drag acting on the DSO/G2 object (Gillessen et al. 2019). The general density power-law profiles are depicted by black lines: the solid line stands for the slope of 1.0, the dashed line represents the flat profile of γ = 0.5, and the dot-dashed line depicts the steeper Bondi-like spherical flow with γ = 1.5. The shaded rectangle shows the distance and the density limits (n ∼ 10 5 − 10 6 cm −3 ) of the putative cool disc whose discovery is claimed by Murchikova et al. (2019). The black-framed rectangle depicts the typical densities of the broad-line region (BLR) clouds in the range of n ∼ 10 8 − 10 11 cm −3 . The gray lines depict the number density values expected for a thin disc (Shakura & Sunyaev 1973) for the accretion rate ofṀ = 10 −9 − 10 −7 M yr −1 and the viscosity parameter of α = 0.1. The brown-shaded area to the lower left shows the set of density profiles determined using the rotation measure of the submillimeter polarisation measurements (Marrone et al. 2006(Marrone et al. , 2007 for the inner radii of r in = 300 r s and r in = 3 r s , density slopes of γ = 0.5 − 1.5, and the accretion rates in the range 2 × 10 −9 − 2 × 10 −7 M yr −1 . The blue dot-dashed vertical at 100 r s and the blue dot-dashed arrow to the left denote the region of a potential magnetically arrested flow (MAD), where the accretion flow changes from continuous to clumpy due to the accumulated poloidal magnetic flux (see e.g. Narayan et al. 2003;Tursunov et al. 2019). The dotted vertical lines mark the periapsis of the S62 star at ∼ 225 r s and the periapsis of the S2 star at ∼ 1512 r s . Next to the S2 pericentre vertical line, we highlight the range of densities potentially being explored using L -band METIS@ELT imaging mode.
S2 star L -band magnitude. Taking into account the model of thermal ambient-shock emission, which is the least sensitive in terms of the density, we obtain the value of ∼ 1.5 × 10 6 cm −3 . This provides an improvement by three orders of magnitude in comparison with the current upper limit. The more sensitive non-thermal bow-shock emission model implies the lower ambient-density limit of only ∼ 700 cm −3 , which is two orders of magnitudes smaller than current limits in Table 2. The density range probed by METIS is also shown specifically in the summary plot in Fig. 11. In particular, using the lower limit of 700 cm −3 inferred from the non-thermal model, METIS should be able to directly detect a non-thermal emission increase in case the hot-flow slope is larger than γ = 0.5 between the Bondi radius and the S2 pericentre distance. Further details will have to be determined through observations on the target.
The best next target to observe both the potential thermal and the non-thermal bow-shock emission at the periapse would be S62 in the early 2023 which appears to be a suitable timing to observe the closest S-star to the SMBH by the JWST. It will be an opportunity to shed some more light on the density of the accretion flow around Sgr A* along the S62 orbital plane , in particular at its pericentre distance of r S 62 P ≈ 225 r s ∼ 18 AU, where the conditions of the accretion flow were only constrained via the rotation measure (Marrone et al. 2006(Marrone et al. , 2007, see Fig. 11. The detection of the bow-shock emission of S62 would provide an independent means of assessing the ambient number density on the scale of ∼ 100 r s . In fact, the S stars S2 and S62 as well as the dusty source DSO/G2 orbit Sgr A* at different inclinations. Therefore detecting the bow-shock emission for each of them would enable us to constrain the density profile of the accretion flow around Sgr A* not only as a function of distance, but for a broader range of inclinations. Near-infrared bow-shock emission from the S stars, which is expected to be most prominent at the pericentre, could be detected via peculiar, longer K s or L -band flares. In fact, the total bow-shock flare duration would be of the order of a few months up to one year and the peak flux is coincident with the pericentre of the star, see our model predictions in Fig. 9 for the thermal dust emission and in Fig. 10 for the non-thermal synchrotron emission associated with the bow shock. The start of the flux increase would be half a year before the pericentre. In terms of the shocked stellar wind,  and Christie et al. (2016) calculated the timescale of ∼ one month for the X-ray bremsstrahlung flare produced by S2 bow-shock with the luminosity of 4 × 10 33 erg s −1 . However, Schartmann et al. (2018) argued that for the expected accretion-flow density, the X-ray emission from the bow shock is beyond the detection limit. Ginsburg et al. (2016) calculated the non-thermal synchrotron emission, which for the typical parameters assumed for S2, the massloss rate ofṁ w ∼ 10 −7 M yr −1 and the terminal wind velocity of v w ∼ 10 3 km s −1 , is below the quiescent emission of Sgr A*. Therefore, the stochastic infrared flares of Sgr A* (Witzel et al. 2012(Witzel et al. , 2018, including the very bright ones (Do et al. 2019b), are not associated with the stellar bow shocks in the S cluster since they evolve on the timescale of several hours only, which can be interpreted as an orbital timescale of plasmoids close to the innermost stable circular orbit (Gravity Collaboration et al. 2018b). In other words, some short-term NIR flares could be associated with short-period stars orbiting Sgr A* on the scale of the innermost stable circular orbit (Leibowitz 2020), which could be disentangled from the stochastic background via their periodic or quasi-periodic signal. However, the bright infrared flare analysed by Do et al. (2019b) could be associated with the change of an accretion state due to the recent pericentre passage of S2 in 2018 or even the pericentre passage of DSO/G2 in 2014. The time-delay between the pericentre and the average flare statistics may be interpreted via the viscous timescale of the hot accretion flow, which can be of the order of one to ten years (Czerny et al. 2013).

Conclusions
For the brightest star in the S cluster, S2 star, we obtained a light curve in the near-infrared L -band, which is flat within the measurement uncertainties with the fractional flux variability of only 2.52% in terms of the L -band flux density. When we associate the flux density standard deviation of 0.04 mag with the local dust extinction due to the bow shock, we can place an upper limit of n a < 1.87 × 10 9 cm −3 on the ambient number density at ∼ 1500 r s for the warm bow shock driven into the ambient medium, which is expected to contain dust. For the colder and the denser stellar-wind shock, the number density limit is n a < 1.86 × 10 5 cm −3 , which is, however, less firm due to the limited presence of dust in stellar winds of B-type stars. Considering the non-thermal bow-shock emission, which does not rely on the existence of dust, we can place an upper density limit of 1.01 × 10 5 cm −3 .
These limits cannot yet constrain the type of the hot accretion flow and hence both the radiatively inefficient accretion flow with the density profile of γ = 0.5 and the spherical Bondi-type flow with γ = 1.5 can accommodate these number densities. We can, however, firmly exclude the standard, thin accretion disc extending all the way to 1 500 r s , whose densities would be at least two orders of magnitude larger and the star-disc interactions would produce a shock with the local extinction of 0.65 − 2.30 mag in L band, which is much larger than the inferred 1σ excess of 0.04 mag of the L -band light curve as well as the difference of 0.11 mag between the maximum and the minimum magnitude.
In terms of future prospects, the challenging part is to detect and directly resolve bow shocks associated with the S-stars in near-infrared bands because of the high confusion and stellar density close to Sgr A*. It may become possible when highresolution mid-infrared imaging becomes available with the next generation of instruments, namely METIS at the ELT, since bow shocks are generally more prominent due to the dust emission in mid-infrared bands. High-precision photometry associated with METIS with the flux sensitivity of ∼ 0.01 mJy in L -band is expected to improve the density constraints by two to three orders of magnitude in comparison with our current upper limits. For the non-thermal bow-shock emission, the direct detection of the flux excess is plausible in case the hot-flow density slope is larger than γ ∼ 0.5 between the Bondi radius and the S2 pericentre distance.
The last equality in Eq. (B.5) is derived using a general expression for the power-law density profile, Eq. (B.4). Unless otherwise indicated in the text, we consider the ambient medium to be stationary with respect to the star, therefore the relative velocity is approximately given by the orbital velocity of the star around the Galactic centre, v rel v . Hence, we obtain a slightly Article number, page 15 of 17 A&A proofs: manuscript no. aS2photometry modified relation for the ratio, The last equality is obtained using the expression for the orbital velocity of a star on an elliptic orbit, or the vis-viva equation, v = µ(2/r − 1/a), where µ = GM • . In case the orbital elements for a given S star are constrained, one can invert Eq. B.6 to get the power-law index γ as function of the bow-shock standoff ratio at two positions R 01 (r 1 )/R 02 (r 2 ), orbital distances r 1 and r 2 , and the semi-major axis a, The number of parameters in relation B.7 may be reduced when evaluated at special points on the orbit, especially the pericentre (true anomaly ν = 0 • ), the apocentre (ν = 180 • ), and the semilatus rectum (ν = 90 • ). From the classical celestial mechanics, we easily obtain the ratios for corresponding distances and velocities at the apocentre and the pericentre for a general elliptical orbit with an eccentricity e. The ratio of the distances from the supermassive black hole is (r P /r A ) = (1 − e)/(1 + e) 3 and the ratio of velocities is (v orbP /v orbA ) = (1 + e)/(1 − e). Thus, the ratio between the apocentre and the pericentre bow-shock size is simply a function of two parameters -the orbital eccentricity e and the power-law index for the ambient density distribution γ, A similar simple expression is obtained when evaluating the ratio between the points at the latus-rectum intersection with the ellipse and the pericentre. We denote the standoff distance at that point R 0,90 (the true anomaly is 90 degrees). The following relation then holds, R 0,90 R 0P = (1 + e) (γ+2)/2 (1 + e 2 ) 1/2 , (B.10) from which the density power-law index trivially follows (or from Eq. (B.7)), γ LP = 2 log [R 0,90 /R 0P ] + log (1 + e 2 ) log (1 + e) − 2 . (B.11) Since the star passes through the medium with a variable density n a , the bow-shock emission is also expected to change. An upper limit for the thermal bow-shock emission is given by the rate of thermalized kinetic terms of the stellar and ambient winds, L th = 1/2ṁ w (v 2 rel + v 2 w ) 1/2ṁ w (v 2 + v 2 w ) (Wilkin et al. 1997). The ratio of thermal bow-shock luminosities between two points is then given by, L th1 /L th2 = (β 2 1 + 1)/(β 2 2 + 1) , (B.12) 3 We denote the quantities evaluated at the pericentre, apocentre, and the semi-latus rectum by indices P, A, and 90 • , respectively.
For the mean eccentricity of e = 2/3 in the thermal (isotropic) distribution of eccentricities, n(e)de = 2ede, and the flat density profile of γ = 0.5 − 1.0 (Wang et al. 2013), the ratio R 0A /R 0P is between 7.5 and 11.2 according to Eq. (B.8). Effect of thermal The colour-coded ratio R 0A /R 0P of stellar bow-shock sizes between the apocentre and the pericentre of the corresponding orbit in the e-γ plane (see also Eq. B.8). The white and black lines correspond to the contours of the constant ratio with numbers indicating the value of R 0A /R 0P for a given contour.
pressure. In the analysis above, we considered the thermal pressure of the ambient medium to be negligible with respect to the ram pressure, i.e. α = P th /P ram → 0. Yet, at different distances from the SMBH, the factor α(r) = P th /P ram = c s (r) 2 /v (r) 2 may in principle change and become non-negligible. The ratio of standoff radii between the apocentre and the pericentre of the where (R 0A /R 0P ) 0 is the ratio with a neglected thermal pressure, Eq. B.8. The thermal term at the pericentre may be evaluated as follows, α P = c s (r P ) 2 /v (r P ) 2 = κk B T P µm p a µ 1 − e 1 + e (B.14) where T P is the gas temperature at the pericentre, µ is the mean molecular weight, and m p is a proton mass. The ratio of the thermal terms at the apocentre and the pericentre then is, where δ ≥ 0 is a power-law index of the spherical temperature profile of the ambient medium, T a (r) = T 0 (r 0 /r) δ , where T 0 = T a (r 0 ). The extra term in Eq. (B.13) would vanish if α P = α A , which would occur if e = 0. Using Eq. (B.15) we may rewrite Eq. (B.13) into the form, 1 + α P (T P , a, e) 1 + α P (T P , a, e) 1+e For the estimation of the factor F AP in brackets that arises due to thermal pressure, we consider the orbital elements of S2 star and the following temperature profile of the ambient medium (Psaltis 2012;Broderick et al. 2011), where δ = 0.84 and T 0 = 9.5 × 10 10 K. After calculation, the correction term is 0.8 for S2 star, so every ratio in Table B.1 should be slightly adjusted, R 0A /R 0P 0.8(R 0A /R 0P ) 0 , if the temperature profile, Eq. (B.17), holds. Including the thermal pressure term, the formula for the density power-law index γ based on the ratio of the apocentre and the pericentre standoff radii changes accordingly, γ AP = 2 (log (R 0A /R 0P ) − log F AP )/ log [(1 + e)/(1 − e)] − 1 . (B.18) Similarly, using the semi-latus rectum-pericentre ratio R 0,90 /R 0P , one can derive the slope γ LP modified by the thermal therm F LP in the following way,