Effect of Quenching Parameters on Distortion Phenomena in AISI 4340 Steel

: During quenching heat treatment, the formation of high residual stress values and the presence of distortion are phenomena which are difﬁcult to control and accurately predict, their effects being extremely important to the components or pieces of complex and robust geometry that are commonly used in the industry. The latter is mainly due to the mixture of the high temperature levels formed between the surface and the cores of the components and the martensitic transformation during quenching. In this research, an experimental and simulated analysis of the process of the quenching heat treatment of AISI 4340 steel, using geometrically complex components, was under-taken with the objective of studying and understanding the effect of quenching process parameters on distortion, stress generation, and mechanical properties. A model that applied the ﬁnite elements method (FEM), in which entry data such as thermo-physical and mechanical properties were obtained through experimental techniques that were reported in the literature, made it possible to simulate the cooling process under different conditions, which helped to explain the origins of the distortion in the quenched parts. The results show a close relationship between various quenching parameters such as heat extraction speed, the immersion orientation in the liquid, and the component’s geometry. The data obtained could contribute to accelerating the design process of the heat processing routes for quenching components by taking into consideration both the classic process variables and, due to the increased precision resulting from mathematical modeling, additional factors such as the geometry of real applications.


Introduction
The purpose of the quenching heat treatment is to modify the initial microstructure of steel by means of cooling the heated parts through the austenitizing temperatures of different liquid quenchants, such as brine, water, or oil. The high cooling rate achieved during the quenching process suppresses diffusion-controlled phase transformations (ferrite, perlite, and bainite) and favors non-diffusional transformations such as martensite, a desirable phase in quenched steel which is responsible for reaching optimum levels of mechanical properties [1,2], followed by a complementary tempering heat treatment. Quenching heat treatment on steel adequately meets the requirements that the modern industry demands. This is mainly in the automotive and aerospace industries, where the strict control of the specifications of mechanical properties and residual stresses are required in order to reduce the possibility of failures and to increase the service life of various components with differing complex geometries. For this reason, distortion control plays a determining role in the dimensional precision of massive production parts when it comes to reducing waste.

Materials and Experimentral Procedure
The material used in this research was an AISI 4340 steel of medium carbon content, of which its main alloyings were Cr and Ni. The chemical composition of the steel is presented in Table 1. For the quenching tests, probes were fabricated with a geometry similar to the one shown in Figure 1. There was a dimensional control of the specimens prior to and after the heat treatment with an interior gauge, a Starrett 700MA with a precision of 0.01 mm, for the purpose of quantifying the dimensional changes in the A, B, and C gaps of the specimens that were caused by the distortion during quenching; see Figure 1.

Materials and Experimentral Procedure
The material used in this research was an AISI 4340 steel of mediu of which its main alloyings were Cr and Ni. The chemical composi presented in Table 1. For the quenching tests, probes were fabricated similar to the one shown in Figure 1. There was a dimensional contro prior to and after the heat treatment with an interior gauge, a Starr precision of 0.01 mm, for the purpose of quantifying the dimensional c and C gaps of the specimens that were caused by the distortion duri Figure 1.

Heat Treatment Process
For all the quenching tests, the samples used were instrume thermocouples attached to their surfaces and connected to a data acqui channels: OMB-DAQ 54. The pieces were heated at a rate of 5 °C/mi 3500 muffle-type furnace (Thermo Scientific, Waltham, MA, USA) austenitization temperature of 860 °C; once reached, it was kept for 4 homogeneous austenitic microstructure. The quenching was perform quenching media, oil and water. The commercial quenching oil E Equimsa brand was used at a temperature of 60 °C, while the aqueo water at a temperature of 25 °C. In both cases, the quenching media we agitation by the action of a peripheral pump of ½ HP, and the immersi 40 mm/s, controlled through a robotic arm with stepper motor control the process are summarized in Table 2. The direction of the immersio

Heat Treatment Process
For all the quenching tests, the samples used were instrumented with type K thermocouples attached to their surfaces and connected to a data acquisition card with 10 channels: OMB-DAQ 54. The pieces were heated at a rate of 5 • C/min in a Thermolyne 3500 muffletype furnace (Thermo Scientific, Waltham, MA, USA) until reaching an austenitization temperature of 860 • C; once reached, it was kept for 45 min to achieve a homogeneous austenitic microstructure. The quenching was performed in two liquid quenching media, oil and water. The commercial quenching oil Equiquench 770 of Equimsa brand was used at a temperature of 60 • C, while the aqueous media was tap water at a temperature of 25 • C. In both cases, the quenching media were kept in constant agitation by the action of a peripheral pump of 1 2 HP, and the immersion speed used was 40 mm/s, controlled through a robotic arm with stepper motor controls; the conditions of the process are summarized in Table 2. The direction of the immersions occurred in the direction "-z" in the case of the quenching probes in a vertical mode and in the "x" direction for the quenching probes in a horizontal mode; see Figure 1.

