1 Introduction

With the progress of science and technology, in aerospace, deep-sea oil extraction, medicine and other fields appear many newly shaped deep-hole parts with ultra-high strength, high hardness and high value. At the same time, the depth of the parts, processing accuracy and processing efficiency and other aspects put forward higher requirements, the realisation of shaped deep hole machining key technology to be overcome to become a manufacturing technology problem, is imminent. In the manufacturing process of nuclear power evaporator tube plates, hollow axles, heat exchangers, separators and other equipment, it is often necessary to machine deep holes with small diameters, large quantities and high-quality requirements [1]. To ensure the overall quality of internal combustion engines, the deep-hole machining operations carried out on the body and housing of internal combustion engines and other parts are subject to high-quality requirements in addition to ensuring efficiency [2]. Traditional machining technology after years of development technology has been very mature, but in the face of some of the more strange parts such as shaped deep holes and so it seems to be stretched, not only processing accuracy is difficult to ensure, and the tool in the process of high vibration frequency, cutting stress and chip removal problems are also difficult to solve. For this reason, special machining technologies such as EDM and ultrasonic machining should be used. The use of EDM technology, although you can get better accuracy, the use of tool electrodes is easy to wear and tear, is not conducive to continuous processing, and the cost is higher [3]. The use of ultrasonic machining technology, although it can largely improve the accuracy of processed products, it is mainly with electrolysis, EDM and laser processing to form a composite processing technology [4]. Compared with EDM and ultrasonic machining technology, electrolytic machining has the advantages of no loss of tool cathodes, no cutting stress in the machining process, high machining accuracy, high machining efficiency and a wide range of machining, which is widely used in many fields [5, 6].

In recent years, many scholars at home and abroad have explored the use of electrolytic machining for shaped deep holes. Kharis et al. used electrolytic machining with a hybrid machining physical model and a correlation system within the machining gap to machine small diameter deep holes [7]. Zishanur et al. used electrochemical machining in an H2SO4 electrolyte for deep micro-hole drilling and obtained holes with precise dimensions and good surface quality [8]. Wang et al. proposed that ECM is promising for micro-hole fabrication and used ultrasonic vibration-assisted methods, and the results showed that in electrochemical micro-hole machining, when ultrasonic vibration also acted on the tool, there was a significant increase in the machining speed and maximum depth of deep holes, and the taper diameter was reduced and the surface quality was also substantially improved [9]. Sato et al. used an electrochemical etching process and applied the overpotential and specific resistance of a silicon wafer to an artificial microcavity on the silicon surface and adjusted the depth of the space charge region according to the depth of the cavity, the electrochemically etched structure would also be tuned and finally, a high aspect ratio pore with controlled diameter could be formed [10]. To improve the efficiency of electrochemical discharge processing, Elhami and Razfar added nanoparticles to the original electrolyte to form a nano electrolyte, and subsequently, the current signal plots showed that the nano electrolyte discharged more than the previous electrolyte, with a subsequent increase in material removal, and the hole depth results showed that the hole depths of Cu and Al2O3 with the nano electrolyte were increased by 21.1% and 18.7%, with a further increase in hole depth [11].

