1 Introduction

With the advancement of technology, newly deep special-shaped hole parts with high strength, hardness, and high value have emerged in more and more fields, such as the mold industry and precision CNC machining machine tools. But the depth, accuracy, and efficiency of deep-hole parts required to improve also make for shaped deep-hole machining technology has become a prominent challenge in modern manufacturing. The parts of cement machining products are mainly large shaft parts; these parts include both concentric and eccentric holes, to solve the processing difficulties, complex movement, and deep hole machining chip removal and other aspects of the problem [1]. The machining of long deep holes in the main body of a smoking gun has to be optimized because the holes are deeper and the chip path through the deep hole is longer, which does not facilitate chip removal and can easily cause deflection and vibration during work, leading to a scrap of the part [2]. 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 [3]. With the use of traditional machining technology for deep special-shaped hole processing, the tool vibration frequency is high, cutting force and machining process chip removal difficulties, so to use new processing methods for shaped hole processing, special machining methods such as EDM, ultrasonic machining, and electrochemical machining. However, compared to electrochemical machining, EDM can get better machining accuracy, but in the process will produce damage to the processing cathode, resulting in higher processing costs [4]. Ultrasonic machining is generally combined with other machining methods to form a composite machining method, which further improves the accuracy of the original base [5]. Compared with EDM and ultrasonic machining technology, the electrolytic machining process has the advantages of no cutting stress, high machining accuracy, good machining efficiency and a wide range of processing, and no loss of the processing cathode in the process [6, 7].

With the continuous improvement and development of electrolytic machining technology, more and more researchers have conducted in-depth discussions and research on it. Xurong et al. used electrolytic machining to machine curved holes, optimized the parameters, and verified experimentally that the surface roughness of the specimens met the requirements of engineering applications [8]. Tang et al. used a computer simulation-assisted cathode design method to solve the uneven gap distribution and flow problems existing in complex parts with multi-stage internal tapered holes in electrochemical machining [9]. Rahman et al. used electrochemical machining to drill deep micro-bores in H2SO4 electrolytes for difficult-to-machine materials, resulting in holes with accurate dimensions and good surface finish [10]. Kharis et al. used electrolytic machining methods in conjunction with a hybrid machining physical model and a correlation system within the machining gap for the machining of small-diameter deep holes [11]. Prakash et al. set up a process test based on response surface methodology (RSM) with a central combinatorial approach, based on the effect of each process parameter on the machining results, multi-objective optimization was carried out with the optimization objectives of material removal rate, radial overcut, surface roughness, and tool electrode wear, and roughness prediction was obtained with a small error rate by using the TLBO algorithm with the constraints of the surface roughness [12].

Compared to conventional processing and other unusual processing methods, the electrolytic machining is accompanied by a common influence of multiple factors in multiple fields, such as flow, electric, temperature, and bubble fields. When coupling multiple physical fields, problems in a single field can affect the stability of other fields and eventually lead to inaccurate prediction of the final forming results [13, 14]. Pratik et al. simulated and analyzed cylindrical, conical, and hemispherical tool cathodes to predict the shape of the working cavity, obtained the effect of various process variables on the shape accuracy of the cavity, and proposed guidelines to improve the contouring accuracy of micro ECMs [15]. Chen et al. proposed a gas-liquid two-phase turbulence model and solved it using a weakly coupled iterative method to obtain numerical simulations of gas volume fraction, temperature, and conductivity at equilibrium because hydrogen gas is generated during electrochemical processing and has an effect on the conductivity of the electrolyte [16]. Shen et al. used COMSOL software to derive simulation and experimental measurement profile curves for conical holes with different tapers by setting different cathode feed rates and operating voltages and compared them with experimental results to verify the accuracy of the simulation [17]. Wang et al. proposed that the electrochemical processing of metal gratings with diamond-shaped holes can effectively improve the processing quality of diamond-shaped holes, but due to the special shape of diamond-shaped holes, there is a diagonal problem and the electrolyte will cause stray corrosion on the side walls, so the synchronization method of pulsed current and low-frequency oscillation is used to improve the flow field [18]. Tim et al. proposed a new approach to simulate anode dissolution for electrolytic processing using a constant mesh, which permits the modeling of complex dissolution processes by controlling the effective material parameters without calculating costly re-gridding, and which yields realistic results [19]. Yin et al. studied the effect of machining voltage, initial machining gap, and feed rate on the forming accuracy of hexagonal holes by coupling electric and flow fields [20]. Jia et al. used COMSOL simulation software to simulate the flow field process of deep-hole electrochemical processing and optimized the cathode based on the simulation results. The flow field distribution can be effectively improved, and the machining accuracy will be improved by using two sets of 1.5-mm diameter liquid-filled holes with a slope of 20° and an angle of 22.5° [21].

