{'fraction_non_alphanumeric': 0.03012412957917045, 'fraction_numerical': 0.010545968311635887, 'mean_word_length': 4.438666300768387, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Global modelling of X-ray spectra produced in O-type star winds

High-resolution X-ray spectra of O-type stars revealed less wind absorption than expected from smooth winds with conventional mass-loss rates. Various solutions have been proposed, including porous winds, optically thick clumps or an overall reduction of the mass-loss rates. The latter has a strong impact on the evolution of the star. Our final goal is to analyse high resolution X-ray spectra of O-type stars with a multi temperature plasma model in order to determine crucial wind parameters such as the mass loss rate, the CNO abundances and the X-ray temperature plasma distribution in the wind. In this context we are developing a modelling tool to calculate synthetic X-ray spectra. We present, here, the main ingredients and physics necessary for a such work. Our code uses the AtomDB emissivities to compute the intrinsic emissivity of the hot plasma as well as the CMFGEN model atmosphere code to evaluate the opacity of the cool wind. Following the comparison between two formalisms of stellar wind fragmentation, we introduce, for the first time in X-rays, the effects of a tenuous inter-clump medium. We then explore the quantitative impact of different model parameters on the X-ray spectra such as the position in the wind of the X-ray emitting plasma. For the first time, we show that the two formalisms of stellar wind fragmentation yield different results, although the differences for individual lines are small and can probably not be tested with the current generation of X-ray telescopes. As an illustration of our method, we compare various synthetic line profiles to the observed O VIII {\lambda} 18.97{\AA} line in the spectrum of {\zeta} Puppis. We illustrate how different combinations of parameters can actually lead to the same morphology of a single line, underlining the need to analyse the whole spectrum in a consistent way when attempting to constrain the parameters of the wind.


Introduction
The study of stellar winds is crucial for our understanding of the evolution of massive stars and their in-1 Research Associate FRS-FNRS (Belgium) teractions with their environment. In fact, mass-loss plays a fundamental role in the evolution of massive stars (e.g. Hirschi 2008) as well as in the mechanical and chemical feedback of these stars into the interstellar medium (e.g. Dopita 2008). Over the last decade, our view on the mass-loss of massive stars has changed as the importance of wind fragmentation became clear.
Direct observational evidence for the existence of clumps in the winds of O-type stars was obtained from the low-level, rapid variability of the He II λ 4686 emission line in the spectrum of ζ Puppis (Eversberg et al. 1998). Indirect evidence stems from the analysis of the spectra of O-type stars. Indeed, with observations from the FUS E satellite, it became clear that the modelling of lines of ions such as O V, N IV and P V with model atmosphere codes such as CMFGEN, is impossible if clumping is not included (e.g. Bouret et al. 2005).
The existence of such small-scale wind structures has important consequences on many diagnostics of mass-loss rates. Indeed, strong clumping often implies a substantial reduction, by factors between a few and about ten, of the overall mass-loss rate compared to a homogeneous stellar wind. In this context, our ignorance of the properties of these wind structures translates into uncomfortably large uncertainties on the actual mass-loss rates. For instance, whilst the space between clumps is generally supposed to be totally empty, some recent studies (Zsargó et al. 2008;Sundqvist, Puls & Feldmeier 2010) showed that it is necessary to include the effects of a tenuous interclump medium to correctly predict the strength of various lines in the observed UV spectra of O-type stars. By doing so, these authors even found that the observed profiles might again be compatible with the conventional mass-loss rates.
Mass-loss rate diagnostics in different wavelength domains are strongly sensitive to different aspects of the wind fragmentation. For instance, H α and radio emission are collisional processes which scale with density squared and are thus sensitive to the clumping factor regardless of the size of the clumps. In clumped winds with a void inter-clump medium, the velocity law is intermittent and some velocities are not present along a given sight line. This porosity in the velocity field is called 'vorosity' (Owocki 2011). The latter strongly modifies the Sobolev length and its impact is mainly visible on the UV resonance lines.
The present paper deals with the impact of wind structure on the morphology of X-ray spectra of massive stars. High-resolution Chandra and XMM − Newton X-ray spectra of presumably single O-type stars revealed less absorption of the X-rays by the cool wind than expected for a homogeneous wind with conventional mass-loss rates. This property can be explained in the case of fragmented stellar winds (e.g. Miller et al. 2002;Kramer, Cohen & Owocki 2003;Oskinova, Feldmeier & Hamann 2006; see also Güdel & Nazé 2009 for a review), although Cohen et al. (2010) argue in favour of an overall reduction of the mass-loss rate of the wind without the need to include porosity effects.
In a fragmented wind with optically thick clumps, X-ray lines are sensitive to porosity, which depends on clump continuum optical depth, and thus clump size as well as the clumping factor. That is why highresolution X-ray spectra are important tools to study the structure of the wind and help us determine mass loss rates which must be consistent with the other wavelength domain analyses. Previous works in the X-ray domain (e.g. Oskinova, Feldmeier & Hamann 2006), were performed on a line-by-line basis; the spectra were never analysed as a whole at once. Using multi-temperature plasma models in future work, the global fit of observations will give information concerning the different shock temperatures as well as the size and the position of the different X-ray emitting shells.
With this in mind, we have designed a new code for the purpose of simulating the full high-resolution X-ray spectrum of a single massive star. Our method properly accounts for the effect of line blending on the line profiles, and allows testing the consistency of current models for the X-ray emission of massive stars over the full range of the X-ray domain. Therefore, our code is meant as a further step towards extracting the maximum amount of information from the highresolution X-ray spectra. In this paper, we introduce the different free parameters and investigate their impact on single temperature synthetic X-ray spectra. We further discuss the main assumptions and physics in our code and compare different formulations of the wind fragmentation. In particular, we investigate for the first time the impact of a tenuous, but non-void, inter-clump medium on the synthetic X-ray spectra. Finally, we present the first application of our code to fit the region around the O VIII λ 18.97Å line in the XMM spectrum of ζ Puppis and illustrate the degeneracies on the stellar wind parameters that exist when a single line is fitted. In future work, we will apply this code to the full X-ray band spectra of ζ Puppis.

Assumptions and main concepts of the code
Before using a multi temperature plasma model to analyse the X-ray spectra of O-type stars in detail, we need to calculate single temperature synthetic spectra with the most recent stellar wind theories (emission and absorption) and with as few as possible free parameters. We decide to follow the wind embedded shocks scenario. Consequently, we need to know where the shocks arise in the wind and what is the temperature of the resulting post-shock hot plasma. Using up-to-date emissivities, we can then determine the X-ray emission of a hot plasma as a function of temperature, abundances and quantity of matter present in the shocks. Next, we determine how the cool wind material absorbs the X-ray photons and how the wind structure (i.e homogeneous or porous) impacts on the emergent X-ray flux. In the following subsections, we describe the tools and assumptions considered to build our code and to calculate synthetic spectra.

The plasma emission spectrum
Previous works on X-ray line profile fitting have always normalized the line profiles, i.e the overall line flux was never physically modelled. We attempt a different approach here, by using the true X-ray emissivity of an optically thin plasma. For this purpose, we use AtomDB 2 which models the emission from a collisionally ionized, optically thin isothermal plasma in thermal equilibrium. Many processes are included in the model: collisional excitation, ionization, and dielectronic recombination drive the ionization balance and emission spectra from the plasma. Continuum processes such as two-photon decay and bremsstrahlung are also included. Photon-driven processes such as photo-excitation and photo-ionization are not included in the model. The assumption of an optically thin plasma requires a low density (≤ 10 13 cm −3 ), therefore three body effects are not included. The standard AtomDB model data has been recalculated on a finer 0.025 keV/step electron temperature grid for this analysis and we use an energy resolution of 0.2 eV.
In addition to the strongest lines that dominate the spectrum, the high-resolution theoretical spectra reveal the presence of numerous weak lines and also discontinuities in the continuum (Fig. 1). Their contribution to the emergent flux is non-null and it is necessary to take them into account for the computation of emergent spectra as they certainly modify the emis-sivities and profiles of the strongest observed lines. When fitting actual observations, one further needs to account for the presence of plasma at different temperatures, located at different places in the wind. Therefore the normalization of the model will result from the combination of several model spectra weighted according to their relative emission measure. This will be dealt with in our forthcoming paper on model fits of ζ Puppis spectrum. In addition, in the X-ray emitting plasma, some ions are present in a helium-like form. The treatment of the transition between the 2 3 S 1 and 2 3 P j levels must be done separately. Indeed, the presence of a strong UV radiation modifies the populations of the metastable upper level of the forbidden line via a pumping to the upper level of the inter-combination line (Blumenthal et al. 1972;Porquet et al. 2001). We will discuss this fundamental effect in our more complete analysis of ζ Puppis presented in a forthcoming paper (Hervé et al., in preparation).
We consider the hot plasma to be embedded in the cool wind and to move outwards along with the latter. We decompose the emitting volume into small cells where we calculate the X-ray emission of each cell and its shift in wavelength in the observer's frame of reference due to the overall wind motion.

Wind optical depth and mass-absorption coefficient
The X-ray emitting plasma is assumed to be optically thin to X-rays. An X-ray photon emitted by the hot plasma, either escapes from the wind or is absorbed by the cool wind material. Thus the radiative transfer is reduced to the calculation of τ, the optical depth along the line-of-sight due to the cool wind material. Following the approach of Owocki & Cohen (2001), the absorption by the stellar wind is essentially characterized by the τ * parameter and the massabsorption coefficient κ, which are linked by the relation τ * ≡ κṀ 4πv ∞ R * . These absorption coefficients are dependent on the wavelength and the abundances of the different elements. To evaluate the mass-absorption coefficients, we use the radiative transfer code CM-FGEN (Hillier & Miller 1998) which computes the ionization structure of the cool wind as a function of temperature, abundances of many elements and massloss rate. In the ionization calculations, CMFGEN accounts for different physical processes such as collisional excitation, photo-ionisation by photospheric light and X-rays, and radiative and dielectronic recom-bination. From the known ionization structure, we can then compute κ. In the X-ray domain, the opacity is dominated by the photo-ionization of the metals. This absorption is by far the dominant source of opacity and we can safely neglect other physical processes such as free electron scattering.
The wavelength dependence of κ (Fig. 2) and therefore τ * , is quite sensitive to the model elemental abundaces and to the ionization fraction of singly ionized helium. In this respect, we stress that the large values of the mass absorption coefficient, used in the present paper, reflect the fact that the sum of the CNO abundances in the best-fit model of the UV and optical spectrum of ζ Puppis is supersolar (Bouret et al., in preparation).
The detailed behaviour of κ as a function of radius and wavelength (especially at longer wavelengths) also depends upon the ionization structure of the wind and more specifically on the details of the recombination of He 2+ into He + ). However, for simplicity, we assume here that κ is independent of the position in the wind 3 and we evaluate its value at r = 10 R * . In our detailed analysis of the RGS spectrum of ζ Puppis (Hervé et al., in preparation), we will drop this assumption and rather introduce a radial dependence of κ.
Finally, the values of the mass-absorption coefficient or the wind optical depth as a function of the wavelength are used in Eq. 3 and 4 (see Sect. 2.3 below) to determine the absorption of X-rays by the stellar wind.