In the process of ECM, there are often multiple factors, such as flow field, temperature field, bubble field and other physical fields, which interact with each other during the process, and problems in one field will affect the normal operation of other fields, which also leads to multiple changes and unpredictability in the electrolytic process [12]. Therefore, multi-physics field coupling must be carried out before conducting the test, so that the test period can be minimised with saving research costs [13]. Liu et al. established an ultrashort pulse interstitial electric field model to simulate the drilling process, predicted using ultrashort pulse voltage, and simulated the interstitial electric field and interstitial flow field, and finally concluded that as the tool cathode speed increases, the resulting air thin film can greatly reduce the micro-hole taper, resulting in an electrochemical drilling process for efficient hole fabrication [14]. Liu et al. used a gas–liquid two-phase flow model in ANSYS software by combining rotational ultrasonics and electrolytic processing, and the results showed that the pressure and velocity of the electrolyte in the gap changed through the vibration of the cathode, which facilitated the electrochemical process to proceed, and that the combined ultrasonics and electrolytic processing had a beneficial effect on the processing of the hole [15]. Dong et al. used CAE simulation technology to optimise the deep hole machining method, took the gun drilling machining of φ38.1 mm and 1050 mm deep as an example, and used the drilling model to calculate and obtain the influence law of drilling and tool parameters on the machining process, and then obtained the straightness under different drilling schemes by the offset integral model [16]. Chen et al. proposed a gas–liquid two-phase turbulence model considering the effect of hydrogen gas generated during electrochemical machining on the electrical conductivity of the electrolyte, which was solved by a weakly coupled iterative method to obtain numerical simulation results for the gas volume fraction, temperature and conductivity at equilibrium [17]. Mariem et al. used a two-fluid model, an interfacial momentum transfer closure and the original three-equation turbulence model for bubble flow in a three-dimensional CFD code with the addition of mass forces to the fluid model, and the results showed that the addition of mass forces provided effective support for predicting the gap distribution and bubble dynamics aspects [18]. Ren et al. pointed out that the uniformity of the flow field distribution directly affects the stability and machining accuracy of electrolytic machining. In the simulation, it was found that the complex grid structure of the flow channel makes the flow field in the machining area uneven, which leads to low-velocity zones and dead zones, and finally, a new electrolyte flow pattern with an auxiliary internal fluid was adopted to apply the auxiliary electrolyte in the machining area, and the results showed that the new flow pattern significantly improves the flow field. The results showed that the new flow pattern significantly improved the uniformity of the flow field [19]. Shen et al. used COMSOL software to obtain simulation results and experimental measurement profile results for tapered holes of different tapers by setting different cathode feed rates and operating voltages, and the accuracy of the simulation was significantly improved by comparing the results [20]. Wang et al. proposed that the metal grating of the rhombic hole was processed by electrolysis, which can effectively improve the processing quality of the rhombic hole, but due to the diagonal problem of the rhombic hole, the electrolyte will occur stray corrosion to the side wall, for this reason, the compound method of pulsed current and low-frequency oscillation was used to significantly improve the flow field [21].

Compared to conventional deep hole machining methods, deep holes machined by electrolysis often suffer from uneven flow field distribution, concentration differences in the cathode area, air bubbles obstructing the flow of electrolyte and difficulty in controlling the forming results. In this paper, a cathode structure with increasing spiral working teeth is designed, which can be machined and shaped in one pass. The cathode structure is optimised by simulating the gas–liquid two-phase flow field in the gap model and by optimising the number of liquid-boosting slots and liquid-boosting holes. Finally, process tests were carried out to ensure the machining efficiency and meet the actual machining accuracy requirements of production, significantly shortening the research cycle of the product parts and significantly saving production costs.

2 Cathode design

2.1 Machining object analysis

The length of the shaped deep hole part is 6000 mm, the shape of the end face is approximate shuttle shape, the length is 62 mm, the middle width is 40 mm, the internal spiral structure of the part, the pitch is 100 mm, as shown in Fig. 1. From an electrolytic process point of view, the spiral-shaped deep hole has a long processing length, a large material removal margin and an uneven material removal margin. The spiral bore structure allows the tool cathode to be fed horizontally while also moving in a rotary motion around the part axis. The axial feeding and rotational movement of the tool cathode causes an uneven distribution of electrolyte flow in the gap. In severe cases, electrolyte shortages can occur in the machining area, resulting in short circuits and short-circuit burns to the tool cathode. This is more complex than deep-hole ECM with a single feed.

Fig. 1
figure 1

Schematic diagram of spiral-shaped deep hole structure

2.2 Cathode structure design