Microstructural Analysis
The microstructure of the heat-treated samples was analyzed using an optical microscope (Velab, Ecatepec, Mexico) with a prior standard metallographic preparation according to the norm ASTM E3 [28], while the microstructure was revealed using a 2% Nital etchant according to ASTM E407 [29].

Hardness Evaluation
The hardness of the treated specimens was measured with a TIME TH-500 model hardness tester (Time Group Inc., Beijing, China) in Rockwell C scale along an axial cut in the "z" axis.

Modeling of the Quenching Process
The simulation of the finite elements in the quenching process involved three main aspects: the heat transfer coefficient, the phase transformations, and the residual stresses plus the deformations that had to be properly taken into account [14,16,30,31].
The mathematical model presented in this research considered the relationships between the thermal phenomena, the microstructural changes, mechanical properties, and the residual stresses generated both by thermal origin stress and those due to the phase transformations. The research considered a component of complex geometry through FEM simulation; therefore, thermal gradients existed at the same instant in time. This temperature distribution in the component depends on factors such as the quenching severity, thermal conductivity, heat capacity and latent heat.
Modeling the phase transformations was considered through the evolution of the phase volume fraction during its solid-state transformation as a function of the cooling time and temperature; because of this, diagrams for time-temperature-transformation (TTT) were necessary in modeling. On the other hand, internal stresses produced in the material were calculated by elasto-plastic analysis that assumed small deformations in the part.

Heat Transfer
The quenching heat treatment can be defined as a transient heat conduction problem that involves all possible means of heat extraction (conduction, radiation, and convection). However, the effect of thermal radiation was not considered in the simulation model used because the treated piece was exposed to the environment for an extremely short time, and the loss of heat by radiation was not considerable; therefore, only the heat conduction and convection equations are described below, using the law of Fourier [32] in Equation (1): where q is the heat flux, k is the thermal conductivity, and ∇T is the temperature gradient field inside the part. According to Fourier s law, the heat conduction equation of the transient problem that contains the phase transformation can be defined using the conservation of energy balance in the rectangular coordinate system presented in Equation (2): where k is the thermal conductivity, T is the quenching part temperature, q v is the heat generation rate from the steel phase transformations, is the material density, C p is the specific heat capacity at a constant pressure, t is the time, and (x, y, z) are the rectangular coordinates.
To calculate the heat transmission by convection between the part's surface and the cooling media, the cooling equation of Newton is used, as described in Equation (3): where Q is the heat flux density, h is the heat transfer coefficient, A is the surface area of the part, and ∆T is the temperature difference between the part's surface and the quenching media.

Phase Transformation
Because phase transformations have a strong relationship with the thermal and mechanical behavior of the material, they should be considered when finite element simulations are used. In the first place, the temperature ranges where the phase transformations occur and which are limited by the critical temperatures must be defined. Commonly these temperatures can be calculated using time-temperature-transformation (TTT) diagrams or through analytical expressions.
TTT diagrams describe the relationship between the beginning and end of a transformation and indicate a transformed volume fraction during the isothermal process at different temperatures. The isothermal kinetic equation, known as the Johnson-Mehl equation [33], is a fundamental variable in the numerical simulation of thermal processes, although it cannot be directly applied to calculate the volume fraction during non-isothermal processes. Due to this restriction, the Avrami equation was proposed, which has been widely used in these type of processes [34], Equation (4): where ξ is the volume fraction of the new phase, t is the isothermal time duration, b is a temperature, chemical composition of parent phase, and grain size dependent constant, and n is a constant dependent on the type of phase transformation, varying from 1 to 4. In the case of displacive transformation (martensite), there is a stage of nucleation and growth; however, the growth rate is so high that the volume of transformation of the phase is almost entirely controlled by nucleation, and as a result, its transformation kinetics are not influenced by the cooling speed. Because of this, it cannot be explained by Avrami's equation. Therefore, the amount of martensite formed is calculated using the equation established by Koistinen and Marburger [35], Equation (5): where ξ is the martensite transformed volume fraction, T is the temperature, M s is the martensite transformations beginning temperature, and α is a constant that indicates the transformation rate and depends on the chemical composition of steel. It is important to mention that through the TTT and CCT diagrams it is possible to obtain the martensitic transformation temperature at a critical cooling rate.