X-ray absorption by a fragmented wind
Previous studies of stellar winds revealed that they are not homogeneous but fragmented. The absorption of X-rays by a clumpy wind has been addressed by several authors who adopted slightly different formalisms for the same phenomenon. The porosity length prescription is based on the concept of the mean free path of photons between two successive interactions with clumps, and the opacity of the latter (Owocki & Cohen 2006). In the fragmentation frequency prescription, the opacity of the wind in the X-ray band is estimated by the frequency of clumps passing through a reference radius (Oskinova, Feldmeier & Hamann 2006). In this section, we briefly summarize the main aspects of these models.
At the microscopic level, the absorption of X-rays by a stellar wind is mainly due to the bound-free transitions from the K and L energy levels. To start, we assume that the clumps are spherical and very small. We consider clumps over a wide range of optical depth, from optically thin to optically thick. In a situation where the individual clumps are optically thick, the effective opacity is essentially determined by the geometrical properties of the clumps (Feldmeier, Oskinova, & Hamann 2003) and can be written κ e f f = l 2 m c = κ τ c where κ is the mass-absorption coefficient, l is the geometrical scale of the clump, m c its mass and τ c its optical depth. This latter can be written as (Owocki & Cohen 2006): where ρ is the mean density of the stellar wind, f the volume filling factor,Ṁ is the mass-loss rate of the star and v the velocity of the wind at the radius r which is determined by a Under this assumption, it appears that the effective reduction depends on the ratio between the clump scale and filling factor, also called the porosity length (Owocki & Cohen 2006). The concept of effective opacity can be extended to the optically thin limit using a simple bridging law (Owocki & Cohen 2006): Using this result in a steady state (i.e. non variable) wind, one obtains the wind optical depth in conventional (p, z) coordinates (Owocki & Cohen 2006): where r ′ = p 2 + z ′2 , τ * ≡ κṀ 4πv ∞ R * is the optical depth parameter of the wind, v ∞ is the terminal velocity of the wind, R * is the radius of the star and h(r) ≡ l f the porosity length. In the following we adopt h(r) = h ×r.
The fragmentation of stellar wind shells is a consequence of hydrodynamical instabilities. Rather than being spherically symmetric, the resulting clumps could actually have a flattened, elongated shape. Using the number n 0 of fragments passing through some reference radius per unit time, also called the fragmentation frequency, and the opacity of each fragment at this reference radius, Oskinova, Feldmeier & Hamann (2006) showed that the wind opacity can be written in the general case as: where τ j is the optical depth of a flattened fragment j along the line-of-sight and µ(r ′ ) = z ′ √ z ′2 +p 2 represents its orientation. The optical depth along the line-ofsight: with κ the mass-absorption coefficient and τ rad j the average radial optical depth of a fragment located at distance r (Oskinova, Feldmeier & Hamann 2004). In the case of an isotropic opacity (i.e. small-scale spherically symmetric clumps), µ is taken equal to unity (i.e. the line-of-sight crosses each clump along a radial direction).
In Section 3.1, we compare the profiles obtained with τ given by Eq. 4 to those computed with Eq. 3, first in the case of an isotropic opacity where µ is taken equal to one, then in a case of an anisotropic opacity where the clumps are assumed to be flattened (i.e µ 1).