According to the structural characteristics of spiral-shaped deep holes, this paper designs the cathode structure of two processing teeth with increasing spiral, which can be processed and formed at one time, as shown in Fig. 2. The entire cathode structure consists of the front nut, the seal, the front guidance device, the insulation layer, the cathode body, the rear guidance device and the rear screw cap. The area I is the small end of the cathode machined tooth and area II is the large end of the cathode machined tooth. The two small ends of the machined teeth are independently distributed, with an insulating layer between the machined teeth. The large ends of the two machined teeth are joined and the transition between them is smooth. In the machining process, the small end of the machining teeth first roughs the prefabricated hole to remove most of the workpiece material, and then the large end of the machining teeth performs finishing work to obtain a spiral-shaped deep hole that meets the dimensional accuracy requirements.

Fig. 2
figure 2

Schematic diagram of the cathode structure

In this case, with the two machined teeth spiral incremental structure, the electrolyte flows into the interior of the cathode unit through the hollow spiral rod feeder, which is sealed at the rear by a rear screw cap so that the electrolyte cannot flow out. The electrolyte then flows out inside the cathode body through the through-hole and incremental holes, through the free-form structure of the cathode teeth and finally out the rear guide section. The electrolyte flow pattern is shown in Fig. 3.

Fig. 3
figure 3

Schematic diagram of the electrolyte flow pattern

2.3 Electrode materials

The principle of electrolytic processing is to use the anodic dissolution reaction of the anode material in the electrolyte. The main criteria for selecting cathode materials are corrosion resistance, good electrical conductivity and ease of machining and repair. Currently, the most commonly used cathode materials are brass, tungsten copper and bronze. For the deeply shaped holes with internal spiral structure processed in this paper, the cathode needs to be corrosion resistant, conductive and easy to process due to a large amount of material removed. The cathode material properties in the simulation were set as shown in Table 1.

Table 1 Cathode material properties

The anode material is 40CrNiMoV steel. 40CrNiMoV steel has high strength, toughness and good hardenability and stability against overheating, and is commonly used for high-strength shaft parts, connectors and fasteners. The workpiece is made of bar stock with a prefabricated hole in the centre of the bar stock. The elemental composition of the anode material is shown in Table 2, and the anode material properties are set in the simulation as shown in Table 3.

Table 2 Chemical composition of 40CrNiMoV steel
Table 3 Anode material properties

3 Simulation and analysis of gas–liquid two-phase flow field

3.1 Gap modelling

The gap model is the portion of the gap between the cathode and anode where the electrolyte flows when the process is in equilibrium. The gap geometry model can be derived by using the Boolean operation “remove” in the 3D software, as shown in Fig. 4. A comparative simulation of the flow field shows that a processing gap of 0.5 mm is appropriate.

Fig. 4
figure 4

Gap geometry model

3.2 Mathematical modelling of the gas–liquid two-phase flow field

To facilitate subsequent calculations, the following two assumptions are made for the processing gap: (1) the fluid is an incompressible and constant Newtonian fluid; (2) during electrolytic processing, electrolytic products are produced at the anode and cathode areas due to electrochemical reactions, and to effectively reduce the impact of electrolytic products on the concentration difference near the electrodes, a turbulent electrolyte is used. The energy loss of the electrolyte during processing is neglected and the flow process is bounded by the conservation of mass and conservation of momentum.

The motion of the incompressible fluid inside condition 1 satisfies the N-S equation:

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

where \(\rho\) is the fluid density; \(u\) is the component of the vector velocity in the x-direction; \(p\) is the fluid microcircular pressure value; \(\mu\) is the dynamic viscosity; g is the gravitational acceleration; \(\nabla\) is the gradient operator; \({\nabla }^{2}\) is the Laplace operator; \(\nabla \bullet V\) is the volume expansion rate.

The flow state of a turbulent electrolyte is discriminated using the Reynolds number Re:

$$Re=\frac{u{D}_{h}}{v}$$
(3)

where \({D}_{h}\) is the hydrodynamic diameter and \(v\) is the electrolyte kinematic viscosity.

