Revealing the structure and evolution of entrained oxide film in Mg–Y alloy castings

The structure and evolution of oxide film in Mg alloys have been a research objective for a long time but are still unclear up to now. In the present work, the structure of the entrained oxide film (which is also known as bifilm) in Mg–Y alloy castings protected by SF6/air cover gas was characterized. It was found that the entrained oxide film can be divided into two typical types: (1) single-layered F-rich films and (2) double-layered films with a F-rich inner layer and a F-poor outer layer. Based on the experimental phenomena and thermodynamic calculation, the evolution mechanism of the oxide film was also revealed. It was found that F element from the cover gas reacted with the melt firstly to form the initial F-rich single-layered film. Then, O and S were also involved in the reaction, transforming the initial film to be a (F, O, S)-rich single-layered film. Finally, when the F element was depleted, the newly formed layer on the existing oxide film is characteristically F-poor but (O, S)-enriched, leading to a double-layered oxide film. It was also found that the oxide film grew faster in SF6/air cover gas than in SF6/CO2 cover gas, resulting in a higher repeatability of mechanical properties of Mg–Y alloy castings.


Introduction
As per the increasing lightweight requirements, Mg alloys have been attracting more and more attentions due to their excellent properties such as high specific strength, good damping capacity, low density and high specific rigidity [1,2]. However, Mg alloys are prone to burning loss due to the non-protective nature of their oxides [3]. Therefore, it is essential to protect the melt by using a cover gas which is a mixture of a small amount of protective gas (such as SF 6 ) and a carrier gas (such as air or CO 2 ). The cover gas results in the formation of a dense and stable oxide film on the melt surface, preventing the extensive oxidation of Mg melt. However, the surface film can also be entrained into the bulk melt together with a small quantity of cover gas during the pouring of melt. Such an entrained film is normally folded, thus is also known as 'bifilm' (or 'double oxide film defect', 'entrainment defect') [4]. The entrained film is widely considered as a defect to degrade the mechanical properties of castings [5][6][7]. SF 6 is a typical cover gas and still popular in the main Mg-producing countries such as China, Brazil and India [8][9][10] [11]. The oxide film formed in a SF 6 containing cover gas has been attracting researchers' attention [10,[12][13][14][15][16][17][18][19][20][21][22][23]. In 1970s, Fruehling [22] found that the surface film formed under SF 6 was MgO and then Couling [23] noticed that the SF 6 was also consumed by reacting with the melt to form MgF 2 and/ or adsorbing into MgO surface film. In the past two decades, three different structures of the oxide films were reported: (1) single-layered film. In 2002, Cashion [12,13] identified the surface film as a mixture of MgO and MgF 2 and found that film composition was constant throughout the thickness and the whole experimental holding time (10-100 min). It indicates that the observed film is a single-layered film without any evolution. (2) Two-layered film. Aarstad [15] reported a two-layered structure in 2003. It was found that a lot of well-distributed MgF 2 spots formed below MgO film and grew until they covered 25-50% of the total surface. This two-layered structure was also reported by Xiong [10,18] and Shih [17]. (3) Three-layered film. The three-layered film and its evolution process were observed in 2002 by Pettersen [14]. It was found that the initial surface film is MgO and then gradually evolved to the stable MgF 2 by the inward diffusion of F. F was also found in the initial MgO film (atomic ratio Mg/O/F = 58:25:17) but does not form separate phases at the early stage. In the final stage, the film has a three-layered structure with a thin O-rich interlayer between the much thicker outer and inner MgF 2 layers. However, this three-layered film has not been observed by other researchers.
Regardless of the above-mentioned study on the surface film, rare structural characterization of the entrained film within Mg alloys has been reported. The research on the surface film is of course helpful to understand the entrained film since both of them are products of the reaction between a cover gas and Mg melt. However, a significant difference should be noticed. The surface film was formed under a continuous and sufficient cover gas, while the entrained film formed via finite trapped gas within Mg alloys. Therefore, the concentration of gaseous reactant (such as SF 6 and O 2 ) would gradually decrease during the formation of entrained film. To simulate such a situation, Mirak [19] introduced 3.5%SF 6 /air cover gas bubbles into a pure Mg melt and found that the cover gas bubbles were entirely consumed to form ab oxide film which is a mixture of MgO and MgF 2 , but the MgF 2 spots observed by Aarstad [15] and Xiong [10,18] were not found. Mirak also speculated that MgF 2 formed prior to MgO, which is different with previous reports where MgO was considered as the initial phase prior to MgF 2 [14,15]. Considering it, Mirak suggested that the formation and evolution of such an entrained oxide film within Mg alloy may be quite different from that of a melt surface film [19]. However, Mirak did not reveal the structure and evolution of these oxide films within Mg alloys clearly.
As a main defect in castings, entrained film and its evolution can affect the mechanical properties of castings. Campbell [4] conjectured that the opposed entrained film would be expected to grow together to some extent by the further reactions between melt and the entrapped gas. Any resultant bonding may not be particularly strong but is likely to confer some improvement in strength compared to the layer of entrained gas. This hypothesis has been verified in Al casting alloys by Aryafar [24] and Griffiths [25]'s work, in which the mechanical properties were increased by the growth of the oxide film. Meanwhile, the casting defects often lead to an early break of castings during the tension test, resulting in a larger spread of mechanical properties (i.e. a poor repeatability). Griffiths's work [25] also indicated that the growth of entrained films improves the repeatability of the mechanical properties (described by Weibull modulus). According to Mirak's result [19], the entrapped SF 6 /air cover gas can be consumed quickly in Mg alloys. Therefore, it can be speculated that the evolution of entrained film may also affect the mechanical properties of Mg castings. However, no research has been focussed on this.
In the present work, the composition and structure of the entrained film in Mg-Y castings protected by a 0.5%SF 6 /air cover gas were characterized, and the evolution process was also revealed using a specially designed oxidation cell unit to simulate the formational environment of entrained film. What is more, the growth rate of the film under different cover gases (0.5%SF 6 /air and 0.5%SF 6 /CO 2 ) and its effect on the mechanical properties of the castings were also investigated.