Differences and common features of the different prescriptions
As we will show below, the porosity length prescription and the fragmentation frequency prescription are essentially equivalent to first order, although in their original work, Owocki & Cohen (2006) concentrated on spherical clumps, whilst Oskinova, Feldmeier & Hamann (2006) accounted for flattened structures by introducing the line-of-sight orientation via the µ parameter 4 . Actually, the geometry assumed by Owocki & Cohen (2006) is even more idealized than a pure spherical geometry since it assumes that the line-of-sight always crosses the clump along the radial direction. Strictly speaking, this is valid only if the clumps are very small. The main differences between the two approaches hence concern the geometry of the wind fragments and the way the optical depth of a clump is included in the model, i.e. Eq. 2 for the porosity prescription, and the (1 − e −τ j ) term in Eq. 4 for the fragmentation frequency. For small optical depths and isotropic clumps (µ = 1), both models should be essentially equivalent.
In a first step, we reproduce the profile of various lines (Table 1) for each prescription and compare them with each other and with the results for a homogeneous wind model. We consider a distribution of spherically symmetric clumps and we thus set µ = 1 in Eq. 4 and 5. Our general results agree well with those of previous studies. First, the larger the porosity of the wind, the larger the mean free path of a photon in the stellar wind and the lower the absorption (Owocki & Cohen 2006). Second, the larger the fragmentation frequency, the lower the opacity in the fragmentation prescription, see Oskinova, Feldmeier & Hamann (2006).
We have simulated four specific lines with n 0 = 1.7 10 −4 s −1 adopted from Oskinova, Feldmeier & Hamann (2006). This parameter is found by the authors to best fit the O VIII λ 18.97 Å line in the HETG and RGS spectra of ζ Puppis. Then we derive the porosity length, h, needed to reproduce the line profiles computed with this fragmentation frequency (Fig. 4). For different values of τ * , hence different values of wavelength (see Table 1), the two line profiles are, in each case, very close. Note however that we obtain different values for the porosity length when matching different lines computed with the same fragmentation frequency: we have to decrease the porosity parameter when τ ⋆ increases. In other words, when we compare simulated global spectra using a single porosity parameter to those obtained for a specific value of the fragmentation frequency, we find that the spectra are exactly the same in the wavelength band near the line used to find the parameter h that best matches the value of n 0 (in our case the O VIII λ 18.9 Å line), but differ over the other wavelength domains (Fig. 5). More specifically, the porosity model predicts a slightly lower flux in the short wavelength domain and a higher flux in the long wavelength band.
There are some underlying assumptions in both models, and with current data it seems difficult to tell which prescription provides the better description of reality. The porosity prescription has the advantage to provide an analytical form of the opacity that speeds up the computation. Therefore, in the following, we concentrate mainly on the porosity prescription. The overall results and conclusions obtained in the study for the different parameters, in the next section, are the same for the fragmentation model in an isotropic (µ = 1) case.