In this paper, the standard \(k-\varepsilon\) model is used to calculate the turbulent kinetic energy k and turbulent dissipation rate ε, and to neglect the effect of gravity, the standard \(k-\varepsilon\) equation is:

$${\rho }_{l}\frac{\partial k}{\partial t}+{\rho }_{l}{u}_{l}\nabla k=\nabla \left[\left(\mu +\frac{{\mu }_{T}}{{\sigma }_{k}}\right)\nabla k\right]+{P}_{k}-{\rho }_{l}\varepsilon +{S}_{k}$$
(4)
$${\rho }_{l}\frac{\partial \varepsilon }{\partial t}+{\rho }_{l}{u}_{l}\nabla \varepsilon =\nabla \left[\left(\mu +\frac{{\mu }_{T}}{{\sigma }_{\varepsilon }}\right)\nabla \varepsilon \right]+\frac{\varepsilon }{k}({C}_{\varepsilon l}{P}_{k}+{C}_{\varepsilon }{S}_{k}-{C}_{\varepsilon 2}\varepsilon )$$
(5)

where \({P}_{k}\) and \({S}_{k}\) are both generating terms, shear and bubble induced turbulence, respectively, expressed as:

$${P}_{k}=\frac{{\mu }_{T}}{2}|\nabla u+{\left(\nabla \mu \right)}^{T}{|}^{2}$$
(6)
$${S}_{k}=-\beta {C}_{k}|\nabla p{|}^{2}$$
(7)

The constants within the model equations are:

$${C}_{\varepsilon 1}=1.44, {C}_{\varepsilon 2}=1.92, {\sigma }_{k}=1.0, {\sigma }_{\varepsilon }=1.3$$

3.3 Simulation strategy and parameters

The chemical substance transfer module of the COMSOL software can be used to analyse the convection, diffusion and electromigration of electrochemically generated products in solution. Since hydrogen precipitated from the cathode is the main source of bubble generation and diffuses and migrates under the influence of electric and flow fields, the transport of diluted species is used to analyse the changes in hydrogen bubbles. Firstly, the material of the gas is defined as hydrogen, as well as the diffusion coefficient of hydrogen is 5.19e−3 mm2/s. The mobility in the electric field migration is following the Nernst-Einstein formula and the charge number is known to be 2 according to the electrochemical reaction equation. As hydrogen is produced on the cathode surface, the electrolyte interface coupling is performed on the cathode surface. As hydrogen gas undergoes a reduction reaction at the cathode, the number of participating electrons is set to 2 and the stoichiometric coefficient is 2. The electrode reaction at the cathode surface is chosen in the coupling reaction to achieve a simulation of hydrogen gas bubble production.

To realise the gas–liquid two-phase flow simulation, three physical field modules, turbulent flow, primary current distribution and transport of diluted species, are added to the COMSOL simulation software, and the coupling between each physical field module is shown in Fig. 5. Due to the constant potential between the two electrodes, the primary current distribution is coupled with the transport of diluted species to simulate the generation of gases. Due to the scouring effect of the electrolyte, the gas is not uniformly distributed in the process gap, and turbulent flow is coupled to the transport of diluted species to simulate the distribution of the gas in the process gap. The simulation process avoids the need for manual input of the gas generation condition equation, which significantly improves the convergence and stability of the simulation calculation, and the accuracy of the simulation results is good.

Fig. 5
figure 5

Coupling relationships between physical field modules

The simulation parameters were set as shown in Table 4. To demonstrate the flow characteristics of the electrolyte and the bubble concentration distribution in the gap more visually, the simulation results of the machining area of the cathode machining teeth in the gap model are extracted and displayed as shown in Fig. 6.

Table 4 Simulation parameters
Fig. 6
figure 6

Schematic diagram of the machining area of the cathodically machined teeth

3.4 Simulation results analysis and discussion

3.4.1 Simulation results of interstitial electrolyte flow rate and bubble concentration

