3D multiphysics model for the simulation of electrochemical machining of stainless steel (SS316)

In electrochemical machining (ECM) — a method that uses anodic dissolution to remove metal — it is extremely difficult to predict material removal and resulting surface finish due to the complex interaction between the numerous parameters available in the machining conditions. In this paper, it is argued that a 3D coupled multiphysics finite element model is a suitable way to further develop the ability to model the ECM process. This builds on the work of previous re-searchers and further claims that the overpotential available at the surface of the workpiece is a crucial factor in ensuring satisfactory results. As a validation example, a real-world problem for polishing via ECM of SS316 pipes is modelled and compared to empirical tests. Various physical and chemical effects, including those due to electrodynamics, fluid dynamic, and thermal and electrochemical phenomena, were in-corporated in the 3D geometric model of the proposed tool, workpiece, and electrolyte. Predictions were made for current density, conductivity, fluid velocity, temperature, and crucial-ly, with estimates of the deviations in overpotential. Results revealed a good agreement between simulation and experi-ment and these were sufficient not only to solve the immediate real problem presented but also to ensure that future additions to the technique could in the longer term lead to a better means of understanding a most useful manufacturing process.


Introduction
Electrochemical machining (ECM) is a manufacturing process which can generate, by anodic dissolution, complex geometries on conductive materials that, due to their high strength or low ductility, may be hard to machine using conventional manufacturing methods. ECM can also replace traditional mechanical surface finishing techniques, including grinding, milling, blasting, and buffing, in a process named electropolishing (similar to the work presented in this paper). It can be performed with minimal effect on workpiece physical properties and zero tool wear in ideal conditions, which is negligible in practice. Applications include the manufacture of turbine blades for gas jet engines as presented by [1] and later by [2], biomedical implants as presented by [3], and everyday products such as razor blades as presented by [4]. However, in order to increase the use of ECM within industry, better material removal prediction and tool design methods are still needed.
As explained by [5], in ECM, the workpiece material is removed by electrochemical dissolution when a current is induced via the application of a potential difference between the workpiece and the tool. The space between the tool (cathode) and the workpiece (anode) is known as the interelectrode gap and an electrolyte-e.g. aqueous NaCl or NaNO 3 solutionflows within it, removing dissolution products and gases such as hydrogen. Additionally, the electrolyte partially controls the system temperature. Ideally, the resulting workpiece profile would be a negative image of the tool but, as shown in [6], ECM is the result of a complex interaction of various physical and chemical phenomena such as the effects of electrodynamics, mass transfer, heat transfer, fluid dynamics, and electrochemical dissolution, which make the prediction of final workpiece shape difficult.
Diverse experimental and theoretical works have been carried out in order to solve these problems; however, in most of the studies, the ECM problem was reduced to a twodimensional (2D) model, and an accurate three-dimensional (3D) simulation of the ECM process is still under development. [7,8] developed a numerical simulation of ECM using a 2D model based on a moving boundary problem which was solved by using a finite element difference (FED) method. In parallel, Kozak [9][10][11] built a physical and mathematical model of the ECM process in order to find the optimal machining conditions and tool design that would lead to an expected workpiece profile. [12] reported the development of an empirical model based on the characteristic relationships within the ECM process parameters in order to increase its precision. Importantly, [13,14] reported the modelling of the electric field during electrochemical dissolution. They were able to calculate the current density at each point on the workpiece for the whole machining process. The results worked well for planar faces but an increased interelectrode gap was observed when applied to spherical shapes. Later, [5,15] presented their work on the 2D simulation of ECM, including chemical as well as other physical processes. Using a finite difference method, they produced predictions that were later validated experimentally. Small differences (up to 0.5 mm) between the simulated and experimental data were observed. These discrepancies were attributed mainly to variations in the valence of the metal during dissolution. It was not until 2004 that the simulation of ECM in a 3D environment was addressed. [16,17] worked on the development of a general numerical boundary element method for the ECM simulation in a 3D environment and the development of user-friendly software for this purpose. The effect of the overpotential at the electrodes in these models remained to be addressed.
When considering the inclusion of the diverse phenomena occurring during ECM, [9,18] developed 2D mathematical simulation models that took into account ohmic heating and gas fraction influence on the electrolyte conductivity. Later, [19,20] described in their studies the effects that the heat generated by electrode reactions has on the accuracy of the process. [21] have recently presented a semi-coupled multiphysics model that includes non-isothermal electrolyte flow in a 2D environment. They then used their results as a base for the simulation of the electrochemical material dissolution under a constant inlet velocity and temperature. Similarly, [22] built a multiphysics model for the use of ECM in the machining of an internal spiral hole using FEM.
Their model predicted the electrolyte velocity, temperature, conductivity, and-importantly-the volume of H 2 generated in bubble formation. Their results showed agreement (error within 20%) between the simulation and the experimental results; however, electrochemical effects such as the overpotential at the workpiece surface were not considered and the physical model was one-dimensional. Although the above experimental and theoretical works have been carried out in order to understand the ECM process, there still remains a need for a model that can integrate both, the physical and the chemical phenomena that occur during ECM in a 3D environment.