The impact of model parameters on the emergent spectrum
For each simulation in this section, we use a terminal velocity v ∞ of 2250 km s −1 . We further assume a kT plasma of 0.217 keV, solar abundances for the chemical composition of the plasma, a stellar radius R * of 18.6 R ⊙ and a mass-loss rate of 4.2 10 −6 M ⊙ yr −1 . These stellar and wind parameters correspond to those used by Oskinova et al (2006) in their work to fit lines of ζ Puppis, except for the plasma temperature which corresponds to the closest value in AtomDB to the result of Hillier et al. (1993).
In the remainder of this section, we simulate a series of spectra for such a single O star in order to illustrate the sensitivity of the synthetic spectra on the different model parameters.

Porosity
The first explored parameter is the porosity length. The impact of this parameter for broad band spectra was never presented, in the literature. Fig. 6 illustrates our results. We have chosen to explore a wide range of values of the parameter h. As expected, we find a strong impact on the emergent flux. At the shortest wavelengths, where κ is lowest, the porosity length has little impact on the spectrum. However, the situation is radically different at longer wavelengths, where the wind opacity κ becomes huge (Fig.3, Tab.1). Here, the impact of the porosity length is much more important. We find differences of several orders of magnitude between the spectrum for a homogeneous wind and the simulations with the largest porosity. For a highly porous wind, the variations of h have less impact as the wind is already so fragmented that the photons have few remaining interactions with the clumps.
As a second step, we consider the effect of the shape of fragmented shells. For this purpose, the factor µ in Eq. 4 and 5, which represents the orientation of the fragmented shells with respect to the line-of-sight, is re-introduced into our simulations. Compared to the isotropic case, the opacity of the wind decreases (see Fig. 7). The radiation from the back side of the star is less attenuated than in the case of isotropic clumps. Indeed, the fact that fragments are flattened and that photons coming from the rear side of the wind cross these shells mainly perpendicularly implies that they have to cross less matter, and are thus less absorbed, than in the isotropic case. As a result, the total flux and intensity are higher in the anisotropic case. Also, the profiles are less asymmetrical and the full width at half maximum increases. The consequences are more intense spectra (by a factor 1.2 in the short wavelengths and 3.0 in the longer wavelengths domain) and an increased overlap of lines in the anisotropic model (see Fig. 8).

