1 Introduction

Deep irregular hole machining methods are widely used in the modern manufacturing industry, among which the aircraft landing gear is a key load-bearing component of the aircraft, with its complex irregular deep hole structure, by absorbing and dissipating the impact energy formed between the aircraft landing and taxiing and the ground to ensure the safety performance of flight [1]. Complex deep-hole parts in aircraft are key components of aero-engines, and the quality of deep-hole machining directly affects the service performance and service life of aero-engines [2]. In engineering processing irregular deep holes, compared to the round deep hole is more difficult, than the traditional mechanical machining methods, difficult to its processing, machining accuracy cannot be guaranteed, and linear feed is high difficulty, tool vibration frequency, cutting stress, chip problem is difficult to solve. Electro discharge machining (EDM), although it can get a better machining accuracy, will cause loss of tool cathodes [3]. Compared to ECM, electrochemical machining has no loss of machining cathodes, a wide range of machining, high machining efficiency, good accuracy, and no cutting forces and is widely used in the irregular deep hole machining industry [4, 5]. In recent years, many people at home and abroad have conducted a lot of investigations on the electrochemical machining of shaped deep holes. Feng et al. used electrochemical machining to solve the problem of machining the stator bore of a metal screw pump and successfully machined a test piece to meet the dimensional accuracy requirements [6]. To solve the problems of poor forming accuracy and uneven flow of electrolyte for complex parts with multi-stage internal tapered bores by electrochemical machining, the cathode structure was optimized utilizing computer simulation-aided cathode design, and the surface of the machined workpiece was free of flow lines, with dimensional forming accuracy better than 0.1 mm and surface roughness reaching Ra 0.697 μm [7]. Luo et al. used an electrochemical drilling technique with an eight-channel flow control system to measure and regulate the electrolyte flow to each tube electrode in real time, to address the problem that the value and fluctuation of electrolyte flow can seriously affect the stability and hole quality of the process. This not only improves the uniformity of electrolyte flow in the tube electrodes but also reduces the flow fluctuations [8]. Tang et al. used electrochemical machining to solve the problem that conventional machining techniques are unable to machine screw drill stators with an aspect ratio of 100:1 or more, resulting in stable and good quality specimens with guaranteed machining efficiency [9]. Feng et al. used a rotating flow field machining method to solve the problems of short-circuiting and large flow patterns in the electrochemical machining of complex parts with one hole and two cones and rotated the outlet hole of the cathode at an oblique angle of 45°, which effectively improved the uniformity of electrolyte flow and reduced the electrolyte temperature [10].

Electrochemical machining is very complex, involving many physical fields such as electric and flow fields, which interact with each other and are interlinked. A change in one factor often leads to a common change in all physical fields, making electrochemical machining difficult to predict accurately [11]. Therefore, finite element simulation is required to couple multiple fields together to predict workpiece forming [12], which not only shortens the processing cycle time but also saves initial costs. Chen et al. proposed a gas-liquid two-phase turbulence model, which was solved by a weakly coupled iterative method, considering the effect of hydrogen gas generated during electrochemical machining on the conductivity of the electrolyte, and obtained numerical simulation results for the gas volume fraction, temperature, and conductivity at equilibrium [13]. The simulation was carried out for four different cathode configurations with an “L”-shaped tank by coupling the electric, gas-liquid two-phase flow, temperature, and structural fields. The optimal cathode structure was selected based on the simulation results [14]. Chen et al. used a new multi-physics model incorporating electric, flow, temperature, and geometrical deformation fields and a multi-step steady-state flow field solution based on COMSOL and a circular iterative solution algorithm to keep the errors of the electrochemical machining within reasonable limits [15]. Torii et al. performed three-dimensional coupled numerical simulations of two-phase flow and electrochemical phenomena to elucidate the mechanism by which microscale bubble dynamics affect ion transport and overpotential [16]. Wang et al. proposed that electrochemical machining of metal gratings with rhombic holes can effectively improve the processing quality of rhombic holes, but due to the diagonal problem of rhombic holes, the electrolyte can cause stray corrosion to the sidewalls, for which a synchronization method of pulsed current and low-frequency oscillation was used to improve the flow field [17]. Chai et al. developed a geometric model of the flow path of the interstitial flow field based on the electrolyte flow state from CFD and carried out an analysis to determine the effect of the flow pattern on the accuracy and stability of the cooling hole process [18]. Meng et al. produced hard anti-adhesive surfaces with low roughness and wear resistance on aluminum substrates for rubber-plastic molds by a new coupling method of liquid plasma and electrochemical machining [19]. Zhao et al. coupled a cathodic vibration feed to the flow field and simulated different flow channel structures to make the process of electrochemical machining of metal grids more stable. The results showed that a short arc-shaped flow channel could significantly improve the uniformity of the electrolyte velocity distribution and that vibratory feeding of the cathode could reduce the fluctuation of the electrolyte velocity and the pressure on the bottom surface of the diamond hole [20]. Yin et al. studied the effect of machining voltage, initial machining gap, and feed rate on the forming accuracy of hexagonal holes by coupling the electric and flow fields [21].