Methodology
The work described in this paper is part of a project where a multiphysics ECM simulation model was constructed by the authors, originally in a 2D environment, further developed into a 3D computational simulation, and subsequently linked with a real-world application example [23].
Using CAD software and an FEM package (COMSOL®), the development of a multiphysics time-dependant simulation model of the ECM process is outlined. This model integrates electrodynamics, fluid dynamics, heat transfer, and electrochemistry. The results are presented in a single solution and the final workpiece profile can be accurately predicted. The flexibility of the model and the methodology used for its construction give the user the opportunity to use any other geometry for analysis and simulation. Moreover, it has the added advantage of allowing the user to extract more information on the behaviour of the ECM process at any time stage. And, by considering sufficient data points, the surface finish can also be forecast. For validation, the output data was compared with experimental results where the process was applied to a realworld industrial problem that sought to improve surface quality of the internal face of stainless steel 316 (SS316) pipes as presented. The simulation results show good agreement with the experimental ones.
Previous work by the authors and others, as discussed, has led to progress in 3D simulation models for a set of machining conditions. This work adds to the more general past papers by studying real effects in a specific application. The initial motivation of the work reported here was to show a general 3D method that could simulate a wide variety of geometries and machining conditions in a coupled multiphysics based environment and to validate this by showing its application to a real problem (rather than presenting an optimised single simulation for that specific problem). However, further justification for the work resulted from a practical challenge. This was to attempt to simulate the machining of samples of stainless steel 316 pipes that were proving problematic to machine in a commercial environment and hence to help predict suitable set-up conditions for future manufacture. The intention of the machining was to clean up welded seam pipes so that they were sufficiently bright in all areas to be acceptable for end use by a customer. Initial samples exhibited areas of dark and pitted material and there was a wide variation in the quality of the finish across individual workpiece, suggesting that the result was sensitive to small changes in machining conditions.
In setting up the approach used, several questions arose, i.e. could 3D be justified to illustrate the general approach taken (even if it could not be proven to be optimal)? If so, what conditions for the FE simulation would be necessary and what factors should the simulation be exposed to? Previous work, e.g. [22], showed successful ways of using simple low dimensional approaches for solving some classes of problems. Initial inspection and measurements on sample workpiece and their associated known machining conditions showed that the weld-step was approximately 0.3 mm in depth and therefore that the interelectrode gap for such a set-up could vary between 2.00 and 2.30 mm. Given that the surface finish showed considerable variation around the pipe in the region of the weld-step, it was necessary to use at least a 2D approach. Additionally, the surface finish could be seen to vary along the length of the pipes and with very different and variable profiles in the slices along this length. Although the conditions giving rise to these variations were not yet known, it was clear that a 3D approach might prove necessary.
In order to generate necessary meshes for the 3D simulation, standard techniques would be adopted, i.e. to use variable meshing so that course meshes could be used in areas with little detail with the mesh becoming finer in areas where complex detail was. The mesh size would be chosen using a standard method that would produce ≥ 2 elements along any detail edge.
The machining conditions included in the simulation would initially be chosen based on past results and data from the literature; however, some variation would be made in experiments to find a suitable set. The final justification for the set chosen would be whether the simulations produced results that were in agreement with the physical samples. Figure 1 shows a photograph of the pipe sample used to validate the simulation. It is clear that the finish varies both around the pipe profile (i.e. with varying machining depthdiscussed later) and along the length of the pipe where other conditions may vary (e.g. temperature). Although several attempts were made to numerically characterise the surface finish, it was found that the best quality measurements came from visual inspections that were in accordance with the end-user specification.