Outer radius of the emitting region
Another parameter of our model is the size of the X-ray emitting plasma (R out ). As the emissivity is proportional to ρ 2 , the outer parts of the wind contribute less to the total intrinsic (i.e. before wind absorption is accounted for) X-ray emission, but cannot be neglected for the wind-absorbed emission as can be seen for specific line profiles in Fig. 9. The effect is by far strongest in the long wavelength domain where κ λ is largest. The intensity of the lines in Fig. 9 varies by a factor between 1.1 and ∼ 80 (from shorter to longer wavelengths) when the outer radius of the emitting volume is multiplied by a factor 2.0. Moreover, extending the emitting region to larger distances implies that the velocity of the X-ray emitting plasma (assumed to move along with the cool wind) becomes larger if the outer radius is still located inside the wind acceleration zone. This in turn increases the full width at half maximum of the lines as well as the line width at the continuum level. The effect is best seen in the red wing of the line which is most strongly depressed by the wind absorption. With a larger emitting volume, a larger fraction of the redshifted photons from the rear outer parts of the wind escape the wind since they cross layers of lower density. The impact of the increase of the size of the emitting region on the overall spectrum can be seen in Fig. 10.

Inner emission boundary
The location of the inner boundary of the emission region is one of the open questions in the understanding of the X-ray emission of massive stars. However, a variation of this parameter can have important consequences. As we pointed out in the previous section, the density of matter increases as one moves inwards in the stellar wind, and therefore the contribution to the intrinsic X-ray emission increases as well. Still, as far as the observable emission is concerned, part of this increase in emission measure is compensated by the increase of the amount of absorbing material that the photons have to cross before they escape. If we adopt an inner radius of 2.5 R * instead of 1.5 R * , with an outer radius of 10. R * , for the emitting plasma, we note that the line intensity in the short wavelength range, where τ * is low, decreases roughly by a factor two. In the long wavelength domain, where τ * is high, the reduction of the stellar wind absorption is more important than that of the emission. In consequence, the inner part of an X-ray emission shell is fully absorbed by the cool material. The result is that the lines at longer wavelength are rather insensitive to the location of the inner boundary of the emission region (Fig.11). The same qualitative considerations hold for the overall spectrum which is shown in Fig. 12.
We note that the FIR triplet of helium-like ions provides in principle a powerful diagnostic of the inner emission boundary (Leutenegger et al. 2006). However, in the case where the observed X-ray emission stems from a multi-temperature plasma with each component possibly having its own value of the inner boundary, it must be stressed that the resultant triplets are the sum (weighted by the emission measures) of the triplets in the various components. This situation renders the interpretation of the FIR diagnostics more complex than expected from a single temperature plasma.