However, electrochemical machining of deep irregular holes is not the same as machining deep holes of conventional shape and faces problems such as uneven etching amount, electrolyte flow rate distribution, and difficulty to control forming accuracy during machining. In this paper, we propose a three-side-feed machining method and design a three-side-feed cathode. By simulating the electric, flow, and temperature fields of the gap, we optimize the cathode structure and the number of cathode through-holes. Finally, through process tests with different machining parameters and comprehensive analysis of the test results, efficient and stable machining of the machined parts is achieved, and the machined parts meet the design accuracy requirements, shortening the preliminary research cycle and greatly saving production costs.

2 Cathode design

2.1 Analysis of processing object

A deep irregular hole is a non-straight type, and its end face is a step hole structure, in the inner wall of the hole with three spacing 120° uniformly distributed key teeth structure; the workpiece and dimensions are shown in Fig. 1. From the electrochemical machining, the difficulty of machining this kind of deep special-shaped hole is that the thickness of the etched metal layer is large, the processing depth is long, and the machining allowance is not uniform, which makes it difficult to guarantee the processing accuracy and processing quality. And the width of the key teeth is narrow, and processing is easy to produce excessive corrosion, making the tip of the end face of the healthy teeth form a too-large rounded angle, after processing the forming accuracy is difficult to control.

Fig. 1
figure 1

Schematic diagram of deep special-shaped holes

2.2 Cathode structure design

According to the structural characteristics and processing requirements of the deep special-shaped hole, this paper proposes the processing method of three-sided feed machining once forming; firstly, the front face of cathode I will roughly process the prefabricated hole to the overall shape of the deep special-shaped hole, and then, the cathode side wall face II and cathode key tooth slot wall face III will rectify the roughly processed outer end profile of deep special-shaped hole and key tooth, respectively, and finally obtain the deep special-shaped hole structure to meet the dimensional accuracy requirements. The cathode structure is shown in Fig. 2. The cathode structure consists of a front nut, front guidance device, seal, cathode body, cathode connector, rear guidance device, and rear screw cap. The purpose of the cathode connector is to improve the stability of the electrolyte flow in the gap and avoid disturbances in the electrolyte flow caused by the sudden decrease in pressure and avoid leaving incomplete protrusions on the inner wall surface after machining.

Fig. 2
figure 2

Schematic diagram of the cathode structure

The electrolyte flow is shown in Fig. 3. The electrolyte flows through the hollow tie rod into the internal flow channel of the cathode body. As the rear screw cap prevents the direct discharge of the electrolyte, the electrolyte is ejected through the internal through-hole of the cathode body as well as the booster hole, flows through the front face and side wall face of the cathode, and is finally discharged through the rear guide.

Fig. 3
figure 3

Schematic diagram of the electrolyte flow pattern

3 Electric field simulation and analysis

3.1 Geometric modeling

The tool cathode and the workpiece anode are filled with high-speed flowing electrolytes. Under the action of DC machining power, a certain potential is maintained between the cathode and the anode, and a current field is formed in the interstitial electrolyte. The tool cathode shape size can be initially obtained by the equal gap method. To facilitate the exploration of the electric field distribution of deep special-shaped hole electrochemical machining, 1/3 of the cross section of the gap between the cathode and anode is intercepted, as shown in Fig. 4. In the gap model, a voltage is applied to the workpiece anode boundary and the tool cathode is grounded.

Fig. 4
figure 4

Schematic diagram of the gap electric field model

3.2 Mathematical modeling of the electric field

Assuming that the electrolyte is homogeneous, the electric field in the electrolyte is a passive electric field, where the potential distribution conforms to the Laplace equation, that is

$$\frac{\partial^2\varnothing }{\partial {x}^2}+\frac{\partial^2\varnothing }{\partial {y}^2}+\frac{\partial^2\varnothing }{\partial {z}^2}=0$$
(1)

The potential distribution at the interface between the electrode and the electrolyte is generally attributed to the sum of the potential of the cathode and anode plan. As both the cathode and anode are metallic materials with good electrical conductivity, the surfaces of both electrodes can be considered as equipotential surfaces.

The anode workpiece boundary condition is

$${\varphi}_a=U$$
(2)

The tool cathode boundary condition is

$${\varphi}_c=0$$
(3)

where x, y, and z are the coordinates of each place in the gap, ∅ is the potential of each point of the electric field, U is the anode surface potential, and φa, φc are the anode and cathode potential.