Compared to conventional deep hole machining, electrolytic machining of deep holes can cause problems such as uneven flow field distribution, more differences in electrode concentration in the machining area, the effect of bubbles from the reaction on machining accuracy, and unpredictable final forming results. In this paper, a cathode structure with six working teeth is designed to ensure a single machining process. The COMSOL simulation software is used to simulate the gas-liquid two-phase flow field of the gap model, and the number of cathode liquid increasing tanks is modified according to the simulation results to achieve the optimization effect. Finally, using the optimized cathode structure, the comprehensive matching of process parameters is realized by gray correlation analysis. The development cycle is shortened and the processing cost is reduced.

2 Cathode design

2.1 Analysis of the processing object

The deep special-shaped hole has an approximate hexagonal end face, a length of 96 mm, and a central width of 39.5 mm. The internal spiral structure of the deep special-shaped hole is 100-mm long, and its structure shown in Fig. 1. From the electrolytic machining process and the actual processing situation, the spiral processing special-shaped hole has a long processing process, processing parts of the material removal is extremely large, but the removal amount is not uniform characteristics. As a result of the spiral process, the tool cathodes are subjected to increased spin on the horizontal feed, which causes an uneven flow of electrolytes between the anode and cathode, resulting in severe short-circuiting and burning of the tool cathodes. The spiral process is, therefore, more complex than a single-directional feed process.

Fig. 1
figure 1

Schematic diagram of the spiral form deep special-shaped hole structure

2.2 Electrode materials

The principle of electrolytic processing is the use of anode materials in the electrolyte produced by the anode dissolution reaction of a processing method, the main criteria for the selection of cathode materials are corrosion-resistant, conductive, and easy to process and repair, and the more commonly used cathode materials are brass, tungsten copper, and bronze. For the spiral deep-shaped hole structure processed in this paper, due to the large amount of material removal, the cathode needs to be corrosion-resistant, conductive, and easy to process the characteristics of this in a comprehensive comparison of the use of H62 brass has the highest value, and in the machining of the cathode surface of the surface of the part of the region using epoxy resin for insulation, the cathode is a good choice. The cathode material property settings in the simulation are shown in Table 1.

Table 1 Cathode material properties

The anode material of the workpiece 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 blank material of the workpiece is a bar with a prefabricated hole at the center of the bar, the elemental composition of the anode material is shown in Table 2, and the properties of the anode material in the simulation are set as shown in Table 3.

Table 2 Chemical composition of 40CrNiMoV steel
Table 3 Properties of workpiece anode materials

2.3 Design of the cathode structure

According to the characteristics of the deep special-shaped hole structure, this paper adopts a cathode structure with six working teeth, in which the front end of the working teeth is small, and the back end is large in a spiral increment so that the parts be processed can be processed and shaped at one time, as shown in Fig. 2. The small ends of the six working teeth are evenly distributed in the front of the cathode at the same angle, the insulating layer is placed between the working teeth, and the large ends of the working teeth are partially connected, with smooth transition at the connection, during the machining, the small end of the working teeth first rough the prefabricated hole to remove a large amount of part material, and then the large end of the working teeth finish the part to obtain a spiral-deep special-shaped hole that meets the requirements of forming accuracy.

Fig. 2
figure 2

Schematic diagram of the cathode structure