The initial cathode structure is shown in Fig. 7. The through-hole is located in front of the small end of the cathode processing teeth, and the electrolyte is ejected through the through-hole and flows through the processing surface of the cathode teeth and out of the rear guide device. The initial structure is simulated to obtain a cloud of the interstitial electrolyte flow rate and bubble concentration distribution, as shown in Fig. 8.

Fig. 7
figure 7

Initial cathode structure

Fig. 8
figure 8

Electrolyte flow rate and bubble concentration distribution in the spiral-shaped deep hole processing area

The electrolyte flow rate distribution in the spiral-shaped deep hole processing area is shown in Fig. 8a. It can be seen from the figure that the electrolyte flow rate is higher at the small end of the cathode processing tooth because it is closer to the through-hole. As the electrolyte travels more, the high electrolyte flow rate is mainly concentrated in the root area of the processed tooth with a maximum flow rate of 32.2 m/s, while the top of the tooth and the transition area of the two teeth have a smaller flow rate of 0.05 m/s. During machining, it is more difficult for the electrolyte to flow through the top of the tooth and the transition area at a high rate. The low electrolytic flow rate makes it impossible to discharge the air bubbles precipitating from the cathode at this location in time, resulting in a large accumulation of air bubbles, which in turn affects machining accuracy.

This phenomenon is since the top area of the tooth and the transition area of the two teeth have a longer flow. Due to the distance from the through-hole, more kinetic energy is lost during the flow of the electrolyte, which reduces the flow rate. The bubble concentration distribution of the electrolyte in the spiral-shaped deep hole processing area is shown in Fig. 8b, from which it can be seen that the distribution of the bubble concentration of the interstitial electrolyte is the same as the distribution of the flow velocity, indicating that the bubbles are mainly affected by the distribution of the interstitial electrolyte flow field. In the actual electrolytic process, the bubble concentration is too large, which will cause the electrolyte conductivity to decrease and the anode corrosion rate to decrease. As a result, the amount of anode material removed at the top of the tooth and the transition between the two teeth is smaller than at other locations, and the dimensional accuracy of the workpiece cannot be guaranteed after machining. Therefore, the cathode structure needs to be further optimised by increasing the electrolyte flow rate at the top of the cathode working teeth and the transition between the two teeth.

3.4.2 Optimisation of the cathode structure

Given the results of the above analysis, the structure of the cathode working teeth has been optimised. By adding liquid slots, the electrolyte flow rate is increased at the top of the cathode working tooth and the transition between the two teeth. The slot structure provides better uniformity of electrolyte flow, mitigating interference during electrolyte ejection and avoiding excessive kinetic energy loss. Four different cathode structures with different numbers of liquid slots are designed, as shown in Fig. 9. Structures 1, 2, 3 and 4 are respectively three liquid slots cathode structures, four liquid slots cathode structures, five liquid slots cathode structures and six liquid slots cathode structures.

Fig. 9
figure 9

Cathode structures with four different numbers of slots

The electrolyte flow rate distribution in the spiral-shaped deep hole processing area with different cathode structures is shown in Fig. 10. The optimised cathode structure has significantly increased the electrolyte flow rate at the top of the working teeth and the transition position of the two teeth, with the lowest electrolyte flow rate reaching above 5 m/s. The high electrolyte flow rate is mainly concentrated in the small end of the cathode processing teeth and the transition area of the two teeth. Due to the addition of the booster tank, the electrolyte flow rate in the top and root areas of the working teeth is increased, while the electrolyte is squeezed to converge in the transition area of the two teeth, thus effectively avoiding electrolyte shortage in the whole processing area. Structure 2 has a higher overall electrolyte flow rate than the other structures, with a minimum electrolyte flow rate of 6.85 m/s. Structure 1 has a reduced electrolyte flow rate, with a minimum electrolyte flow rate of 6.1 m/s, which means that the number of booster tanks is small and cannot meet the flow requirements of the interstitial electrolyte. In structure 3 and structure 4, the electrolyte flow rate decreases significantly, with the lowest flow rate being 5.48 m/s and 5.18 m/s, respectively. This is mainly since there are too many liquid slots, which causes interference between the electrolyte flowing from each slot, resulting in kinetic energy loss.

