<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Survival of the Fittest: Numerical Modeling of SN 2014C</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>05/01/2022</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10351657</idno>
					<idno type="doi">10.3847/1538-4357/ac649d</idno>
					<title level='j'>The Astrophysical Journal</title>
<idno>0004-637X</idno>
<biblScope unit="volume">930</biblScope>
<biblScope unit="issue">2</biblScope>					

					<author>Felipe Vargas</author><author>Fabio De Colle</author><author>Daniel Brethauer</author><author>Raffaella Margutti</author><author>Cristian G. Bernal</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Abstract                          Initially classified as a Type Ib supernova (SN), ∼100 days after the explosion SN 2014C made a transition to a Type II SN, presenting a gradual increase in the H              α              emission. This has been interpreted as evidence of interaction between the SN shock wave and a massive shell previously ejected from the progenitor star. In this paper we present numerical simulations of the propagation of the SN shock through the progenitor star and its wind, as well as the interaction of the SN ejecta with the massive shell. To determine with high precision the structure and location of the shell, we couple a genetic algorithm to a hydrodynamic and a bremsstrahlung radiation transfer code. We iteratively modify the density stratification and location of the shell by minimizing the variance between X-ray observations and synthetic predictions computed from the numerical model, allowing the shell structure to be completely arbitrary. By assuming spherical symmetry, we found that our best-fit model has a shell mass of 2.6              M              ⊙              ; extends from 1.6 × 10              16              cm to 1.87 × 10              17              cm, implying that it was ejected ∼ 60/(              v                              w                            /100 km s              −1              ) yr before the SN explosion; and has a density stratification with an average behavior ∼              r              −3              but presenting density fluctuations larger than one order of magnitude. Finally, we predict that if the density stratification follows the same power-law behavior, the SN will break out from the shell by mid-2022, i.e., 8.5 yr after explosion.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">Introduction</head><p>While mass loss is one of the key mechanisms regulating the evolution of massive stars, a complete understanding of it is still missing, especially during the final phases before the supernova (SN) explosion (e.g., <ref type="bibr">Smith 2014)</ref>. The mass-loss history &#61576;100-1000 yr before core-collapse SN explosions can be inferred from the radio and X-ray emission resulting from the propagation of the SN shock through the circumstellar material (for a review see, e.g., <ref type="bibr">Chevalier &amp; Fransson 2017)</ref>. While the bulk of the SN ejecta emits in the optical, the shockheated gas resulting from the interaction with the environment might be observed in X-ray and radio owing to bremsstrahlung and synchrotron radiation from relativistic electrons accelerated at the shock front.</p><p>The forward shock (FS) of Type Ib/c SNe, originated from pre-SN stars with high mass loss before collapse, interacts with the wind of the progenitor star, which has typical mass-loss rates of M 10 10</p><p>&#61478; ~---M e yr -1 . The wind is often not smooth, as proven by radio emission, showing small flux fluctuations of &#8764;a few over timescales of tens to hundreds of days after the explosion (e.g., <ref type="bibr">Bietenholz &amp; Bartel 2005;</ref><ref type="bibr">Soderberg et al. 2006;</ref><ref type="bibr">Schinzel et al. 2009;</ref><ref type="bibr">Wellons et al. 2012;</ref><ref type="bibr">Salas et al. 2013;</ref><ref type="bibr">Bietenholz et al. 2014;</ref><ref type="bibr">Corsi et al. 2014;</ref><ref type="bibr">Palliyaguru et al. 2019)</ref>.</p><p>In a few cases, Type Ib/c SNe show signs of much stronger interaction between the ejecta and shells of material ejected before the explosion. For instance, SN 2006jc exploded inside a dense He-rich environment (e.g., <ref type="bibr">Foley et al. 2007)</ref>, likely produced by an outburst ejected &#8764;2 yr before the SN event. In addition, SN 2001em, initially classified as a Type Ib SN, presented prominent H&#945; emission lines at 2.5 yr. Associated with strong radio and X-ray emission, this was interpreted as evidence of the interaction between the SN ejecta and a massive (&#8764;3 M e ) hydrogen-rich shell located at &#8764;7 &#215; 10 16 cm from the progenitor iron core <ref type="bibr">(Chugai &amp; Chevalier 2006;</ref><ref type="bibr">Chandra et al. 2020)</ref>. Several other SNe show similar signs of early interaction with massive shells (see, e.g., <ref type="bibr">Anupama et al. 2005;</ref><ref type="bibr">Dwarkadas et al. 2010;</ref><ref type="bibr">Ben-Ami et al. 2014;</ref><ref type="bibr">Moriya &amp; Maeda 2014;</ref><ref type="bibr">Chen et al. 2018;</ref><ref type="bibr">Mauerhan et al. 2018;</ref><ref type="bibr">Pooley et al. 2019;</ref><ref type="bibr">Suzuki et al. 2021</ref>). Nevertheless, while in all these cases the intermediate phases of the transition between Type Ib and Type IIn SNe were not observed, this transition has been observed in detail in SN 2014C.</p><p>Discovered by the Lick Observatory Supernova Search (LOSS; <ref type="bibr">Kim et al. 2014)</ref> in the NGC 7331 galaxy at a distance of 14.7 Mpc and initially classified as a Type Ib SN, SN 2014C made a transition to a Type IIn SN &#8764;100 days after the explosion, showing strong H&#945; emission <ref type="bibr">(Milisavljevic et al. 2015)</ref>. The modeling of the optical/UV light curve shows that SN 2014C has a kinetic energy of (1.75 &#177; 0.25) &#215; 10 51 erg, with an ejecta mass of 1.7 &#177; 0.2 M &#9737; and a nickel mass of 0.15 &#177; 0.02 M &#9737; <ref type="bibr">(Margutti et al. 2017)</ref>.</p><p>SN 2014C has also been extensively observed with the X-ray Telescope (XRT; <ref type="bibr">Burrows et al. 2005</ref>) on board the Neil Gehrels Swift Observatory <ref type="bibr">(Gehrels et al. 2004</ref>) and the Chandra X-ray Observatory (CXO) in the 0.3-10 keV energy band, as well as by the Nuclear Spectroscopic Telescope Array (NuSTAR) from 3 to 79 keV <ref type="bibr">(Margutti et al. 2017;</ref><ref type="bibr">Brethauer et al. 2020</ref><ref type="bibr">Brethauer et al. , 2021))</ref>. Most of the detected X-ray emission is Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. concentrated in the 1-40 keV energy band, while emission below &#8764;1 keV is strongly absorbed.</p><p>The observed X-ray emission increased at 250 days, although the lack of temporal coverage between 100 and 250 days implies that likely the onset of the X-ray increase was at a smaller time. Integrated over the spectral range 0.3-100 keV, it increased from 5 &#215; 10 39 erg s -1 to 5 &#215; 10 40 erg s -1 . Then, it peaked at &#8764;850-1000 days and maintained a nearly constant flux until &#8764;2000 days after the explosion <ref type="bibr">(Brethauer et al. 2020)</ref>.</p><p>Radio observations showed a similar behavior. Light curves of the SN at 15.7 GHz taken with the Arcminute Microkelvin Imager (AMI) between 16 and 567 days showed that the flux increased rapidly at &#8764;100-150 days <ref type="bibr">(Anderson et al. 2017)</ref>.A similar increase (by more than one order of magnitude) was observed by the Very Large Array (VLA; <ref type="bibr">Margutti et al. 2017)</ref>. Furthermore, observations done by using very long baseline interferometry (VLBI) found that the shock expansion has already strongly decelerated 384 days after the explosion <ref type="bibr">(Bietenholz et al. 2018</ref><ref type="bibr">(Bietenholz et al. , 2021))</ref>.</p><p>The evolution of radio, optical, and X-ray emission has been interpreted by considering the interaction of the SN ejecta with a low-density steady wind with M 51 0</p><p>(assuming a wind velocity v w = 1000 km s -1 ; see <ref type="bibr">Anderson et al. 2017;</ref><ref type="bibr">Margutti et al. 2017</ref>) and a higher-density, extended circumstellar medium (CSM). Although most previous studies agree on the position of the denser shell (e.g., R shell &#8764; (5-6) &#215; 10 16 cm from the progenitor iron core; <ref type="bibr">Milisavljevic et al. 2015;</ref><ref type="bibr">Anderson et al. 2017;</ref><ref type="bibr">Margutti et al. 2017;</ref><ref type="bibr">Tinyanont et al. 2019;</ref><ref type="bibr">Sun et al. 2020</ref>), different models have been proposed with respect to the shell thickness, mass, and structure. Consistently with the fact that the interaction lasts several years, <ref type="bibr">Bietenholz et al. (2021)</ref>, <ref type="bibr">Bietenholz et al. (2018)</ref>, <ref type="bibr">Margutti et al. (2017), and</ref><ref type="bibr">Milisavljevic et al. (2015)</ref> interpreted the data as evidence of the interaction between the SN shock and a thick and massive shell with a size &#916;R shell &#8764; R shell and a mass M shell &#8764; 3.00 M &#9737; . On the other hand, Harris &amp; Nugent (2020) consider a progenitor with a lower mass-loss rate, which formed a "wall" at R w &#8764; 10 16 cm and resulted in a thin shell with size &#916;R w &#61576; 0.25R w , corresponding to a lower mass, M w = 0.04-0.31 M &#9737; . A similar structure, with a thin, high-density shell and an extended outer medium, is also inferred by <ref type="bibr">Tinyanont et al. (2019)</ref>.</p><p>In order to explain the presence of a dense CSM around the progenitor of SN 2014C, two possible scenarios have been suggested. In the first scenario, it is assumed that the progenitor of SN 2014C was a star with a steady mass-loss rate, resulting in a stratified, low-density environment with a density Mr w 2 &#61478; r &#181; -(e.g., <ref type="bibr">Anderson et al. 2017;</ref><ref type="bibr">Margutti et al. 2017;</ref><ref type="bibr">Bietenholz et al. 2018</ref><ref type="bibr">Bietenholz et al. , 2021;;</ref><ref type="bibr">Harris &amp; Nugent 2020)</ref>. In this scenario, the mass-loss rate had an abrupt increase roughly tens to hundreds of years before the explosion (with M 10 10 w 32</p><p>&#61478; ~---M &#9737; yr -1 assuming a wind velocity v w &#8764; 100 km s -1 ), creating a spherically symmetric expanding high-density CSM (with a density &#8764;10 6 cm -3 ). Sun et al.</p><p>(2020) depicted a different scenario, in which the dense CSM results from an 11 M e star stripped of its outer envelope by binary interaction.</p><p>In synthesis, in addition to the progenitor star, the structure, extension, and mass of the environment leading to the X-ray emission have been extensively debated. Clarifying the structure of the dense CSM leading to the X-ray emission, i.e., its density profile and total mass, is the main aim of this paper.</p><p>Radio emission and X-ray emission from the SN shock are typically described by considering a self-similar behavior for the dynamics (e.g., <ref type="bibr">Chevalier 1982;</ref><ref type="bibr">Chevalier &amp; Liang 1989;</ref><ref type="bibr">Chevalier 1998</ref>). In the case of an SN interacting with a massive shell, we cannot assume a self-similar behavior for the flow, as the interaction with the shell leads to the formation of a strong reverse shock (RS). Then, although an analytical description gives a qualitative picture of the problem, a detailed understanding of the dynamics can be achieved only employing numerical simulations.</p><p>Typically, running a large number of models covering a predefined number of parameters provides sufficient detail of the dynamics. When running computational intensive hydrodynamical simulations, however, this approach necessarily limits the parameter space explored. To handle this limitation, in this paper we use an optimization method (a genetic algorithm (GA)) to iteratively determine a relatively large number of parameters by running a limited number of numerical simulations. Although there have been a wide range of applications of GAs in astrophysics (e.g., Charbonneau 1995), it is the first time that this method has been applied by coupling hydrodynamic simulations with radiative transfer, in order to obtain an optimized solution for the CSM density profiles.</p><p>Specifically, we run a set of numerical simulations coupled to a GA. The GA iteratively adapts the values of the shell density by minimizing the difference between the synthetic X-ray emission (computed by post-processing the results of the hydrodynamical simulations) and observations of this SN presented in <ref type="bibr">Margutti et al. (2017)</ref>, <ref type="bibr">Brethauer et al. (2020), and</ref><ref type="bibr">Brethauer et al. (2021)</ref>. In this approach, the physical space is divided into several parts (according to the epochs of observations), and each part has a density &#961;(r i )( with i = 1, ..., N) that is considered a parameter of the model.</p><p>The paper is organized as follows: In Section 2 we describe the hydrodynamics code and the initial conditions of the simulations, the bremsstrahlung radiation transfer code, and the GA employed to solve the optimization problem and to find the density stratification of the shell. In Section 3 we present the results of our numerical calculations. In Section 4 we discuss the limits of the simulations presented and the implications of our findings. Finally, in Section 5 we draw our conclusions.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">Methods</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1.">Numerical Codes and Initial Conditions</head><p>We study the interaction of an SN shock with a massive shell by running a set of one-dimensional (1D), spherically symmetric simulations with the Adaptive Mesh Refinement (AMR) code Mezcal <ref type="bibr">(De Colle et al. 2012)</ref>. The code solves the special relativistic hydrodynamics equations and has been extensively used to run numerical simulations of astrophysical flows (e.g., De <ref type="bibr">Colle et al. 2014</ref><ref type="bibr">Colle et al. , 2018</ref><ref type="bibr">Colle et al. , 2018;;</ref><ref type="bibr">Gonz&#225;lez-Casanova et al. 2014)</ref>.</p><p>We follow the propagation of the SN shock front as it moves through a computational grid covering &#8764;nine orders of magnitude in space, from &#8764;2 &#215; 10 8 cm (the outer edge of the iron core) to &#8764;2 &#215; 10 17 cm. We do so by running two sets of simulations. First, we follow the propagation of the SN shock front as it moves through the progenitor star, e.g., from &#8764;10 8 to 10 11 cm. Then, after remapping the results of the small-scale simulation into a much larger computational box, we follow its propagation through the wind of the progenitor star and its interaction with the massive shell located at &#61577;10 16 cm.</p><p>We set the density profile of the progenitor star by using the E25 pre-SN model from <ref type="bibr">Heger et al. (2000)</ref>. This corresponds to a star that has lost its outer envelope. The resulting star has a mass of 5.45 M e and a radius of &#8764;3 &#215; 10 10 cm. The computational grid extends radially from 2.2 &#215; 10 8 cm to 6.6 &#215; 10 11 cm. We employ 20 cells at the coarsest level of refinement, with 22 levels of refinement, corresponding to a resolution of 1.6 &#215; 10 4 cm. We set reflecting boundary conditions at the inner boundary and outflow boundary conditions at the outer boundary of the computational box. The SN energy (E SN &#8776; 10 51 erg) is imposed by setting the pressure of the two inner cells of the computational box as</p><p>, where &#915; ad is the adiabatic index and V is the volume of the two cells. We employ a variable adiabatic index &#915; ad , bridging between the relativistic &#915; ad = 4/3 and the Newtonian &#915; ad = 5/3 cases (see Section 2.4 of De <ref type="bibr">Colle et al. 2012)</ref>.</p><p>Figure <ref type="figure">1</ref> shows the initial density stratification of the star and of the ejecta at 50 s. The SN energy has been chosen to match that derived by <ref type="bibr">Margutti et al. (2017)</ref>, while the ejecta mass is larger (3.5 M e in our simulations vs. 1.7 &#177; 0.2 M e inferred by <ref type="bibr">Margutti et al. 2017)</ref>. Anyway, we notice that (1) the mass inferred depends strongly on the (uncertain) opacity coefficient &#954; (see Maund 2018, and references therein) and (2) as we set a reflective boundary condition at the inner boundary, our simulations do not include fallback, which could decrease the ejecta mass.</p><p>Outside the stellar surface, we take</p><p>, where M 51 0 w 6</p><p>&#61478; =&#180;-M e yr -1 and v w = 10 8 cm s -1 are the massloss rate and velocity of the wind launched by the star before the collapse, respectively. As the velocity of the SN shock front is about two orders of magnitude larger than the stellar wind (i.e., &#8764;10 10 cm s -1 vs. &#8764;10 8 cm s -1 ), we assume that the wind medium is static. The propagation of the SN shock front is followed as it breaks out of the progenitor star and arrives at 4.5 &#215; 10 11 cm in 50 s.</p><p>In the large-scale simulations, the computational box goes from 10 10 cm to 5 &#215; 10 17 cm. For r &lt; 4.5 &#215; 10 11 cm we set the density, pressure, and velocity by using the values determined from the small-scale simulation. We save outputs each &#8764;20 simulated days and at the times corresponding to the available observational epochs. For larger radii, we take the density stratification as</p><p>, with M 51 0 w 6</p><p>&#61478; =&#180;and v w = 10 8 cm s -1 as in the small-scale simulation. We employ 150 cells, with 20 levels of refinement in the AMR grid, corresponding to a resolution of 2.5 &#215; 10 9 cm. By running different simulations in which we change the number of levels of refinement between 14 and 22 levels, we verify that 20 levels of refinement are enough to achieve convergence.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2.">Bremsstrahlung Emission Code</head><p>To compare models with observations, we compute the X-ray bremsstrahlung emission coming from the shocked plasma by post-processing the results of the hydrodynamical simulations. We assume that the shocked material is completely ionized<ref type="foot">foot_1</ref> so that it does not contribute to the bound-free opacity and the unshocked shell is neutral. Extending the radio synchrotron emission to X-rays by assuming <ref type="bibr">Margutti et al. (2017)</ref> showed that the contribution of synchrotron emission to the X-ray flux is negligible (&#8764;2 orders of magnitude smaller than the observed values), suggesting a thermal origin for the X-rays.</p><p>The specific flux is given by</p><p>, with D = 14.7 Mpc the luminosity distance from SN 2014C <ref type="bibr">(Freedman et al. 2001)</ref>, and I &#957; is the specific intensity.</p><p>The observed X-ray radiation is due to thermal bremsstrahlung emission caused by the interaction between the SN shock and a massive shell <ref type="bibr">(Margutti et al. 2017)</ref>. To determine the specific intensity, we solve the radiation transfer equation</p><p>where S &#957; = j &#957; /&#945; &#957; is the source function, &#964; &#957; = &#8747;&#945; &#957; dl is the optical depth, and j &#957; and &#945; &#957; are the emissivity and the absorption coefficient, respectively. The radiation transfer equation is solved by a standard approach (see, e.g., Section 9.2 of <ref type="bibr">Bodenheimer et al. 2007</ref>). Shortly, we created a twodimensional grid in cylindrical coordinates. We mapped the results of our 1D simulations on this grid and integrate along 200 rays. We compute the intensity in the plane of the sky, whose integration leads to the flux (see Equation (1)).</p><p>In addition to the bremsstrahlung (free-free) self-absorption, we also consider bound-free absorption, which at early times dominates absorption for frequencies &#61576;10 18 Hz, so that</p><p>To compute the bound-free absorption, we use tabulated cross sections for solar metallicity <ref type="bibr">(Morrison &amp; McCammon 1983)</ref>. For the bremsstrahlung coefficients we take (e.g., <ref type="bibr">Rybicki &amp; Lightman 1986)</ref> jZ n n T e G 6.8 4 10 4</p><p>Progenitor pre-explosion density profile (blue line) and ejecta density profile (orange line, at 50 s) in mass coordinates. As the computational box extends from 2.2 &#215; 10 8 cm, the figure does not include the mass of the iron core (corresponding to ~1.8 M e ).</p><p>T Znn eG 3.7 10 1 , 5</p><p>where Z, n e , and n i are the atomic number and electron and ion densities, respectively, and G is the Gaunt factor (&#8764;1 for the range of parameters considered here). All other variables have their usual meaning, and everything is in cgs units. The electron/ion densities and the temperature are directly determined from the numerical simulations by assuming that the ejecta is an ideal gas with solar metallicity. We also assume that electrons and ions have the same temperature. Cooling is not included in the numerical simulations, as the bremsstrahlung cooling timescale is t ff = 60(T/10 8 K)(n e /10<ref type="foot">foot_2</ref> cm -3 ) yr, so it is much larger than the timescales studied here.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3.">Computing the Shell Parameters from a Grid of Models</head><p>As a first attempt to reproduce the observed X-ray emission, we have first considered a massive, uniform cold shell located at radius R s , with mass M s and thickness &#916;R s . To determine the best values for these three parameters, we run a grid of 1815 models by using 11 values of M s (in the range 1.5-2.5 M e ),15 values of &#916;R s (ranging from 7.5 &#215; 10 14 cm up to 2.5 &#215; 10 15 cm), and 11 values of R s (from 1.8 &#215; 10 16 cm to 7.8 &#215; 10 16 cm). To compare the results of the numerical simulations with observations, we have then employed the ray-tracing code described in Section 2.2.</p><p>Unfortunately, none of the models provided a reasonable fit of the data. In particular, shells with larger density (i.e., larger mass and smaller thickness) reproduce well the early observational epochs, while shells with smaller densities (i.e., smaller mass and thicker) reproduced well the late observational epochs. This indicates that the shell density is not constant and has a decreasing density from smaller to larger radii.</p><p>We notice that, as the origin of the massive shell is not understood, it could in principle have an arbitrary shape. In this case, to find the density at several radii is a task that is not possible to achieve with a grid of numerical models. For instance, a grid of 10 values for the density at 10 different radii implies running 10 10 simulations. Thus, to determine the density stratification of the shell, we decided to solve the "full" optimization problem. This is done by coupling the Mezcal code with two other codes: a radiation transfer code that computes the bremsstrahlung radiation (see Section 2.2), and a GA (described in Section 2.4) that automatically and randomly changes the density profile inside the shell by minimizing the variance between the synthetic observations computed from the numerical model and the X-ray observations, allowing the density profile to be completely arbitrary.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.4.">Genetic Algorithm</head><p>GAs (e.g., Rajpaul 2012) are based on the theory of natural selection. GAs are commonly used optimization methods, 6 employed also in astrophysics to solve problems with many degrees of freedom, in which finding the optimal solution would be very hard otherwise (e.g., <ref type="bibr">Cant&#243; et al. 2009;</ref><ref type="bibr">D e Geyter et al. 2013;</ref><ref type="bibr">Morisset 2016</ref>). Nevertheless, this is the first time, as far as we know, that optimization methods are coupled directly to hydrodynamical simulations.</p><p>We run a single small-scale simulation following the propagation of the shock wave in the interior of the star. Then, we use the SN ejecta structure given by this simulation to initialize large-scale numerical simulations. The GA (see Figure <ref type="figure">2</ref> for a schematic description of the algorithm) is then used to find the best density stratification of the shell by running several simulations of the interaction of the SN ejecta with the massive shell.</p><p>The initial conditions of the large-scale simulations are described in Section 2.1. The shell structure is initialized in the numerical simulations by a power-law interpolation of the densities &#961;(r i )( with i = 1,K,11) defined at 11 radial positions r i . Nine of the radii r i are determined directly from the numerical simulations and are given by the location of the shock at the nine available observational epochs. Additionally, we define two densities, one at a smaller radius (r 1 ) and one at a larger radius (r 11 ). While the value of r 1 = r 2 /2i sfixed, r 11 is allowed to vary to get the necessary absorption.</p><p>Thus, the 11 values of density (and the corresponding 11 radial positions) represent the parameters of the optimization process. We do not impose any constraint on the value of the densities. At the beginning of the iterative process, 10 constantdensity shell structures are defined, with equally spaced values (defined in log space) between n = 10 2 cm -3 and n = 10 8 cm -3 and located at a radius r i = 2 &#215; 10 16 cm to 4 &#215; 10 16 cm. This choice of the initial parameters is completely arbitrary. Indeed, as usual in optimization methods, the final results are independent of the initial choice of the parameters.</p><p>Then, we create 90 new shell structures. Half of the densities &#961;(r i ) are defined by randomly choosing two shell structures from the initial set and applying to them crossover and mutation (see below), while the other half are initialized by directly copying the density values from one random shell structure and modifying it only by mutation. In GA, the fraction of the parameters that should change as a result of mutation and crossover depends on the particular problem studied. Empirically, we found that, for the optimization problem discussed in this paper, setting equal probability for the crossover and mutation processes was producing reasonably fast results. Anyway, we did not attempt to find the fraction of mutations/crossover that reduces the number of iterations to a minimum. Optimizing it and replacing the GA Flowchart showing the GA employed to determine the density stratification of the massive shell interacting with SN 2014C. First, we initialize a set of shell density profiles. We modify the initial densities by mutations and crossover (see the text for details). We run hydrodynamical simulations following the interaction of the SN ejecta with the shell and compute synthetic X-ray spectra, which are compared with the observations. We select the "best" simulations using a "fitness function" (the &#967; 2 test). The process is repeated until convergence.</p><p>with more efficient optimization methods could reduce substantially the final computational time.</p><p>In the crossover process, two values of density taken from a previous iterative step are mixed by choosing randomly values of densities from each shell structure (e.g., the first and second densities from the first density profile, the third density from the second profile, and so on). This process is inspired by the genetic mixing present in biological evolution. In the mutation process we modify randomly one density in each profile. We do so by setting a Gaussian distribution around the original value of the density &#961; 0 , with a width given by &#961; i /2 in 90% of the cases and by 10&#961; 0 in 10% of the cases, so that in a few cases the system explores density values far away from the initial one (to avoid being trapped by a local minimum).</p><p>The shell densities are then mapped as initial conditions into the Mezcal code in each step. Then, after each simulation is completed, the bremsstrahlung X-ray emission is computed by post-processing the results. A fitness function (a reduced &#967; 2 test) is applied to compare the synthetic spectra produced by the model and the observational data at nine epochs: <ref type="bibr">308, 396, 477, 606, 857, 1029, 1257, 1574, and 1971</ref> days after explosion. The fittest 10 simulations (out of the new 90 and the old 10 sets of simulations) are then used as the initial condition for a new step.</p><p>This process converged in &#8764;150 iterations, for a total number of &#8764;10 4 simulations, then reducing the number of simulations by a factor of 10 6 with respect to a grid of simulations covering a similar number of parameters. Each simulation took &#8764;10 minutes so that the entire process could be completed in less than a day.</p><p>The simulations were done on a cluster of CPUs, by using the "Message Passing Interface" library. At each iteration, the master node initialized and synchronized the simulations, selected the best simulations/shell structures, and managed the crossover/mutation processes, while the other nodes ran (in parallel) each of the 90 hydrodynamics simulations and computed the X-ray spectra and the fitness function (a &#967; 2 test).</p><p>Figure <ref type="figure">3</ref> shows the evolution of the fitness function (the normalized &#967; 2 ) for the best and worst simulation (among the 10 fittest simulations) during each iteration step. The solution reaches a minimum of &#967; 2 &#8776; 3.03. The evolution of the density profile of the massive shell as a function of radius and iteration is shown in Figure <ref type="figure">4</ref>. At the beginning of the iteration process, the solution fluctuates substantially between different iterations, to then converge to a final density profile (shown in blue in the figure). The density profile and the value of &#967; 2 are discussed in more detail below.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">Results</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1.">SN Shock Propagation through the Progenitor Wind</head><p>The propagation of the shock wave through the star has been extensively studied for both the nonrelativistic regime (e.g., <ref type="bibr">Sakurai 1960;</ref><ref type="bibr">Matzner &amp; McKee 1999)</ref> and the mildly relativistic regime (e.g., <ref type="bibr">Tan et al. 2001;</ref><ref type="bibr">Nakar &amp; Sari 2010;</ref><ref type="bibr">Waxman &amp; Katz 2017)</ref>. As the shock approaches the surface of the progenitor star and moves into the stellar envelope, in which the density drops steeper than &#961; &#8733; r -3 , the shock velocity increases to mildly relativistic speeds.</p><p>As a result, once the SN shock breaks out in &#8764;25 s, most of the mass (and energy) of the SN moves at velocities &#8764;10 4 km s -1 , while a small fraction of the mass (corresponding to a kinetic energy &#8776;10 47 ergs) expands with larger velocities (up to v sh &#8764; 0.5c in our simulations). Self-similar solutions describing the propagation of the SN shock through a polytropic envelope (with &#961; env &#8733; (R/r -1) k ) predict an ejecta density stratification &#961; &#8733; r -n after the breakout, with n = 7-11, depending on the structure of the progenitor star. We get a nearly constant density profile in the inner ejecta (containing most of the mass; see Figure <ref type="figure">5</ref>), while the outer ejecta has a steep density profile, i.e., &#961; &#8764; r -10.3 .</p><p>Then, we run a set of simulations by using as input the outcome of the small-scale simulations, i.e., density, pressure, and velocity profiles. As described in Section 2.4, we compute the shell density profile that minimizes the variance between the bremsstrahlung emission computed from the numerical model and the observations. In the following, we discuss the evolution of the SN shock front while it propagates into the progenitor wind and interacts with the shell density profile obtained after the GA algorithm has converged.  Evolution of the number density profiles (in units of cm -3 ) of the outer shell during the iteration process (black lines, with increasing opacity from lower to higher iteration numbers). The final density profile is shown in blue.</p><p>Figure <ref type="figure">5</ref> shows the evolution of the ejecta before interacting with the outer shell. The expansion of the SN ejecta through the progenitor wind leads to the formation of a double-shock structure, formed by the FS, which accelerates and heats the WR wind, and the RS, which decelerates and heats the SN ejecta. Following <ref type="bibr">Chevalier (1982)</ref>, the evolution of the FS and RS is self-similar, with R &#8764; t m , where m = (n -3)/(n -2).By taking n = 10.3, we get m &#8764; 0.88, which is consistent with the evolution of the shock wave obtained in our simulation.</p><p>In our simulations, the SN shock acceleration stops only when the shock arrives at the very edge of the progenitor star. This leads to an overestimation of the true shock velocity, as the shock acceleration should stop once the stellar envelope becomes optically thin to the radiation coming from the postshock region. A detailed calculation of the shock acceleration and breakout is an open problem, which requires a radiation hydrodynamics code. Once the SN ejecta interacts with the shell (see below), the shock velocity quickly drops. Then, the late evolution of the system will be independent of the particular shock velocity obtained, while it will depend on the energy stratification of the SN ejecta, i.e., on the properties of the explosion (energy, ejected mass, fallback, and so on) and of the progenitor star. A detailed study of it could potentially constrain the progenitor star and is left for a future study.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2.">SN Shock Interaction with the Massive Shell</head><p>At &#8764;50 days after the explosion, the shock begins interacting with the massive shell. Radio and optical observations showed that the interaction started &#8764;100 days after the explosion <ref type="bibr">(Milisavljevic et al. 2015;</ref><ref type="bibr">Anderson et al. 2017)</ref>. Then, our simulations overestimate the average shock velocity by a factor of &#8764;2 with respect, e.g., to radio observation by <ref type="bibr">Bietenholz et al. (2018)</ref> or to the shock velocity inferred by <ref type="bibr">Milisavljevic et al. (2015)</ref> from absorption lines at 10 days. A lower shock velocity can be due, as mentioned above, to the loss of thermal energy during the shock breakout or, alternatively, to a less steep density profile in the outer layers of the progenitor stars.</p><p>The interaction of the ejecta with the shell is shown in Figures <ref type="figure">6</ref> and<ref type="figure">7</ref>. The shell presents large density fluctuations (see the top panel of Figure <ref type="figure">7</ref>). Then, the shock propagation leads to the formation of strong RSs, whose interaction produces the complex shock structure observed in Figure <ref type="figure">7</ref>. Once interacting with the shell, the shock velocity<ref type="foot">foot_3</ref> quickly drops to &#8764;7500 km s -1 and then maintains an approximately constant velocity (see Figure <ref type="figure">6</ref>). Small fluctuations in the shock velocity are present at &#8764;10 3 days (see the bottom panel of Figure <ref type="figure">3</ref>), with increases (drops) in velocity by &#8764;3000 km s -1 Figure <ref type="figure">5</ref>. Top panel: number density in mass coordinates at 50 s. Middle panel: time evolution of the SN shock as it moves through the wind of the progenitor star. The outer ejecta has a self-similar density profile &#961; &#8733; r -10.3 . Bottom panel: structure of the dense CSM located between 1.6 &#215; 10 16 cm and 2 &#215; 10 17 cm. The plot also shows r -2 and r -3 density profiles as a reference. The dense CSM is roughly composed of three consecutive shells; the first goes from 2 &#215; 10 16 cm up to 5 &#215; 10 16 cm, the second from 5 &#215; 10 16 cm up to 10 17 cm, and the third from 10 17 cm up to 1.6 &#215; 10 17 cm, with an average shell density declining like r -3 . During the self-similar phase, the shock velocity drops from &#8764;0.35c to &#8764;0.15c. After interacting with the shell, it drops to &#8764;0.025c. The inset shows a zoom-in corresponding to t &#61576; 2000 days. Velocities inferred from VLBI observations <ref type="bibr">(Bietenholz et al. 2018</ref>) are also included in the plot. Bottom panel: evolution of the FS and RS (in mass coordinates).</p><p>corresponding to drops (increases) in the density. The velocities inferred in our model differ from those estimated by VLBI observations <ref type="bibr">(Bietenholz et al. 2018</ref>) by &#8776;50% (slightly larger than 1&#963;; see the middle panel of Figure <ref type="figure">6</ref>).</p><p>The bottom panel of Figure <ref type="figure">7</ref> shows the evolution of the FS and RS in mass coordinates. Before interacting with the dense CSM, the low-mass post-shock structure remains thin, with the FS and RS very close to each other. While the ejecta interact with the dense CSM, more and more mass is accumulated in the post-shock region, separating the two shocks when seen in mass coordinates. By the end of the simulation (&#8764;2000 days after the explosion), most of the CSM mass and about half of the ejecta mass have been shocked.</p><p>The velocity plot (third panel from the top in Figure <ref type="figure">7</ref>) illustrates the evolution of the different components, i.e., the unshocked CSM (the stationary medium at large radii), the unshocked ejecta (the region with increasing velocities at small radii), and the shocked CSM and ejecta (the region with fluctuating velocities between the unshocked ejecta and CSM).</p><p>Initially, the RS is stronger than the FS. Thus, the shocked ejecta is hotter than the shocked wind, i.e., the progenitor wind accelerated and heated by the SN shock front (Figure <ref type="figure">7</ref>, blue and green lines in the middle panel). As the ejecta crosses the RS and approaches the RS velocity, the RS temperature drops, becoming smaller than the FS temperature. Thus, the bremsstrahlung specific emission (larger at smaller temperatures) is initially dominated by the shocked wind and later the bremsstrahlung emission is dominated by the shocked ejecta. We also notice that the unshocked ejecta mainly cools by adiabatic expansion.</p><p>A fit to the density profile (see Figure <ref type="figure">5</ref>, bottom panel) gives &#961; &#8733; r -3.00&#177;0.06 , consistently with the constant shock velocity seen in Figure <ref type="figure">7</ref> (as E &#8764; Mv 2 &#8764; R 3 &#961;v 2 implies that the velocity is constant as long as &#961; &#8733; R -3 and the shock is adiabatic), although the density profile is clearly more complex than what is predicted by a power-law fit, as it presents fluctuations larger than &#8764;1 order of magnitude, apparently being formed by the joining of three different shells that are centered at 4 &#215; 10 16 cm, 7.5 &#215; 10 16 cm, and 13.75 &#215; 10 16 cm. The shell mass is 2.6 M e . This value is consistent with the 3.0 &#177; 0.6 M e (VLB model) determined by <ref type="bibr">Brethauer et al. (2021)</ref>, which also assumes spherical symmetry and is within the range of typical shell masses observed in Type IIn SNe (0.1-10 M e ; see, e.g., <ref type="bibr">Branch &amp; Wheeler 2017;</ref><ref type="bibr">Smith 2017)</ref>.</p><p>One of the parameters of the GA was the 11th density specified in the shell structure (corresponding to the dashed region of Figure <ref type="figure">7</ref>). This was the average density of shell material not yet reached by the SN shock front. This density allows us to determine the amount of neutral hydrogen still to be crossed by the ejecta (inferred from the bound-free absorption). We get M = 0.38 M e for this component at t = 1971 days, which is represented by a constant-density dashed line in the top panel of Figure <ref type="figure">7</ref>. We notice that the exact structure of this region cannot be determined. Nevertheless, it will extend to r &#8764; 2.3 &#215; 10 17 cm if the shell density continues dropping as r -3 , in which case (moving at a constant speed as discussed above) the SN shock will break out of it &#8764;8.5 yr after the explosion. Late X-ray and radio observations will help to constrain the outer structure of the shell. We also notice that <ref type="bibr">Milisavljevic et al. (2015)</ref> constrained the density of the unshocked CSM to be &lt;10 7 cm -3 , which is consistent with the results shown here, and the temperature to be &#8776;(2-8) &#215; 10 4 K.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3.">Radiation</head><p>Figure <ref type="figure">8</ref> shows the total integrated flux over time and Figure <ref type="figure">9</ref> shows the X-ray spectra at <ref type="bibr">308, 396, 477, 606, 857, 1029, 1257, 1571, and 1971</ref> days and the radiation emitted as a result from the models obtained by employing the GA (Section 2.4). Dashed lines are computed by assuming solar metallicity in the neutral shell, whereas the solid lines consider half of the cross section of the material used in the solar-Figure <ref type="figure">7</ref>. Time evolution of the shock front and the SN ejecta while interacting with the dense CSM. The lines corresponds to the epoch in which there are X-ray observations available. "IC" represents the initial shell density profile. The ejecta and the CSM material are represented by thicker and thinner lines, respectively. The separation is at a fixed location when shown in mass coordinates (bottom panel). In addition to nine densities corresponding to the epochs with X-ray data available, the amount of unshocked neutral mass is estimated by considering bound-free X-ray absorption. As the absorption does not depend on the density stratification but only on the amount of mass crossed by the X-rays, we show this region as uniform in the figure (dashed line in the top panel). metallicity model. We include in the figure also the X-ray emission computed by considering a simple r -3 density profile obtained by using as parameters of the GA the normalization factor (i.e., the parameter A in the equation &#961; = Ar -3 ) and the position and width of the shell. The fit is clearly poor in this case, implying that the "bumpy" structure inferred from the GA algorithm is not due to an overfitting of the X-ray data. We also notice that the presence of small-scale fluctuations in the X-ray observations is not generated in our simple 1D model and can be due to the presence of a clumpy medium, which would require a multidimensional study, or to the presence of unresolved lines (this explains the normalized &#967; 2 larger than 1 obtained in our optimizing procedure).</p><p>The best fit, in this case, predicts a larger absorption by a factor &#61576;5a t2&#215; 10 17 Hz than observed. Solid lines, which fit better the observational data, are computed by reducing the cross section by a factor of two and then running a new set of simulations using the GA. We notice that the shell density structure obtained from this calculation is nearly identical to the first one, showing the robustness of the result. The implications of this result will be discussed in the next section.</p><p>Finally, Figure <ref type="figure">8</ref> shows the X-ray flux integrated over the range of frequencies used in the GA, i.e., 0.1-12.5 keV, excluding the region between 5.3 and 7.8 keV, where the emission from Fe lines dominates the X-ray flux. The "bump" models are in general agreement with the observations, and also it is possible to see that observations cannot be explained by a simple r -3 density profile.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">Discussion</head><p>The optimization method employed in this work allows us to determine the detailed structure of the shell. As described in the previous section, the shell has a mass of 2.6 M e (2.2 M e of shocked and 0.4 M e of still unshocked gas) and a density stratification that at first order can be approximated as &#961; &#8733; r -3 and extends from 2 &#215; 10 16 cm to 2 &#215; 10 17 cm. While uncommon in Type Ib SNe, Type IIn SNe show evidence of strong interaction, with shell masses of 0.1-10 M e (see, e.g., Branch &amp; Wheeler 2017; Smith 2017, and references therein). Also, many Type IIn SNe show an X-ray emission inconsistent with a density profile &#961; &#8733; r -2 , implying a steeper density stratification <ref type="bibr">(Dwarkadas &amp; Gruszko 2012)</ref>. While sharing many characteristics with Type IIn SNe, in the case of SN 2014C the shell is located at a much larger distance, implying that it was ejected &#8764; 60/(v w /100 km s -1 ) yr before the SN explosion.</p><p>Several papers have inferred the properties of the massive CSM from the observations. Based on the models of Figure <ref type="figure">8</ref>. X-ray light curve at 0.1-12.5 keV. The observational data (stars) are compared with the models computed by the GA. The three models shown correspond to a cross section computed assuming solar metallicity (indicated by "Model 2" in the figure), a model computed assuming half of that cross section ("Model 1"), and a simplified r -3 density profile model, where the formation of the bumps was not allowed, showing that the bumps are necessary to fit observational data.</p><p>Figure <ref type="figure">9</ref>. Comparison between X-ray observations and synthetic observations computed for the best model. Dashed lines correspond to a bound-free cross section computed for solar metallicity and assuming that the upwind CSM is neutral. Solid lines are obtained by considering half of this bound-free cross section. We do not include the shaded gray area in the fit, as it is dominated by Fe emission lines. The thin lines are computed by assuming a simple r -3 density profile. Curves at different times are rescaled as indicated in the figure, so they do not overlap with each other. <ref type="bibr">Chevalier &amp; Liang (1989)</ref>, <ref type="bibr">Margutti et al. (2017)</ref> modeled the behavior of the X-ray light curve by considering three components: a low-density wind, a high-density shell, and an outer wind with an unknown density profile. <ref type="bibr">Margutti et al. (2017)</ref> modeled the high-density shell as a &#8776;1-1.5 M e , constant-density medium (which is excluded by our numerical simulations). <ref type="bibr">Tinyanont et al. (2019)</ref> and <ref type="bibr">Harris &amp; Nugent (2020)</ref> presented a similar three components model. These works focused on the high-density shell and outlying material. <ref type="bibr">Tinyanont et al.</ref> concluded that &#8764;1 M e of material has been shocked by the SN 2014c ejecta by 400 days. <ref type="bibr">Harris &amp; Nugent (2020)</ref> presented numerical simulations of an SN ejecta interacting with a wall located at r 0 &#8764; 2 &#215; 10 16 cm and with a CSM wind at larger radii. They deduce a small mass for the wall (&#8764;0.04-0.31 M e ), while the CSM wind density is assumed to be a factor 4-7 smaller than the density of the wall at r 0 . The CSM wind, then, corresponds to a mass loss M 10 w 2</p><p>&#61478; ~-M e yr -1 (assuming v w = 10 8 cm s -1 ). Our results (which, we stress, have been obtained by a "blind" fit, i.e., without assumptions on the final shell structure) clarify the structure of the massive CSM. In particular, our results imply that the wall and the CSM wind considered by <ref type="bibr">Harris &amp; Nugent (2020)</ref> are both part of the same extended structure (see Figure <ref type="figure">7</ref>), with the densest shell material located at &#8764;2 &#215; 10 16 cm and the outer shell density dropping quickly with radius. Thus, we conclude that the same event is responsible for the ejection of the full massive shell.</p><p>The parameters determined for SN 2014C are remarkably similar to those inferred for SN 2001em. The X-ray, radio, and H&#945; emission from SN 2001em has been interpreted as evidence of interaction with a 3 M e hydrogen-rich shell <ref type="bibr">(Chugai &amp; Chevalier 2006)</ref>. VLBI observations showed that the shell is located at 7 &#215; 10 16 cm and expanding with a velocity of 5800 &#177; 10 4 km s -1 <ref type="bibr">(Bietenholz &amp; Bartel 2007)</ref>, which is consistent with the 7500 km s -1 inferred here.</p><p>The X-ray emission is strongly absorbed at low frequencies. To compute it, we have used a tabulated cross section that assumes solar metallicity and have assumed that the upstream medium is neutral. We have also shown that employing a smaller cross section leads to a better fit at low frequencies. This has interesting implications for the properties of the upstream shell material.</p><p>There are two physical main mechanisms that can modify the absorption cross section. In the first one the metallicity can be lower than solar (which, by the way, would also lead to a lower X-ray flux). We notice that a lower metallicity is in contradiction with observations of the Fe line. The prominent Fe emission line at 6.7-6.9 keV is consistent with a metallicity larger by a factor of &#8764;5 with respect to solar metallicity. This can be reconciled with our results by assuming that the medium is clumpy, with high-density (and lower-temperature) regions responsible for most of the Fe emission <ref type="bibr">(Margutti et al. 2017)</ref>. In the second one the upstream medium can be partially ionized owing to the strong ionizing X-ray flux coming from the postshock region, as the optical depth is n H 0 s &#181; n , where n H 0 is the density of neutral hydrogen and &#963; &#957; is the bound-free cross section. This is indeed very likely considering that the X-ray emission and/or UV radiation coming from the shocked shell and SN ejecta can partially ionize the unshocked material. In this case, we expect the mass of the shell to be larger than the value obtained in this paper, although by a small factor since the bremsstrahlung emission is n e 2 &#181; . A detailed calculation of the ionization of the shell, left for a future work, will help to clarify which among these two effects is dominant and will potentially help to determine the ionization degree and metallicity of the dense CSM.</p><p>Different origins for the shell have been considered. The possibility of the shell being due to a massive wind ejection (e.g., <ref type="bibr">de Jager et al. 1988;</ref><ref type="bibr">Leitherer 2010;</ref><ref type="bibr">Kuriyama &amp; Shigeyama 2020)</ref> is unlikely, as it would correspond to an extremely large mass-loss rate of &#8764;10 -2 M e yr -1 (v w / 100 km s -1 ). Other possibilities include a sudden outburst some time before collapse, which would remove the most external layer of the star, where almost all hydrogen is found (Smith &amp; Arnett 2014), or binary system interactions in which the envelope of the most massive star has been stripped away <ref type="bibr">(Sun et al. 2020)</ref>. A better understanding of the origin of this ejection can be achieved only by detailed theoretical models coupled to a larger sample of observed interacting SNe. Anyway, future models exploring the origin of this massive shell will need to account for the density profile, size, and mass obtained in this work.</p><p>The dense CSM presents density fluctuations. It is roughly formed by three consecutive shells, the first one from (2-5) &#215; 10 16 cm, the second from (5-10) &#215; 10 16 cm, and the third from (10-16) &#215; 10 16 cm, with average shell density declining like r -3 . The density fluctuations have a characteristic length scale of &#8764;4 &#215; 10 16 cm. A similar length scale has been observed in the radio emission from SN 1979C <ref type="bibr">(Weiler et al. 1991</ref>) and has been interpreted as evidence of a binary system in which the orbital motion modulates the wind density (see Yalinewich &amp; Portegies Zwart 2019), which interacts with the stellar outburst. If this is also the case of SN 2014C, it would imply that the binary system is very detached (as the binary period is ? 4 &#215; 10 16 /v w &#8764; 10 yr v 10 w 81 ( ) -). The companion star would then be not responsible for the loss of the envelope of the primary star. An alternative explanation is that the density fluctuations seen in the GA fit are the direct result of a modulation in the outburst from the progenitor star.</p><p>Finally, we notice that the simulations presented here assume that the shell is spherically symmetric. This is consistent with VLBI observations <ref type="bibr">(Bietenholz et al. 2018)</ref>. On the other hand, the velocities estimated by the GA are smaller than those inferred from VLBI observations (and, puzzling, larger than those inferred by the H&#945; emission line, corresponding to roughly a few thousand kilometers per second). The density profile shown in Figure <ref type="figure">7</ref> shows large-scale (i.e., much larger than the size of our computational cells) density fluctuations that, in spherical symmetry, correspond to fluctuations among contiguous shells of material. Actually, it is likely that the medium is clumpy, with the clumps necessarily breaking the spherical symmetry. In this case, the interaction with the SN ejecta will amplify the inhomogeneities (see, e.g., <ref type="bibr">Guo et al. 2012;</ref><ref type="bibr">Vel&#225;zquez et al. 2017)</ref>, leading to a multiphase medium with denser/colder regions in pressure equilibrium with more tenuous/hotter regions, which could explain the strong Fe emission line observed at &#8764;6.5 keV <ref type="bibr">(Margutti et al. 2017)</ref>.</p><p>A more realistic scenario, with density stratification in the shell not only in the radial but also along the polar direction, could also explain the apparent discrepancies in the velocities inferred by the different emission processes, with faster material, moving along lower-density regions of the shell, emitting in radio and denser regions, moving at lower speeds, emitting in X-rays and radio. Such a complex (but possibly more realistic) scenario requires multidimensional simulations and is left for a future study.</p><p>In addition, if the shell is initially nearly perfectly homogeneous, the contact discontinuity that separates the shocked SN ejecta from the shocked shell is prone to Rayleigh-Taylor (RT) instabilities, so that we can expect the formation of plasma filaments and inhomogeneities in the post-shock region, which cannot be captured by our numerical simulations (but see Harris &amp; Nugent 2020 for an approximated treatment of RT instabilities in 1D simulations). As the bremsstrahlung emission is &#8733; Z 2 n 2 , inhomogeneities in the shell and mixing with the higher-metallicity ejecta lead to a larger emissivity, implying that the mass of the shell should be taken as an upper limit.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">Conclusions</head><p>In this paper, we presented hydrodynamical simulations of the strongly interacting SN 2014C. First, we follow the propagation of an SN shock through the progenitor star. Then, by using as input the outcome of the small-scale simulation (i.e., density, pressure, and velocity profiles), we run a large set of simulations. As described in Section 2.4, we initialize the shell with a uniform density n shell = 10 7 cm -3 .</p><p>We followed the propagation of the SN shock as it interacts with the wind launched by the progenitor Wolf-Rayet star and with the massive shell. We computed the bremsstrahlung emission using the algorithm described in Section 2.2 and compared the results with observations. At each step, we run a large number of simulations changing the shell density profile. As a result, we determine the shell structure. In particular, we get a mass of 2.6 M e for the shell and a density profile roughly dropping as &#961; &#8733; r -3 , although presenting large density fluctuations. We also found that the shell is very extended, with a size &#61577;10 17 cm. If the shell stratification continues with the same average slope, the SN shock will break out of it nearly 8 yr after the explosion, i.e., during 2022.</p><p>Although this paper represents one of the most detailed models of the interaction between the SN ejecta and the surrounding massive CSM, several ingredients are still missing from our model. In particular, we have explored only one pre-SN structure; we have modeled only the X-ray emission, while radio emission (especially images obtained by VLBI; see, e.g., <ref type="bibr">Bietenholz et al. 2021)</ref> contains detailed information about the evolution of the shock and its interaction with the medium; we have not included a detailed treatment of the photoionization of the upwind medium, which can affect the bound-free absorption. Finally, and most importantly, we assumed that the shell structure is spherically symmetric.</p><p>Radio and X-ray emission allows us to understand the massloss history of core-collapse SN progenitors on timescales that are impossible to study by direct observations. As we have shown in this paper, optimization methods can be used, coupled with hydrodynamical simulations, to model the density stratification of the environment once data at several epochs are available, as in the case of SN 2014C. The X-ray emission tracks the FS and RS emission, depending on the density of the environment and the ejecta velocity. The H&#945; emission tracks the shocked shell and the unshocked medium photoionized by the X-ray and UV radiation. Altogether, a detailed fit of the different components can help us to get a better understanding of this system. Then, coupled with detailed modeling of the radio emission, this analysis can allow us to determine the microphysical parameters as a function of time (which are usually degenerate with the density of the environment and ejecta velocity), giving us direct information on the particle acceleration process. In this paper, we describe this technique by analyzing the X-ray bremsstrahlung emission. The extension to radio and optical emission will be considered in a future study.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0"><p>The Astrophysical Journal, 930:150 (11pp), 2022 May 10 Vargas et al.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="5" xml:id="foot_1"><p>This assumption is justified by the large post-shock temperature and the presence of strong photoionizing X-ray and UV emission.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="6" xml:id="foot_2"><p>We have employed GA in this paper, but the results obtained are independent of the particular optimization method chosen.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="7" xml:id="foot_3"><p>A velocity of &#8764;half of this value is inferred from the H&#945; line<ref type="bibr">(Milisavljevic et al. 2015)</ref>. This is consistent with the hydrogen lines being produced in the post-shock clumpy medium or by recombination of the upstream medium.</p></note>
		</body>
		</text>
</TEI>