Theory
Lu et al. [24] have shown that the complexity of the ECM process depends largely on the electrochemical phenomena affecting the current density in the interelectrode gap. Faraday's laws for electrolysis are employed for the theoretical analysis of the ECM process. This analysis is based on the following assumptions as described by [25]: 1) the tool and the workpiece are uniformly covered by electrolyte, 2) flow rate in the interelectrode gap is fully developed, 3) the electric field is quasi-stationary, 4) the processed material does not include impurities and is homogeneous, 5) the dissolution of the metal is only reaction on the anode and there are no other subreactions, 6) the metal is removed by only the dissolution.
These assumptions lead to the simplified formulation of the ECM process. Hence, considering the direct problem, where the tool's shape and trajectory are known, the workpiece copies iteratively the shape of the tool by electrochemically dissolving the material at its surface. The amount of material dissolved, m, is directly proportional to the electric current, I, flowing between the electrodes and can be expressed by Faraday's law, as described by [17]: where M (kg/mol) is the molar mass of the anode, z n is the valence of the anode, F is the Faraday's constant (96,458 C/mol), and t (s) is the total process time. The simulation is stopped when the solution reaches equilibrium and the final workpiece geometry is a negative profile of the tool shape. Assuming that the current is wholly responsible for workpiece dissolution, the local variation of the anode dissolution Δy (m), for a certain time step Δt, is: where ρ a (kg/m 3 ) is the anode density and J (A/m 2 ) is the current density.
Since the electrolytes are the conductors of the electricity, the current flow across the interelectrode gap through the electrolyte is subject to Ohm's law. As shown by [26], if the applied voltage V 1 is assumed sufficient for the establishment of field lines perpendicular to the electrodes, I is directly related to the applied voltage according to: where k e (S/m) is the electrolyte conductivity, y (m) is the interelectrode gap, V 0 (V) is the overpotential (minimal voltage required at the two electrodes to start the migration of ions), and A (m 2 ) is the tool surface area.
Assuming that the electrolyte flows within the interelectrode gap at a sufficiently high flow rate, Q, to remove the machining products, they will not significantly affect the electrolyte conductivity. Therefore, k e is assumed constant throughout the experiment, and as [26][27][28] demonstrated, the current density, J, can be described by Ohm's law in differential form where Φ is the electrical potential distribution, as shown in Eq. (4): 3.1 Multiphysics model The simulation model presented in this work was developed based on an overpotential model coupled with fluid flow and Joule heating effects as these were conjectured to be the principal phenomena affecting material dissolution. Gas evolution was not considered at this stage of the work and was not identified as a major factor in predicting reasonable results.

Joule heating
Joule heating q describes heat generated when an electric current passes through a conductor, i.e. the electrolyte within the interelectrode gap during ECM, according to Eq. (5): J depends on the machining parameters, e.g. V 1 , I, and y, as well as the properties of the electrolyte, e.g. conductivity (k e ) and temperature (T). The electric field (E) in turn depends on the potential difference and the resistivity of the electrolyte. Deconinck et al. [22] showed that the electrolyte temperature T varies according to Eq. (6): where ρ (kg/m 3 ) is the electrolyte density, C (J/kg K) is the specific heat, T (K) is the temperature, u (m/s) is the velocity, and k (W/m K) is the thermal conductivity of the electrolyte. Additionally, the surface-to-ambient radiation emissivity of the material has to be defined.

Fluid flow
The mathematical model for the electrolyte flow is established by combining theoretical modelling with practical experience.
McGeough [29] stated that for assuming a fully developed velocity profile for ECM simulation, a high electrolyte flow should be pumped into the interelectrode gap. In an ideal case, the electrolyte drags the ECM products; hence, the effect of any sludge or gas bubbles in the electrolyte can be considered negligible due to the small volume ratio. The electrolyte is assumed incompressible and laminar according to [22,30]. The fluid profile should meet Eq. (7) [22,31]: where p (N/m 2 ) is the pressure of the electrolyte, I is the identity matrix, μ (kg/m s) is the electrolyte dynamic viscosity, and F (N/m 3 ) is the volume force. F between the electrodes and the electrolyte is small enough to be ignored. Moreover, previous works by [32,33] demonstrated that the electrolyte flow affects the overpotential during the ECM process and in turn the final surface finish of the workpiece.