Mechanical Interactions
The formation of residual stresses during quenching can occur in different mannershigh temperature gradients, martensitic transformations, or the combination of both. In the first, the differences in temperature between the surface and the core of the part cause the surface to cool faster than the core, and therefore a volume contraction of the part begins on the surface with the presence of tension from the residual stresses, while in the core, to balance the entire part state of the residual stresses, there should be compression. In the second case, when a martensitic transformation is involved, stresses appear immediately after the martensitic transformation occurs on the surface of the piece, causing compressive residual stresses and tension-types in the core. The end of the residual stress behavior finishes as soon as the martensitic transformation occurs in the core of the part; at this point, the surface of the part is completely transformed and has reached room temperature [36]. Assuming that steel behaves like a thermo-elasto-plastic material, the total strain rate on the steel during quenching can be expressed in terms of the five deformation sources in Equation (6).
ε tr ij terms are the elastic, plastic, thermal, phase transformation, and plasticity transformation strain rates, respectively. Equations (7)-(11) are used individually in the simulation model to calculate the addition of deformations due to the different physical origins considered in this study. .
where E, υ, σ ij , dλ, δ ij , and ϕ are the elastic modulus, Poisson s ratio, Cauchy stress tensor, the plastic multiplier, Kronecker delta, and the yield functional using temperature, respectively.
where α κ is the termal expansión coefficient of the phase κ, and ζ κ is the volume fraction of phase κ.
where ∆ κ is the structural dilation due to the phase transformation.
where K κ is a constant due to the transformation-induced plasticity (TRIP), . ζ k is the transformation rate of the phase κ, and S ij is the stress deviator tensor.
Once the previous sources of deformation have been established, the internal stresses can be reconstructed using Hooke's law for isotropic materials.
Hardness values can be calculated using a simple rule of mixtures, assuming a constant hardness value for each phase.
where H is the weighted average of hardness in any element of the simulated geometry, H (1−n) are typical values of hardness for each phase, and f (1−n) values are the calculated volume fraction for each present phase.

Finite Element Simulation Conditions
The quenching process was simulated using the finite elements method (FEM). Table 3 summarizes the simulation parameters used. The compute domain of geometry is shown in Figure 2, representing a tridimensional model with 165,000 tetrahedral elements and 36,500 nodes, which was chosen so the results did not depend on the refinement degree of the mesh. The input data of the thermal and transformation properties of the material can be appreciated in Figure 3; these thermophysical properties of the material were the ones available in the literature for AISI 4340 steel. The model considered the thermal interactions, the formation of internal stress, the elasto-plastic deformation, and the microstructural evolution. thermal interactions, the formation of internal stress, the elasto-plastic deformation, a the microstructural evolution.

Thermal Analysis
In Figure 4, the experimental results of the temperature evolution during the cooling on the surface of the quenched parts from 860 °C until reaching the quenching media temperature are shown; oil and water with temperatures of 55° and 25°, respectively, in the two directions of immersion, vertical and horizontal.