The contribution of the inter-clump medium
In their work, Zsargó et al. (2008) have shown the need to introduce a homogeneous inter-clump medium to better fit the profile of the O VI λλ 1032,1038 doublet with the model atmosphere code CMFGEN. These authors conclude that the inclusion of a small percentage (∼ 5%) of homogeneous material in between the clumps is needed to achieve a good fit of the line. Similar conclusions were reached by Sundqvist, Puls & Feldmeier (2010).
What is the consequence of such a tenuous, but homogeneous, inter-clump medium on the X-ray line profiles? To answer this question, we incorporate this situation in our model. In practice, we work with a constant mass-loss rate and we consider that the size of the clumps is small. We distribute an important percentage of matter (90%, 95% or 97%) in clumps and we compute the optical depth due to a totally clumped wind. As a first assumption, we consider that the ionization is the same in the cool clump as in the inter-clump medium 5 . Next, we compute the optical depth for an homogeneous wind with the remaining matter. Finally we take the sum of the two contributions and determine the absorption for a mixed wind model. As a homogeneous wind absorbs more photons, the intensity of the line profiles of the mixed model should actually be lower than for a fully clumped model (see Fig. 13) and the impact is stronger at longer wavelengths, and hence at larger opacities κ. These considerations are confirmed by our simulations of the overall X-ray spectrum (see Fig. 14). As a second step, we attempt to fit the spectrum of the mixed model with 97% of matter clumped to a model spectrum for a fully clumped wind. Fig. 15 illustrates the results: the individual line profiles of the mixed model are almost perfectly fitted by a fully clumped model with a slightly lower porosity parameter. This has important consequences in practice: whilst the X-ray line profiles might allow us to infer the presence of clumps and to constrain their geometry, it seems almost impossible to distinguish between a fully clumped wind and a mixed model without constraints from observations at other wavelengths (e.g. UV, optical).We thus conclude that X-ray line profiles alone cannot reveal the presence of an inter-clump medium.