Experimental procedures
Melting and casting Three kilogrammes of commercial purity Mg alloy ingot and 0.75 kg Mg-35%Y master alloy (wt.%) were melted in a mild steel crucible. Prior to heating, the ingot was machined to completely remove any contaminants from the ingots surface (e.g. oxide scale). The cover gas used was 0.5%SF 6 /air, and the melt temperature in the crucible was 700 ± 5°C. The melt was degassed by a lance degasser using argon at 0.3 L/min for 15 min [26]. Then, the melt was poured into the sand mould. The pouring temperature was 700 ± 5°C. The cover gas for pouring process was also 0.5%SF 6 /air. The sand mould cavity was flushed with SF 6 /air for 20 min prior to pouring. The casting was machined into 40 test bars for a tensile strength test. The dimensions of the test bar were designed based on the British Standard BS EN ISO 6892-1 [27]. The castings were sectioned, mounted in conductive Bakelite and then polished for SEM observation. The SEM equipment used was a Philips JEOL7000 unit set at an accelerating voltage from 5 to 20 kV. Figure 1 shows the dimensions of the sand mould. In order to study the structure of the entrained film and explore the entrained films' effect on the mechanical properties, the casting was deliberately designed to introduce a large amount of oxide films using a top-filling running system [28]. The sand mould was made from resin-bonded silica sand, containing 1wt. % PEPSET 5230 resin and 1wt. % PEPSET 5112 catalyst. 2 wt.% Na 2 SiF 6 was added to the sand to act as an inhibitor [29].
To study the effect of different cover gases on the casting repeatability, 0.5%SF 6 /CO 2 was also used as the cover gas to produce another 40 test bars according to the same procedure. The composition of the final casting is shown in Table 1. The H content was also measured at the 5th day after the casting process by Sci-Lab Analytical (UK) Ltd and was determined to be 4.87 and 4.52 ppm for 0.5%SF 6 /air and 0.5%SF 6 /CO 2 castings, respectively.