Thermal Analysis
In Figure 4, the experimental results of the temperature evolution during the cooling on the surface of the quenched parts from 860 • C until reaching the quenching media temperature are shown; oil and water with temperatures of 55 • and 25 • , respectively, in the two directions of immersion, vertical and horizontal.  At the beginning of the cooling for all the studied cases, it was observed that there was a downfall in the cooling curve temperature of 860 °C until 770 °C, and this downfall was related to the stage of convection cooling followed by a severe cooling caused by the immersion into the used liquid. Just as expected, the water-quenched samples showed an At the beginning of the cooling for all the studied cases, it was observed that there was a downfall in the cooling curve temperature of 860 • C until 770 • C, and this downfall was related to the stage of convection cooling followed by a severe cooling caused by the immersion into the used liquid. Just as expected, the water-quenched samples showed an extremely rapid decrease in temperature, quickly reaching the martensitic transformation, as shown in Figure 4b, while the time required for the samples to reach thermal equilibrium with the quenching media was 70 s in the case of the quenching in oil, with the time extending asymptotically until 400 s, as shown in Figure 4a. Additionally, it could be observed that the relative cooling times of the oil immersion mode were reduced when the specimen was submerged in a vertical position (V-OQ), which is explained by the austenite-martensite transformation beginning before expected and by the transformation being completed in a shorter span of time for all the specimens. However, for the horizontal immersion (H-OQ), this timing was delayed for an approximated period of 30 s to begin the martensite transformation (see Figure 4a). Figure 5 shows the thermal history and the maximum cooling rates reached in each stage until the completion of cooling for all the studied conditions. Figure 5a,b represents the oil immersion conditions of the tested specimens, the maximum cooling rates of 55 • and 45 • C/s for the vertical direction immersion (V-OQ) and horizontal (H-OQ), respectively. On the other hand, the maximum cooling rate was observed in the vertical immersion position, with water as the cooling medium. The maximum cooling rates were 150 and 250 • C/s for the vertical direction immersions (V-WQ) and horizontal (H-WQ), respectively; see Figure 5c,d. Cooling rates in that order of magnitude typically cause problems such as cracking or fracture of the samples because of the high temperature gradient formed at different points in the component. During the cooling of the quenched samples, it was desirable that the temperature changes along the samples occured in a uniform way between the surface and the core in order to avoid the formation of high thermal gradients, which can be the origin of high stress of thermal origin. Even though the formation of residual stresses depends on a complex interaction among the diverse thermal-physical-mechanical phenomena, for the During the cooling of the quenched samples, it was desirable that the temperature changes along the samples occured in a uniform way between the surface and the core in order to avoid the formation of high thermal gradients, which can be the origin of high stress of thermal origin. Even though the formation of residual stresses depends on a complex interaction among the diverse thermal-physical-mechanical phenomena, for the specific case of the quenching treatment, the homogeneous distribution of temperature along the component is a critical condition. Because of this, it becomes an issue of great interest to evaluate the temperature gradient intensity formed between the surface and core zones during the cooling, which can partially inform the stress profiles found through the mathematical model at the end of the heat treatment and in the presence of the diverse unwanted phenomena of excessive distortion and the occurrence of fractures. These thermal gradients were evaluated in six positions (surface and core) during the whole cooling stage for all the simulated cases, and the results are presented in Figure 6. The results show that the highest thermal gradients were present when water was used as the quenching medium; see Figure 6c,d. Values of ∆T ≈ 650 • C were found between the surface and the core of the piece, showing non-homogeneous temperature profile behavior due to the fast heat extraction in its surface and a heat extraction slower in the core, increasing the possibility of the presence of cracks and subsequent fractures. Figure 6a,b shows the thermal gradients in the samples quenched in oil as the quenching medium. It can be observed that the lowest thermal gradients, ∆T ≈ 350 • C, are found on the points (P3 vs. P6) which corresponded to the thinnest zone of the piece, while in the other studied points, the maximum values of ∆T were ≈ 440 • C, increasing the probability of a major concentration of thermal origin stresses and the presence of distortions that compromised the dimensional precision of the pieces and caused the generation of cracks and fractures in real quenched components.  The cooling profiles obtained experimentally were compared with the simulation results and are presented in Figure 7. It is evident that the model could predict the necessary time for the piece to reach the thermal balance with the quenching media; however, the model needs to be perfected to obtain the same cooling rates in the inferior parts of the cooling curves corresponding to the convection cooling stage. In a general The cooling profiles obtained experimentally were compared with the simulation results and are presented in Figure 7. It is evident that the model could predict the necessary time for the piece to reach the thermal balance with the quenching media; however, the model needs to be perfected to obtain the same cooling rates in the inferior parts of the cooling curves corresponding to the convection cooling stage. In a general way, the implemented model overestimated the cooling rates in the oil cases and underestimated the cooling rates in the water quenched case estimations. The cooling profiles obtained experimentally were compared with the simulation results and are presented in Figure 7. It is evident that the model could predict the necessary time for the piece to reach the thermal balance with the quenching media; however, the model needs to be perfected to obtain the same cooling rates in the inferior parts of the cooling curves corresponding to the convection cooling stage. In a general way, the implemented model overestimated the cooling rates in the oil cases and underestimated the cooling rates in the water quenched case estimations.  Figure 8 shows images through optical microscopy of the obtained microstructure from the quenched AISI 4340 steel in oil and water and two immersion directions. In all studied cases, an almost complete martensite transformation could be observed, which was expected according to the steel chemistry and the used quenching conditions.