Fig. 10
figure 10

Electrolyte flow rate distribution in the spiral-shaped deep hole processing area with different cathode structures

The distribution of the flow velocity on the AB line in the top area of the tooth is shown in Fig. 11. It can be seen from the figure that the flow velocity at the top of the tooth processing area has increased significantly compared to the initial cathodic structure after the addition of the liquid slot, and the overall flow velocity at the top of the tooth area has reached more than 5 m/s. In the actual processing process, the anode dissolution products and air bubbles can be discharged in time, which helps to improve processing accuracy and ensure a stable processing process. The flow rate of electrolyte in the small end of the teeth of structure 3 and structure 4 is relatively low, and it can be seen that the flow rate in the booster tank near the small end is significantly reduced, indicating that the electrolyte at this location has produced interference disturbance, and the uniformity of electrolyte flow is relatively poor. The stability of the electrolyte flow rate in the liquid slot area of structure 1 has improved significantly, but the electrolyte flow rate at the small end of the machined tooth is still low. Structure 2 has a higher overall electrolyte flow rate and better stability of electrolyte flow in the processing area.

Fig. 11
figure 11

The distribution of the flow velocity on the AB line in the top area of the tooth

In summary, the cathode structure with a structure 2 four-booster gap has a higher electrolyte flow velocity and better flow uniformity.

The distribution of electrolyte bubble concentration in the spiral-shaped deep hole processing area with different cathode structures is shown in Fig. 12. The optimised cathode structure has significantly reduced the electrolyte bubble concentration at the top of the working teeth and the transition position of the two teeth, and the highest bubble concentration has dropped to below 54 mol/m3. The reduction rate of electrolyte bubble concentration between structure 1, structure 2, structure 3 and structure 4 has reached 45%, 47%, 43% and 44%, respectively. The higher bubble concentrations in the optimised cathode structures were mainly concentrated at the top of the machined teeth and the end of the cathode. Structure 1, structure 3 and structure 4 had a significantly larger area of interstitial electrolyte bubble distribution, while structure 2 had a smaller area of interstitial electrolyte bubble distribution, and the overall bubble concentration was significantly reduced compared to the other structures.

Fig. 12
figure 12

Bubble concentration distribution of electrolyte in the spiral-shaped deep hole processing area with different cathode structures

The distribution of bubble concentration in the AB line in the top region of the tooth is shown in Fig. 13. The optimised cathode structure electrolyte bubble concentration increases along the process direction. The highest bubble concentration in structure 1, structure 3 and structure 4 is significantly lower compared to the initial structure, but the bubble concentration of the electrolyte in the first half of the process is greater than that of the initial structure, and there are obvious fluctuations in the bubble concentration distribution, which is uneven and easily causes poor surface processing quality of the anode. In contrast, the bubble concentration of the electrolyte in the entire processing area of structure 2 is less than that of the initial structure, and the bubble concentration distribution is smooth and uniform without obvious fluctuations, which is conducive to improving the processing accuracy and ensuring the stable processing process.

Fig. 13
figure 13

The distribution of bubble concentration in the AB line in the top region of the tooth

In summary, the cathode structure with four liquid slots has a lower concentration of bubbles in the interstitial electrolyte and a better uniformity of bubble concentration distribution. The ability to improve the consistency of the conductivity distribution of the interstitial electrolyte and thus the machining accuracy of profiled holes.

4 Process experiments

4.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 towards 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. Figure 14 shows a schematic diagram of the test system.

Fig. 14
figure 14

Schematic diagram of the electrochemical machining test system

4.2 Measurement methods for process targets

The two process objectives of dimensional deviation and surface roughness of deeply profiled holes are measured using a CMM and a white light interferometer.