The evolution of oxide film in a designed oxidation cell
To understand the evolution process of entrained films and the reactions occurring between an entrained gas bubble and its surrounding Mg-Y melt, an oxidation cell was designed and developed, which creates a sealed environment for the reactions. The cover gas contained in the sealed oxidation cell can be regarded as a large size ''entrained bubble''. As shown in Fig. 2, a liquid metal surface (held in a magnesia crucible) was exposed to a controlled atmosphere, imitating the inner conditions of an entrained ''gas bubble''. A water-cooled copper tube was wrapped around the upper half of the cell to create a temperature difference between the upper and lower sections in effort to promote convection of the atmosphere within the cell during the heating process.
During the experiment, a machined Mg-Y alloy block was placed in a magnesia crucible located at the bottom of the oxidation cell. The original atmosphere (i.e. air) was completely replaced by flushing 0.5%SF 6 /air cover gas at a rate of 1 L/min for 20 min. The oxidation cell was then heated to 700°C using an electric resistance furnace to melt the Mg-Y alloy block. The gas inlet and exit valves were then closed, creating a sealed environment for oxidation of the melt surface under a limited supply of cover gas. The melt temperature was controlled by a type-K thermocouple inserted into the top of the crucible and maintained at 700 ± 5°C for periods of time ranging from 5 to 30 min in 5 min intervals. At the end of each holding time, the cell was quenched in water. After cooling to room temperature, the oxidized sample was sectioned, polished and subsequently examined by SEM.

Experimental results
The morphology of entrained films in Mg-Y casting Figure 3 shows the optical and back-scattered electron images of Mg-Y alloy. The alloy was composed of large dendritic Mg grains (marked in Fig. 3a) and Mg 24 Y 5 intermetallic phase distributed in the grain boundary areas (marked in Fig. 3b). To characterize the microstructural and compositional feature of the J Mater Sci (2021) 56:16671-16685 entrained films in the Mg-Y alloy sample, secondary electron images/energy-dispersive X-ray spectroscopy (SEI/EDS) were used, as shown in Fig. 4.
The typical morphologies of entrained films in the samples are shown in Fig. 4. Most films were highly contorted ( Fig. 4a, b), which was very similar to the ''snaky'' entrained oxides film found by previous researchers [30][31][32][33]. Upon investigation, it was found that the entrained films often wrapped at least one, although often several, collapsed bubbles as an integral part of the defects structure. The contortion, length and thickness of the entrained films varied significantly. Figure 4c, d shows a relatively flat and thin entrained film. Similar to the contorted film, the flat one also seems to comprise of at least one intrinsic gas bubble. From the magnified observation shown in Fig. 4d, a, clear interface at the centre of the film can be observed. This indicates that it was actually an entrained film where the two sides of the oxide film appear to have grown close, and the void volume between the oxide films was very small. Figure f shows a gas bubble with similarly thick oxide film as its outer perimeter.