3.3 Simulation parameters

The process gap electrolyte is a steady flow field, the electrolyte is homogeneous, and the anode material is 40CrNiMoV alloy steel. Since Fe occupies the majority of the 40CrNiMoV material, the anode can be considered iron in the simulation. The cathode is brass. The electrolyte is 10% NaNO3.

To make the simulation close to the actual processing effect, a step function step(cd.itot/i_threshold-1) is applied to the anode reaction interface, where the step is the step function, cd.itot is the anode surface current density, and i_threshold is the etching threshold current density. The i_threshold is obtained by converting the logarithm of the current density in the passivation zone of the polarization characteristic curve. The measured polarization characteristic curve is shown in Fig. 5. It can be seen that the passivation zone of the anode material in the NaNO3 electrolyte lies roughly between log [i/A(A/cm2)]=2.5 and log [i/A(A/cm2)]=2.7, and the current density i/A (A/cm2) in the passivation zone is calculated to be between 12.2 and 14.8 A/cm2, and the etching threshold current density is finally selected to be 13 A/cm2. This function enables the anode to stop dissolving when located in the passivation zone when the anode surface current density is less than the etching threshold current density. The specific parameter settings for the simulation are shown in Table 1.

Fig. 5
figure 5

Polarization characteristic curve of anode material in NaNO3

Table 1 Electric field simulation parameters

3.4 Analysis of simulation results

The distribution of the current density on the anode surface at different moments is shown in Fig. 6. As can be seen from the figure, as the processing time progresses, the current density values on the anode surface gradually decrease and the decrease slows down and gradually converges, while the current density distribution gradually becomes more uniform and the abrupt change is significantly reduced. The reason for this is that the anode surface is gradually etched away and the processing gap increases, which increases the flow of the gap electrolyte and increases the resistance, resulting in a reduction in the current through the gap electrolyte; as the tip of the key teeth of the special-shaped hole produces a tipping effect, which makes the current density at this location higher, as the anode surface is continuously etched away, the tip gradually erodes to a rounded angle, eliminating the tip effect and making the current density distribution uniform.

Fig. 6
figure 6

Distribution of current density on the anode surface at different moments

The morphological changes of the anode surface at different moments are shown in Fig. 7. It can be seen from the figure that as the processing proceeds, the anode surface is continuously etched and the tips of the key teeth of the special-shaped hole gradually form rounded corners. When the processing time is 0–10 s, the etching rate is faster because the processing gap is smaller and the electrolyte current density is higher; when the processing time is 10–60 s, the amount of etching on the anode surface is only twice as much as that of the processing time 0–10 s because the processing gap increases and the electrolyte current density decreases, so the processing rate slows down significantly. When the processing time exceeds 60 s, the amount of anode surface etching does not change, which means that the processing gap reaches the cut-off gap, the anode no longer reacts, and the processing is in equilibrium. Due to the tip effect at the tip of the key teeth of the special-shaped hole, the current density is high, resulting in the position still being activated and the anode being further etched, forming a larger rounded corner. The machining gap is measured to be approximately 0.53 mm when in equilibrium; taking into account the actual machining conditions, the final machining gap in equilibrium is 0.5 mm.

Fig. 7
figure 7

Morphological changes of the anode surface at different moments

As a result of the large rounded corners formed at the tip of the key teeth of the special-shaped hole, the machining accuracy cannot meet the actual working requirements, so the cathode surface needs to be further optimized to reduce the rounded corners.

3.5 Optimization of the cathodic structure profile

Because of the results of the above analysis and discussion, the rounded corners formed at the tips of the key teeth of the special-shaped holes are too large after processing and cannot meet the accuracy requirements. Insulation of the end surfaces and walls on both sides of the tip of the cathodic keyway utilizing a coating. Firstly, narrow slots of 0.3 mm, 0.4 mm, 0.5 mm, and 0.6 mm are machined on a slow-walking wire-cutting machine. Afterwards, the narrow grooves of the insulation are coated with epoxy resin. After the epoxy has been set, the surface of the insulation is sanded smooth. The final insulation layer widths are 0.3 mm, 0.4 mm, 0.5 mm, and 0.6 mm, respectively.

To analyze the effect of the insulation width on the rounded corner formation, 1/2 of the key tooth end face and 5 mm of the side wall length were taken as models for simulation, as shown in Fig. 8.

Fig. 8
figure 8

Geometric model with different insulation widths