Simulation of the machining interelectrode gap 4.1 Geometry
The simulation model developed is based on the initial results of experimental work carried out to investigate the internal machining weld areas, on the inside face and along the seam, of stainless steel pipes (SS316). Figure 1 shows a photograph of the pipe used as a workpiece.
The workpiece is a commercial SS316 pipe of 170-mm length and 38.1-mm diameter, which was manufactured by rolling and welding along the seam. The original material, prior to processing, is dark and opaque and the surface quality is uniform along the pipe. The welding process leaves behind a weld-flash at the interior face of the pipe. The weld-flash is of interest because it causes a step (welding-step) of 3 × 10 −4 m in the internal surface of the pipe. It is necessary to remove the weld primarily to assure a smooth and bright surface finish. The exterior of the pipe is not treated.
The tool is a cylindrical solid bar of stainless steel, with a radius 2, 4, or 8 mm smaller than the inner radius of the pipe (workpiece). The tool is placed concentrically inside the pipe; thus, the interelectrode gap is the annular area limited on the inside by the tool and on the outside by the internal face of the pipe.
The geometry defined for the present work relates to the annular shape of the interelectrode gap and was constructed as a 3D CAD model. The tool is the inner boundary (inner cylinder in Fig. 2a) and the pipe is the outer boundary (outer cylinder in Fig. 2a) of the model. In Fig. 2b, the top view of the assembly is presented. A section subtending 30°of the cylinders is taken at the area centred on the welding-step that allows the simulation of the effects of the electrochemical dissolution in both, the pipe and the weld, and to evaluate the effects of having a 3D geometry instead of a 2D profile. Figure 2c shows the 30°section of the interelectrode gap limited on the sides for the two straight lines. Figure 2d presents a close view of the weld-step.
One of the advantages of developing a computational simulation model is that knowing the correspondent input parameters, it is possible to simulate just a section of the pipe, 30 mm for this case, where all the physics can be applied regardless of the size and position of the section in the actual pipe. Figure 2c shows the profile of the 30°, 30-mm model used for the simulation.
The final parameterised model shown in Fig. 2c and d is then exported to the multiphysics FE package.

Working conditions
The workpiece properties are shown in Table 1. The notation used corresponds to the variables and parameters in the FE package.
The electrolyte properties of primary interest for the simulation are the inlet temperature and electrical conductivity. The electrolyte considered is a solution of sodium nitrate (NaNO 3 ), with specific gravity (S.G.) 1.15, at a concentration of 22%. The electrolyte electrical conductivity and density are temperature-dependent; hence, the initial temperature, T e , is introduced in the model, and the values for the equations of conductivity and density are extracted from experimental values published by [34] and presented in Fig. 3. Additionally, the electrolyte flow rate, Q, has to be established.

Incorporating electrochemistry
The electrode electrochemical activity, depicted by the overpotential, was included in the present simulation model. Muir et al. [35] highlighted the effect of the overpotential in the ECM behaviour; namely, low overpotential favours repassivation and high overpotential favours the removal of the characteristic oxide film at the SS316 surface. The is placed concentric to the workpiece (outer cylinder). b Top view of the array. The interelectrode gap is the annular area between the tool and the workpiece. c 30°section of the 2mm interelectrode gap within the circumference and 30 mm along the pipe modelled for the computational simulation of the ECM process in 3D perspective. d Close view of the weld-step overpotential behaviour used for the present simulation model has been determined by extracting experimental values from [36] and using these in Eq. (8): Rosset et al. data presented in Fig. 4 corresponds to a 39% NaNO 3 solution instead of the 22% NaNO 3 solution considered from the experimental trials. Rosset et al. data was the closest data available in literature, and as it can be observed from [37] work, the overpotential trend is usually the same; hence, it was assumed that by using Rosset data, the error will be small. For future work, more experimental data would be needed to include in this simulation the exact overpotential data for the simulation conditions; however, the acquisition of this experimental data was out of the scope of the present work.