Microstructure and Hardness
After the microstructural characterization, a simulation analysis through FEM modeling was made to compare the results of the austenite-martensite transformation during the cooling stage. According to the results shown in the histograms in Figure 9a,b, which represents the martensite distribution in all the 36,500 nodes of the model, 93% transformed martensite was obtained for the quenching condition in oil; these results are similar for the vertical immersion condition (V-OQ) and horizontal condition (H-OQ). Moreover, with the quenching treatment using water as the quenching medium, the martensite transformation reached 97% in both vertical immersion (V-WQ) and horizontal immersion modes (H-WQ). In addition to the histograms in Figure 9, for the distribution of martensite in the pieces studied at the end of the modeled cooling for the different studied conditions of immersion, see Figure 10. It can be seen that despite the similarities in the amount of final martensite transformation for both immersion cases, the most homogeneous distribution was found in the vertical immersion cases without consideration of the quenching media, indicating a more uniform cooling under this condition when compared to the cooling in a horizontal position that generates less symmetrical martensite distributions.  Figure 8 shows images through optical microscopy of the obtained microstructure from the quenched AISI 4340 steel in oil and water and two immersion directions. In all studied cases, an almost complete martensite transformation could be observed, which was expected according to the steel chemistry and the used quenching conditions. After the microstructural characterization, a simulation analysis through FEM modeling was made to compare the results of the austenite-martensite transformation during the cooling stage. According to the results shown in the histograms in Figure 9a,b, which represents the martensite distribution in all the 36,500 nodes of the model, 93% transformed martensite was obtained for the quenching condition in oil; these results are similar for the vertical immersion condition (V-OQ) and horizontal condition (H-OQ). Moreover, with the quenching treatment using water as the quenching medium, the martensite transformation reached 97% in both vertical immersion (V-WQ) and horizontal immersion modes (H-WQ). In addition to the histograms in Figure 9, for the distribution of martensite in the pieces studied at the end of the modeled cooling for the different studied conditions of immersion, see Figure 10. It can be seen that despite the similarities in the amount of final martensite transformation for both immersion cases, the most homogeneous distribution was found in the vertical immersion cases without consideration of the quenching media, indicating a more uniform cooling under this condition when compared to the cooling in a horizontal position that generates less symmetrical martensite distributions. studied conditions of immersion, see Figure 10. It can be seen that despite the similarities in the amount of final martensite transformation for both immersion cases, the most homogeneous distribution was found in the vertical immersion cases without consideration of the quenching media, indicating a more uniform cooling under this condition when compared to the cooling in a horizontal position that generates less symmetrical martensite distributions. The difference between the results lies mainly in the quenching media; when water was used, the quenching severity was more aggressive and a major cooling rate was obtained, promoting the austenite-martensite phase transformation to occur early in most nodes in the simulation model. By contrast, for the oil quenched cases, the cooling rate was minor, and the martensite complete transformation was affected by variables such as the oil temperature, agitation of the liquid, and the rate and the immersion direction of the pieces.