The simulation results for different insulation layer widths are shown in Fig. 9. As can be seen from the figure, the rounded corners formed by insulating the ends and walls on both sides of the cathode tooth tip are significantly reduced compared to the uninsulated sides, resulting in a significant improvement in machining accuracy, indicating that the method is effective. The fillet formed after machining decreases as the width of the insulation layer increases. The radius of the rounded corners formed by the uninsulated process is 0.24 mm. When the width of the insulation layer is 0.5 mm, the radius of the rounded corners is 0.11 mm, a reduction of 54% compared to the uninsulated layer. However, the width of the insulation layer is not too large. When the width of the insulation layer is 0.6 mm, the end face and the side wall face of the special-shaped hole key tooth are formed with poor precision, and the shaped profile size is larger than the ideal size. To sum up, the insulating layer width of 0.5 mm on both sides of the end face and wall face of the cathode key tooth slot tip can be used to obtain a high-precision special-shaped hole key tooth.

Fig. 9
figure 9

Variation of anode surface shape with different insulation layer widths

4 Simulation analysis of the flow and temperature fields

4.1 Gap geometry modeling

The machining gap model is the portion of the electrolyte that flows between the tool cathode and workpiece anode and the fixture when the machining is in equilibrium. The gap geometry model can be obtained by Boolean operations to find the difference, as shown in Fig. 10. From the electric field simulation, it can be seen that the machining gap at equilibrium is 0.5 mm.

Fig. 10
figure 10

Schematic diagram of the gap flow field model

The design of the through-hole is crucial in the design of the cathode, as it determines the uniformity of the interstitial flow field and whether the temperature rise during the process can be effectively controlled. In this paper, we have designed the number of vias with a spacing of 4, 6, 8, and 10, as shown in Fig. 11.

Fig. 11
figure 11

Number of through liquid hole diagram

4.2 Mathematical modeling of the flow and temperature fields

4.2.1 Mathematical modeling of the flow field

To facilitate the calculation, the following assumptions are made for the processing gap flow field: (1) the fluid is an incompressible, constant Newtonian fluid; (2) to facilitate a uniform flow field and eliminate the concentration difference polarization, the gap electrolyte flow is required to be turbulent during electrochemical machining. Neglecting the energy dissipation of the electrolyte during processing, the flow is governed by the conservation of mass and conservation of momentum.

The motion of an incompressible fluid satisfies the N-S equation:

$$\rho \frac{dV}{dt}=\rho \textrm{g}-\nabla p+\mu {\nabla}^2V$$
(4)
$$\nabla \bullet V=\frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}+\frac{\partial \omega }{\partial z}=0$$
(5)

where ρ is the fluid density; u is the component of the vector velocity in the x-direction; p is the fluid microcircular pressure value; μ is the dynamic viscosity; g is the gravitational acceleration; ∇ is the gradient operator; ∇2 is the Laplace operator; and ∇∙V is the volume expansion rate.

This paper uses the standard k-ε equation for calculations. For the steady-state flow of an incompressible fluid, neglecting the effect of gravity, the standard k-ε equation is

$$\frac{\partial \left(\rho K\right)}{\partial t}+\frac{\partial \left(\rho K{u}_i\right)}{\partial {x}_i}=\frac{\partial }{\partial {x}_j}\left[\left(\mu +\frac{\mu_i}{\sigma_k}\right)\frac{\partial K}{\partial {x}_i}\right]\pm \rho \varepsilon$$
(6)
$$\frac{\partial \left(\rho \varepsilon \right)}{\partial t}+\frac{\partial \left(\rho \varepsilon {u}_i\right)}{\partial {x}_i}=\frac{\partial }{\partial {x}_j}\left[\left(\mu +\frac{\mu_i}{\sigma_{\varepsilon }}\right)\frac{\partial \varepsilon }{\partial {x}_j}\right]+\frac{C_{C1}}{K}{G}_k-{C}_{c2}\rho \frac{\varepsilon^2}{K}$$
(7)
$${G}_k=\rho {C}_{\mu}\frac{K^2}{\varepsilon}\left[\frac{\partial {u}_i}{\partial {u}_j}+\frac{\partial {u}_j}{\partial {x}_i}\right]\frac{\partial {u}_i}{\partial {x}_i}$$
(8)

where μi is the turbulent viscosity; Gk is the turbulence k generation term caused by the mean velocity gradient; ε is the turbulent dissipation rate, and the constants CC1, Cc2, Cμ, σk, σε, and K take the values 1.44, 1.92, 0.09, 1.0, 1.3, and 0.41, respectively.

4.2.2 Mathematical modeling of the temperature field

The reaction heat and Joule heat generated during the electrochemical machining are the main sources of heat, and the heat balance equation at the boundary between the tool cathode and the workpiece anode is

$${d}_z\rho {C}_p\frac{\partial T}{\partial t}-\nabla \bullet \left({d}_z{k}_t\nabla T\right)={Q}_{dl}+q$$
(9)