Boundary conditions
The boundary conditions in the simulation model define the problem, i.e. the normal electric current through the electrolyte and the electric potential at the electrodes define the behaviour of the electric reactions, and by specifying the flow at the inlet, outlet, and walls, the fluid flow is constrained. Moreover, according to Faraday's law and Ohm's law, the anode and cathode boundaries should satisfy particular potential conditions: where ϕ anode and ϕ cathode are the electric potential at the workpiece and tool, respectively, and nJ side is the normal current density at the side boundaries of the model, as shown in Fig. 5.
The aim is to find an anode boundary which can satisfy the Laplace equation for the electric potential distribution ∇ 2 ϕ, within the ECM gap domain, and all boundary conditions listed in Eqs. (9)- (11).
Since the tool is static, f = 0 m/s, the simulation is stopped after 10 s machining time, in contrast with previous works where the simulation is stopped when the convergence of Laplace's equation is found. This corresponds to the actual machining regime.
The initial electrolyte temperature, T e , was set to 7 or 15.3°C. The tool (upper boundary) and the workpiece (lower boundary) were defined as walls of the model and it was assumed that there was no heat transfer through the walls. The short lateral sides were considered open boundaries.
Due to the fact that just one section of the pipe length was considered, the initial flow velocity values were not zero but

Meshing
The mesh for the FEM is constructed using an adaptive tetrahedral mesh. This mesh is denser (finer) in the weld-step area of the simulation geometry. The increased number of the mesh elements in the areas of interest achieves higher accuracy in that area whilst maintaining a coarser mesh in the rest of the simulation geometry in an attempt to optimise computational resources. Figure 6 shows the meshed interelectrode gap where the elements can be readily seen to become finer and the mesh denser in the area close to the weld-step. The element sizes used were of side length of maximum 0.002 m and a minimum of 2.5 × 10 -4 m. The maximum element growth rate (size difference between adjacent elements) is 1.7. For the simulation of the movement of the tool and the dissolution of the workpiece, i.e. the change of the interelectrode gap, an arbitrary Lagrangian-Eulerian (ALE) formulation was used. The mesh attached to the tool was fixed; thus, their velocity in each axis direction, v x , v y , and v z was equal to 0 m/s. The mesh attached to the workpiece moved according to Eqs. (1) and (2). The mesh attached to the sides of the model is fixed in the x-y plane; hence, v x and v y = 0 m/s and free in v z with respect to the global coordinate system. Table 2 presents a summary of the variables which can be controlled in the ECM process. Interelectrode gap is varied between 2, 4, and 8 mm; voltage V 1 , between 18, 24, and 36 V; electrolyte flow rate Q, between 1.7 × 10 −4 , 4.2 × 10 −4 , 6.7 × 10 −4 , and 10 × 10 −4 m 3 /s (10,25,40, and 60 L/min); and inlet electrolyte temperature T e , between 7 and 15.3°C (280.15, 288.45 K).

5.1
Electric potential distribution ϕ, overpotential V 0, and current density J Figure 7 shows the electric potential distribution within the interelectrode gap. Additionally, the overpotential variations (depending on the interelectrode gap and V 1 ) can be observed. The results agree with previous works of [38,39], where the overpotential is higher at smaller gaps. Additionally, as shown by [40], V 0 is directly related with V 1 . Moreover, Fig. 7 shows that J is inversely proportional to the interelectrode gap and directly related with V 1 .  The electrolyte flow, Q, in the interelectrode gap is depicted in Fig. 8. The electrolyte enters for the front of the geometry and exits at the back of it. The inlet flow rate is set uniform, and the entrance effects are neglected. The highest velocity values of the electrolyte are observed in the centre of the interelectrode gap and the lower ones at the walls (tool and workpiece boundaries); this forms the expected parabolic flow profile. The lateral sides are considered open. Some turbulence is expected close to the weld-step. From Fig. 8a, it can be observed that at low flow rates (< 10 L/min, 1.7 × 10 −4 m 3 /s), the laminar boundary layer (layer of fluid in the immediate vicinity of the wall) is more evident.