The structure and composition of entrained films
The structure and composition of the entrained films were further studied by observing their cross sections. It was revealed that the entrained films can be subdivided into single-layered and double-layered types. Figure 5 shows a typical entrained film having a single-layered oxide film, which has a uniform composition and is enriched in F, O and Y according   Figure 2 Oxidation cell used to study the evolution of the films on a Mg alloy melt (unit mm).
to the EDS mapping result shown in Fig. 5c. The local S enrichment was not distinguishable from the EDS mapping result but was identifiable from the corresponding EDS spectrum. It was found that singlelayered oxide film normally has a thickness of less than 3.5 lm.
The thicker entrained films show a typical doublelayered structure, as shown in Fig. 6. According to the EDS mapping results shown in Fig. 6c, the outer layer of the entrained film was rich in F, O and Y, similar to that of the single-layered entrained film shown in Fig. 6. However, the inner layer of this entrained film was only rich O and Y, but has no enrichment of F. The inner layers have grown together, presenting a sandwich-like structure. The author's previous work [34] also reported a similar structure of entrained film found in a Mg-Y casting protected by 0.5%SF 6 /CO 2 .
The formation of oxide film is the result of an ongoing oxidation reaction between melt and entrapped 0.5%SF 6 /air cover gas. Different stages of the oxidation reaction may lead to different structures and compositions of entrained films. However, the reaction between Mg-Y melt and entrapped 0.5%SF 6 /air cover gas is rarely reported. To further understand the formation mechanism and process of the entrained film in a Mg-Y alloy, the evolution process of entrained films was further studied.
The evolution of oxide films between a Mg-Y melt and 0.5%SF 6 /air gas It is difficult to track and in situ observe an entrained film in Mg-Y alloy melt due to its small size and high mobility. Therefore, an oxidation cell (shown in Fig. 2) was designed and used in the present work to simulate the formation of entrained films. During the experiment, a finite amount of cover gas was available in the upper part of the oxidation cell to replicate the environment of an entrained ''gas bubble'' within the defect. The top surface of the liquid metal in the crucible at the bottom of the oxidation cell was thoroughly contacted with cover gas to simulate the gas bubble-melt boundary conditions found in entrainment defects. With the help of the oxidation cell, the growth process of the oxide film developing between the Mg-Y melt and the 0.5%SF 6 /air gas was studied and revealed. Figure 7 shows the oxide films at different development stages. It is clear that the thickness of the oxide film increased with the prolonging holding time. Similarly, the composition of the oxide film also evolved with the increasing holding time. As shown in Fig. 7d, the film at its initial stage (holding time 5 min) was only enriched with F and Y but in lack of O and S, suggesting that the F element originating from the SF 6 gas was preferentially consumed at the beginning of the process. Hence, the initial film formed was fluoride based. As the oxidation reaction continued (holding time 10 min), the film was then found to include O and S except the initial F and Y, as shown in Fig. 7e. The appearance of O and S in the film indicated that the film formed between the Mg-Y melt and 0.5%SF 6 /air gas was not impermeable, as it allowed the atomic diffusion of atoms from the Mg-Y melt and the 0.5%SF 6 /air gas through the film, leading to the continuous growth of the film. The film then begins to evolve into a mixture of fluoride, oxide and sulphide constituents. The amount of Mg in this part of the system could not clearly be ascertained (b) (a) Figure 3 The a optical and b back-scattered electron images of the Mg-Y alloy casting.
using EDS mapping due to the interference of Mg-Y matrix, but the EDS point analysis indicated that Mg was also a constituent metallic element present in the film. Both Pettersen [35] and Xiong [36] found that the fluoride and oxide present in the film from an AZ91 melt and a pure Mg melt were MgF 2 and MgO, respectively. In the present work, it can be further suggested that, except the MgF 2 and MgO, film formed in the Mg-Y melt also contains YF 3 and Y 2 O 3 due to the existence of Y. The sulphide can be considered as MgSO 4 as described in Pettersen's research [35]. The oxide films held for 10 min and 5 min had the single-layer structure similar with the film shown in Figure. As the holding time was further prolonged, the oxide film developed in both size and complexity into a double-layered structure as shown in Fig. 7c, f. It was observed that the newly formed top layer (corresponding to the inner layer in a real entrained film as shown in Fig. 7) was much thicker but lacked any F constituent, meaning that F has been consumed completely. The EDS results shown in Figure and Figure also show that O content in the film was much higher than S. Therefore, it can be conducted that the top layer of the film was primarily oxide, as well as small amounts of sulphide. The film evolution (i.e. the ongoing reaction between metallic elements from melt and entrained gas) was maintained by the (major) O and (minor) S content from the cover gas. Due to the large amount of oxygen in the 0.5%SF 6 /air cover gas, the reaction and film growth developed quickly, leading to the formation of the thick top layer of the film. In a real entrained film, the inner layers of the film growing from the opposite melt/gas interface would meet each other, hence reducing the void volume of the entrainment defect. The transformation of entrained gas to solid oxide film (i.e. gas phase to solid phase) may also reduce the size of entrainment defect.
The double-layered film formed on the Mg alloy melt has also been reported by both Aarstad [15] and Xiong [10,18]. However, the structural details and the evolution process of the film in the present work are very different with their previous findings. In Aarstad [15] and Xiong [10,18]'s work, the fluoride layer is actually some well-distributed fluoride particles which covered 25-50% of total surface. However, the film reported here is a continuous film covering the whole melt surface. On the other hand, Pettersen [14], Aarstad [15] and Xiong [10,18] observed that the oxide layer formed prior to the fluoride layer, but in this experiment, the fluoride layer formed firstly before the oxide layer. It should be mentioned that such a new evolution process was also speculated by Mirak but has not been confirmed by detailed experimental evidence until the present work is reported.
The growth rates of oxide film in 0.5%SF 6 /air and 0.5%SF 6 /CO 2 cover gases As discussed above, the opposed sections of an entrained film can grow together and therefore reduce the size and void volume of the defects. Therefore, the growth rate of an oxide film may be a key parameter for diminishing the detrimental effect of the entrainment defects. The normal carrier gases in the SF 6 -contianing cover gas are air and CO 2 . To study the effect of different cover gases on the film growth and the mechanical properties of casting, the growth rates of oxide film in 0.5%SF 6 /air and 0.5%SF 6 /CO 2 cover gas were consequently further measured and compared.  Figure 8 shows the comparison of the growth rates of the oxide films formed under different cover gases (i.e. 0.5%SF 6 /air and 0.5%SF 6 /CO 2 ). Fifteen random points taken from each sample were used for the film thickness measurement. The 95% confidence interval (95%CI) was calculated under the assumption that the variation in the film thickness followed a normal distribution. It was found that the oxide films formed under 0.5%SF 6 /air grew much faster than those formed under 0.5%SF 6 /CO 2 . The different oxide film growth rates suggested that an entrained 0.5%SF 6 /air gas would be consumed much faster than 0.5%SF 6 / CO 2 . Therefore, the size and void volume of entrainment defects containing 0.5%SF 6 /air would be reduced more quickly due to the reaction with the surrounding melt.