where dz is the thickness of the boundary layer; Cp is the constant pressure heat capacity; and kt is the thermal conductivity.

The temperature distribution of the electrolyte is represented by the energy balance approach as

$$\rho {C}_p\frac{\partial T}{\partial t}+\rho {C}_p\boldsymbol{u}\bullet \nabla T-\nabla \bullet \left({k}_t\nabla T\right)={Q}_{\textrm{bulk}}$$
(10)

Joule heat of electrolyte is

$${Q}_{\textrm{bulk}}=k{\left(\nabla U\right)}^2$$
(11)

where k is the conductivity of the electrolyte; U is the electrical potential.

4.3 Simulation parameter settings

The simulation parameter conditions are set as shown in Table 2. The electric field simulation parameter conditions are shown in Table 1. To facilitate the analysis of the flow characteristics and temperature distribution of the interstitial electrolyte, the simulation results of the flow and temperature fields of the anode front surface and the anode side wall surface as well as the anode bond tooth wall surface are extracted and compared respectively, as shown in Fig. 12.

Table 2 Simulation parameters for flow and temperature fields
Fig. 12
figure 12

Anode front face and anode side wall face and anode key tooth wall face

4.4 Analysis of results and discussion

4.4.1 Analysis of the flow field results

The flow field simulation results for the front face and side wall face of the anode are shown in Fig. 13. It can be seen from the figure that the electrolyte flow velocity increases with the increase of the number of through-holes at the front face and side wall of the anode, and when the number of through-holes is 4, the overall electrolyte flow velocity is low. In the actual process, the electrolyte flow rate is too low, resulting in the dissolution products and temperature of the anode not being discharged in time, which has a large impact on the machining accuracy. When the number of through-holes is 6, the electrolyte flow rate is increased to a certain extent, and the electrolyte flow rate at the upper end of the bonded tooth machining area is significantly improved, and the electrolyte flow uniformity is somewhat improved, but the overall flow rate is still too low. When the number of through-holes reaches 8, the electrolyte flow rate increases further and the maximum electrolyte flow rate increases to over 5 m/s. However, the uniformity of electrolyte flow does not improve significantly compared to the previous situation. When the number of through-holes reaches 10, the electrolyte flow rate increases less, but the uniformity of the electrolyte flow rate improves significantly, and the electrolyte flow rate decreases gently in the direction of the process throughout the front-end processing area. There is no low electrolyte flow rate or even lack of liquid. As a result, the electrolyte flow rate distribution between the front face of the anode and the side walls shows a higher and more homogeneous flow rate in the gap between the 10 through-holes.

Fig. 13
figure 13

Cloud of electrolyte flow velocity distribution at the front face and side wall of the anode

The results of the flow field simulation on the wall of the anode key teeth are shown in Fig. 14. From the figure, it can be seen that the high electrolyte flow rate is mainly concentrated in the vicinity of the through-hole, while the electrolyte flow rate is lower at the side wall and root of the key teeth. When the number of through-holes is 4 and 6, the flow rate of electrolyte on the side wall of the key teeth is 0 m/s, which means that there is a shortage of electrolyte at this location, which can easily lead to cathode short-circuit burns in actual processing. When the number of holes is 8, the electrolyte flow rate is higher than 0 m/s. However, the electrolyte flow rate on the side wall of the key teeth is still low at 0.1 m/s, which is still not enough to ensure stable machining. When the number of through-holes reaches 10, the electrolyte flow rate on the entire key tooth wall is significantly increased and the electrolyte flow rate in the key tooth side wall area reaches 0.6 m/s, which significantly improves the electrolyte shortage phenomenon. As a result, the electrolyte flow rate distribution on the wall surface of the anode key teeth shows that the gap between the 10 through-holes has a higher electrolyte flow rate and avoids liquid depletion.

Fig. 14
figure 14

Cloud diagram of electrolyte flow rate distribution in the key tooth processing area

To further analyze the distribution of the electrolyte flow rate over the entire machining area, the flow rate was divided and the area of the divided flow rate range was calculated using the surface integration method for comparison, as shown in Fig. 15. As can be seen from the graph, with 4 holes, the electrolyte flow rate is mainly concentrated between 1 and 2 m/s, with a smaller area above 3 m/s. This means that most of the interstitial electrolyte flow rate is below 3 m/s and the overall flow rate is too low. When the number of through-holes is 6, the electrolyte flow rate is mainly concentrated between 2 and 3 m/s, and the overall flow rate has improved to a small extent, but the area with a flow rate greater than 4 m/s is still small, and the electrolyte flow rate has not been significantly improved. When the number of through-holes is between 8 and 10, the electrolyte flow rate is also concentrated between 2 and 3 m/s, but the area with a flow rate greater than 4 m/s is significantly increased, indicating that when the number of through-holes reaches 8 and above, the electrolyte flow rate is significantly improved. When the number of vias is 10, the electrolyte flow rate is greatest in the area of 4–5m/s, and the variation in the area of the flow rate range is relatively small, indicating a good uniformity of flow rate distribution. Therefore, in terms of the distribution of flow velocities over the entire processing area, the use of a 10-hole cathode structure has the best effect on the flow field.

