1 Introduction

Electrical discharge machining (EDM) is a machining process that employs pulsed spark discharges between the tool electrode and the workpiece to eliminate surplus metal and achieve precise predetermined dimensions, shapes, and surface finishes [1, 2]. With the rapid development of manufacturing and processing technology, the trend of fine precision in mechanical parts is becoming more and more obvious, and the application field of EDM is increasing, especially in aerospace, automobiles, molds, and other fields [3, 4]. EDM provides many advantages for the shaping of metallic materials [5]. In the fluid dielectric, the tool electrode and the workpiece generate an electric spark in a narrow gap with a duration of only a few microseconds, but an instantaneous high temperature of more than 6000 K can be generated in the discharge area, which can melt or even vaporize the material on the surface of the tool electrode and the workpiece [6, 7]. After each pulse discharge, there will be fine craters on the surface of the workpiece, and the repeated discharge is uninterrupted at high frequency. The predetermined shape and size can be copied onto the workpiece by adjusting the feed device. However, the presence of a significant quantity of electrocorrosion residues in the inter-pole processing region during EDM can lead to secondary discharges in localized clusters, ultimately impacting processing stability and precision [8, 9]. The flow field condition of the EDM gap plays a key role in the movement process of the material’s electrocorrosion residues [10, 11]. It is of great significance to study the gap flow field and the distribution of electrocorrosion residues to improve the efficiency of EDM and ensure processing stability.

Fig. 1
figure 1

Principle of escape of the electrocorrosion residues

Most EDM processes are conducted within a liquid or gaseous environment. However, due to the limited structural size and fluid flow rate of the machined parts, the transient situation is difficult to observe due to other factors, and the visualization test is difficult and costly. At present, most scholars focus on computational fluid dynamics (CFD) calculations on the gap flow field of EDM [12, 13], and use simulation results to replace complex theoretical analysis [14,15,16]. Mori et al. [17] studied the gap between the electrode and the workpiece by directly observing the gap with a camera. Morimoto et al. [18] investigated the effect of electric current on debris distribution. The simulation results showed that the discharge interval decreased, the debris concentration increased with the increase in processing depth. Pontelandolfo [19] studied the shape and size of waste particles and their motion characteristics in detail by CFD. Molina et al. [20] explored the flow characteristics of the original circular vent and four elliptical holes with different eccentricities and found that cavitation often did not occur, where the arc curvature of the section was large. Ebisu et al. [21] researched the flow field and chip movement during the cutting of angular workpieces by wire EDM using CFD analysis. Tanjilul et al. [22] proposed a new EDM drilling and washing system and applied CFD to simulate the movement of particles in the gap during EDM.

By analyzing the characteristics of the gap flow field in EDM, a geometric model of the gap flow field in a three-dimensional cylindrical combination is established. Using the discrete phase model (DPM) in Ansys Fluent and the secondary development function, the random generation of electrocorrosion residues in the bottom surface machining gap is realized. A simulation model of liquid-solid interaction in the gap flow field of EDM was established, and the effects of treatment time, treatment depth, current, and medium on the motion of corrosion residues in the gap flow field were analyzed. The simulation of the gap flow field in EDM is expected to be a powerful tool for research and optimization of EDM. Dieses study provides theoretical basis and experimental support for, how EDM parameters affect the motion behavior of corrosion residues, which is helpful to improve the EDM process and reduce the cost of optimization of EDM process parameters.

2 Gap flow field simulation model

The microscopic process of EDM is highly intricate. The generation of electrocorrosion residues is formed by the interaction of moving electromagnetic force, fluid force caused by dielectric flow, and explosive force caused by bubble explosion [23]. Electric field force, magnetic force, and thermal force are all interconnected with electrical parameters. In the process of EDM, the electrode is fed forward, there is a discharge gap between the electrode and the workpiece, and the fluid medium is forced to flow through the gap during processing. The flowing working fluid medium discharges the electrocorrosion residues remaining between the two poles to the non-processing zone through the processing gap, and the principle of electrocorrosion residues ejection is shown in Fig. 1.