This paper uses a cathode structure with a spiral progression of six working teeth surfaces. The electrolyte flows into the cathode through a hollow spiral rod feed device, with a rear nut seal at the end of the spiral rod to prevent the electrolyte from flowing out, and the electrolyte flows inside the cathode body through a through-hole and an increasing hole into the cathode teeth for machining and finally flows out through the rear guide part. The cathode rotates counterclockwise around the direction of the workpiece axis and moves along the axis in the opposite direction to the flow of electrolyte, Fig. 3 shows the flow of electrolyte and cathode movement form and direction.

Fig. 3
figure 3

Electrolyte flow and cathode motion form and direction

3 Simulation of the gas-liquid two-phase flow field

3.1 Modeling the gap

The gap model for electrolytic machining in the machining equilibrium state, electrolyte in the tool cathode, the workpiece anode, and fixture in the flow of electrolyte existence of the spatial position model, in the three-dimensional software using Boolean operations can be obtained through a gap geometric model as shown in Fig. 4; the initial machining gap is taken as 0.5 mm.

Fig. 4
figure 4

Gap geometry model diagram

3.2 Simulation mathematical modeling

3.2.1 Mathematical modeling of the gas-liquid two-phase flow field

To investigate the simulation results in the ideal state, as well as to facilitate the subsequent calculation, the simulation process of the machining gap is set up with the following two assumptions: 1, the fluid in the flow field is incompressible Newtonian fluid and 2, the use of the turbulent flow of electrolyte can quickly eliminate the electrolysis process in the cathode and anode parts of the electrolysis products on the electrode parts of the concentration of the impact. The energy loss generated by the electrolyte during processing is ignored and the flow of the electrolyte also satisfies the laws of conservation of mass and conservation of momentum. The motion of an incompressible fluid inside the ideal state assumption 1 satisfies the N-S equation:

$$\rho \frac{dV}{dt}=\rho \mathbf{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 \({\uprho }\) is the fluid density, \(u\) is the component of the vector velocity in the x-direction, \(p\) is the fluid micro circular pressure value, \({\upmu }\) is the dynamic viscosity, g is the gravitational acceleration, \(\nabla\) is the gradient operator, \({\nabla }^{2}\) is the Laplace operator, and \(\mathit\nabla\bullet V\) is the volume expansion rate.

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

$$\textit{Re}=\frac{uD_h}v$$
(3)

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

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

$${\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}\epsilon +{S}_{k}$$
(4)
$${\rho }_{l}\frac{\partial \epsilon }{\partial t}+{\rho }_{l}{u}_{l}\nabla \epsilon =\nabla \left[\left(\mu +\frac{{\mu }_{T}}{{\sigma }_{\epsilon }}\right)\nabla \epsilon \right]+\frac{\epsilon }{k}({C}_{\epsilon l}{P}_{k}+{C}_{\epsilon }{S}_{k}-{C}_{\epsilon 2}\epsilon )$$
(5)

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

$${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 in the formula used are as follows: \({C}_{\epsilon 1}=1.44\)\({C}_{\epsilon 2}=1.92\)\({\sigma }_{k}=1.0\), and \({\sigma }_{\epsilon}=1.3.\)

3.2.2 Simulation parameters

The simulation parameters used in this paper are shown in Table 4. To visualize the simulation results of the flow field and the gas-liquid two-phase field, the simulation results of the six-tooth cathode working area in the gap model are extracted for display, as shown in Fig. 5.

Table 4 Simulation parameters
Fig. 5
figure 5

Map of the six-tooth cathode working area

4 Simulation results analysis and discussion

4.1 Discussion of simulation results for the gas-liquid two-phase flow field of interstitial electrolytes

The distribution of electrolyte flow rate in the region of shaped deep hole machining is shown in Fig. 6a, from which it can be seen that the highest flow rate in the gap model reaches 28.2 m/s, while the flow rate at the top of the tooth and the tooth connection is smaller at 8.54 m/s. This phenomenon is due to the fact that the big end part of cathode machining working tooth is farther away from the position of the liquid injection hole, and electrolyte generates the kinetic loss in the process of flowing through the working tooth. The flow rate of electrolyte shows a decreasing trend. And when the electrolyte flows out from the liquid injection hole, from the small end of the cathode working tooth to the big end of the process, as the cross-sectional area of the electrolyte in the processing gap gradually increases, the flow rate of the electrolyte decreases with the cross-sectional area, especially in the big end of the cathode working tooth, the cross-sectional area of the electrolyte processing gap is the largest, and at this time, the electrolyte flowing out of the liquid injection hole cannot satisfy the demand of the electrolyte for the cross-sectional gap of the cathode working tooth at the big end of the cathode working tooth, which is prone to the phenomenon of short-circuit, and the machining process is not stable. Increasing liquid tank structure and processing of the small end of the tooth to the top of the tooth and the large end of the tooth part of the incremental form, the two add up to be more conducive to enhance the machining accuracy, so in order to meet the cathode working tooth machining gap in the sufficient electrolyte, this paper in the cathode designed to increase the liquid tank structure. The cloud diagram of the electrolyte bubble concentration distribution in the deep special-shaped hole machining area is shown in Fig. 6b, it can be seen that the distribution of the gap electrolyte bubbles is approximately the same as the flow field distribution, and it can be seen that the bubble distribution is mainly influenced by the flow field distribution. As seen in the figure, the volume fraction of gas is the highest at the top of the working tooth and the big end connection, up to 0.91. In actual processing, the gas concentration in the cathode and anode gap will have a direct effect on the conductivity, and a high gas concentration will reduce the conductivity of the electrolyte, which indirectly leads to a reduction in the rate of anode corrosion, so that the top of the working tooth and the big end connection of the material etching is lower, and the accuracy of the processed workpiece cannot be guaranteed. The precision of the workpiece cannot be guaranteed, and in serious cases, it may lead to collision between the anode of the workpiece and the processing cathode, which has an impact on the stability of processing. The cathode structure should be optimized to increase the flow rate of the electrolyte at the top of the working teeth and the large end of the tooth connection.

Fig. 6
figure 6

The distribution cloud diagram of electrolyte flow rate and bubble concentration  in the special-shaped deep hole processing area

4.2 Optimization of the cathode structure

Through the analysis of the simulation results of the initial structure, it can be seen that the electrolyte flow rate distribution in the initial structure is not uniform, and the method of designing the liquid increasing tank in the cathode structure can significantly improve the electrolyte flow rate from the small end to the large end of the cathode working tooth. With the increase of the overall flow rate of the electrolyte in the processing area, the stability of the electrolyte flow will become better, and the bubble concentration is low, the bubble distribution area is small, and the machining accuracy and quality of the workpiece can be effectively improved. Therefore, this paper decided to increase the liquid tank on the original structure to optimize the cathode structure. Four different types of cathode structure with different numbers of booster slots are designed for this purpose, as shown in Fig. 7, with structures 1, 2, 3, and 4 being the three-booster slot cathode structure, the four-booster slot cathode structure, the five-booster slot cathode structure, and the six-booster slot cathode structure respectively.

Fig. 7
figure 7

Cathode structure for four different types with different number of baths for liquid enrichment

4.2.1 Analysis of flow field simulation results

The optimized electrolyte flow rate distribution cloud in the deep special-shaped hole machining area is shown in Fig. 8. It can be seen from the diagram that the optimized cathode structure shows a significant increase in the flow rate from the top of the working tooth to the end of the large tooth. This shows that the addition of the pressurized groove increases the electrolyte pressure from the top of the working tooth to the large end of the working tooth, and the electrolyte converges to the top of the working tooth and the large end of the working tooth under the action of pressure. The overall flow of electrolytes in structure 2 is better than the other three structures, with a maximum flow rate of 24.9 m/s and a minimum flow rate of 3.05 m/s, while the maximum flow rate in structure 1 is 22.9 m/s and a minimum flow rate of 0.74 m/s. This indicates that a small number of booster tanks will have a poor effect on the flow rate of electrolytes in the gap model, and the area with a small minimum flow rate is very prone to The cathode will be burnt when the minimum flow rate is too small. Structure 4 and structure 3 have a low flow rate improvement compared to structure 2, 26 m/s and 26.7 m/s, respectively, but the minimum flow rate is lower compared to structure 2, 1.87 m/s and 1.77 m/s, respectively, which is mainly due to the excessive number of booster tanks, resulting in the influence of the electrolyte flowing out of the machining gap, causing the electrolyte flow interference phenomenon, resulting in the loss of kinetic energy, which leads to the loss of kinetic energy. Structure 4 and structure 3 have a low minimum electrolyte flow rate.

Fig. 8
figure 8

Cloud plot of electrolyte flow rate distribution in the machining area  of the six-tooth cathode with different structures

The flow velocity distribution of the electrolyte in the AB cut-off line at the top of the six-tooth cathode is shown in Fig. 9. From the figure, it can be seen that the minimum flow velocity of the electrolyte in the machining area at the top of the teeth has increased significantly compared to the structure before optimization, and the overall flow velocity is above 13.4 m/s, which can quickly take away the anode dissolution products and air bubbles generated in the machining area, improving machining accuracy and ensuring processing stability. The flow velocity of structure 2, structure 3, and structure 4 at the top of the tooth is the same, while the flow velocity of structure 1 is always fluctuating, which is because the small number of liquid increasing tanks leads to the uneven distribution of the flow field. From the curves of structure 2, structure 3, and structure 4, it can be seen that the flow rates of structure 3 and structure 4 on both sides of the tooth top are quite different and uneven, which indicates that too many booster grooves cause interference and turbulence of the electrolyte, resulting in a decrease in the uniformity of the electrolyte flow, while the flow rate curve of structure 2 around the tooth top is low, indicating that even increasing the flow rate can ensure the stability of the electrolyte flow of structure 2.

In summary, the cloud diagram of the electrolyte flow velocity distribution in the six-tooth cathode machining area and the cross-sectional flow velocity distribution curve shows that the cathode structure with a structure 2 four-boost bath not only has a fast flow velocity but also a uniform flow field distribution.

Fig. 9
figure 9

Flow velocity distribution of the AB cut-off  at the top of the six-tooth cathode teeth

4.2.2 Analysis of bubble field simulation results

After optimization of the bubble concentration distribution in the shaped helix deep hole machining region of the cloud diagram shown in Fig. 10, as shown in the figure, after optimization of the gas volume fraction of each structure was reduced, structure 3 and structure 4 are not obvious, the reason for the reduction is due to the structure of structure 3 and structure 4 to increase the liquid tank is too much, the electrolyte produced by the interference interference interference flow caused by the electrolyte flow uniformity is reduced, so that the change in the volume fraction of the change is not obvious, the structure of structure 1. The reduction rates of gas volume fraction for structure 2 are 14.2% and 28.5%, respectively. The optimized cathode structures with high volume fractions are mainly concentrated at the top of the cathode working teeth and at the cathode big-end joints, and a comparison shows that structure 1, structure 3, and structure 4 all have larger gas volume fractions in the cathode working region, while structure 2 has a lower value of the overall volume fraction in the cathode working region compared to the other three.

Fig. 10
figure 10

Gas volume fraction distribution cloud diagram of  six-tooth cathode working area with different structures

As shown in Fig. 11 is a cloud view of the distribution of the gas volume fraction of the AB truncation at the top of the six-tooth cathode tooth, from which it can be seen that the optimized structure 4, which has a significant increase in the volume fraction compared to the initial structure because of the interference perturbation, has a poorer machining quality. The gas volume fraction of structure 3 was not significantly improved compared to the initial structure, and some of the gas volume fraction values of structure 1 were not only higher than those of the initial structure but also higher than those of structure 3. The value of structure 2 is consistently in a slowly increasing state and are smaller than the initial structure as well as other structures, so structure 2 is conducive to improving machining accuracy and ensuring smooth processing.

In summary, through the six-tooth cathode working area electrolyte gas volume fraction distribution cloud diagram and the truncated line bubble concentration distribution curve, we can see that the electrolyte flow rate of structure 2 cathode structure and the value of gas volume fraction are more reasonable, which is suitable for the machining conditions, and can significantly improve the machining accuracy and machining quality.

Fig. 11
figure 11

The gas volume fraction distribution  of the AB section of the six-tooth cathode tooth tip

5 Tests

5.1 Test systems

The system used in this test is a horizontal electrolytic machine with the workpiece anode connected to a positive power supply and the tool cathode connected to a negative power supply, creating an electrical potential difference between the workpiece and the tool, with the tool cathode controlled by a drawbar control device on the right-hand side for movement. The electrolyte is pressurized by a hydraulic pump and flows at high speed between the workpiece and the tool, carrying away the electrolysis products generated by the workpiece anode and the air bubbles formed by the tool cathode until the machining is completed. The horizontal electrolytic machining process for deep special-shaped hole is shown in Fig. 12 below. The two-dimensional diagram of the tool cathode is shown in Fig. 13.

Fig. 12
figure 12

Schematic diagram of horizontal electrolytic machining process

Fig. 13
figure 13

Tool cathode two-dimensional diagram

5.2 Test design

An orthogonal test is used to optimize the multiple objectives so that the optimal results for each value are obtained for the multiple objectives used and to determine the best combination of final machining parameters. An 8% NaNO3 electrolyte was chosen as the processing electrolyte, and the deviation of the diameter of the large end of the deep special-shaped hole and the surface roughness of the inner wall of the deep special-shaped hole were used as process targets. The inlet pressure, processing voltage, duty cycle, and cathode feed rate used as factors in the process parameters and four levels were set for each process parameter shown in Table 5.

Table 5 Factor levels

5.3 Measuring instruments and methods

The white light interferometer and the three coordinate measuring instrument are used to measure the surface roughness of the inner wall of the deep special-shaped hole and the diameter deviation of the large end of the special-shaped deep hole after the processing test. The white light interferometer is shown in Fig. 14.

Fig. 14
figure 14

White light interferometer

The workpiece is sliced using a wire-cut machine at a distance of 60 mm, 120 mm, 180 mm, and 240 mm from the end face of the workpiece, each slice is 6-mm thick, and a CMM is used to measure the coordinates of the diameter of the large end of the deep special-shaped hole at the end face of the slice, as shown in Fig. 15, and the four sets of measured data are averaged. The average value is differenced from the ideal size value and the absolute value is taken as the final size deviation of the diameter of the large end of the deep special-shaped hole.

Fig. 15
figure 15

Special-shaped deep hole big end diameter coordinate  measurement schematic diagram

We use a white light interferometer to measure the surface roughness of the inner wall surface of the machined deep special-shaped hole and the measured surface roughness values are averaged and solved for as the final surface roughness value.

5.4 Test results

An orthogonal test matrix L16(45) with a total of 16 groups of 4 factors and 4 levels, based on the surface roughness of the inner wall of the deep special-shaped hole and the deviation of the diameter of the large end of the deep special-shaped hole for the orthogonal test, and the average value was taken five times for each combination of parameters. The test results are shown in Table 6.

Table 6 Test results

5.5 Optimization of process parameters

The gray correlation method is a method for optimizing parameters when information is incomplete. With the help of the gray correlation, it is possible to measure the influence of the machining parameters used on the deviation of the diameter of the big end of the hexagonal teeth and the surface roughness and thereby find the variable that has the greatest influence on the test results, transforming a problem with multiple objectives into a single problem with comparable indicators and better finding the optimal combination of parameters.

(1) Determining the reference data.

The reference data is generally a set of parameters for which each indicator is optimal, but other reference values can be selected as required. This is noted as \({x}_{0}\left(1\right),{x}_{0}\left(2\right),\cdots ,{x}_{0}\left(n\right)\).

For this reason, the optimum value for each indicator was chosen as the reference data for this test. Diameter size of the big end of the six teeth is 96 mm and surface roughness 0.6 μm.

(2) Dimensionless indicator data.

The two main methods of using dimensionless processing are as follows:

  1. 1.

    Initialization: dividing the data of the series uniformly by the reference data chosen at the beginning of the experiment. Since the series of the same factor do not differ greatly in magnitude, the values can all be collapsed to around the magnitude of 1 by dividing by the reference data.

    $${x}_{i}\left(k\right)=\frac{{x}_{i}\left(k\right)}{{x}_{i}\left(1\right)} , k=\text{1,2},\cdots ,n ; i=\text{0,1},2,\cdots ,m$$
    (8)
  1. 2.

    Homogenization: dividing all the data of a sequence by the mean value. Since the mean value of a series of a large order of magnitude is larger, dividing it also normalizes it to around the order of 1.

    $${x}_{i}\left(k\right)=\frac{{x}_{i}\left(k\right)}{{x}_{i}\left(1\right)} , k=\text{1,2},\cdots ,n ; i=\text{0,1},2,\cdots ,m$$
    (9)

(3) Calculate the absolute value, maximum value, and minimum value of the difference between the index series of the evaluated object and the reference series.

$$\left|{\widehat{x}}_{0}\left(k\right)-{\widehat{x}}_{i}\left(k\right)\right| , k=\text{1,2},\cdots ,m ; i=\text{1,2},\cdots ,n$$
(10)
$$\text {min}=\text {min}\left(i\right) \text {min}\left(k\right)\left|{\widehat{x}}_{0}\left(k\right)-{\widehat{x}}_{i}\left(k\right)\right|$$
(11)
$$\max=\max\left(i\right)\max\left(k\right)\left|{\widehat x}_0\left(k\right)-{\widehat x}_i\left(k\right)\right|$$
(12)

(4) Calculation of correlation coefficients.

$$\epsilon_i\left(k\right)=\frac{\min+\rho\max}{\left|{\widehat x}_0\left(k\right)-{\widehat x}_i\left(k\right)\right|+\rho\max}$$
(13)

where \(\rho\) is the resolution factor, usually taken as 0.5.

(5) Calculate the correlation.

The mean value of the correlation coefficient between each indicator and the corresponding element of the reference series is calculated separately for each evaluation object, thus reflecting the correlation between each evaluation indicator object and the reference series.

$${r}_{i}=\frac{1}{m}\sum _{k=1}^{m}{\epsilon}_{i}\left(k\right)$$
(14)

The results of orthogonal tests are shown in Table 7 and the distribution of gray correlation values is shown in Fig. 16; the maximum gray correlation value is obtained for the process parameters of group 3, which has the best machining effect. Specific processing parameters are as follows: inlet pressure 0.4 MPa, processing voltage 11 V, duty cycle 40%, and cathode feed speed 0.9 mm/min. Figure 17 shows the optimal process parameters processing of the processed workpiece to meet the actual production requirements.

Table 7 Test result data
Fig. 16
figure 16

Line graph of gray correlation values

Fig. 17
figure 17

Slicing diagram of workpiece after processing

6 Conclusion

In this paper, the electrochemical machining technology of internal spiral curved irregular deep hole is studied. The COMSOL software is used to simulate and analyze the gas-liquid two-phase flow field of the initial gap model, optimize the cathode structure, and optimize the processing parameters in combination with the experiment. The processing problem of internal spiral curved irregular deep hole is solved, and the following conclusions are drawn:

(1) The initial cathode structure was optimized by adding different number of liquid-increasing grooves on the tooth surface of the processing tooth, and the gas-liquid two-phase flow field simulation analysis of the initial gap model was carried out for different optimized structures. The results show that the cathode structure with four liquid-increasing grooves has a high overall flow rate of the electrolyte in the processing area, good flow uniformity, low bubble concentration, and small distribution area, and the surface processing quality and accuracy are guaranteed.

(2) In the orthogonal test on the machining parameters of electrolytic machining, using gray correlation analysis to optimize the machining parameters, the best machining process parameters are inlet pressure 0.4 MPa, machining voltage 11 V, duty cycle 40%, and cathode feed rate 0.9 mm/min. Under this parameter, the diameter deviation of the large end of the deep special-shaped hole is 0.15 mm, the surface roughness is 0.487 μm, and the processing effect is good. The processing efficiency is good, and the processing precision of the parts meets the product requirements.