First application to the O VIII λ 18.97Å line of ζ Puppis
In the previous sections, we have discussed the impact of different parameters and of different fragmentation prescriptions on the line profiles and on the emergent X-ray spectra. In this section, we use our code to fit the O VIII Lyman α doublet λ18.97 Å and the neighbouring N VII λ 19.36 Å, λ 19.82 Å lines of the massive star ζ Puppis and determine some stellar wind parameters. We decided to work on an extended region around the strong O VIII line since Fig. 1 reveals the presence of weak lines that affect the wings of the O VIII line and produce a pseudo-continuum that contributes of order 5% of the flux of the O VIII line. For this purpose, we have extracted, reduced and combined 18 RGS spectra of ζ Puppis from the XMM − Newton archive (Nazé, Flores & Rauw 2012; the different aspects of the data reduction are treated in detail in that paper). We also apply the absorption by the interstellar medium (N H = 8.9 × 10 19 cm −2 , Diplas & Savage 1994) to the synthetic spectra. Then, we convolve the spectra with a Lorentzian profile with a half-width at half-maximum of 0.07 Å to account for 2008). the instrumental resolution of the RGS spectrograph onboard XMM − Newton. Finally, we compare the results to the observation.
As shown in Fig. 16 and 17, we obtain a degeneracy of the stellar wind parameters. Indeed, for the O VIII line profile, we demonstrate that we can use a homogeneous or a porous wind model to fit the data equally well (see Fig. 16 and Table 2) though with different values for the hot gas filling factors. Note that these values are in agreement with the results of Hillier et al. (1993). We only need to adapt the mass-loss rate and the abundance of oxygen to obtain similar results. In a denser wind (i.e. with a larger mass loss rate), the increase of absorption dominates the increase of Xray photon production at longer wavelengths where the opacity is largest. In consequence we have two ways to increase the number of X-ray photons which escape from a denser wind. The first solution is to increase the number of X-rays resulting from shocks. To first order, we could imagine that the number of shocks, and hence the hot gas filling factor, would be larger in a denser wind (Tab. 2, models A and C). Alternatively, we can increase the number of photon which escape. Consequently, we have to increase the free mean path of photons in the stellar wind. This can be achieved with a more porous wind (Tab. 2, models A and D). Normally, the line profiles of the two previous solutions should be different. Unfortunately, the instrument resolution is not sufficient to distinguish the subtle differences.
Furthermore, we can also fit this line equally well with a model where the inter-clump medium is not void (Fig. 18, on the left).
It is thus obvious that a single line does not permit to discriminate between models. These preliminary results therefore emphasize the necessity to work on the full X-ray spectrum. The analysis of the full RGS spectrum is beyond the scope of the present paper, but will be presented in a future work (Hervé et al., in preparation). As we demonstrated in Sect. 3, each parameter has a different impact over different parts of the spectrum and we are therefore confident that some degeneracies on e.g. porosity or mass-loss rate, will then be lifted.
Nevertheless, already on this small region of the spectrum, three results are found. First, the possibility of an anisotropy (i.e., µ 1, in the fragmentation prescription) of the wind absorption appears unlikely. Indeed, the flux from the back side of the star would be too large (Fig. 7, on the top right) and hence the width of the synthetic line emission would be too large in comparison to the observations (Fig. 18, on the right). Second, a good fit to the O VIII line and its close neighbours is only found if one uses an overabundance of N and a depletion of O (Tab. 2 and Fig. 16). Third, a quick look at a wider wavelength band (Fig.19) shows that a single temperature plasma cannot reproduce the whole spectrum of ζ Puppis. A multi-temperature plasma model is required for a full analysis of the X-ray spectrum. Thus the observed line profiles and intensities are a combination of the contribution of the different temperature plasmas present in the wind.
Finally, it should be noted that part of the degeneracy of the results is due to the limited resolution of present-day high-resolution X-ray spectrographs. In Sect. 3, we show the impact on a line profile of a change in porosity length or inner radius for example, but the convolution by the response matrix of current instruments washes out part of the difference induced by the different parameters.

