*Corr. Author’s Address: Northeast Petroleum University, Xuefu Road 99#, Daqing, China, 1538937270@qq.com 483 Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 Received for review: 2023-05-02 © 2023 The Authors. CC BY 4.0 Int. Licensee: SV-JME Received revised form: 2023-07-24 DOI:10.5545/sv-jme.2023.627 Original Scientific Paper Accepted for publication: 2023-09-13 Optimization Method of Multi-parameter Coupling for a Hydraulic Rolling Reshaper Based on Factorial Design Li, H.F. – Luo, M. – Xu, T.T. – Li, Q.Z. – Hou, Y .M. Hongfei Li – Min Luo – Tingting Xu – Qiaozhen Li – Yanming Hou Northeast Petroleum University, School of Mechanical Science and Engineering, China A hydraulic rolling reshaper is an advanced shaping technology with superior protection for casings, and the structural parameters of the reshaper affect its shaping effect on deformed casing directly. To improve the shaping capacity of the reshaper, a multi-parameter coupling optimization method of hydraulic rolling reshaper is proposed to optimize the design of the factors with significant influence under the premise of screening multi-structural parameters. In this paper, according to the working principle of the reshaper, considering the contact nonlinearity between the hydraulic rolling reshaper and deformed casing, as well as the material nonlinearity of the casing, a parametric finite element model of the hydraulic rolling reshaper repairing the shrinkage deformation of casings was developed. The remarkable factors were screened by factorial design, the sample points were generated by optimal Latin hyper-cube design (OLHD), and the response surface models were established by stepwise regression. Therefore, with the maximum plastic deformation of casings as the objective function, the maximum equivalent stress, residual stress, and the plastic deformation of casings as the constrained conditions, an optimized mathematical model for a reshaper was constructed, and the genetic algorithm (GA) is performed to obtain the optimal combination of parameters. The results showed that the optimal reshaper made the shaping process safe and effective, the plastic deformation of casings after single shaping was increased by 11.38 %, and the shaping effect was better (96.48 %), which can effectively improve the safety performance and shaping ability of the reshaper. Keywords: hydraulic rolling reshaper, structural optimization, factorial design, orthogonal test Highlights • Optimization of a hydraulic rolling reshaper used to repair deformed casings in oilfields has been performed by numerical simulation. • Considering both the material and contact nonlinearities, a parametric finite element model of a hydraulic rolling reshaper repairing shrinkage deformation of casings was developed. • An orthogonal test was performed to analyse the multi-geometric parameters and find five significant parameters of the reshaper on the shaping effect. • Nonlinear interactive regression models of response variables were established using stepwise regression based on the sampling and calculation of OLHD. 0 INTRODUCTION In recent years, with the development of downhole casing shaping technology, higher requirements have been put forward for the safety and efficiency of the shaping tools. As one of the advanced shaping tools to repair deformed casings, the hydraulic rolling reshaper has been widely used because of its advantages in protecting the damaged casing, fewer multiple trips to the well, and low construction cost. Fig. 1 shows the working principle of the hydraulic rolling reshaper when repairing horizontal wells. According to its working principle, the work section directly contacts the inner wall of the deformed casing to transmit the repairing load provided by the ground devices, and its structural dimensions directly impact the shaping effect of the casing. For the structural optimization of shaping tools, the current research focuses on traditional shaping tools, such as the pear-shaped tube expander and the eccentric tube expander. Jiang [1] discussed the influence of the angle of the shaping tool on the shaping effect by establishing the mechanical and finite element model of the deformed casing of the pear-shaped tube expander, and the reasonable taper angle of the expander is 30° to 40°. Chen et al. [2] used an ANSYS / LS-DYNA explicit structural dynamic analysis module to calculate the stress of different cone angles under different diameters and Fig. 1. Working principle of hydraulic rolling reshaper Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 484 Li, H.F. – Luo, M. – Xu, T.T. – Li, Q.Z. – Hou, Y.M. determined the reasonable cone angle of the eccentric expander under different diameters. Bai [3] used the numerical simulation method to conduct finite element analysis on the shaping process of four types (spherical, curved, stepped and conical), and obtained the conclusion that the shaping effect of a conical shaping cone is the best and the best cone angle is 15° to 20°. In addition, most of the studies on hydraulic rolling reshapers are focused on analysing its shaping process and shaping law by using numerical simulation combined with laboratory tests. Lin et al. [4] obtained the relationship between load and torque required for shaping casing based on the established mechanical model of repairing elliptic deformation casing combined with laboratory tests. Deng et al. [5] established the calculation method of shaping force required by rolling reshaper to repair the deformed casing, and verified the reliability of the calculation method through tests. Luo et al. [6] took a single ball on the hydraulic rolling reshaper to perform a radial extrusion test on the casing, obtained the relationship between the shaping force and the radial displacement of the inner wall of the casing, and established a corresponding finite element model for verification. Xu et al. [7] gave a research method for the single shaping limit of casing and established the finite element model of roll-shaping shrinkage deformation casing to obtain the single shaping limit of casing with different axial deformation lengths. In summary, regarding the optimization of shaping tools, most researchers used the method of fixing other variables and changing a geometric parameter to explore the influence of this parameter on the shaping effect. The research process is equivalent to the “selection” rather than “optimization” of parameters. Moreover, there are few reports on the optimization of hydraulic rolling reshaper, and the present research [8] only optimizes the structural parameters of a part of the reshaper, and the influence of other parameters on the shaping effect has not been analysed or screened. Therefore, to improve the shaping ability of the hydraulic rolling reshaper in the premise of ensuring the safety bearing capacity of the casing, it is necessary to perform structural optimization with full consideration of the key structural parameters of the reshaper. However, the structural complexity of the reshaper and the high nonlinearity of its contact with the inner wall of the casing make it difficult to calculate and evaluate the shaping effect using the traditional analytical method, which needs to be simulated by numerical simulation. Based on this, taking the shrinkage deformation casing as an example, the process of repairing the deformed casing by hydraulic rolling reshaper is simulated and analysed, and the deformed state and stress distribution of the casing during the shaping process are explored. Subsequently, a multi-parameter coupling optimization method of a hydraulic rolling reshaper based on the factorial design is proposed. The response surface model is constructed by stepwise regression, and the optimal structural parameters of the reshaper are obtained by genetic algorithm (GA). 1 RELATED OPTIMIZATION THEORY 1.1 Optimized Mathematical Model Generally, an optimization problem with M optimization objectives and N design variables can be simplified into an optimized mathematical model: min, ,, ,, ,, ,, fx fxfx fxmM gx i m i             12 12 01 2  s.t. ,, , ,, ,, ,,,,, , minm ax    s hx jk xx xxx xx xn j rN nn n       01 2 12 1 12 ,, ,  N min, ,, ,, ,, ,, fx fxfx fxmM gx i m i             12 12 01 2  s.t. ,, , ,, ,, ,,,,, , minm ax    s hx jk xx xxx xx xn j rN nn n       01 2 12 1 12 ,, ,  N , (1) where M is the total number of optimization objectives, f m (x) is the m th objective function, g i (x) = 0 is the i th equality constraint, h j (x )  ≥  0  is  the j th inequality constraint, x is the N-dimensional design variable, x nmax and x nmin are the upper and lower limits of the feasible region of the n th design variable. 1.2 Design of Experiment The Design of Experiment involved in this paper includes a factorial design and an Optimal Latin hyper-cube design (OLHD). 1. Factorial design A factorial design is a screening experimental design method that aims to find the design variables involved in optimization by screening out remarkable factors from multi-factors [9] to [11]. To judge the influence of different factors on the response and reduce the number and cost of experiments, an orthogonal test is chosen to analyse and screen the related influencing factors. The different values of influencing factors are called levels. According to the orthogonality, a representative combination of levels is selected from a full-scale test to form an orthogonal table for experimental design, and multi-factors are screened to simplify the subsequent optimization. Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 485 Optimization Method of Multi-parameter Coupling for a Hydraulic Rolling Reshaper Based on Factorial Design 2. Optimal Latin hyper-cube design An optimal Latin hyper-cube design (OLHD) is a sampling experimental design method that improves the uniformity of the traditional Latin hyper-cube design. It can reflect the relationship between factors and responses more realistically and accurately, with better space-filling and equilibrium. Fig. 2 is quoted from [12], Fig. 2a shows the test points randomly generated by the Latin hyper-cube design, and Fig. 2b shows the more uniformly distributed test points generated by OLHD. a) b) Fig. 2. Latin hyper-cube design; a) traditional; and b) optimal 1.3 Polynomial Fitting Based on Response Surface Methodology Response surface methodology is a statistical method to obtain the relationship between multiple influencing factors and responses in complex systems so as to establish polynomial regression models [13]. The basic idea is to select suitable sample points in the design space and calculate the responses, use polynomial fitting to obtain explicit formulas between variables and responses in complex systems, and finally, the structural parameters are optimized based on the optimization algorithms. Due to the complex structure of the hydraulic rolling reshaper and the large number of related variables, the stepwise regression is chosen for fitting. Stepwise regression is a multiple linear regression method [14]. However, considering only the linear relationship between variables and responses will reduce the fitting effect of the model, so in order to consider the nonlinear relationship between variables, interactions, and responses, it is necessary to generalize linearity to nonlinearity by making a power series of single-factor variables and considering interactions to form a new set of variables before stepwise regression. In the process of regression, statistical tests should be carried out on each variable in each step, remarkable variables are automatically screened and added; the variables are introduced into the regression model in turn according to the influence degree of each variable on the response. There are two reference values for judging the significance, which are the values of inclusion (α c ) and deletion (α d ). If the p-value of the variable is less than or equal to α c , the variable is automatically identified and added to the regression model; if the p-value is greater than α d , the variable is eliminated. The final regression model is obtained when the p-values of all variables not in the model are greater than α c and less than or equal to α d . There are two coefficients to determine the fitting effect of the model: the coefficient of determination (R 2 ) and the degree-of-freedom adjusted coefficient of determination (R adj 2 ), and the calculation methods are shown in Eqs. (2) and (3). R 2 is used to represent the goodness of fit for the regression models, and the higher the value, the higher the goodness of fit of the models. R adj 2 includes the number of design variables in the model, which can better reflect the pros and cons of the regression model [15]. Moreover, the closer R 2 and R adj 2 are to 1, the better the fitting effect of the model is. R SS SS E T 2 1  , (2) R SS tw SS t adj E T 2 1 1      , (3) where t is the total number of samples, and w is the total number of terms in the regression model. 2 OVERALL RESEARCH IDEA The optimization flow of the hydraulic rolling reshaper is shown in Fig. 3. Firstly, a preliminary analysis of the reshaper is required to determine the geometric parameters of the structure and the response variables of the optimization problem. Then, enter the experimental design stage, the orthogonal test is used to sample and obtain the different combinations of multi-geometric parameters, and the corresponding responses are solved by invoking the parametric finite element model repeatedly. Therefore, the factorial design of multi-geometric parameters is performed to screen out the remarkable factors and determine the design variables involved in the subsequent optimization. On this basis, OLHD is used for scientific sampling in the feasible region, and the responses of the sample points are calculated by invoking the finite element model, and the response surface model is established based on responses. Thus, with the maximum plastic deformation of the casing as the objective function, the maximum equivalent stress, residual stress, and the plastic deformation of the casing as the constrained conditions, an optimized Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 486 Li, H.F. – Luo, M. – Xu, T.T. – Li, Q.Z. – Hou, Y.M. mathematical model for reshaper is constructed. Thereafter, GA is used to optimize and evaluate the shaping effect of the reshaper before and after optimization, and finally the optimal structure of the reshaper is obtained. 3 MECHANICAL ANALYSIS OF SHAPING PROCESS 3.1 Parametric Finite Element Model Fig. 4 is the basic structure of the hydraulic rolling reshaper. It is mainly composed of a work section, a charging section, and a connective section. The rolling balls in the work section are the key component in direct contact with the inner wall of the casing, and they are also the main working body to transmit the shaping load and achieve the repair goal, so the reshaper is simplified into the multi-stage tapered structure shown in Fig. 4. There are 7-stage balls in the reshaper, and the first 6 stages are called “shaping stage”, which are used to roll the inner wall of the casing to achieve the repairing goal and diameters of each stage increase in steps with the conical degree of 1.145°. Moreover, the 7 th stage is called “reinforced stage”, which is used to strengthen the shaping effect. Furthermore, the total length of the reshaper is 300 mm, and the axial distance of each stage is 50 mm. The rolling balls (the outer diameter is 20.64 mm) are Fig. 3. Optimization flow chart Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 487 Optimization Method of Multi-parameter Coupling for a Hydraulic Rolling Reshaper Based on Factorial Design embedded in the grooves located at the work section, and the exposed size of the ball relative to the surface of the reshaper is 5 mm. The main body diameter of the 1 st stage is 100 mm (the maximum equivalent diameter is 110 mm), and the diameters of the 6 th and 7 th stages are 110 mm (the maximum equivalent diameter is 120 mm). The shrinkage deformation casing is the object of this research, and the ideal casing with material P110 and specification of 5 1/2 in ( Φ 139.7 mm × 9.17 mm) is selected. The axial deformation length of the casing is 300 mm, and the minimum diameter (110 mm) is located in the middle of the casing. To avoid the influence of the boundary effect, both ends of the deformed section are connected with intact casing (length is 100 mm), as shown in Fig. 5. Before the shaping process begins, the section of the 1 st stage on reshaper coincides with the A-A section shown in Fig. 5. Fig. 4. Structural parameters of hydraulic rolling reshaper Fig. 5. Structural parameters of shrinkage deformation casing According to the API 5CT standard for casing material properties, the P110 casing with an elastic modulus of 210 GPa, Poisson's ratio of 0.3, yield limit σ s of 851 MPa, and strength limit σ b of 933 MPa is taken as an example for calculation. In addition, the multilinear isotropic hardening model is used to characterize the stress-strain relationship of casing [16], as shown in Fig. 6. To simplify the calculation, the assumptions have been given for the simulation as follows. (1) Simplify the reshaper into a rigid body. (2) Ignore the influence of temperature on the mechanical properties of the material during the shaping process. (3) The central axis of the reshaper always coincides with the axis of the casing during the shaping process. (4) Ignore the wall thickness variation of the deformed casing. (5) Ignore the influence of the initial residual stress of deformed casing on the shaping effect. Fig. 6. Stress-strain curve of casing According to the structural characteristics of the reshaper, parametric modelling is carried out on the basis of clarifying the geometric relationship between the structural parameters, and the casing is discretized into solid elements by the finite element method. Moreover, target elements and contact elements are created on the outer surface of the reshaper and the inner surface of the casing, respectively. Considering the computational cost and accuracy comprehensively, the global grid density is determined, and the key geometric features (such as the contact interface between the reshaper and the inner wall of the casing) are refined with the local grid refinement. According to the loading features of the integral structure, the end faces on both sides of the casing are set as fully fixed constraints. The axial translational velocity of the reshaper is v = 1 mm/s, the rotating angular velocity is ω = 0.48 rad/s, and the friction coefficient between the outer surface of the reshaper and the inner wall of Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 488 Li, H.F. – Luo, M. – Xu, T.T. – Li, Q.Z. – Hou, Y.M. the casing is 0.1. Therefore, the mechanical model and finite element model of the hydraulic rolling reshaper shaping deformed casing are shown in Fig. 7. a) b) Fig. 7. Models of the shaping process; a) mechanical model; and b) finite element model 3.2 Solving Algorithm To reflect the material nonlinearity of the casing and the contact nonlinearity of the contact interface involved in the shaping process, the overall mechanical equilibrium equation of the shaping process is determined as K+ K= F+F CC         , (4) where δ is the node displacement array, K( δ) is the elastic-plastic stiffness matrix of casing material, K C ( δ) is the contact stiffness matrix, F is nodal force array, F C is the contact force array. Since the elastic-plastic analysis is involved, and the nonlinearity of the contact area and contact pressure on the contact interface, the solution uses intermediate sub-steps, and the convergence of each sub-step is achieved by stepwise iterative solution, so as to track the load path correctly and complete the overall calculation. Therefore, the modified Newton- Raphson method is chosen to solve the nonlinear problems involved in this paper. The reliability of the algorithm in solving the double nonlinear problems involved in the shaping process has been verified by Xu et al. [7] in our research group through the combination of numerical simulation and experiment. 3.3 Results and Discussion The shaping process is calculated for 700 s, and the maximum equivalent stress and radial displacement of the deformed casing under different times are shown in Fig. 8. The figures show that when the reshaper moves to 136.56 s, the 1 st stage ball of the reshaper starts to contact with the inner wall of the casing, and the casing begins to deform elastically. At 166.55 s, the equivalent stress of the casing exceeds the yield limit, and the casing produces plastic deformation. As the reshaper keeps moving forward, the stress and strain of the casing increase, and the plastic deformation area gradually expands. The maximum equivalent stress of the casing is 933 MPa at 315.08 s, and the maximum radial displacement of the casing is 5.133 mm at 427.37 s. When the reshaper moves to 587.56 s, the rolling balls are completely separated from the inner wall of the casing, the repairing load is unloaded, and the shaping process is completed. At this time, the residual stress of the casing is 809.38 MPa, and the radial displacement is rebounded by 0.213 mm due to elastic strain, so the plastic deformation of the casing after single shaping is 4.920 mm. Hence, the equivalent stress and radial displacement nephogram of the casing at important times are shown in Fig. 9. However, it should be noted that the maximum equivalent stress of the casing reaches the strength a) b) Fig. 8. Maximum equivalent stress and radial displacement of the casing under different times; a) maximum equivalent stress; and b) maximum radial displacement Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 489 Optimization Method of Multi-parameter Coupling for a Hydraulic Rolling Reshaper Based on Factorial Design limit during the shaping process at 315.08 s, and the casing will be destroyed in the actual construction, so this reshaper cannot repair this deformed casing. 4 FACTORIAL DESIGN By analysing the mutually restrictive relationship between the geometric parameters of the reshaper, the following eight geometric parameters are selected as influencings to participate in the factorial design, as shown in Fig. 10: main body diameter of the 1 st stage (D 1 ), reshaper’s taper (α), length of the shaping stage (L), helix angle (β, replaced by the pitch H while modelling, β=arctan(H/πD 1 )), diameter of the ball (D b ), number of balls each stage (s), total number of stages of reshaper (k), exposed size of the ball (h). a) b) Fig. 10. Schematic diagram of related geometric parameters; a) front view of the reshaper; and b) B-B section Considering the trafficability of the reshaper and the rationality of the structure, combined with the requirements of GB/T 308.1-2013, the range of eight influencing factors is obtained by preliminary analysis. According to the central composite design method [17] and [18], three levels of eight influencing factors are selected for the 8-factor 3-level orthogonal test, and the values are shown in Table 1. Table 1. Factor values for the orthogonal test No. Factors Unit Level 1 2 3 1 L mm 220 230 240 2 D 1 mm 97.5 98.5 99.5 3 α ° 1.15 1.2 1.25 4 h mm 3.5 4 4.5 5 H mm 400 600 800 6 D b mm 20.64 21.43 22.22 7 k stage 6 7 8 8 s piece 4 5 6 To reduce the downhole frequency of the reshaper and shorten the construction period of workover, it is necessary to ensure that the plastic deformation of the casing after single shaping is the largest under the safety of the casing when evaluating the shaping effect of the reshaper. At the same time, the residual stress of the shaped casing will also weaken its own load-bearing capacity, so it is necessary to minimize the residual stresses of the shaped casing. Therefore, the maximum equivalent stress (p max ), residual stress (p r ), and plastic deformation of the casing after Fig. 9. Von-Mises stress and radial displacement nephogram at important times in repairing process; a) Von-Mises stress nephogram at 315.08 s; b) Von-Mises stress nephogram at 587.56 s; c) radial displacement nephogram at 427.37 s; and d) radial displacement nephogram at 587.56 s Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 490 Li, H.F. – Luo, M. – Xu, T.T. – Li, Q.Z. – Hou, Y.M. the absolute value of the t-value obtained by the t-test, and the ordinates are arranged in descending order of the value of the standardized effect. Based on the significance level α of 0.05, the statistical significance threshold of 2.101 is obtained, which corresponds to the critical value of the t-value of the red reference line in Fig. 11. The variable is statistically significant when p ≤  0.05  or  the  bar  in  the  Pareto  diagram  exceeds  the reference line [19]. Hence, it can be seen from the chart that the geometric parameters that have a great single shaping (d) are selected as response variables. The table of the 8-factor 3-level orthogonal test is generated by SPSS, and 27 combined schemes are obtained. By invoking the parametric finite element model, the responses corresponding to each combined scheme are obtained, as shown in Table 2. The p-value and t-value of each factor for the three response variables are shown in Table 3, and the Pareto diagrams are shown in Fig. 11. The abscissa “standardized effect” in Fig. 11 represents Table 2. Schemes and responses of orthogonal test Sample No. Geometric parameters Responses L [mm] D 1 [mm] α [°] h [mm] H [mm] D b [mm] k [stage] s [piece] p max [MPa] p r [MPa] d [mm] 1 220 99.5 1.2 4 800 21.43 7 5 880.05 692.54 0.84 2 230 97.5 1.15 4.5 800 20.64 8 6 797.49 328.73 0.38 3 240 97.5 1.15 4 600 20.64 7 5 585.84 215.39 0.17 4 220 97.5 1.25 3.5 600 21.43 8 5 18.177 2.9887 0.01 5 240 99.5 1.15 4.5 600 22.22 7 4 930.36 752.92 1.68 6 220 99.5 1.25 4 600 20.64 8 4 905.80 670.05 0.95 7 230 97.5 1.25 4.5 400 21.43 7 4 889.39 677.74 0.58 8 220 99.5 1.15 4 400 22.22 6 6 856.19 656.66 0.58 9 230 99.5 1.2 3.5 600 21.43 6 4 847.77 650.73 0.41 10 240 98.5 1.25 3.5 800 22.22 6 4 836.07 520.20 0.34 11 220 98.5 1.2 4.5 800 20.64 7 4 895.91 692.24 0.63 12 230 99.5 1.25 3.5 400 20.64 7 6 870.60 705.28 0.72 13 240 99.5 1.25 4.5 800 20.64 6 5 931.53 806.39 1.91 14 230 98.5 1.25 4 400 22.22 7 5 875.67 667.63 0.75 15 230 97.5 1.2 4.5 600 22.22 6 5 849.1 606.62 0.54 16 240 97.5 1.2 4 400 22.22 8 4 760.19 322.70 0.21 17 230 98.5 1.15 4 800 21.43 8 4 793.61 418.97 0.30 18 230 98.5 1.2 4 600 20.64 6 6 847.55 577.83 0.47 19 220 98.5 1.15 4.5 400 21.43 6 5 870.77 708.42 0.55 20 240 98.5 1.2 3.5 400 20.64 8 5 738.45 300.02 0.25 21 220 97.5 1.2 3.5 800 22.22 7 6 0 0 0 22 240 97.5 1.25 4 800 21.43 6 6 847.05 536.95 0.47 23 240 98.5 1.15 3.5 600 21.43 7 6 636.87 230.57 0.64 24 230 99.5 1.15 3.5 800 22.22 8 5 782.71 403.77 0.37 25 220 98.5 1.25 4.5 600 22.22 8 6 892.80 679.19 1.13 26 220 97.5 1.15 3.5 400 20.64 6 4 0 0 0 27 240 99.5 1.2 4.5 400 21.43 8 6 927.77 809.90 1.93 Fig. 11. Pareto charts of response variables Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 491 Optimization Method of Multi-parameter Coupling for a Hydraulic Rolling Reshaper Based on Factorial Design influence on the response variables are D 1 , h, L, α, and k, so these five parameters are selected as the design variables for optimization. Table 3. The p-value and t-value of the response variables Vari- ables p max p r d p-value t-value p-value t-value p-value t-value L 0.028 2.39 0.3 1.07 0.01 2.88 D 1 0.001 4.07 0 9.39 0 6.97 α 0.313 1.04 0.001 4.21 0.044 2.17 h 0.001 4.16 0 8.82 0 6.54 H 0.975 -0.03 0.239 -1.22 0.749 -0.32 D b 0.792 0.27 0.405 0.85 0.908 0.12 k 0.735 -0.34 0.007 -3.06 0.802 0.25 s 0.818 -0.23 0.63 -0.49 0.238 1.22 5 OPTIMIZATION DESIGN 5.1 Elements of the Mathematical Model The optimized mathematical model includes three elements: objective function, design variable and constraint. 1. Objective function The key to the hydraulic rolling reshaper is to ensure that the casing has a large plastic deformation after single shaping (d) under safe conditions to ensure a rapid and effective workover. Therefore, d is selected as the objective function. 2. Design variable Based on the requirements for performance and dimensions of the reshaper and its trafficability of deformed casing, the value ranges of the 5 design variables will be determined separately. (1) Main body diameter of the 1 st stage (D 1 ) At present, the maximum equivalent diameter of the reshaper is 120 mm, and it determines the diameter of the casing through which the reshaper can pass and the shaping effect on the casing. After analysis, the maximum equivalent diameter is affected by three geometric parameters: main body diameter of the 1 st stage (D 1 ), exposed size of the ball (h), and reshaper's taper (α), so the main body diameter of the 1 st stage is determined first. According to the working principle of the reshaper, the balls will retract into the grooves after the centre shaft is lifted up, and Fig. 12 shows the minimum limit state for the main body diameter of the 1 st stage when the balls are not exposed. As can be seen from the figure, the contact point at the bottom corner of the groove is point B, point O is the centre of the centre shaft, point A is the contact point between the ball and the bottom surface of the groove, and the diameter of the ball is D b . According to the geometric relationship in the figure, DD 1 1 2         tan b , and the diameter of the ball is 20.64 mm, α = 30°. After calculation, the minimum D 1 is 77.03 mm, and the safety factor is taken as 1.1, the minimum value of D 1 is 84.73 mm which is rounded up to 85 mm. Based on past experience, the smaller the diameter of the work section, the easier to wedge into the minimum diameter of the casing for repair. Therefore, the main body diameter of the 1 st stage is 100 mm as the upper limit of this design variable, so the range of D 1 is determined to be 85 mm ≤ D 1 ≤ 100 mm. Fig. 12. Minimum limit state for the main body diameter of the 1 st stage (2) Exposed size of the ball (h) The balls will be extruded from the grooves when the charging section pushes the centre shaft forward, so the exposed size of the ball has a certain impact on the shaping effect of the casing, if it is too small, the shaping ability of the reshaper will be reduced, and the desired effect will not be achieved. Simultaneously, in order to ensure that the balls cannot fall out of the grooves, the exposed size of the ball should not be greater than 1/4 of its diameter, the range of h is determined to be 3 mm ≤ h ≤ 5.16 mm. (3) Length of the shaping stage (L) The balls on the work section are spirally distributed and build the helical line by controlling the pitch and cycle number in parametric modelling. Therefore, the number of turns of the spiral is set to one, and the helix angle is replaced by the pitch for representation. To facilitate the subsequent analysis, the shaping stage of the reshaper is expanded along the ring direction of the 1 st stage, and the side unfolded drawing of spirally arranged balls on the shaping stage is obtained, as shown in Fig. 13. Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 492 Li, H.F. – Luo, M. – Xu, T.T. – Li, Q.Z. – Hou, Y.M. Fig. 13. Side unfolded drawing of spirally arranged balls on the shaping stage The reference circle is established by the circumference of the 1st stage, and the circumference of the reference circle is πD 1 after expansion, so the conversion relationship between pitch (H) and helix angle (β) is β = arctan(H/πD 1 ). For structural parameters of the reshaper, D 1 = 100 mm, H = 600 mm, so the helix angle is equal to 62.36°. Take the geometric relationship between the 1 st and 2 nd balls as an example (Fig. 14). Combined with the practical processing technology, at least 1/2 diameter processing allowance should be left between each stage, MN = 30.96 mm, so the minimum interval between each stage is MN sinβ. After calculation, the minimum interval between each stage is 27.43 mm. Fig. 14. Schematic diagram of the geometric relationship between the 1st and 2nd balls The hydraulic rolling reshaper is one of the main shaping tools for repairing deformed casing in horizontal wells. To improve the applicability of the reshaper so that it can pass through a horizontal well with a smaller radius, the length of the reshaper should be reduced on the current basis. The total number of shaping stages should be less than 9 (250 mm / 27.43 mm = 9.11) with 8 intervals, so the length of the shaping stage should be greater than 27.43 × 8 = 219.44 mm and rounded upward to 220 mm. Hence, the range of L is determined to be 220 mm ≤  L ≤  250 mm. (4) Reshaper’s taper (α) The inner diameter of the intact casing is 121.36 mm, and if the exposed size of the ball reaches the maximum (5.16 mm), the maximum diameter of the main body is 111.04 mm. According to the expression of the reshaper’s taper:          arctan DD L k 1 . (D k indicates the main body diameter of the k th stage), the main body diameter of the 1 st stage ranges from 85 mm to 100 mm through the analysis of point (1). After calculation, when D 1 = 85 mm, α ≤  3.387°, when D 1 = 100 mm, α ≤  1.437°. The current reshaper's taper is 1.145°, in order to obtain the remarkable result of shaping, the range of α is determined to be 1.145° ≤  α ≤  1.437°. (5) Total number of stages of reshaper (k) The balls in the reinforced stage play a role in consolidating the shaping effect, so it is necessary to set up 1 stage to strengthen. For the shaping stage, in addition to the first and final stages of the shaping stage, at least two stages of balls should be set between these two stages to ensure that the reshaper has a more uniform shaping effect during the spinning process, so the total number of stages of reshaper should be at least 5 stages, as shown in Fig. 15. Fig. 15. Structure diagram of 5-stage reshaper According to the analysis of point (3), the minimum interval between each stage is 27.43 mm, and the number of shaping stages is not higher than 9. In addition, it is necessary to add another stage for reinforcement; then, the total number of stages of reshaper should not be higher than 10, so the range of k is determined to be k = 5, …, 10. 3. Constraint condition According to the simulation results in Section 2.2, the non-optimized shaper cannot repair the deformed casing with the axial deformation length of 300 mm and the minimum diameter of 110 mm. To ensure the integrity of the casing, the maximum equivalent stress of the casing is required to be lower than the strength limit, and the residual stress of the casing after Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 493 Optimization Method of Multi-parameter Coupling for a Hydraulic Rolling Reshaper Based on Factorial Design shaping is lower than the yield limit. Considering a certain safety margin (1 %), the maximum equivalent stress of the casing is lower than 923.67 MPa, and the residual stress is lower than 842.49 MPa. Therefore, the maximum plastic deformation of casing that can be shaped is 5.68 mm ((121.36 – 110) / 2 = 5.68 mm), and d should be less than 5.68 mm. 5.2 Response Surface Model OLHD is used to conduct scientific sampling in the feasible region of the design variables, and 50 sample points are obtained, which are brought into the finite element calculation module to calculate the corresponding responses, and the nonlinear interactive regression model of three response variables is established by stepwise regression, as shown in Eqs. (5) to (7). R 2 and R adj 2 of the three regression models are shown in Table 4, and it is considered that the regression models have high accuracy. pL D hh max     1639917 7983 16495 1436683 29129 3837 574 2 1 22   .7 79 5 6467 288 22 21 6 7975 14220 7975 63 1 1 1 . . . LD LL hhD Dh h         .. ., 51 37 4 1 LD Lh   (5) pD h kD D r       2668966 72108 197139 14 37 640 32808 314 4 1 1 2 1   .. 4 4054 507 1 861 20 91 1 11 32 Dh hD Dh    ., . (6) dL D hh     58 12 0 0221 0 50495 4 476 05 70 1845 1 2 .. .. ...  (7) Table 4. R 2 and R adj 2 of the regression model Responses R 2 [%] R adj 2 [%] p max 99.92 99.83 p r 97.39 95.76 D 99.55 99.44 To summarize, combined with Eqs. (5) to (7), the multi-parameter coupling optimization of the hydraulic rolling reshaper is transformed into an optimized mathematical model with constraints as max s.t .67 MPa 42.49 MPa mm m r dLDh k p p d (, ,,) . . max , 1 923 8 56 8 220     m mm m mm mm mm mm      L D h k 250 85 100 1 145 1 437 35 16 5 1 .. . ,...,   1 10 . (8) 5.3 Comparison of Optimization Results For the optimization problem of hydraulic rolling reshaper, the geometric parameters have both continuous and discrete variables, which will lead to a higher degree of nonlinearity in the optimization process. For such highly nonlinear optimization problems, a genetic algorithm is more advantageous [20]. The number of the initial population is 5000, the samples’ number for one iteration is 1000, the maximum allowable Pareto percentage is 70 %, the stable convergence percentage is 2 %, and the maximum number of iterations is 20 [21] and [22]. The iteration converges when the number of iterative evaluations is 13556, and the optimal solution of this optimization problem is obtained. The comparison with the structural parameters before the reshaper optimization is shown in Table 5. Table 5. Comparison of structural parameters of reshaper before and after optimization Geometrical parameters Non- optimization Optimization Design variables L [mm] 250.00 238.68 D 1 [mm] 100 100 α [°] 1.145 1.345 h [mm] 5.000 5.131 k [stage] 7 7 Other variables Axial distance of each stage [mm] 50.00 47.74 Length of reshaper [mm] 300.00 286.42 Equivalent diameter of stage 1 [mm] 110.00 110.26 Maximum equivalent diameter [mm] 120.00 121.41 The parametric finite element model is called again to simulate the shaping process of the deformed casing with an axial deformation length of 300 mm and a minimum diameter of 110 mm. The minimum Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 494 Li, H.F. – Luo, M. – Xu, T.T. – Li, Q.Z. – Hou, Y.M. diameter in the middle of the casing is a dangerous position in the shaping process; its shaping effect is also worthy of attention. Fig. 16 shows the distribution of plastic deformation at the minimum diameter of the casing before and after optimization. It can be seen that the shaping effect of the casing is more uniform while the plastic deformation of the casing is expanded. The maximum equivalent stress and radial displacement of the casing before and after optimization under different times are shown in Fig. 17, and the comparison of the evaluation parameters is shown in Table 6. Table 6. Comparison of the results of evaluation parameters before and after optimization Results comparison Is the casing reshaped safely? Effect of reshaping [%] p max [MPa] p r [MPa] d [mm] Optimization Yes 96.48 922.97 799.25 5.480 Non- optimization No / 933.00 809.38 4.920 Degree of optimization [%] / / -1.08 -1.25 11.38 Depending on the above chart, it can be seen that the optimal reshaper can safely repair the shrinkage deformation casing with a minimum deformation diameter of 110 mm and an axial deformation length of 300 mm. The shaping effect of the casing is the ratio of d to the maximum plastic deformation of the casing that can be shaped, so the shaping effect reaches 96.48 %. In addition, compared with the non-optimized reshaper, p max is reduced by 1.08 %, p r is reduced by 1.25 %, and the area of high-stress distribution on the Table 7. Comparison of evaluation parameters for repairing deformed casings before and after optimization Minimum diameter [mm] Evalua tion para meters Non-optimi zation Optimi zation Degree of optimi zation [%] Effect of reshap ing [%] 112 p max [MPa] 933.00 920.58 -1.33 96.30 p r [MPa] 793.38 804.97 1.46 d [mm] 3.725 4.507 20.99 114 p max [MPa] 932.19 920.1 -1.30 93.75 p r [MPa] 805.72 805.63 -0.01 d [mm] 2.758 3.450 25.09 116 p max [MPa] 930.45 917.76 -1.36 91.49 p r [MPa] 805.27 779.03 -3.26 d [mm] 1.676 2.452 46.30 118 p max [MPa] 852.77 908.2 6.50 93.21 p r [MPa] 564.26 739.6 31.07 d [mm] 0.542 1.566 188.93 deformed casing is reduced. Also, d is increased by 11.38 %, which can effectively improve the efficiency of workover. Fig. 16. Distribution of plastic deformation at the minimum diameter of the casing before and after optimization Furthermore, the reshaping effect of the casings with different deformation diameters before and after optimization is calculated, and the results and comparisons of the evaluation parameters are shown in Table 7. It can be seen from the table that the optimized reshaper can safely repair the deformed casing, and the reshaping effect of the casing and the single shaping ability of the reshaper are improved. 6 CONCLUSIONS The present work presents a multi-parameter coupling optimization method for the complex structure of a Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 495 Optimization Method of Multi-parameter Coupling for a Hydraulic Rolling Reshaper Based on Factorial Design hydraulic rolling reshaper. The deformed state and stress distribution of the casing during the shaping process are discussed in detail, and an optimization method for screening multi-factors is given. Some interesting conclusions can be drawn from the results: 1. Based on the structural characteristics and working principle of the hydraulic rolling reshaper, considering the dual nonlinear characteristics of the contact and material, a parametric finite element model of hydraulic rolling reshaper repairing shrinkage deformation casing is developed. 2. The orthogonal test is performed to analyse and screen the eight geometric parameters of the reshaper, and the following five structural parameters are determined which have a significant effect on the shaping effect: the main body diameter of the 1 st stage, exposed size of the ball, the reshaper’s taper, length of the shaping stage, and the total number of stages of the reshaper. 3. By analysing the coupling relationship between structural parameters and combining it with the processing requirements, the value range of the five significant factors is reasonably determined, the regression model of the responses is obtained by stepwise regression method, and the multi- parameter coupling optimization mathematical model of a hydraulic rolling reshaper is obtained. 4. The optimal structure of the reshaper is obtained after optimization: the main body diameter of the 1st stage is 100 mm, the exposed size of the ball is 5.131 mm, the reshaper’s taper is 1.345°, the length of the shaping stage is 238.68 mm, and the total stages of reshaper is 7. Moreover, the optimized reshaper can protect the casing better and improve the shaping effect of the casing with different deformation diameters, which can effectively improve the efficiency of the workover. In addition, to facilitate the calculation, the numerical simulation in this paper has been simplified to a certain extent. To better reflect the stress change and distribution law in the shaping process, more factors that may affect the shaping effect can be considered, such as: considering the rolling contact of the ball with the casing and the body of the reshaper, considering the change of high-temperature material properties in the shaping process and the influence of the initial residual stress of the casing on the shaping effect, etc., so as to further improve the level of simulation and improve the optimization results. 7 ACKNOWLEDGEMENTS The authors are thankful for the financial support of the National Natural Science Foundation of China [51674088] and the Natural Science Foundation of Heilongjiang [LH2021E011]. 8 REFERENCES [1] Jiang, D.M. (2004). The optimized research of the structure of plastic tool for repairing the destroyed casing well. Daqing Petroleum Institute, Daqing, p. 46. (in Chinese) [2] Chen, X.J., Wang, Z.C., Liu, H. (2005). Mechanical behavior of eccentric tube expander in shaping process. Oil-gas Field Surface Engineering, vol. 24, no. 1, p. 20, DOI:10.3969/j. issn.1006-6896.2005.01.011. (in Chinese) [3] Bai, H.L. (2016). Mechanics analysis of casing repair and optimum design for cone angle of shaper. China University of Petroleum (East China), Qingdao, p. 57-63. (in Chinese) a) b) Fig. 17. Correlation parameters of the casing before and after optimization under different times; a) maximum equivalent stress; and b) maximum radial displacement Strojniški vestnik - Journal of Mechanical Engineering 69(2023)11-12, 483-496 496 Li, H.F. – Luo, M. – Xu, T.T. – Li, Q.Z. – Hou, Y.M. [4] Lin, Y.H., Deng, K.H., Zeng, D.Z., Liu, W.Y., Zhu, H.J., Xie J., Zhou, Y., Wang, W.J. (2013). Numerical and experimental study on working mechanics of pear-shaped casing swage. Advances in Mechanical Engineering, vol. 5, art. ID 893723, DOI:10.1155/2013/893723. [5] Deng, K.H., Liu, W.Y., Liu, B., Lin, Y.H., Singh, A. (2019). Repairing force for deformed casing shaping with spinning casing swage and damage behavior of cement sheath. Applied Mathematical Modelling, vol. 70, p. 425-438, DOI:10.1016/j. apm.2019.01.042. [6] Luo, M., Jia, L., Gu, H.W., Leng, D.C., Shi, J.B., Li, Q. (2018). Experimental research and mechanical analysis of radial compression casing for hydraulic ball shaper. Chemical Engineering & Machinery, vol. 45, no. 5, p. 538-542, DOI:10.3969/j.issn.0254-6094.2018.05.003. (in Chinese) [7] Xu, T.T., Luo, M., Chi, X., Leng, D.C., Yin, W.J., Zhang, J.H. (2020). Mechanical analysis and single shaping limit research of casing rolling shaping. Machine Tool & Hydraulics, vol. 48, no. 5, p. 88-92, DOI:10.3969/j.issn.1001-3881.2020.05.019. (in Chinese) [8] Jin, C.J. (2022). Mechanical analysis and structural optimization of the shaping necking sleeve of the hydraulic ball shaper. Northeast Petroleum University, Daqing, p. 24-29, DOI:10.26995/d.cnki.gdqsc.2022.000 467. (in Chinese) [9] De Oliveira Araújo M.S., Dantas Grassi, E.N., Carlos de Araújo, J. (2021). Fatigue tests of superelastic NiTi wires: an analysis using factorial design in single cantilever bending. Smart Materials & Structures, vol. 30, no. 12, art. ID 125017, DOI:10.1088/1361-665X/ac2f82. [10] Zhang, F.B., Zhang, J.Q., Ni, H.J., Zhu, Y., Wang, X.X., Wan, X.F., Chen, K. (2021). Optimization of AlSi10MgMn alloy heat treatment process based on orthogonal test and grey relational analysis. Crystals, vol. 11, no. 4, art. ID 385, DOI:10.3390/cryst11040385. [11] Pohya, A.A., Kai, W., Kilian, T. (2022). Introducing variance- based global sensitivity analysis for uncertainty enabled operational and economic aircraft technology assessment. Aerospace Science and Technology, vol. 122, art. ID 107441, DOI:10.1016/j.ast.2022.107441. [12] Wang, D.F., Lu, F. (2015). Body-in-white lightweight based on multidisciplinary design optimization. Journal of Jilin University (Engineering and Technology Edition), vol. 45, no. 1, p. 29-37, DOI:10.13229/j.cnki.jdxbgxb201501005. (in Chinese) [13] Swain, G., Singh, S., Sonwani, R.K., Singh, R.S., Jaiswal, R.P., Rai, B. N. (2021). Removal of Acid Orange 7 dye in a packed bed bioreactor: Process optimization using response surface methodology and kinetic study. Bioresource Technology Reports, vol. 13, art. ID 100620, DOI:10.1016/j. biteb.2020.100620. [14] Salehnia, N., Ahn, J. (2022). Modelling and reconstructing tree ring growth index with climate variables through artificial intelligence and statistical methods. Ecological Indicators, vol. 134, art. ID 108496, DOI:10.1016/j.ecolind.2021.108496. [15] Ribeiro, R., Gama, J., Melo, L. (2014). Sectional analysis for volume determination and selection of volume equations for the Tapajos National Forest. Cerne, vol. 20, no. 4, p. 605-612, DOI:10.1590/010477 60201420041400. (in Potuguese) [16] Liu, B., Zhou, L. (2007). The design of material compositions of P110 resist collapse casing. Metal Materials and Metallurgy Engineering, vol. 185, no. 3, p. 14-18, DOI:10.3969/j. issn.1005-6084.2007.03.004. (in Chinese) [17] Medan, N., Banica, M. (2016). Taguchi versus full factorial design to determine the influence of process parameters on the impact forces produced by water jets used in sewer cleaning. IOP Conference Series: Materials Science and Engineering, vol. 161, no. 1, art. ID 012016, DOI:10.1088/1757-899X/161/1/012016. [18] Montgomery, D.C. (2013). Design and Analysis of Experiments. 8 th Edition. John Wiley & Sons Inc., New York. [19] Wang, Y., Wang, X.L., Zhang Z.L., Li, Y., Liu, H.L., Zhang, X., Hočevar, M. (2021). Optimization of a self-excited pulsed air- water jet nozzle based on the response surface methodology. Strojniški vestnik - Journal of Mechanical Engineering, vol. 67, no. 3, art. ID 75-87, DOI:10.5545/sv-jme.2020.6995. [20] Raji, M.F., Zhao, H., Monday, H.N. (2019). Fast optimization of sparse antenna array using numerical Green’s function and genetic algorithm. International Journal of Numerical Modelling Electronic Networks Devices and Fields, vol. 33, no. 4, art. ID e2554, DOI:10.1002/jnm.2544. [21] Yang, C.M., Ma, Y.Q., Liu, T.B., Ding, Y.C., Song, W.L. (2023). Lightweight optimization design of beam and column tool rest based on topology and MOGA algorithm. Mechanical Science and Technology for Aerospace Engineering, vol. 43, p. 1-9, DOI:10.13433/j.cnki.1003-8728.20230056. (in Chinese) [22] Van, A.L., Nguyen, T.T. (2022). Optimization of friction stir welding operation using optimal taguchi-based ANFIS and genetic algorithm. Strojniški vestnik - Journal of Mechanical Engineering, vol. 68, no.6, art. ID 424-438, DOI:10.5545/sv- jme.2022.111.