Temperature, T
In parallel, the electrochemical dissolution of the workpiece generates heat due to Joule heating. [19,20] demonstrated that there is an increase of the electrolyte temperature at the vicinity of the tool during ECM. The results in the present work show a difference, of about 1°C, but the same behaviour is observed. Additionally, an increase of the electrolyte temperature between the entrance and the exit of the interelectrode gap was observed and it can be depicted in Fig. 9.
As explained by [21], a homogeneous temperature distribution is aimed during the ECM in order to maintain k e stable and in turn, J. At higher temperature, k e and J rise. There is an evident relationship between the overvoltage and the current density. A variation in V 0 is evidence of a change in the electrochemical reactions.
The role of the electrolyte flow rate is twofold: it flushes away the metal ions (ECM products) dissolved from the anode before they can reach the cathode and, at the same time, mitigates the temperature increase of the system. The heat generated during the ECM process should be well dissipated, as it is known that the electric conductivity is directly related with the temperature of the electrolyte and demonstrated by [20,41]. When the conductivity changes, the electrochemical reactions during the ECM also change. Moreover, the electrolyte conductivity plays a crucial role in J. The conductivity, in turn, is also dependent on the electrolyte flow rate and the electrolyte concentration, as shown by [42], thus affecting the overall outcome.
The difference in temperature within the sample may be also affected by the interelectrode gap. ECM products are more easily accumulated in a small gap than in a larger one. If the electrolyte velocity within the interelectrode gap is not enough, some ECM products may be accumulated at the end of the pipe, provoking a change in the concentration and conductivity of the electrolyte at this point, hence a change in the temperature of the electrolyte.

Workpiece shape development
The workpiece profile after 10 s of simulated ECM is presented in Fig. 10. As expected, the dissolution is not only normal to the workpiece surface but also lateral (to  the sides of the weld-step). J is inversely related to the gap; hence, smaller gaps show higher J. Figure 10c shows how the current density is different in the weldstep; as "sharp" corners provoke an increase of the current density, this has been observed previously in theoretical work [43] and experimental work [30] in the form of marks (ridges) on the workpiece surface. For quantitative geometry analysis, the deformation can be related with the material removed. From works of [44,45], the material removed (or in the simulation model, the deformation of the workpiece profile) is directly related with V 1 , V 0 , and J during ECM. The current work presents this effect in a 3D environment. Moreover, the surface finish at the end of the process can be predicted and it can vary along the workpiece (hence, the requirement for a 3D model)

Surface finish
The 3D ECM simulation model developed in the present work was applied to reproduce an experimental ECM process. Two samples with different final surface finish after ECM were considered, being case 1, a reflective and bright surface finish (average roughness of 116 nm measured with a Mitutoyo® profilometer) and case 2, a passivated surface finish (average roughness of 540 nm was measured with a Mitutoyo® profilometer). Figure 11 presents the samples chosen. As demonstrated by [32,33], the final surface finish on the SS316 samples depends on the electrochemical dissolution of the characteristic protective oxide film that is usually formed on their surfaces. An electrochemically polished (reflective and bright) surface is usually associated with the random but even removal of atoms from the anode surface. The common problem of a non-or partial breakdown of the oxide film results in passivated or non-uniform surface finish of the workpiece as shown in [33] work.

Electrolyte flow velocity
As a first approximation, a fully developed laminar flow is considered in both cases accordingly to [22,30]. From previous works from [32,33], Q higher than 20 L/min is usually needed for achieving reflective and bright surface finish. This is in agreement with the experimental results presented here, where Q = 25 L/min (4.2 × 10 −4 m 3 /s) generated a reflective and bright surface finish, and Q = 10 L/min (1.7 × 10 −4 m 3 /s) generated a passivated surface finish. From the simulation results, a maximum velocity of 1.573 and 1.092 m/s for case 1 and case 2, respectively, was achieved. These values correspond to a transitional flow and not to a laminar flow as considered initially for the simulation. However, as shown by [46] and despite their attempts to find the actual flow regime in a concentric annular pipe similar to the array presented in this work, an accurate solution still needs to be developed and it is out of the scope of this work. A turbulent flow promotes the breakdown and removal of the oxide film at the surface of the SS316 sample as demonstrated by [47], but in a transitional flow, a laminar boundary layer may be protecting the oxide film from breaking, hence generating a non-uniform or a passivated surface finish as observed in Fig. 11b.