Conclusions
In this paper, we have studied the impact of the two different prescriptions of stellar wind fragmentation on the emergent broad-band X-ray spectrum. For spherical clumps with an isotropic opacity, the differences between the two prescriptions are the most obvious when comparing the overall X-ray spectrum. Indeed, in this case, we find that a given simulation with a single value of the fragmentation frequency cannot be represented by a spectrum calculated with a single value of the porosity parameter. However, in practice, with the quality of current high-resolution X-ray spectra of O-type stars, it seems almost impossible to distinguish the two models in a real case when working on a line-by-line basis. This is because the differences are often small and are washed out by the coarse resolution of present-day instruments. Moreover, the differences are most easily seen when comparing the shape of the full spectrum which is seldom done. In addition, one must keep in mind that the shape of spectrum is also affected by the amount of interstellar absorption and the fact that the X-ray emission from a real stellar wind most likely spans a range of plasma temperatures rather than a single temperature as assumed here (see e.g. Zhekov & Palla 2007;Nazé 2009). In both prescriptions we find that the X-ray emission is more intense in a frag-mented stellar wind than in a homogeneous wind. The introduction of an anisotropic opacity in the fragmentation frequency prescription yields spectra that are more intense than in the isotropic case and of course than in an homogeneous wind. Sophisticated, 3-dimensional hydrodynamical calculations might eventually be needed to clarify the issue of the geometry of the clumps.
As pointed out previously, both models rely on a series of assumptions and, currently, we do not have enough knowledge on the stellar wind fragmentation to privilege one model over the other. Our investigation of the impact of the various model parameters on the emerging spectrum showed that both the position and the size of the X-ray emitting plasma are very important. An increase in the size leads to a more luminous spectrum, although we have shown that the amplitude of the intensity increase depends upon wavelength.
For a given mass-loss rate, the differences between fully clumped and homogeneous wind models are quite large. However, in light of the simulations presented here, it will be very difficult to estimate correctly the value of the porosity if we include the effect of an inter-clump medium. In fact, the incorporation of a few percent of the wind material in the inter-clump medium yields the same emergent spectrum as obtained for a purely clumped model with a slightly less fragmented wind.
Finally, we present preliminary fits of the region near the O VIII λ 18.97Å emission line of ζ Puppis with our code. Our first results reveal that anisotropic clumps are unlikely, and that non-solar abundances (overabundance of N, depletion of O) are needed to reproduce the X-ray spectrum. However, there is also a degeneracy of stellar wind parameters. Even though a porous wind is closest to the observational data, we can not totally exclude an homogeneous wind. The mass-loss rate, the porosity parameter and the hot gas filling factor are strongly tied. However, simultaneous fits of the total spectrum will likely allow to reduce the degeneracy on the porosity and other parameters. But, it appears that a single temperature X-ray plasma is insufficient to fit the global spectrum of ζ Puppis. This result implies the necessity to use several temperatures and we will have to include the contribution of each temperature plasma to the line intensity and profile of O VIII λ 18.97Å (and all the other lines) but also to the continuum.      Table 1). The profiles are compared with those computed in the fragmentation prescription for n 0 = 1.710 −4 s −1 (black solid line) and for a homogeneous wind model (dot-dashed green line).    Table 1). The results are compared to the line profiles computed for an isotropic opacity (µ = 1; solid black line) with n 0 = 1.710 −4 s −1 .   -Impact of the size of the emitting plasma on the overall X-ray spectrum. The colours have the same meaning as in Fig. 9. Fig. 11.-Importance of the inner boundary of the X-ray emission region. The dashed red (respectively solid black) line profiles illustrate the results of our simulations for different lines assuming r 0 = 2.5 R * (resp. 1.5 R * ) and on outer radius of the emitting region of 10R * . The huge τ * value at large wavelengths (Fig.3, Tab.1) makes the wind opaque to X-ray photons. Consequently the X-ray photons produced in the inner part of the emitting shell are all absorbed by the cool wind material (bottom panels and right top panel).    There exists a degeneracy on the determination of the mass-loss rate, the porosity of the wind and the hot gas filling factor. Top panels: Profiles derived for a homogeneous wind (on the left, model A in dashed red line) and a porous wind with the same mass-loss rate (on the right, model B in dashed red line) compared to the observational data (in solid black line). Bottom panels: same but for a different mass-loss rate (model C on the left, model D on the right). Model parameters are given in Table 2.  That indicates the need to use a second temperature in order to fit the whole spectrum of ζ Puppis. Consequently, the hot gas filling factor of the first plasma temperature will be lower in order to take account of the contribution, in the O VIII intensity and line profile, of the second plasma temperature emission.