Fig. 15
figure 15

Area of the electrolyte flow rate range

4.4.2 Analysis of temperature field results

In electrochemical machining, the temperature of the electrolyte is one of the key factors affecting the machining accuracy. An increase in the temperature of the electrolyte will cause an increase in the conductivity of the electrolyte, resulting in an uneven distribution of the conductivity of the electrolyte in the machining area, causing inconsistencies in the amount of material etched at each location and ultimately affecting the machining accuracy. Reducing the temperature rise of the interstitial electrolyte can therefore improve the machining accuracy of deep special-shaped holes. The simulation results for the temperature field at the front face and side wall of the anode are shown in Fig. 16. It can be seen from the graph that the temperature of the electrolyte at the front face and side wall of the anode decreases as the number of liquid holes increases, and the temperature of the electrolyte decreases as the number of vias increases. When the number of liquid holes is 4 and 6, the temperature of the electrolyte is higher than 30°C and the temperature rise is more than 10°C. The higher temperature rise of the electrolyte is mainly at the side wall of the anode; in practice, the high temperature of the electrolyte will increase the current density of the electrolyte and increase the corrosion rate of the anode material, susceptible to excessive corrosion, which will have an impact on the dimensional accuracy after processing. When the number of liquid holes is 8 and 10, the electrolyte temperature drops below 30°C and the temperature rise of the electrolyte is significantly reduced, with the maximum temperature of the electrolyte being only 27.3°C at 10 liquid holes. As a result, the temperature distribution of the electrolyte on the front face and side wall of the anode shows that the temperature of the electrolyte is lower in the gap between the 10 through-holes, which can effectively control the temperature rise of the electrolyte.

Fig. 16
figure 16

Cloud diagram of temperature distribution of the electrolyte on the front face and side walls of the anode

The results of the simulation of the temperature field on the wall of the anode key teeth are shown in Fig. 17. As can be seen from the figure, the locations where the electrolyte temperature is higher are mainly on the side walls of the key teeth, where the maximum electrolyte temperature reaches 75°C and 67.9°C, respectively, due to the lack of electrolyte on the side walls of the key teeth when the number of liquid holes is 4 and 6, making it impossible to discharge the electrolyte temperature generated at this location in time. The high temperature will cause the electrolyte to evaporate, making it impossible to etch the anode material at this location, resulting in poor dimensional accuracy after machining and even leading to a cathode short circuit. When the number of liquid holes is 8 and 10, the maximum electrolyte temperature is significantly reduced to 36.3°C and 23.6°C, respectively, and the electrolyte temperature rise is significantly improved, 3.6°C. As a result, from the electrolyte temperature distribution on the wall surface of the anode key teeth, the gap electrolyte temperature of the 10 through-holes is lower and the dimensional accuracy of the deep special-shaped holes is better after machining.

Fig. 17
figure 17

Separate clouds of electrolyte temperatures in the key tooth machining area

To further analyze the distribution of electrolyte temperature over the entire machining area, the temperature was divided. The area of the divided temperature range was calculated using the surface integration method for comparison, as shown in Fig. 18. As can be seen from the figure, the area of the electrolyte temperature in the range of 20~24°C is the smallest when the number of liquid holes is 4. The area above 24°C is significantly larger than the other number of liquid holes, and the variation in the area of the temperature range is relatively small, indicating that with 4 liquid holes, the interstitial electrolyte temperature is higher overall. With 6 liquid holes, the area in the 20~24°C region is somewhat higher compared to 4 liquid holes, indicating that the temperature is somewhat lower compared to 4 liquid holes, but the area in the greater than 24°C regions is still larger and the area in the greater than 30°C temperature region is still larger. When the number of liquid holes is 8 and 10, the electrolyte temperature is larger in the area of 20~24°C, indicating that the electrolyte temperature has been significantly reduced, where the number of liquid holes is 10, the electrolyte temperature is mainly concentrated in 20~26°C, and the area of the area larger than 26°C is extremely small, and the change in the area of the temperature range is relatively large, indicating that with 10 liquid holes the interstitial electrolyte temperature is lower overall. Therefore, in terms of the temperature range distribution in the whole processing area, the use of 10 liquid hole cathode structures has the best effect on the flow field.

Fig. 18
figure 18

Area of the electrolyte temperature range