Microstructure and Hardness
The hardness of the quenched pieces was measured in a longitudinal section along the axis "z" in the coordinate system. Figure 11 shows the average hardness in three zones in the studied samples of AISI 4340 steel under different immersion modes in oil and water. The water-cooled pieces showed more hardness in both immersion modes in the three analyzed zones, and the hardness levels obtained were 57.3-59.1 HRC. By contrast, for the oil cooling and the vertical immersion conditions, a major hardness was obtained with hardness magnitudes between 51.9 and 54 HRC. On the other hand, the quenching condition in oil and horizontal immersion showed the lowest hardness magnitude for the experiments performed. The hardness results gobtained through FEM showed a more uniform distribution compared with the experimental results for all the types of immersion and quenching media, and the latter can be observed in Figure 12, which shows the hardness distribution of the 36,500 nodes that formed the mesh through histograms. These hardness fluctuations could be explained by the variations in the transformation kinetics used in the model in addition to the HTC used, which could be optimized using the experimental data collected in this research for future works.  The difference between the results lies mainly in the quenching media; when water was used, the quenching severity was more aggressive and a major cooling rate was obtained, promoting the austenite-martensite phase transformation to occur early in most nodes in the simulation model. By contrast, for the oil quenched cases, the cooling rate was minor, and the martensite complete transformation was affected by variables such as the oil temperature, agitation of the liquid, and the rate and the immersion direction of the pieces.
The hardness of the quenched pieces was measured in a longitudinal section along the axis "z" in the coordinate system. Figure 11 shows the average hardness in three zones in the studied samples of AISI 4340 steel under different immersion modes in oil and water. The water-cooled pieces showed more hardness in both immersion modes in the three analyzed zones, and the hardness levels obtained were 57.3-59.1 HRC. By contrast, for the oil cooling and the vertical immersion conditions, a major hardness was obtained with hardness magnitudes between 51.9 and 54 HRC. On the other hand, the quenching condition in oil and horizontal immersion showed the lowest hardness magnitude for the experiments performed. The hardness results gobtained through FEM showed a more uniform distribution compared with the experimental results for all the types of immersion and quenching media, and the latter can be observed in Figure 12, which shows the hardness distribution of the 36,500 nodes that formed the mesh through histograms. These hardness fluctuations could be explained by the variations in the transformation kinetics used in the model in addition to the HTC used, which could be optimized using the experimental data collected in this research for future works.   The difference between the results lies mainly in the quenching media; when water was used, the quenching severity was more aggressive and a major cooling rate was obtained, promoting the austenite-martensite phase transformation to occur early in most nodes in the simulation model. By contrast, for the oil quenched cases, the cooling rate was minor, and the martensite complete transformation was affected by variables such as the oil temperature, agitation of the liquid, and the rate and the immersion direction of the pieces.
The hardness of the quenched pieces was measured in a longitudinal section along the axis "z" in the coordinate system. Figure 11 shows the average hardness in three zones in the studied samples of AISI 4340 steel under different immersion modes in oil and water. The water-cooled pieces showed more hardness in both immersion modes in the three analyzed zones, and the hardness levels obtained were 57.3-59.1 HRC. By contrast, for the oil cooling and the vertical immersion conditions, a major hardness was obtained with hardness magnitudes between 51.9 and 54 HRC. On the other hand, the quenching condition in oil and horizontal immersion showed the lowest hardness magnitude for the experiments performed. The hardness results gobtained through FEM showed a more uniform distribution compared with the experimental results for all the types of immersion and quenching media, and the latter can be observed in Figure 12, which shows the hardness distribution of the 36,500 nodes that formed the mesh through histograms. These hardness fluctuations could be explained by the variations in the transformation kinetics used in the model in addition to the HTC used, which could be optimized using the experimental data collected in this research for future works.  Figure 13 shows the distortion generated the studied samples after the quenching treatment measured in a quantitative way in three zones identified as: A, B, and C, which correspond to the nominal 25 mm gaps prior to the heat treatment (see Figure 1).  Figure 13 shows the distortion generated the studied samples after the quenching treatment measured in a quantitative way in three zones identified as: A, B, and C, which correspond to the nominal 25 mm gaps prior to the heat treatment (see Figure 1).

Distortion
(c) (d)  Figure 13 shows the distortion generated the studied samples after the quenching treatment measured in a quantitative way in three zones identified as: A, B, and C, which correspond to the nominal 25 mm gaps prior to the heat treatment (see Figure 1). It can be seen that the major distortion was presented in the water-quenched samples in the direction of horizontal immersion (H-WQ), and the magnitude of the measured distortion was ≈ 0.48 mm, while the minor distortion was found for the case of the oilquenchied samples and when the piece enters the quenching media in a vertical direction (V-OQ), with a magnitude of just |0.005| mm. In both cases, these values occurred in the thinnest region of the piece, identified as zone C. Furthermore, it was observed that for the quench in water and in the direction of the vertical immersion (V-WQ), a distortion was obtained in the range of 0.23-0.31 mm for the gaps B and C, while for A it corresponded to the thickest region of the piece and presented the lowest distortion levels, regardless the cooling media used. In a general way, the tendency to increase the magnitude of the distortion was presented when using the direction of horizontal immersion and using water as the quenching medium, while when using oil, which is the less severe quenching medium, and a vertical direction immersion, the decrease of the distortion effect is favored. It can be seen that the major distortion was presented in the water-quenched samples in the direction of horizontal immersion (H-WQ), and the magnitude of the measured distortion was ≈ 0.48 mm, while the minor distortion was found for the case of the oilquenchied samples and when the piece enters the quenching media in a vertical direction (V-OQ), with a magnitude of just |0.005| mm. In both cases, these values occurred in the thinnest region of the piece, identified as zone C. Furthermore, it was observed that for the quench in water and in the direction of the vertical immersion (V-WQ), a distortion was obtained in the range of 0.23-0.31 mm for the gaps B and C, while for A it corresponded to the thickest region of the piece and presented the lowest distortion levels, regardless the cooling media used. In a general way, the tendency to increase the magnitude of the distortion was presented when using the direction of horizontal immersion and using water as the quenching medium, while when using oil, which is the less severe quenching medium, and a vertical direction immersion, the decrease of the distortion effect is favored.