Discussion
The evolution mechanism of oxide film formed between Mg-Y melt and SF 6 /air cover gas To better understand the evolution mechanism of the entrained films, thermodynamic calculations were modelled using 'HSC Chemistry for Windows' created by HSC Software Outokumpu (http://www.h sc-chemistry.net/). The pressure was set to 1 atm, and the temperature to 700°C. The amount of the cover gas was set to be 7e-7 kg, which was approximately 0.57 cm 3 (3.14e-8 kmol) for 0.5%SF 6 /air. The amount of the Mg-Y alloy melt in contact with the trapped gas was assumed to be sufficient to complete all reactions.
According to the results shown in Fig. 8, the initial film was rich in F but comparatively poor in S. This meant that SF 6 in the cover gas decomposed allowing for the S and F to react with the metallic elements (M and Y, respectively) at different reaction stages. Pettersen [35] suggested that SF 6 decomposed to provide SF 4 and atomic F in the cover gas at a high temperature. Tsang and Herron [37] suggested that SF 5 , SF 4 and SF 3 also existed in the SF 6 decompositions based on kinetics and thermodynamics calculations. Hayashi et al. [38] detected SF 5 , SF 4 SF 3 , SF 2 and SF in SF 6 thermal decompositions using a mass spectrum. These fluorides may further dissociate to provide a source of sulphur in the cover gas as S 2 , S 3 and atomic S [39]. Therefore, in consideration of these previously reported results, the decomposition products of SF 6 used in this series of calculations were set as SF 5 , SF 4 , SF 3 , SF 2 , F 2 , S(g), S 2 (g) and F(g). It was reported that Y 2 (SO 4 ) 3 would decompose at 700°C [40], thus Y 2 (SO 4 ) 3 was assumed not to occur in the process. Figure 8 shows the equilibrium diagram of the thermodynamic calculation of the reaction between the Mg-Y melt and 0.5%SF 6 /air. In this diagram, the reactants and products less than 1e-15 kmol have not been included, since 1e-15 kmol was five orders of magnitude less than the amount of SF 6 used (& 1.57e-10 kmol) and hence would not affect the process in a measurable way. According to the equilibrium diagram, the evolution process of oxide film can be divided into three stages: In Stage 1, all fluorides within the entrained gas reacted with the Mg-Y melt, forming MgF 2 and YF 3 allowing sulphur to accumulate in the remaining residual gases as SO 2 . As a result, the initial film developed as a single layer that is rich in F but poor in O and S, as shown in Fig. 7a, d.
In Stage 2, SO 2 and O 2 also began to react with the Mg and Y from the melt. According to the thermodynamic calculation shown in Fig. 9, SO 2 would react with the melt only after fluorides were consumed completely. While the real situation occurred in our experiment seems a little different. It seems that some fluorides still existed when SO 2 and O 2 began to react. Therefore, stage 2 can be subdivided into two steps: 1. The early step of stage 2. The remaining fluorides in the gas continued to react with the melt. Meanwhile, as the concentration of fluorides decreases, SO 2 and O 2 also began to react with the Mg and Y from the melt, forming MgO, Y 2 O 3 and MgSO 4 . The simultaneous reactions involved F, S and O made the initial F-rich layer evolved to be a thicker (F, O, S)-rich layer, as shown in Fig. 7b, e. At this stage, the film still has a singlelayered structure although its composition has changed a lot. In consideration of the initial (solid) film located between the cover gas and melt, the reaction started after the diffusion of SO 2 /O 2 and the metallic atoms (Mg and Y) have passed through this F-rich single layer. The appearance of S and O in the initial F-rich single-layer film (Fig. 7, Fig. 7b, d) should be the result of this diffusion. 2. The late step of stage 2. While the little amount of remaining fluorides within the entrained gas reacted quickly away, the following formed film would be lacking in F and only rich in O and S. As the result, the film began to have a two-layer structure, as shown in Fig. 7, Fig. 7c, f. As the amount of O in the cover gas is much higher than the levels of F, the thickness of newly formed O-rich layer would be much larger than the initial F-rich layer. Another noticeable phenomenon during the analysis was that the Y content within the oxide film was much higher than that of the Mg-Y ratio contained within melt, even higher than the Mg content detected in the oxide film. This observation is inconsistent with the calculation result shown in Fig. 9. The reason may be the existence of a solid film between the cover gas and melt makes the cover gas unable to be always in full contact with the melt, which could not be simulated by the HSC software. The thermodynamic calculations are simulated under an assumption that the reactants were in complete contact with each other. According to the following calculations, Y has a higher chemical activity than Mg and will therefore react more readily with O, F and S. As the result, Y segregation in the oxide film was observed.
In Stage 3, as the reaction further progressed, O 2 (as an available reactant) would also become fully depleted. At this stage, N 2 began to react with the metallic atoms (Mg and Y) to form Mg 3 N 2 and YN. Meanwhile, Mg 2 SO 4 also decomposed and reacted with the melt metallic atoms, resulting in the formation of MgS and Y 2 S 3 . However, the analysis shows that the nitrides were not detected in the joint area of the oxide films shown in Fig. 7. The nitrides may have hydrolyzed more readily than predicted, leading to the escape of N in the form of NH 3 during the sample polishing process [41]: In summary, the evolution of the oxide film in both structure and composition can be explained by theoretical calculation.

Effect of different cover gases on the repeatability of Mg-Y alloy castings
The results of the oxide film growth in the oxidation cell indicated that the entrained gas between different sections of an entrained film could be consumed by the surrounding melt. Different oxide film growth rates (''The growth rates of oxide film in 0.5%SF 6 /air and 0.5%SF 6 /CO 2 cover gases'') further revealed that compared with 0.5%SF 6 /CO 2 , the 0.5%SF 6 /air cover gas had a higher reaction rate. In other words, the void volume between different sections of an entrained film can reduce quicker and even disappear (i.e. the opposed sections of an entrained film can get closer or together).
The internal voids within castings have been widely demonstrated harmful for the casting qualities. The void reduction and elimination have been The equilibrium diagram for the reaction between 7e and 7 kg 0.5%SF 6 / air and sufficient amount of Mg-Y melt. The X axis is the amount of Mg-Y melt having reacted with the entrained gas, and the Y-axis is the amount of the reactants and products.
confirmed to be effective to improve the mechanical properties effectively of Al alloys [42,43] and can be achieved by hot isostatic pressing (HIP), during which a high pressure was applied on the castings at a certain temperature to compress void volume within all internal defects (e.g. H porosities, entrained gas). Campbell [4] conjectured that the opposed sections of an entrained film would be expected to grow and even bond together to some extent by the further reaction between melt and the entrapped gas. The resultant bonding may not be particularly strong but is likely to confer some improvement in strength. This hypothesis was supported by Aryafar's research [24], in which the bonding of the two layers of a double oxide film held in liquid A356 Al alloy was observed to become stronger with increasing holding time, and the reason was confirmed to be the growth of the oxide film. Following this work, Raidszadeh and Griffiths [25] also observed such a phenomenon and found that the repeatability of both the ultimate tensile strength (UTS) and elongation (El) (described by Weibull moduli) was improved by a longer holding time which allows the entrained gas to have more time to react with the surrounding melt. Such a phenomenon is also possible in Mg alloys. Here, it should be noted that the contact area of Mg-Y melt and cover gas in the oxidation cell was relatively small considering the large volume of melt and gas, therefore, the holding time for the reaction within the oxidation cell was comparatively long (5-30 min) in the present work and impractical for the casting process. However, the entrained films contained in practical castings are very small in contrast to the atmosphere inside the oxidation cell, and the finite entrained gas was enclosed by the surrounding melt, thus had a relatively large contact area. Hence, the growth of the entrained films (i.e. the reaction between an entrained gas and the Mg-Y melt) can be expected to be comparatively quick. Mirak has also reported that the introduced gas bubbles in the Mg melt solidifying in a permanent mould can be consumed completely. In addition, the Mg alloy sand casting requires a few minutes to be solidified (e.g. Guo [44] reported that a Mg alloy sand casting with 60 mm diameter required 4 min to be solidified, and an A319 sand cast 4-cylinder turbocharged engine block solidified within 5 min [45]). Therefore, the entrained gas consumption due to the reactions with the surrounding melt may likely occur in a Mg alloy sand casting process, which could reduce both the size and void volume of entrainment defects, thus probably diminishing their negative effect on the quality of castings. In addition, since the use of different cover gases (i.e. 0.5%SF 6 /CO 2 , the 0.5%SF 6 / air) would cause different entrained gas consumption rates, the use of 0.5%SF 6 /air during casting process may promote the deactivation (at least partly deactivation) of existing internal void defect and partly supress their deleterious effect on mechanical properties. However, although the entrained gas could be potentially depleted, the residual product (as shown in Fig. 7) was a non-metallic inclusion, which was still harmful for the mechanical properties of castings. Therefore, to improve the casting quality, the most practical way in industry is still to reduce the melt disturbance and the amount of entrained defects by optimizing die design (especially the runner and gating system design) and pouring operation. To investigate the effect of the entrained gas consumption on the repeatability of castings, the Mg-Y castings produced under the cover gas of 0.5%SF 6 /air and 0.5%SF 6 /CO 2 were machined into test bars for mechanical evaluation. The Anderson-Darling test of the tensile test data sets rejected the normality of the data sets (i.e. p value even less than 0.005). Therefore, analysis techniques, which require the assumption that the data set follows a normal distribution (such as mean value, 95%CI, 2-sigma), were not suitable for the analysis of the data sets. The Weibull analysis calculation methods were adopted. Figure 10 shows the Weibull analysis of the UTS and elongation of the Mg-Y alloy castings, obtained by using linear least square method. The probability estimator used was P = (i-0.5)/N which is widely suggested to have the smallest bias among the estimators [46][47][48]. Both the UTS and elongation data points were approximately linearly plotted. The UTS Weibull moduli of SF 6 /air (m = 18.1) was clearly higher than that of SF 6 /CO 2 (m = 9.9). Meanwhile, the casting produced in SF 6 /air also had a higher elongation Weibull moduli (m = 3.6) than that produced in SF 6 /CO 2 (m = 2.). Hence, the results of Weibull modulus showed that the Mg-Y casting produced in 0.5%SF 6 /air had a better repeatability than that protected by 0.5%SF 6 /CO 2 . It can be suggested that consumption of entrained gas may be profitable to improve the repeatability of castings' mechanical properties. While these castings were produced by a specially designed mould with the top-filling system which is rarely adopted in the real casting industry, therefore, it still requires a further investigation in Mg alloy foundries case by case to confirm the effect of carried gas on the repeatability of different industrial Mg alloy castings.

Conclusions
1. The entrained films in Mg-Y alloys formed under a limited amount of 0.5%SF 6 /air have two typical types: (1) a single-layered F-rich film and (2) a double-layered film with a F-rich inner layer and a F-poor outer layer. 2. The evolution processes of the oxide film were revealed by both experiment and theoretical thermodynamic calculations. The F constituent of the entrained cover gas would be consumed firstly resulting in the formation of an initial F-rich film. The diffusion of atoms through this initial film can lead to the eventual appearance of S and O within the initial F-rich film. After all available F and S reactants had become exhausted, O elements would react with the metallic elements from Mg-Y melt and form a new outer layer that is characteristically F-deficient but O-rich. It is this process which leads the oxide film to develop a double-layer structure. 3. An entrained SF 6 /air gas bubble will react with the surrounding Mg-Y melt, and hence be consumed more rapidly when compared to a SF 6 / CO 2 atmosphere, leading to a faster reduction in the size and void volume of entrainment defects, which is potential to diminish the detrimental effects associated with the entrainment defects and improve the repeatability of castings' mechanical properties.

Declarations
Conflict of interest The authors declare that they do not have any conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licen ses/by/4.0/.