The Fluent DPM fluid simulation model was developed to compute the motion of electrode etching residues within the electrode flow field during EDM. In order to simplify the calculation model, this study mainly considers the flow field force, while the electromagnetic force, explosion force, heat flow, and other minor factors are not considered, and the following assumptions are put forward:

  1. (1)

    The dielectric in the EDM process is a pure liquid and an incompressible fluid;

  2. (2)

    The electrocorrosion residues ejected from the surface of the workpiece are the electrocorrosion residues generated by pulsed discharge;

  3. (3)

    During the calculation time, the electrocorrosion residues are continuously ejected from the surface of the workpiece;

  4. (4)

    The electrocorrosion residues are driven by the flow field in the processing gap, and the initial state of the electrocorrosion residues can be set autonomously according to the processing conditions, and their motion can be calculated.

Fig. 2
figure 2

Gap flow field geometric model

2.1 Theoretical model

The dielectric in the EDM gap follows the law of conservation of mass. Combining hypothesis (1), the density of the incompressible fluid is fixed, and the equation for conservation of mass of a two-dimensional incompressible fluid is shown in Eq. 1 [24]:

$$\begin{aligned} \frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}=0 \end{aligned}$$
(1)

where u and v are the velocities of the fluid along the X and Y directions, respectively. Meanwhile, the dielectric motion in the interstitial flow field also follows the momentum conservation law, and its momentum equation is shown in Eq. 2 [24]:

$$\begin{aligned}{} & {} \frac{\partial }{\partial t}(p u_{i})+ \frac{\partial }{\partial t}(p u_{i}u_{j})= -\frac{\partial p}{\partial x_{i}}+ \frac{\partial \tau _{ij}}{\partial x_{j}} + p g_{i}+ F_{i}\end{aligned}$$
(2)
$$\begin{aligned}{} & {} \tau _{ij}=\left[ \mu (\frac{\partial u_{i}}{\partial x_{j}}+\frac{\partial u_{j}}{\partial x_{i}}) \right] -\mu \delta _{ij} \frac{2 \partial u_{l}}{3 \partial x_{l}} \end{aligned}$$
(3)

where p is the static pressure strength and \(\tau _{ij}\) is the stress tensor, which can be expressed by Eq. 3. \(g_{i}\) and \(F_{i}\) are gravitational volumetric forces and external volumetric forces in the i direction, respectively.

In the three-dimensional case, the continuous equation and the Navier-Stokes equation for the fluid are shown in Eqs. 4 and 5 [25]:

$$\begin{aligned} \frac{ \partial u}{\partial x}+\frac{\partial v}{\partial y}+ \frac{\partial w}{\partial z}=0 \end{aligned}$$
(4)
$$\begin{aligned} \left\{ \begin{array}{l} \rho (\frac{ \partial u}{\partial t}+u\frac{ \partial u}{\partial x}+v\frac{ \partial u}{\partial y}+w\frac{ \partial u}{\partial z})= X- \frac{ \partial p}{\partial x}+\mu (\frac{ \partial ^{\textrm{2}} u}{\partial t^{\textrm{2}}}+\frac{ \partial ^{\textrm{2}} u}{\partial y^{\textrm{2}}}+\frac{ \partial ^{\textrm{2}} u}{\partial z^{\textrm{2}}}) \\ \rho (\frac{ \partial v}{\partial t}+u\frac{ \partial v}{\partial x}+v\frac{ \partial v}{\partial y}+w\frac{ \partial v}{\partial z})= Y- \frac{ \partial p}{\partial x}+\mu (\frac{ \partial ^{\textrm{2}} v}{\partial t^{\textrm{2}}}+\frac{ \partial ^{\textrm{2}} v}{\partial y^{\textrm{2}}}+\frac{ \partial ^{\textrm{2}} v}{\partial z^{\textrm{2}}}) \\ \rho (\frac{ \partial w}{\partial t}\!+u\frac{ \partial w}{\partial x}+v\frac{ \partial w}{\partial y}+w\frac{ \partial w}{\partial z})\!= Z\!- \frac{ \partial p}{\partial x}\!+\mu (\frac{ \partial ^{\textrm{2}} w}{\partial t^{\textrm{2}}}+\frac{ \partial ^{\textrm{2}} w}{\partial y^{\textrm{2}}}+\frac{ \partial ^{\textrm{2}} w}{\partial z^{\textrm{2}}}) \end{array}\right. \end{aligned}$$
(5)

where X, Y, and Z are volumetric forces in three directions; u, v, and w are velocity components in three directions; \(\rho \) is the density of the liquid; \(\mu \) is the viscosity coefficient; and p is pressure per unit volume.

2.2 Geometric model

This model utilizes ICEM CFD for finite element mesh division, which is a specialized computer-aided engineering (CAE) pre-processing software. When meshing, a mesh that is too large will lead to insufficient computational accuracy, and a mesh that is too dense will lead to excessive consumption of computing resources. According to the size of the model and the calculation requirements, this model is divided into grids in an unstructured manner, with a maximum grid size of 0.2 mm, which meets the calculation requirements after grid quality inspection. Taking into account the influence of fluids beyond the electrode outlet position on the discharge of electrode residues within the discharge gap, the fluids studied also include a portion of the free liquid level. According to the oil flushing situation in the machining process, the two end faces of the free flow field along the X-axis direction are named INLET and OUTLET, the workpiece processing surface is named WORKPIECE, the discharge surface of the electrode is ELECTRODE, the side boundary of the electrode is named GAP-INSIDE, the side boundary of the hole is named GAP-OUTSIDE, and the top surface of the free flow field is named TOP-WALL. The interface on both sides of the free-flow field and the boundary between the workpiece surfaces are named WALL, as shown in Fig. 2.

2.3 Experiments design

This simulation experiment mainly studies the effects of current, dielectric, and processing depth on the discharge of electrocorrosion residues in the discharge gap under the condition of an oil rushing speed of 2 m/s. In the process of material melting and gasification, several reactants, such as aerosols and toxic gases, will be produced in the mineral oil dielectric, which is not conducive to the green manufacturing and sustainable development of EDM [26, 27]. In order to reduce the discharge of residues and aerosols during EDM, kerosene, sunflower seed oil, and water were used as the dielectrics for simulation to provide a reference for the selection of actual EDM parameters. The feasibility of EDM with sunflower seed oil and water as dielectrics has been demonstrated [28, 29]. The experimental parameter levels are shown in Table 1. The physical properties of the three dielectrics are shown in Table 2. In this study, the Taguchi orthogonal design experiment was carried out based on the Mintab software, and the distribution of electrocorrosion residues under different parameters, the time of electrocorrosion residues staying in the gap and the state of electrocorrosion residues at different times were discussed.

Table 1 Simulation experiment parameter level
Table 2 Characterization of different dielectric fluids

In this study, the transient simulation is used, and the flow field is established by machining deep holes in stainless steel with copper rods with a diameter of 8 mm as electrodes. Beyond the flow field within the processing gap, our analysis also encompasses the free-flowing flow field on the workpiece’s surface during oil flushing. In EDM, it’s a non-contact machining method submerged in a dielectric, featuring a small discharge gap between the electrode and the workpiece’s surface. The size of the discharge gap has a great influence on processing performance, such as processing stability, electrode loss, and processing accuracy. However, since the size of the discharge gap is extremely small and extremely difficult to observe directly during processing [30]. This study is represented by the empirical formula, as shown in Eq. 6:

$$\begin{aligned} S = K_\mathrm{{u}}u_\mathrm{{i}}+K_\mathrm{{R}}W_\mathrm{{M}}^{\mathrm {0.4}}+S_\mathrm{{M}} \end{aligned}$$
(6)

where S is the discharge gap referring to the single-sided discharge gap (referring to the single-sided discharge gap, \(\mu \)m). \(u_{i}\) is the open-circuit voltage. \(K_{u}\) is a constant, and the value is 0.05 when the dielectric is kerosene. \(K_{R}\) has a constant value of 250 when the workpiece is steel. \(K_{M}\) is a single pulse of discharge energy (J). \(S_{M}\) is the mechanical gap, generally 2-3 \(\mu \)m.

Depending on the processing conditions, the discharge gap is 0.3 mm. The gravity is -9.81 m/s\(^2\) along the positive Z-axis, the rushing velocity is 2 m/s, and the Reynolds number of the flow field is shown by Eq. 7:

$$\begin{aligned} R _\mathrm{{e}}=\frac{\rho vL}{\eta } \end{aligned}$$
(7)

where \(\rho \) is the density of the fluid, \(\eta \) is the viscosity coefficient of the fluid, and v and L are the flow rate and characteristic length, respectively.

According to the processing conditions, the material of the electrocorrosion residues in this DPM model is steel. As the current intensifies, the energy of the pulse discharge escalates, resulting in a more pronounced impact on the workpiece’s surface, an increased ablation of material, and more vigorous dielectric vaporization. The rapid expansion of bubbles further accelerates the expulsion of electrocorrosion residues. The bubble expansion rate generated by the dielectric gasification at high temperatures is less than 10 m/s, and the bubble expansion helps the ejection of electrocorrosion residues in the discharge gap [31, 32]. Aiming at the effect of current on machining performance, simulation experiments were carried out. The size distribution of the electrocorrosion residues adopts the Rosin-Rammler distribution with a distribution coefficient of 3.5, and the parameters set under different currents are shown in Table 3.

3 Simulation results and analysis

This chapter analyzes and discusses the effects of processing time, processing depth, current, and medium on the distribution and residence time of electrocorrosion residues, respectively.

Table 3 Parameters setting of electrocorrosion residues under different current
Table 4 Parameters setting of electrocorrosion residues under different current

The simulation adopts the calculation method of pressure-velocity coupling, the gradient is based on the least squares element, and the power adopts the second-order windward function. The time step of the solution is 0.05 s, the total number of time steps is 200, and the maximum number of iterations per time step is 10. The ratio and size distribution of particle escape at different moments are calculated, and the simulation results are shown in Table 4 (Ke: kerosene; Sso: sunflower seed oil; Wa: water). In addition, in order to explore the distribution and residence time of the electrocorrosion residues at the beginning of the simulation, we alone explored the electrocorrosion residues distribution and residence time of the electrocorrosion residues at 0.0001 s, 0.001 s, and 0.01 s with a step size of 0.0001 s. In order to simplify the simulation process, we separate the simulation of these three moments from the design of the simulation moments mentioned in Table 4.

3.1 Effect on processing time

At a current of 4 A, with a depth of 4 mm and kerosene as the dielectric, you can observe the size distribution in Fig. 3 and the residence time of electrocorrosion residues at various time intervals in Fig. 4. As can be seen from the figure, compared with the small-size electrocorrosion residues, the large-size residues is closer to the outlet, the residence time is shorter, and the large-size residues is easier to escape from the discharge gap. In addition, it can also be seen from Figs. 3 and 4 that the residues escape just begins when the treatment time is 0.0001 s, and the residues escape rate gradually increases when the treatment time is 0.001 s and 0.01 s. When the treatment time reached 0.1 s, both the quantity and residence time of the electrocorrosion residues increased steadily, indicating that the escape rate gradually decreased with the extension of time after stabilization, but the decline trend of the escape rate was not large.

Fig. 3
figure 3

Size distribution of the electrocorrosion residues at different times

Fig. 4
figure 4

Residence time of the electrocorrosion residues at different times

Fig. 5
figure 5

The average escape rate of electrocorrosion residues at different time periods and depths

The majority of small-sized electrocorrosion residues tend to remain within the gap between the electrode and the workpiece surface. This is attributed to their substantial relative surface area and limited momentum, making them more prone to suspension within the liquid of the gap and less likely to escape from it [33, 34]. The large size of the electrocorrosion residues gives it more momentum and makes it easier to escape from the discharge gap. As time goes by, more and more electrocorrosion residues accumulates in the discharge gap, which leads to the collision of electrocorrosion residues and changes the original motion state, resulting in a lower and lower escape rate [35].

3.2 Effect of processing depth

When the current is 4 A and the dielectric is kerosene, the average escape rate of the electric corrosion residues in different periods of 0-1 s is shown in Fig. 5(a). The escape rate of electrocorrosion residues decreases with the extension of time and the increase in processing depth. As shown in Fig. 5(b), when the depth is 2 mm, the escape rate at 0.1 s is 6.51%, which is 8.57 times that at 1 s. The escape rate decreases with increasing depth. When the depth is greater than 3 mm, the escape rate begins to decrease significantly, while the escape rate of the residues is little different when the processing depth is 4 mm, 5mm, or 6 mm. At 0.1 s, the escape rate of 3 mm is 1.45 times that of 4 mm. The escape rates at 5 mm and 6 mm are close to each other at different times. The escape rate at 5 mm is the lowest, and the escape rate at 0.5 mm is 28.77% of that at 3 mm.

When the machining depth is shallow, employing unilateral external flushing provides more effective control over the machining gap at the bottom. Under the action of flushing, the working fluid in the gap flow field has a tendency to flow out from the right gap, along the bottom gap, and finally from the left gap. However, with the increase in processing depth, the effective depth of flushing is limited, and it is difficult to discharge the electric corrosion products in the bottom gap [36]. When the current is 4 A, the dielectric is kerosene, and the residence time of the electrocorrosion residues at different depths is shown in Fig. 6. According to Fig. 6(a) and (b), it can be seen that when the depth is 3 mm, the proportion of residues with a long residence time is greater than 2 mm. When the depth is 5 mm (Fig. 6(d)), the proportion of electrocorrosion residues with a long residence time is the largest, which is consistent with the statistical results of the escape rate in Fig. 5. According to Fig. 6(a) and (b), it can be seen that when the depth is 3 mm, the proportion of electrocorrosion residues with a long residence time is greater than 2 mm. When the depth is 5 mm (Fig. 6(d)), the proportion of electrocorrosion residues with a long residence time is the largest, which is consistent with the statistical results of the escape rate in Fig. 5.

Fig. 6
figure 6

Residence time of electrocorrosion residues at different depths

3.3 Effect on dielectric

Among the three mediums of water, kerosene, and sunflower seed oil, the escape rate of electrocorrosion residues in water is the highest, while that in kerosene is the lowest, and that in sunflower seed oil is between the two, as shown in Fig. 7 (current of 4 A, depth of 4 mm). During the 0-1 second timeframe, the rate of electrocorrosion residue escape in water consistently exceeds that observed in both kerosene and sunflower seed oil. The highest escape rate of water at 0.1 s is 18.94%, which is 5.15 times that of kerosene, and the escape rate of water at 1 s is 8.8 times that of kerosene. In addition, at any given moment, the escape rates of kerosene and sunflower seed oil are not very different. The escape rate of sunflower seed oil is 8.42% higher than that of kerosene at 0.1 s and 10.2% higher than that of kerosene at 1 s.

Fig. 7
figure 7

Comparison of escape rates of electrocorrosion residues in different dielectrics

At a current of 4 A, with a depth of 4 mm and a time interval of 1 s, Fig. 8 illustrates the residence time and particle quantity of electrocorrosion residues under various dielectric conditions. It can be seen from Fig. 8 that the amount of electrocorrosion residues that stays in water for a long time is the least. This shows that when the medium is water, the electrocorrosion residues is most easily discharged from the discharge gap. This is because water is less viscous than kerosene and sunflower oil and has less movement restriction on the electrocorrosion residues, so it is easier to carry the electrocorrosion residues out of the discharge gap during the oil flushing process [37]. In addition, it can be seen from Fig. 8(b) that the amount of electrocorrosion residues in kerosene is higher than that in sunflower oil. In our previous EDM experiments [29], the material removal rate in kerosene was higher than that of sunflower oil, resulting in more electrocorrosion residues. Simulation experiments should also follow this rule.

Fig. 8
figure 8

Comparison of residence time of electrocorrosion residues in different dielectrics

Fig. 9
figure 9

Velocity vector graphs of electrocorrosion residues in gaps at different times

As the fluid medium flows, it generates a drag force on the electrocorrosion residues, propelling their movement. Theoretically speaking, the faster the flow speed of the working liquid, the stronger the drag force on the electrocorrosion residues. In addition, when the electrode moves, it also drives the surrounding dielectric’s movement. Therefore, the dielectric flow induces the movement of electrocorrosion byproducts, resulting in a velocity field distribution on the sides and bottom of the intermittent region, as shown in Fig. 9. In the electrode rising stage, the high-speed area of the flow field is mainly below the electrode and moves from the position near the wall to the center. In the electrode descent stage, the high-speed region of the flow field is mainly near the gap between the two sides of the electrode [38]. This study is a transient simulation, and the time of velocity vector image interception is the electrode drop stage. As can be seen from Fig. 9, the corrosion residues in the region between the electrode and the workpiece moves slowly, and there is no uniform speed direction. The electrocorrosion residues between the electrode wall and the workpiece hole wall moves faster, and the speed direction is the same, all pointing in the exit direction.

3.4 Effect on current

When the depth is 4 mm and the dielectric is kerosene, the effect of the current on the escape rate is shown in Fig. 10(a). A higher current of 5 A or 6 A results in a greater escape rate, while a lower current of 3 A or 4 A leads to a lower escape rate. At 0.1 s, the escape rate of 5 A current is 5.42%, which is 47.28% higher than that of 4 A current. At 0.5 s, the escape rate of 5 A was 46.74% higher than that of 4 A. When the depth is 4 mm and the dielectric is sunflower seed oil, the escape rate always decreases with time. The effect of current on the escape rate is shown in Fig. 10(b). When the current is 5 A, the escape rate of the electrocorrosion residues is the highest, and when the current is 2 A or 3 A, the escape rate is lower. At 0.1 s, the escape rate of 5 A current is 5.95%, 34.31% higher than 4.43% of 4 A current. However, when the current is 6 A, the escape rate is lower than 5 A and 4 A.

Fig. 10
figure 10

Comparison of escape rates of electrocorrosion residues under different current

Fig. 11
figure 11

Schematic diagram of oil flushing and dielectric sample after EDM (depth of 4 mm)

The larger the current, the larger the discharge gap, the more intense the pulse discharge, the greater the impact force on the workpiece surface, and the higher the rate of electrocorrosion residues thrown out [39]. Moreover, the larger the current, the larger the size of the resulting electrocorrosion residues. Larger electric corrosion residues are more likely to escape. The smaller the size of the electrocorrosion residues, the more electrocorrosion residues is left in the discharge gap. However, when the current is too large, the energy of a single discharge is large, and the amount of electrocorrosion residues generated in a short time increases sharply, which is easy to accumulate in the discharge gap [40]. The accumulation of residues will cause the escape rate of the electrocorrosion residues to decrease, which will affect the accuracy and stability of the processing.

4 Verification experiments

As can be seen from Fig. 10, the escape rate is higher when the current is 5 A than when the current is 4 A. This summary is designed to verify the size and quantity distribution of electrocorrosion residues that escapes when processed to different depths with 4 A and 5 A currents, respectively. The experimental equipment used in this experiment includes the EDM 350 machine tool produced by Suzhou Changfeng Numerical Control Co., Ltd., China. The electrode and workpiece materials are copper and SKD11, respectively. The electrode size is consistent with the simulation model, and the diameter is 8 mm. External oil flushing is adopted, and the dielectric is collected at the outlet with a disposable syringe. The processing method and collected dielectric samples are shown in Fig. 11(a) and (b), respectively. The electrocorrosion residues was filtered by non-woven fabric and observed by a DVM6 ultra-depth-of-field three-dimensional microscope produced by Leica, Germany.

Table 5 Residues size and quantity statistics when the processing depth is 4 mm
Fig. 12
figure 12

Sampling observation results of different dielectrics and different processing currents

In order to prevent the precipitation of residues in the syringe from affecting the observation results, the dielectric and residues are shaken well during sampling and observation. The plotting scale of the sample at the time of observation was 100 \(\mu \)m, and the electrocorrosion residues was divided into four grades with a diameter of 0-5 \(\mu \)m, 5-15 \(\mu \)m, 15-30 \(\mu \)m, and more than 30 \(\mu \)m. The statistical results of the electrocorrosion residues at a processing depth of 4 mm are shown in Table 5. The sampling observations of different dielectrics (kerosene and sunflower seed oil) and different currents (4 A and 5 A) at a processing depth of 4 mm are shown in Fig. 12. Figure 12(a) and (b) compare the galvanic residues processed at currents of 4 A and 5 A in kerosene at depths of 4 mm, respectively. At a depth of 4 mm, the number of residues greater than 30 \(\mu \)m at 5 A is twice as large as at 4 A. Moreover, the number of electrocorrosion residues with a size of 5-15 \(\mu \)m at 5 A is 80% higher than at 4 A. This is because the more energy in a single pulse discharge when the current is large, the greater the impact of the discharge on the surface of the workpiece, the more electrocorrosion residues is produced, and the easier it is to produce large-size electrocorrosion residues. This conclusion is also verified in Fig.  12(c) and (d), which are statistical plots of electrocorrosion residues processed when the dielectric is sunflower seed oil and the currents are 4 A and 5 A, respectively, at a processing depth of 4 mm.

5 Conclusions

Through an analysis of the characteristics of the gap flow field in EDM, we have developed a comprehensive liquid-solid coupling simulation model to replicate the EDM hole machining process under external flushing conditions. The simulation analysis of the gap flow field has provided a direct showcase of how the distribution and retention of electricalcorrosion products vary with different machining parameters such as time, depth, current, and medium conditions. By conducting statistical assessments of the electric corrosion residue distribution within the interstice flow field across various processing scenarios, we have arrived at the following conclusions:

  1. (1)

    When the simulation reaches a stable state (i.e., after 0.1 s), as time goes by, more and more electrocorrosion residues accumulate in the discharge gap, resulting in collisions of electrocorrosion residues, changing the original motion state, and resulting in a lower and lower escape rate. When the current is 4 A, the depth is 2 mm, and the dielectric is Ke, the escape rate at 0.1 s is 6.51%, which is 8.57 times of 0.76% at 1 s. When the depth is 4 mm, the escape rate at 0.1 s is 4 times that at 0.5 s and 7.51 times that at 1 s.

  2. (2)

    The smaller the machining depth and the larger the medium fluid velocity near the bottom of the electrode and the surface of the workpiece, the better the removal effect of the electrocorrosion residue. The depth of action of the external flushing oil is limited, and when the processing depth increases, the flushing speed should be appropriately increased or the internal flushing method should be used. When the depth is greater than 3 mm, the escape rate is significantly reduced, and the escape rate of 3 mm is 1.45 times that of 4 mm at 0.1 s and 1.59 times that of 4 mm at 0.5 s.

  3. (3)

    The viscosity of water is much lower than that of kerosene and sunflower seed oil, so it is easier to carry out electrocorrosion residues in the discharge gap during the process of oil flushing. In the process of 0-1 s, the escape rate of water is always much higher than that of kerosene and sunflower oil. The highest escape rate of water at 0.1 s is 18.94%, which is 5.15 times that of kerosene, and that of water at 1 s is 8.8 times that of kerosene. The escape rate of sunflower oil is similar to that of kerosene. The escape rate of sunflower oil is about 8.42% higher than that of kerosene at 0.1 s, and about 10.2% higher than that of kerosene at 1 s. However, in actual processing, the processing accuracy of using water as a dielectric is usually lower than that of kerosene and sunflower oil.

  4. (4)

    The size of the electrocorrosion residues increases with the increase in processing current, and the larger the electrocorrosion residues, the easier it is to discharge from the gap. At 0.1 s, the escape rate of 5 A current is 5.95%, 34.31% higher than 4.43% of 4 A current. At 0.5 s, the escape rate of 5 A was 35.78% higher than that of 4 A. However, when the current is too large, the residues will quickly accumulate in the gap, resulting in an unstable discharge and then affecting the accuracy and stability of the processing.