Distortion
In contrast, the distortion values obtained in the simulation presented in Figure 14 are in good agreement with the experimental results in the V-OQ and H-OQ specimens. Less consistent values are found with specimen V-WQ due to the difference found in the gap "A" that shows an inverted distortion with respect to the corresponding experimental result. Finally, the H-WQ specimen was the one with the worst concordance with the experimental results. This difference between results shows the difficulty in modeling processes with many variables, and in this case, even the slightest deviation during immersion in the quenching medium creates an inadequate value for the heat transfer coefficient due to the different convection conditions generating such resultant discrepancies.
The austenite to martensite phase transformation is accompanied by a volumetric expansion and promotes the formation of internal stresses, and similarly, the thermal gradients during the cooling process produce the correspondent thermal origin stresses. In such a way, the dimensional change in the geometry of the studied pieces was related to the combined effect of these phenomena. Both are difficult to avoid; however, these are possible to predict and control through the design of a quenching system that allows the manipulation of each one of the critical variables along with numeric techniques, such as FEM models, which make the design of heat treatments as efficient and controllable as possible.
result. Finally, the H-WQ specimen was the one with the worst concordance with the experimental results. This difference between results shows the difficulty in modeling processes with many variables, and in this case, even the slightest deviation during immersion in the quenching medium creates an inadequate value for the heat transfer coefficient due to the different convection conditions generating such resultant discrepancies. The austenite to martensite phase transformation is accompanied by a volumetric expansion and promotes the formation of internal stresses, and similarly, the thermal gradients during the cooling process produce the correspondent thermal origin stresses. In such a way, the dimensional change in the geometry of the studied pieces was related to the combined effect of these phenomena. Both are difficult to avoid; however, these are possible to predict and control through the design of a quenching system that allows the manipulation of each one of the critical variables along with numeric techniques, such as FEM models, which make the design of heat treatments as efficient and controllable as possible.

Simulated Residual Stresses and Precense of Cracks
The accumulation of internal stresses of thermal origins due to the high temperature gradients is added to the stresses generated by the volumetric expansion during the martensitic transformation, generating not only a decrease in the dimensional precision due to distortion but also, if these stresses overcome the yield stress, cracks or fractures in the material may occur. That is the reason why it becomes important to study the evolution of these stresses to know their magnitude and distribution related to cooling time. Figure 15 shows the stress distribution in the pieces at the end of the simulation, pointing out the residual stress concentrators obtained in each case studied.