In summary, the cathode structure with 10 through-holes has a higher electrolyte flow rate, better flow uniformity, and a lower electrolyte temperature throughout the process area.

The cathode structure with an insulation layer width of 0.5 mm and 10 through-hole cathodes was used for deep special-shaped hole machining tests. The machined deep special-shaped hole product part sections and measurement results are shown in Fig. 19. Figure 19a can be seen after the processing of the key tooth part is more complete, the key teeth and wall transition smooth, with no obvious defects. The overall accuracy of the deep special-shaped hole after processing from Fig. 19b is good, and the cross-sectional size and shape dimensions of the machined test piece are consistent with the requirements of the product. Therefore, the optimized cathodic structure can not only obtain better machining accuracy but also higher machining stability.

Fig. 19
figure 19

Slicing and measuring results of deep special-shaped hole parts

5 Experimental

5.1 Experimental system

The workpiece is connected to the positive side of the power supply, the tool cathode is connected to the negative side of the power supply, the tool cathode is pulled horizontally by the machine tool drawbar toward the side of the workpiece to be machined, the electrolyte pump is fed with a high-speed flow of electrolyte, and a certain voltage is applied between the workpiece and the tool. The metal of the anode workpiece is gradually etched away, the cathode produces bubbles, and the electrolytic products are carried away by the electrolyte until the process is completed. A diagram of the test system for electrolytic machining of deep special-shaped holes is shown in Fig. 20.

Fig. 20
figure 20

Schematic diagram of the electrochemical machining test system

5.2 Orthogonal experimental design

To optimize the results of several objectives and to determine the best combination of machining parameters, several objectives need to be optimized. The test equipment was horizontal electrochemical machining with an electrolyte solution of 8% NaNO3, with the surface roughness of the deep special-shaped holes and the deviation of the key tooth end face as the process targets. The inlet pressure, processing voltage, duty cycle, and cathode feed rate were used as factors in the process parameters. Four levels were set for each process parameter, and the orthogonal test factor levels are shown in Table 3.

Table 3 Table of factor levels

5.3 Measurement method

Using CMM and white light interferometer to measure the surface roughness of deep special-shaped holes and the dimensional deviation of the key tooth end face two process indicators after the completion of the test, the measuring instrument is shown in Fig. 21.

Fig. 21
figure 21

Measuring apparatus

The workpiece was sliced at 50 mm, 100 mm, 150 mm, and 200 mm from the end face of the workpiece by a wire-cutting machine with a thickness of 5 mm. The coordinates of the key tooth profile inside the slices are measured using a CMM, as shown in Fig. 22, and the average value of the measured key tooth coordinates of the four slices is calculated, and the absolute value is taken as the difference with the ideal size. The maximum value obtained is then used as the final maximum deviation of the key tooth profile.

Fig. 22
figure 22

Coordinate measurement of the key tooth profile

The surface roughness of the side wall surface of the key tooth and the inner wall surface of the special-shaped hole after machining is measured using a white light interference instrument, as shown in Fig. 23. The surface roughness of the 2 areas measured was averaged as the final surface roughness value.

Fig. 23
figure 23

Surface roughness measurement of the side wall surface of the key tooth and the inner wall surface of the special-shaped hole

5.4 Experimental results

Sixteen groups of 4 factors and 4 levels of orthogonal test matrix L16 (45) were selected to conduct orthogonal tests based on the surface roughness of the deep special-shaped hole and the dimensional deviation of the key tooth end face, and each combination of parameters was averaged four times. The test results are shown in Table 4.

Table 4 Experimental results

5.5 Optimal selection of process parameters

To be able to better evaluate the machining quality of deep special-shaped holes, the signal-to-noise ratio (S/N), which is the ratio of signal power to the noise power, is chosen as the evaluation index. As an indicator of the robustness of the output characteristics, the signal-to-noise ratio can fully take into account the influence of random disturbances on the test results and is conducive to obtaining better machining accuracy and surface quality of deep special-shaped holes. When the surface roughness of the deep special-shaped hole and the maximum dimensional deviation of the key tooth profile are both small, the deep special-shaped hole has a higher quality. SRN calculation method for the “look small” feature is

$$S/N=-10\log \left(\frac{1}{n}\sum_{i=1}^n{Y_i}^2\right)$$

where n is the number of test repetitions per group and Yi is the index value obtained from the ith test.