Joule heating
Data et al. [48] showed that electrochemical reactions depend strongly on electrolyte temperature and [49] demonstrated that the electrolyte conductivity is proportional to temperature; hence, with the temperature increase due to Joule heating, the conductivity increases and favours the electrochemical reactions. This means that the overpotential gets high enough to promote the dissolution, breaking the oxide film on the sample surface. In the experimental samples, a higher temperature in case 1 generated a reflective and bright surface finish and in case 2, a lower temperature generated a passivated surface temperature. Additionally, the electrolyte temperature increases as the electrolyte flows along the length of the pipe; this difference between the inlet and outlet electrolyte temperature is expected to affect the electrochemical reactions and the surface finish uniformity of the samples. Figure 12 presents the experimental results from the application of ECM on the internal face of SS316 pipes. The experimental results illustrate that for a reflective and bright surface finish, a high current density (J > 5 × 10 4 A/m 2 ) is needed, and if the current density is lower, a passivated surface finish is attained. Focussing on this current density, J, the simulation results agree with the values expected from the experimental The overpotential has been shown to be one of the main parameters that determine the surface finish in SS316 samples machined by ECM. From the experimental works of [32,33], V 0 higher than 9 V is expected for a reflective and bright surface finish and V 0 lower than 6 V is associated with a passivated surface finish. The experimental results for case 1 and case 2 show a V 0 = 10.4 V and V 0 = 6.2 V, respectively; however, from the simulation results, V 0 = 4.3 V and V 0 = 2.9 V for case 1 and case 2, respectively, were attained. Even though, the trend in the simulation results is as anticipated, i.e. a higher overpotential for case 1 and a lower overpotential for case 2, the numerical difference is important. This difference between the simulated and the experimental values could be attributed to possible electrical losses not considered in the simulation model or errors in measuring the parameters during the experimental ECM. Moreover, the electric current was assumed constant for all the processes; however, previous work by [33] demonstrated how the current increases with time until reaching an almost stable value after 250 s, while the tests presented here last 10 s.

Electrochemistry
Even though a good agreement is found between the results presented in this work and the published literature, there are still some discrepancies between the simulation and the experimental results. As pointed out by [43], the main causes affecting the FE solution might be: & Lateral boundaries insulation. According to the FE model, the lateral boundaries have been insulated; however, in the actual ECM process, these gap boundaries are open. & Curvature changes. The sharp geometry in the weld-step generates a concentration point for the electric potential distribution, the current density, and the fluid flow, which results in excessive deformation of the local mesh elements, which in turn affects the entire model.

Conclusions
An enhanced method for the simulation of the ECM process in a 3D environment was presented in this work. The workpiece material properties, machining parameters, and electrolyte characteristics are provided as input parameters, i.e. interelectrode gap, voltage applied, electrolyte flow rate, and electrolyte inlet temperature. COMSOL Multiphysics® was used to close coupling the thermo/flow/electro aspects of the ECM process, developing a multiphysics simulation model. The software was able to merge the results in a single solution that enables the extraction of information about the ECM process at any time during the ECM simulation. In the present work, the electric potential distribution, the overpotential, the current density, the electrolyte flow profile, and the temperature distribution were extracted. The final workpiece geometry was obtained using this simulation model and, by harvesting the driving parameters of the ECM simulation data, a good prediction of the surface finish was successfully achieved. However, considerable future work in specific conditions may be needed to fully understand system behaviour in this respect.
Simulation results were compared with experimental work and good agreement between them was found. The results followed the expected trend, i.e. a higher overpotential and current density is needed for a reflective and bright surface finish (case 1) than for a passivated one (case 2). However, the numerical values were lower than expected. A reason for this might be that the electrical current was considered constant during the ECM process and the efficiency of the process was not included in the ECM simulation model. For further work, this efficiency should be acknowledged in order to enhance the simulation results. More experimental data and further development of the model including the effect of gas evolution are still needed to enhance the accuracy of the results and will be presented in future work.
The use of the present simulation model enables the user to eliminate a priori the range of tool-workpiece-machining parameter configurations that would not deliver the expected Fig. 12 Experimental results of J and V 0 of the ECM on SS316 pipes in relation with the surface finish: passivated entrance-reflective and bright exit (rhomboids), reflective and bright (squares), reflective and dark (triangles), and passivated (circles) Fig. 11 Surface finish photograph of the samples for a case 1, surface finish: reflective and bright, 24 V, 25 L/min (4.2 × 10 -4 m 3 /s), 4-mm gap; b case 2, surface finish: passivated, 24 V, 10 L/min (1.7 × 10 -4 m 3 /s), 8-mm gap result, saving time and resources in the ECM and tool design process. Moreover, this model can easily be modified in order to be applied in various geometries and different materials.