Simulated Residual Stresses and Precense of Cracks
The accumulation of internal stresses of thermal origins due to the high temperature gradients is added to the stresses generated by the volumetric expansion during the martensitic transformation, generating not only a decrease in the dimensional precision due to distortion but also, if these stresses overcome the yield stress, cracks or fractures in the material may occur. That is the reason why it becomes important to study the evolution of these stresses to know their magnitude and distribution related to cooling time. Figure 15 shows the stress distribution in the pieces at the end of the simulation, pointing out the residual stress concentrators obtained in each case studied. Figure 15 shows the stress concentration along the geometry of the piece for all the studied cases. It can be appreciated that the vertical quenching modes produced more minor stress values than the corresponding horizontal quenching cases. Showing the mode V-OQ, Figure 15a shows minor stresses at the end of the quenching. The mode H-WQ, in Figure 15d, is the sample that reached stress values on the order of 530 MPa. This last value was far from overcoming the elastic limit of AISI 4340 steel; however, analyzing the stress history along the cooling time, peak values can be found very close to the yield limit of the material, at least in the water-quenched simulated samples.
In Figure 16 are shown the maximum values of residual stresses related to the simulation time in different zones of the studied pieces in both directions of immersion for water-quenched samples. Figure 16a represents the vertical immersion condition when the maximum effective stresses were reached at 10 s after beginning the quenching process, while, for the horizontal direction, the average time after the immersion started was zones with elevated stress values along the whole piece due to the immersion condition. The magnitudes of such stresses are in the range of 750-1100 MPa and are found in all the geometrical concentrators (sharp edges corners), unlike the vertical immersion case.  Figure 15 shows the stress concentration along the geometry of the piece for all the studied cases. It can be appreciated that the vertical quenching modes produced more minor stress values than the corresponding horizontal quenching cases. Showing the mode V-OQ, Figure 15a shows minor stresses at the end of the quenching. The mode H-WQ, in Figure 15d, is the sample that reached stress values on the order of 530 MPa. This last value was far from overcoming the elastic limit of AISI 4340 steel; however, analyzing the stress history along the cooling time, peak values can be found very close to the yield limit of the material, at least in the water-quenched simulated samples.
In Figure 16 are shown the maximum values of residual stresses related to the simulation time in different zones of the studied pieces in both directions of immersion for water-quenched samples. Figure 16a represents the vertical immersion condition when the maximum effective stresses were reached at 10 s after beginning the quenching process, while, for the horizontal direction, the average time after the immersion started was 7 s; see Figure 16c. This difference in times is caused by the fact that in the horizontal immersion mode, the time for the total immersion of the sample is less than that for the the horizontal way, exposing a greater heat transfer area that accelerates the cooling process of the entire piece in relation to the vertical immersion, and reaching major cooling Most of the steels are susceptible to fragilization when they are exposed to severe temperature changes, such as those in the quenching process. In this research, the formation of cracks in the water-quenched samples was detected for both modes of immersion, and this effect was not observed in the oil-quenched samples. In Figure 17 are shown some images of fractures found in a full section cut along the "z" axis during the metallographic preparation of the pieces; in both cases, they were of the intergranular type, finding their origins in the surface with a propagation direction towards the core of the samples.
The appearance and location of the cracks could be explained from the previously exposed results in which the evolution of the residual stresses are related to the occurrence time, therefore reaching values close to the yield limit of AISI 4340 steel in the quenched condition, as reported by Li [41]. It is possible that the real stresses in the pieces are bigger than the calculated values by the FEM model; however, such simulated stresses predict the zones of the piece where the material is prone to fail and correspond to the zones of high thermal gradients and geometric concentrators. Because of this, the accuracy of the model is able to be improved in future works, including the experimental measurement data of residual stresses, the mechanical properties, and heat transference coefficient optimization.
sustained thermal gradient such as that in zones P1-P3, which developed high values for stress. On the contrary, the horizontal mode immersion in Figure 16c,d, shows a major number of zones with elevated stress values along the whole piece due to the immersion condition. The magnitudes of such stresses are in the range of 750-1100 MPa and are found in all the geometrical concentrators (sharp edges corners), unlike the vertical immersion case. Most of the steels are susceptible to fragilization when they are exposed to severe temperature changes, such as those in the quenching process. In this research, the formation of cracks in the water-quenched samples was detected for both modes of immersion, and this effect was not observed in the oil-quenched samples. In Figure 17 are shown some images of fractures found in a full section cut along the "z" axis during the metallographic preparation of the pieces; in both cases, they were of the intergranular type, finding their origins in the surface with a propagation direction towards the core of the samples.  The appearance and location of the cracks could be explained from the previously exposed results in which the evolution of the residual stresses are related to the occurrence time, therefore reaching values close to the yield limit of AISI 4340 steel in the quenched condition, as reported by Li [41]. It is possible that the real stresses in the pieces are bigger than the calculated values by the FEM model; however, such simulated stresses predict the zones of the piece where the material is prone to fail and correspond to the zones of high thermal gradients and geometric concentrators. Because of this, the accuracy of the model is able to be improved in future works, including the experimental measurement data of residual stresses, the mechanical properties, and heat transference coefficient optimization.

Conclusions
Quenching heat treatment was characterized under controlled conditions relying on an FEM model which is able to reproduce the thermal history, phase transformations, hardness, and the formation of residual stresses during the simulated quenching process of a geometrically complex piece of AISI 4340 steel. The direction of immersion and the

Conclusions
Quenching heat treatment was characterized under controlled conditions relying on an FEM model which is able to reproduce the thermal history, phase transformations, hardness, and the formation of residual stresses during the simulated quenching process of a geometrically complex piece of AISI 4340 steel. The direction of immersion and the cooling media used were the studied variables. Considering the obtained results, it can be concluded:

•
The highest magnitude of thermal gradients was present when using water as the cooling medium and the direction of horizontal immersion, increasing the presence of high values of stress with thermal origin and decreasing the dimensional precision and its mechanical properties; • There are favorable conditions during the quenching process to reduce those phenomena that affect the quality of the quenched pieces. The condition of vertical immersion and the employment of oil at 60 • C presented a lower magnitude of effective stresses according to the FEM model used, as well as more minor distortion and higher hardness values when compared with the horizontal immersion in both quenching media; • The present research allowed us to analyze the distortion behavior in a geometrically non-conventional piece under two different quenching media using FEM modeling, becoming a potent tool in the design of heat treatments for real engineering elements with complex geometries; • Once certain variables have been defined, such as the immersion direction and the quenching media, in which a low level of residual stresses and distortion can obtained, it is advisable to continue researching other critical conditions in the process that contribute to reducing and predicting the distortion and cracking in quenched steels.