Errors due to unstable flow fields at the beginning and end of the process were ignored. The workpiece is sliced at 20 mm, 40 mm and 60 mm from the end face of the workpiece using a wire-cut machine with a slice thickness of 3 mm. The CMM was used to measure the polar coordinate data of eight sampling points of the inner hole profile of the slices, as shown in Fig. 15. The average value of the three measured sampling points is calculated and the difference is taken as the absolute value from the ideal size, and the maximum value is taken as the final size deviation.

Fig. 15
figure 15

Schematic diagram of dimensional deviation measurement

$${\delta }_{n}=\frac{{\sum }_{i=1}^{3}{\varepsilon }_{i}}{3}, n=\mathrm{1,2},\cdots ,8$$
(8)
$$d=\mathrm{max}\left\{\left|{\delta }_{n}-{\delta }_{m}\right|\right\}, m=\mathrm{1,2},\cdots ,8$$
(9)

In the formula, \({\varepsilon }_{i}\) is the number of slices, \({\delta }_{n}\) is the actual sampling point data, \({\delta }_{m}\) is the ideal sampling point data and \(d\) is the final dimensional deviation.

The surface roughness of the inner wall surface of a deep profiled hole is measured using a white light interferometric instrument, as shown in Fig. 16. Six randomly selected areas on the inner wall surface of the deep profiled hole were measured and the surface roughness of the six sampled areas measured was averaged as the final surface roughness value.

Fig. 16
figure 16

Schematic diagram of surface roughness measurement

$$Ra=\frac{\sum_{i=1}^{6}{Ra}_{i}}{6}$$
(10)

In the formula, \({Ra}_{i}\) is the surface roughness of the sampling area and \(Ra\) is the final surface roughness.

4.3 Orthogonal experimental design

The ECM involves many process parameters, and a large number of combinations of parameters are required to optimise the process parameters, which undoubtedly makes the experimental period and costs high. As a highly efficient, fast and economical experimental design method, orthogonal experiments are widely used in the field of electrolytic processing. Using Design-Expert 10 software, a multi-factor orthogonal combination experiment was designed using inlet pressure, machining voltage and cathode feed rate as factors, with the factor levels coded as shown in Table 5. Regression models for surface roughness and dimensional deviation of spiral-shaped deep holes were obtained to solve for the optimum combination of process parameters.

Table 5 Factor level coding

4.4 Multi-factor orthogonal combination experimental results

According to the orthogonal experimental design for processing experiments, with the value of the influencing factors as the independent variable, spiral-shaped deep hole surface roughness and dimensional deviation as the evaluation index, the experimental results are shown in Table 6.

Table 6 Experimental results

4.5 Analysis of experimental results

According to the data samples in Table 6, using Design-Expert 10 software to establish the response function through the method of experimental design, the response surface function can be described and expressed using a second-order polynomial (quadratic) formula, the spiral-shaped deep hole surface roughness and size deviation quadratic polynomial regression model is as follows:

$$Y1=0.60-0.21A+0.067B+-0.05C-0.005AC-0.01BC+0.0.0085A^2-0.016B^2-0.017C^2$$
(11)
$$Y2=1.67-0.22A+0.099B-0.029C-0.048AB-0.042AC+0.015BC+0.013{A}^{2}-0.0095{B}^{2}-0.039{C}^{2}$$
(12)

where \(Y1\) is the dimensional deviation; \(Y2\) is the surface roughness; \(A\) is the inlet pressure; \(B\) is the machining voltage; and \(C\) is the feed rate.

The normal probability distribution of the residuals is shown in Fig. 17. It can be seen from the figure that the internal residuals of the dimensional deviation and surface roughness response surface function models are distributed around a straight line, which can indicate that the internal residuals of the model factors satisfy the normal distribution, so the response surface function of the material removal rate is reliable.

Fig. 17
figure 17

Normal probability distribution of residuals