The grey correlation method is an optimization method commonly used when information is incomplete. It measures the degree of influence of machining parameters on the surface roughness of deep special-shaped holes and the maximum dimensional deviation of the key tooth profile with the help of the magnitude of the grey correlation and looks for the variable that has the greatest influence on the test results. By converting the multi-objective problem into a single consideration index, the combination of process parameters is optimized. The grey correlation is calculated as follows.

  1. (1)

    Signal-to-noise dimensionless processing: because the surface roughness of deep special-shaped holes and the deviation of the key tooth end face are different in scale and data unit, and the change trend is also different. In order to ensure that the quality indicators have equivalence and comparability, it is necessary to carry out dimensionless standardization of the data to facilitate comparative analysis and to choose data with the dimensionless processing of the lookout characteristics.

    $${X}_i(k)=\frac{Y_i^{\prime }(k)-\min {Y}_i^{\prime }(k)}{\max {Y}_i^{\prime }(k)-\min {Y}_i^{\prime }(k)}\ \left(i=1,2,\cdots, 16;k=1\right)$$

    where Xi(k)is the standardized value and \({Y}_i^{\prime }(k)\) is the S/N value of the ith test.

  2. (2)

    The grey correlation coefficient expresses the relationship between the standardized values and the ideal values for the target standardization of the surface roughness and maximum dimensional deviation of the key tooth profile for deep special-shaped holes and is calculated as

    $${\epsilon}_i(k)=\frac{\min (i)\ \min (k)\left|{\hat{x}}_0(k)-{\hat{x}}_i(k)\right|+\rho \max (i)\ \max (k)\left|{\hat{x}}_0(k)-{\hat{x}}_i(k)\right|}{\left|{\hat{x}}_0(k)-{\hat{x}}_i(k)\right|+\rho \max (i)\ \max (k)\left|{\hat{x}}_0(k)-{\hat{x}}_i(k)\right|}$$

    where ρ denotes the discriminant coefficient and takes a value in the range of [0, 1], when performing the calculation, take ρ=0.5; \({\hat{x}}_0(k)\) denotes the expected value and takes a value of 0 when performing the calculation.

  3. (3)

    Calculation of grey correlation degree: the average value of the correlation coefficient between each indicator and the corresponding element of the reference series is calculated for each evaluation object separately to reflect the correlation between each evaluation indicator object and the reference series.

    $${r}_i=\frac{1}{m}\sum_{k=1}^m{\epsilon}_i(k)$$

    where m is the number of optimization objectives.

The results of the S/N ratio and grey correlation method are shown in Table 5, and the grey correlation values of each group of parameters are shown in Fig. 24.

Table 5 Grey correlation of S/N ratio of each indicator
Fig. 24
figure 24

Grey correlation values for 16 groups of tests

The grey correlation ranking in Fig. 24 shows that test No. 14 has the largest grey correlation, indicating that the deep special-shaped hole obtained by the process parameters of test No. 14 is the product with the best overall quality in this orthogonal test, i.e., inlet pressure 0.9 MPa, machining voltage 9 V, duty cycle 45%, and cathode feed rate 1 mm/min. The combination of the parameters used after processing the deep special-shaped hole product parts as shown in Fig. 25, after processing the key tooth size as shown in Fig. 26, after processing the deep special-shaped hole size error is small, processing accuracy in line with product requirements.

Fig. 25
figure 25

The deep special-shaped hole product parts

Fig. 26
figure 26

Key tooth size after machining

6 Conclusion

This paper solves the problem of electrochemical machining of deep special-shaped holes by proposing a three-sided feed machining method and designing a three-sided feed cathode. A model of the interstitial electric, flow, and temperature fields has been developed for simulation analysis, the cathode profile has been optimized, and the number of through-holes has been selected. The following conclusions were drawn.

  1. (1)

    Insulation of the end surfaces and walls on both sides of the working tooth tips inside the cathode utilizing an insulating layer can effectively avoid the formation of excessively rounded corners at the key tooth tips after machining. The width of the insulation layer on both sides of the end face and wall face of the cathode key tooth slot tip was chosen to be 0.5 mm, and the rounded angle formed after machining was reduced to 0.11 mm, with a reduction of 54%, enabling a high precision special-shaped hole key tooth to be obtained.

  2. (2)

    The cathode structure with 10 liquid holes allows for a higher flow rate of electrolyte on the front and side walls of the anode, resulting in better uniformity of electrolyte flow and avoiding the phenomenon of liquid shortage on the walls of the anode key teeth. At the same time, the electrolyte temperature is lower on the front side and side wall side of the anode, and the temperature concentration area is eliminated on the anode keystone wall side so that the electrolyte temperature in the whole processing area can be controlled below 30°C. The processing accuracy is significantly improved.

  3. (3)

    Utilizing the signal-to-noise ratio and grey correlation method, the multi-objective problem was converted into a single consideration index, and the combination of process parameters was optimized. The machining quality of deep special-shaped holes meets the product production requirements under the machining process parameters of inlet pressure 0.9 MPa, machining voltage 9 V, duty cycle 45%, and cathode feed rate 1 mm/min.