According to the response surface function to construct the response surface model, the response surface model of dimensional deviation and each design factor is shown in Fig. 18. The larger the inlet pressure, the smaller the dimensional deviation of the shaped deep hole. In the process of gradually increasing the inlet pressure, the dimensional deviation of the shaped deep hole increases as the machining voltage increases and decreases as the feed rate increases. Among them, the effect of inlet pressure and machining voltage has the most significant effect on the material removal rate.

Fig. 18
figure 18

Response surface of dimensional deviation versus each design factor

The response surface model for surface roughness versus each design factor is shown in Fig. 19. The larger the inlet pressure, the smaller the surface roughness of the shaped deep hole. In the process of gradually increasing the inlet pressure, the surface roughness of the shaped deep hole increases as the machining voltage increases and decreases as the feed rate increases. Among them, the inlet pressure and machining voltage effects have the greatest influence on the material removal rate and the most significant effect.

Fig. 19
figure 19

Response surface of surface roughness and each design factor

4.6 Parameter optimisation

According to the spiral-shaped deep hole surface roughness and dimensional deviation quadratic polynomial regression model, the constraints of each variable in the design are:

$$0.3 \mathrm{MPa}<A<0.7 \mathrm{MPa}, 10 \mathrm{V}<B<14 \mathrm{V}, 0.5 \mathrm{mm}/\mathrm{min}<C<0.9 \mathrm{mm}/\mathrm{min}$$

The target constraints are:

$$Y{(A,B,C)}_{Optimum}={{(Y}_{1}+{Y}_{2})}_{min}$$

Using the optimisation function in Design-Expert 10 software, the regression model was solved to obtain the optimal machining parameters of 0.699543 MPa inlet pressure, 10.2288 V machining voltage and 0.88492 mm/min feed rate. The dimensional deviation predicted by this parameter was 0.264996 mm and the surface roughness was 1.30516 µm, as shown in Fig. 20.

Fig. 20
figure 20

Optimisation of machining parameters and prediction of dimensional deviation and surface roughness

To verify the reliability of the optimised parameters, an electrolytic machining experiment was carried out under optimum conditions, with the following parameters: inlet pressure 0.7 MPa, machining voltage 10 V and feed rate 0.9 mm/min. The machining results are shown in Fig. 21. A comparison of the experimental results with the predicted results is shown in Table 7. The error rate between the experimental and predicted values for dimensional deviation is 5.36% and the error rate between the experimental and predicted values for surface roughness is 6.64%, with an overall error rate of less than 10%, indicating that the method can be used to optimise the electrolytic process parameters more accurately and to achieve a combination of multiple process parameters. The machining accuracy and quality of the test pieces processed with the optimised process parameters can be significantly improved and meet the product requirements.

Fig. 21
figure 21

Machining specimen results

Table 7 Comparison of experimental results and predicted results

5 Conclusion

In this paper, to solve the difficult problem of machining spiral-shaped deep holes, a cathode structure with two machining teeth in the increasing spiral was designed, a gap flow field model was established for simulation analysis, and the structure of the cathode machining teeth was optimised, and the machining process parameters were optimised by the grey correlation method, resulting in the following conclusions:

  1. (1)

    The initial cathode structure was optimised to address the problems of low electrolyte flow rate and high bubble concentration at the top of the tooth and the transition area between the two teeth. By using a cathode structure with four additional liquid slots, the flow rate and bubble concentration of the electrolyte in the gap between the machined areas were significantly improved, resulting in improved machining accuracy and quality of deeply profiled.

  2. (2)

    The optimum process parameters were obtained by the response surface method as inlet pressure 0.7 MPa, machining voltage 10 V and feed rate 0.9 mm/min. Experimental verification of the process parameters was carried out and the error rates of the experimental and predicted values of the process targets were 5.36% and 6.64%, respectively. The machining parameters were reliable and met the product requirements.

  3. (3)

    Utilising coupled gas–liquid two-phase flow simulation, the optimisation of the cathode structure has been achieved and the design and manufacturing cycle of the cathode has been greatly reduced.