1 Introduction

Electrical discharge machining (EDM) is a manufacturing process that consists in removing parts of a material with electrical discharges and is characterized by its ability to machine any conductive material regardless of its hardness [1].

Fig. 1
figure 1

Principle of EDM

Although various forms of EDM exist, all of them share the same concept as described in Fig. 1. Two electrodes (the tool and the workpiece) are separated by a dielectric fluid. Both electrodes are submitted to an electrical current and as the gap between the electrodes diminishes, the intensity between them increases until it reaches what is called the dielectric breakdown voltage. At this point, the dielectric cannot act as an insulator anymore and allows current to flow from one electrode to another leading to the apparition of a plasma channel. The plasma’s temperature ranges from 8000 to 12,000 \(^{\circ }\)C and in some cases can reach up to 20,000 \(^{\circ }\)C [2]. This leads to evaporation and melting of both the tool and the workpiece. When the current is stopped, the dielectric fluid rushes back where the plasma stood and evacuates resulting debris.

Fig. 2
figure 2

Tool wear influence in EDM. a Tool and workpiece before machining. b Tool and workpiece after machining. The black workpiece is the desired final profile while the orange one is the actual profile that is obtained

Micro-EDM (\(\mu \)EDM) shares the same underlying concepts of EDM. It simply tackles with dimensions in the order of the micron. However, while the process setup is modified in order to reduce its effect, tool wear often becomes the main factor of imprecision. Figure 2 describes the tool wear phenomenon. As material is removed from the workpiece, craters also appear on the tool, changing its shape. This is what is referred to as tool wear. As the process goes on, change in the shape of the tool can be drastic and, in the scope of \(\mu \)EDM, has major repercussions on the final profile of the workpiece. While this phenomenon also occurs in classical EDM, its influence on the final shape is significantly smaller. When using conventional machining strategies, the electrodes’ shapes quickly deviates from the original ones. Thus, as of now, \(\mu \)EDM milling is the preferred machining strategy for the fact that proven methods exist to mitigate the influence of tool wear on the final result [3], while for similar applications die-sinking \(\mu \)EDM may require a dozen or more tools before obtaining the desired geometrical tolerances. Being able to predict the tool wear more accurately would enable us to design more efficient machining strategies [4], in particular for die-sinking EDM where using extra volumes on specific parts of a tool electrode could compensate partially for the wear and drastically reduce the number of electrodes required. To achieve this, a better theoretical understanding of the wear phenomena is required so as to be able to simulate a priori, i.e., before machining, the expected final shape as well as the surface’s roughness.

Until now, most modeling works that have been conducted focus on the development of single crater (or single spark) models in which physical equations are used under certain assumptions to determine the shape of the resulting craters of a single spark. A few have proposed simulation methods of \(\mu \)EDM usually using a grid of points to model the involved geometries [5, 6]. Those existing methods result in inaccurate surfaces with discontinuity predicted as steps and sharp corners, which might be the cause of significant cumulative errors in surface approximation when simulating a long sequence of discharges. A more detailed analysis is proposed in Sect. 2.1.

Against this background, our aim is to develop a new approach for the accurate modeling of the local deformations altering the complex 3D shaped micro-electrodes. In order to do so, and instead of using a cloud of points to model the geometries, the use of parametric surfaces is made in order to preserve continuity. The idea is to mimic the iterative crater-by-crater appearing phenomenon through an iterative surface warping approach. At each step, the warping vector and function are computed so as to be able to generate a spherical crater whose volume is also controlled. Thus, through hundreds of thousands of local surface warping, the method is able to compute the global as well as the local shapes of the tool and workpiece. More precisely, the proposed approach has the following advantages:

  • it uses NURBS to define the geometries to be able to model complex shapes at different resolutions: shape of the craters locally, and shape of the wear globally;

  • it mimics the physical \(\mu \)EDM process while performing local surface warping to generate micro-craters;

  • it is driven by physical parameters so as to generate an accurate approximation of the wear and roughness;

  • it can be inserted in a shape optimization loop so as to find the optimal shape of the initial tool that would produce a targeted workpiece.

Considering the first advantage, it is clear that the proposed approach is completely different from the existing surface deformation techniques found in the literature (see Sect. 2.2). Through a huge amount of local deformations, the method can evaluate the overall tool wear as well as the workpiece’s roughness. This underlines the multi-resolution character of the proposed approach even if multi-resolution surfaces are not used. Considering the last above mentioned advantage, our final aim is to be able to set up a complete shape optimization framework that would help finding the shape of the initial tool to be used to obtain a targeted workpiece after machining. Of course, the proposed crater-by-crater simulation method is part of this framework. It is called several times during the optimization.

The paper is decomposed as follows. First, Sect. 2 reviews the state-of-the-art in both \(\mu \)EDM modeling and surface deformation techniques. Then, the crater-by-crater deformation technique is presented and detailed in Sect. 3. In Sect. 4, the proposed approach is then validated through several experimentations where numerically simulated magnitudes are compared to experimentally measured ones. The final section concludes this paper and sketches future perspectives.

2 Literature review

Since our approach is based on an iterative surface warping driven by physical parameters derived from the real \(\mu \)EDM process, this section will review the state-of-the-art in both \(\mu \)EDM modeling and surface deformation.

2.1 \(\mu \)EDM modeling

2.1.1 Introduction

Electrical discharge machining can be considered as a heat transmission problem for which the temperature distribution in the workpiece shall be sought in order to determine the shape of the crater. Three main components are to be studied: energy distribution, size and shape of the discharge channel and material ejection. A portion of the energy is evacuated in the dielectric and by radiation, another portion is evacuated in both electrodes by conduction and a negligible part is lost by convection in the workpiece. The exact repartition of the thermal energy relies on different factors that include the boiling temperature of the electrodes.

Finally material evacuation has to be considered. Unfortunately all of the molten metal is not evacuated by the dielectric fluid and considering so will lead to a theoretical material removal rate (MRR) that will be greater than experimental data. This introduces the concept of plasma flushing efficiency which is defined by the fraction of the molten metal that is actually removed. Work by Descoeudre et al. [7] has established that the plasma flushing efficiency is dependent on the thermal expansion coefficient of the electrode, the amount of molten material, the plasma channel radius, the thermal properties of material and the flushing conditions.

2.1.2 Thermo-electrical modelling

These EDM erosion models are based on the research of solutions for the heat conduction problem described by the following differential equation:

$$\begin{aligned} {\partial T \over \partial t} - {\alpha }{\Delta T} = {0} \end{aligned}$$
(1)

where T is the temperature (K) and \(\Delta \) is the Laplace operator.

$$\begin{aligned} \text {with } \alpha = {K_t \over \rho C_p} \end{aligned}$$
(2)

where \(K_t\) is the thermal conductivity of the material (in W m\(^{-1}\) K\(^{-1}\)), \(\rho \) is the density (kg m\(^{-3}\)) and \(C_p\) is the specific heat capacity (J kg\(^{-1}\) K\(^{-1}\)). Some models take the melting heat m into account in the formulation of the thermal diffusivity:

$$\begin{aligned} \alpha ^{\prime } = {K_t \over \rho (C_p + { m \over T_m})} \end{aligned}$$
(3)

where \(T_m\) is the melting temperature of the material.

The boundary conditions relate to the geometry being considered. Several approaches of the problem exist. Some have used a semi-infinite cylinder, a disk heat input and assumed that the energy was equally shared among the cathode and anode [8, 9]. This was followed by a model using a two-dimensional heat flow model bounded by an adiabatic cylinder [10]. Dibitonto et al. [11] used different sources for each electrode: a disk heat source for the anode and a point heat source for the cathode erosion. Another element of the boundary conditions is the plasma heat flux that can be defined as the following in the case of an uniform temperature distribution:

$$\begin{aligned} q = \left\{ \begin{array}{l l} F_c {UI \over \pi r_c^2} &{} \quad \text {disk source}\\ q_0 &{} \quad \text {point source} \end{array} \right. \end{aligned}$$
(4)

where \(F_c\) is the fraction of energy being transferred, U is the gap voltage applied to the electrodes, I is the current, \(q_0\) is a constant and \(r_c\) is the plasma channel radius.

It has been observed that there is variation in the plasma radius. There is an expansion followed by stabilization. A common function describing the plasma radius, \(R_{\mathrm{plasma}}(t)\) as a function of time is given as follows:

$$\begin{aligned} R_{\mathrm{plasma}}(t) = K t^{n} \end{aligned}$$
(5)

where K and n are coefficients depending on the machining parameters and material properties. Those values are determined empirically.

Concerning the plasma heat flux, researchers have established that the temperature distribution in the plasma channel is not uniform and have adopted a Gaussian distribution as following [7]:

$$\begin{aligned} q(r,t)={F_c U I t_{{\rm ON}} \over 2 \pi R_{\mathrm{plasma}}(t)}e^{-4.5r^2/R^2_{\mathrm{plasma}}(t)} \end{aligned}$$
(6)

where \(t_{{\rm ON}}\) is the duration of the spark.

Fig. 3
figure 3

Parameterisation of beck’s model

In order to provide a better understanding of the various elements that have been described, a model from Beck is presented here in more details [12]. As visible on the parameterisation described on Fig. 3, the heat source used is that of a disk. The geometry is a semi-infinite cylinder insulated everywhere except for the region in contact with the heat flux. Solving Eq. 1 yields the following solution:

$$\begin{aligned} T(r,z,t) = T_i + {2 q \cdot r_c \over K_t} \left( {r_c B(z,t) \over r_0^2} + \sum _{i=1}^{\infty } { C_i(z,t)J_0(\lambda _ir)J_1(\lambda _ir_c)\over 2[\lambda _ir_cJ_0(\lambda _ir_c)]^2} \right) \end{aligned}$$
(7)

where \(T_i\) is the initial temperature, \(J_0\) and \(J_1\) are the Bessel functions of the first kind of the first and second order respectively and \(\lambda _n\) are the roots of \(J_1(\lambda _nr_0)\) and:

$$\begin{aligned} B(z,t)=\sqrt{\alpha t} \cdot \mathrm {ierfc}\left( {z \over 2\sqrt{\alpha t}}\right) \end{aligned}$$
(8)
$$\begin{aligned}C_i(z,t) & = e^{-z \lambda _i} \left( 1 + \mathrm {erf}\left[ \lambda_i\sqrt{\alpha t}-{z \over 2 \sqrt{\alpha t}}\right] \right) \\ & \quad - e^{z\lambda _i} \mathrm {erfc} \left[ \lambda _i \sqrt{\alpha t}+{z \over 2 \sqrt{\alpha t}}\right]\end{aligned}$$
(9)

Using the material properties for aluminium and process parameters observed experimentally, it is possible to draw the temperature distribution using Eq. 7 (see Fig. 4).

Fig. 4
figure 4

Temperature distribution from Beck’s model

From this, it is possible to define the shape of a crater by defining an isotherm on the figure which is usually chosen as the melting temperature affected by a coefficient in order to take into account material that is melted but not flushed away.

2.1.3 Electro-mechanical modeling

An electro-mechanical model for EDM is convenient in the case of short spark duration as the material isn’t sufficiently exposed in order to heat. Singh et al. [13] have proposed such a model exploiting the stress induced by electrostatic forces. This model is based on the assumption that the plasma region is electrically neutral as the positive ion density is nearly equal to the electron density. The potential difference can’t be accommodated in this neutral region creating a thin sheath near the cathode where there is a charge imbalance and where the potential gradient is formed. The presence of such a sheath creates a strong electrical field at the cathode that induces a negative charge. This surface charge is pulled outwards by the field resulting in stress. The research concludes with the observation that at low duration pulses, the crater depth is independent of the spark duration.

2.1.4 Geometric modeling

Geometric modeling is opposed to the previous models in the fact that it is based on simulation and not formulation. The concept lies in knowing the geometry of the tool and the workpiece and that one can derive the gap separating these two elements. This enables us to determine the probability that a discharge will occur between two points. Once the most probable discharge location is determined, removal on both the electrode and the workpiece can be assessed. Most models deal with two dimensional axisymmetric geometries [14]. A 2D geometry profile is extracted from the 3D geometry. The profile is then expressed as a discrete function, i.e., a set of points. The algorithm then proceeds to determine the discharge location and deleting the relevant nodes.

2.1.5 Conclusion

Most of the theoretical models mainly tackle with the modeling of a single discharge in order to derive the resulting crater shape and dimensions. None of these methods provide a satisfying solution for the simulation of an entire process mainly due to the fact that the calculations involved are very long for a single crater. Considering that hundreds of thousands of discharges can occur in a single process, the computation time factor is quite relevant. A recent geometrical effort involving the use of a Z-map has been developed specifically for the case of \(\mu \)EDM milling with good results [15]. However the inherent limitations of a Z-map have led to the idea of developing a purely geometrical method mainly focused on providing an accurate representation of the resulting geometries as well as decent computation speed.

From this analysis, it clearly appears that there is a need for developing a 3D surface deformation technique which should not have to solve complex PDE at each step. Hence, as illustrated on Fig. 4, such an approach has to be able to model one-by-one the apparition of sphere-like craters so as to follow an isotherm whose shape are driven by pre-processed physical parameters of the \(\mu \)EDM process.

2.2 Surface deformation techniques

As mentioned previously, simulation efforts of the \(\mu \)EDM process have focused on the use of a cloud of points (usually set in a regular grid). In order to eliminate the issue of interpolation approximation, the proposed approach will make use of a parametric surface as the deformable geometry. As a result, the different deformation techniques that are available to that specific geometric representation will be discussed. Of course, deformation techniques have been proposed in many different fields and on many representations [16, 17]. Additionally, with the purpose of avoiding expensive computations as much as possible, only purely geometric deformation techniques will be studied. Approaches that make use of physical equations or properties won’t be discussed [18, 19].

The different approaches will be classified using a few criteria relevant to the problem at hand.

  • Algorithmic speed considering the high number of discharges that occur during a \(\mu \)EDM manufacturing process (the exact number depends on the parameters being used but can easily be in the millions), the chosen method must be fast in order to be repeated numerously.

  • Local/global control this criterion illustrates the fact that it is needed to be able to deform a very specific location of our geometry without affecting the rest of it. The global deformation will result from a set of local deformations.

  • Model preservation in order to avoid added complexity in an iterative process, it is desirable that no change in the initial model be made. For example if the initial number of patches describing the geometry is one, a method preserving the model will keep it that way.

  • Shape control this criterion is linked to the variety of deformation that are available.

Criteria linked to the user are not considered here. Interactivity is not a concern since the considered process is to be fully automatic. Criteria characterizing the fact that the method is applicable to multiple trimmed patches is not to be used since in our case, a unique patch will be used. Also, the shape control is not a critical criterion since the main interest lies in the insertion of simple spherical shapes several hundreds of thousands of times per simulation.

The definition of a NURBS surface involves three elements: the knot vectors, the control points and their weights. Changing any of these parameters will have an effect on the resulting surface. However, working directly with these can be tedious and designers usually tend to work directly with the surface itself and indirectly change the position of control points or the value of weights. The modification of knots is hardly used, even indirectly, as it is highly less intuitive than weight modification or control point repositioning. Anyhow, three categories can be identified:

  • Control point repositioning the most common way of modifying NURBS curves or surfaces. The user generally specifies one or multiple curve or surface points to be displaced. Since the problem is often under-constrained, an energy function to be minimized is added to this optimization problem [16, 20, 21].

  • Weight or knot modification this method is used in the specific case where the displacement of a point towards or further away from a control point is required. While local control can be increased similarly to control point repositioning, the nature of this method prevents it to be used for shape-specific deformations. Also the modification of knots is not intuitive and the deformations are indirectly performed. The use of non-linear constraints slows down the deformation process [2226].

  • Surface warping this deformation strategy relies on the notion of control point repositioning. However, instead of specifying a set of constraints linked to points’ positions or derivatives’ values, the control points are moved in respect to the following general formula:

    $$\begin{aligned} \mathbf {P'}_{i,j} = \mathbf {P}_{i,j} + f(i,j) \cdot \mathbf {N}(i,j) \end{aligned}$$
    (10)

    where f(ij) is the warp function and \(\mathbf {N}(i,j)\) is the warp direction. A certain number of common strategies exist such as surface flattening or bending [2729].

A comparison of the previously described methods is presented in Table 1.

Table 1 Performance of some methods in regards to various criteria

While control point repositioning with the use of a certain number of constraints seems to be a very good candidate, the shape control is lacking. It would be possible to specify an exact shape for the deformation but at the cost of using a high number of constraints which adds to the algorithmic complexity. Weight and/or knot sequence modification being too restrictive, surface warping remains the viable candidate.

As a conclusion, local surface warping will be used to insert one-by-one a large number of spherical craters in a heavily refined (1000 \(\times \) 1000 control points) untrimmed NURBS patch of degree 3 in each direction. Using such a multi-resolution approach, it will be possible to get the tool’s wear as well as the workpiece’s roughness.

Fig. 5
figure 5

Flowchart of the simulation’s algorithmic process

3 The \(\mu \)EDM simulation framework

3.1 Simulation process overview

In the proposed approach, both the geometry of the tool and the geometry of the workpiece are defined by means of NURBS patches. To allow the insertion of thousands of craters, the surfaces of the tool \(S_t\) and workpiece \(S_w\) are heavily refined using the Boehm’s knot insertion algorithm [30]. As a result the surfaces’ control points will be a lot closer to it, hence local control is significantly increased. At each step of the insertion process the location of each crater (one on each electrode) is determined while identifying the shortest distance between the tool and the workpiece since it is considered that the electrical spark will happen on the less resistive path, i.e., the shortest one. Minimum distance computations are done using an optimization method known as particle swarm optimization (PSO) which is a simple numerical optimizer that does not require the use of the gradient of the objective function [12]. A crater is then inserted in each of those locations by moving the surrounding control points. As explained in the literature review, the shape of a crater can be assimilated to a part of sphere. If the computed minimum distance d exceeds the value of the minimum distance required for a spark to appear (known in EDM as the gap distance \(M_g\)) then the tool is moved down along the z axis with an increment of \(\Delta _z\). Otherwise, if the computed minimum distance is smaller than \(M_g\) then the PSO algorithm returns four values (\(u_t,\,v_t\)) and (\(u_w,\,v_w\)) corresponding to the parametric coordinates of the craters’ centres respectively on the tool (subscript t) and workpiece (subscript w). The algorithm then moves the control points located in the surrounding of the craters’ centres so that two craters of volumes \(\Delta V_t\) and \(\Delta V_w\) are inserted into the tool and workpiece. The deformation technique is similar to surface warping considered as a geometric deformation technique [30]. The process ends when the desired depth \(D_g\) is met. The overall algorithm can be described in pseudo-code form as in Fig. 5. The different steps of the crater insertion process are further detailed in the next subsections.

Fig. 6
figure 6

Enclosed volume computation

3.2 Volume enclosed by a NURBS patch

In the proposed algorithm, it is mandatory to control the volume \(\Delta V_e\) removed on the electrode e (with \(e\in \{t,w\}\)) at each iteration of the simulation process. To do so, the idea is to compute the difference between the initial volume \(V_{e0}\) and the volume at a given iteration \(V_e\). Generally speaking, the Green–Ostrogradsky’s theorem states that for a vector field \(\mathbf {F}\) and a region V enclosed by a surface S:

$$\begin{aligned} \int _{V} \text{ div }~\mathbf {F}~dV = \oint _{S} \mathbf {F} \cdot \mathbf {dS} \end{aligned}$$
(11)

In the proposed approach, the surface \(S_e\) to be deformed is defined by a single NURBS patch of degree \(p_e\) in u and \(q_e\) in v (Fig. 6a) and defined by its parametric Eq. [30]:

$$\begin{aligned} \begin{array}{ll} \mathbf {S}_e(u,v) &{} \displaystyle =\frac{\sum \nolimits _{i=0}^{n_e}\sum \nolimits _{j=0}^{m_e} w_{ij}N_{ip}(u)N_{jq}(v)\mathbf {P}_{ij}}{\sum \nolimits _{i=0}^{n_e}\sum \nolimits _{j=0}^{m_e}w_{ij}N_{ip}(u) N_{jq}(v)}\\ &{} =~^t[x(u,v),y(u,v),z(u,v)] \end{array} \end{aligned}$$
(12)

where \(\mathbf {P}_{ij}\) represents one of the \((1+n_e)\times (1+m_e)\) control points to be moved, and \(w_{ij}\) the weights associated to each control points to be moved. As explained in Sect. 2.2, the weights will be taken equal to 1 in the proposed approach and won’t be considered as unknowns of the deformation process.

The initial surfaces are, at the moment, defined by hand while paying attention to their parameterization. Future works might include interpolating the initial geometries from a different format (meshes, cloud of points...).

The surface \(S_e\) not being a closed surface, the idea is to choose the field \(\mathbf {F} =~^t[0, 0, z]\) so that:

$$\begin{aligned} \oint\limits_{S} \mathbf {F}.\mathbf {dS} = \int\limits_{S_e} \mathbf {F}.\mathbf {dS}_e = \int\limits_{U_e} \mathbf {F}.\left( {\partial \mathbf {S}_e \over \partial u} \times {\partial \mathbf {S}_e \over \partial v}\right) \mathrm{d}u\mathrm{d}v \end{aligned}$$
(13)

where \(U_e\) is the patch’s parametric domain. The patch is not trimmed in our simulation tool. Thus the enclosed volume \(V_e\) becomes (Fig. 6b):

$$\begin{aligned} V_e = \int\limits_{U_e} z.\left( {\partial x \over \partial u}{\partial y \over \partial v} - {\partial y \over \partial u}{\partial x \over \partial v} \right) \mathrm{d}u\mathrm{d}v \end{aligned}$$
(14)

It can then be approximated while discretizing the parametric space \(U_e\) with \((N_e^u \times N_e^v)\) sample points. Thus, for a given sample point \(\mathbf {S}_{k,h} = \mathbf {S}_e(u_k,v_h)\), and a neighborhood \([u_k,u_{k+1}]\times [v_h,v_{h+1}]\), the surface \(S_e\) can be approximated locally by a quadrangle which can be decomposed in two triangles \(T_{k,h}^1\) and \(T_{k,h}^2\) and the enclosed volume becomes (Fig. 6c):

$$\begin{aligned} V_e = \sum _{k=1}^{N_e^u-1}\sum _{h=1}^{N_e^v-1} \left[ V_e(T_{k,h}^1) + V_e(T_{k,h}^2)\right] \end{aligned}$$
(15)

where the volume \(V_e(T_{k,h}^1)\) enclosed by \(T_{k,h}^1\) can be computed using Eq. 14 and a simple parameterization of the triangle (Fig. 6c):

$$\begin{aligned} V_e = \int _{U_e} \frac{1}{3}(s_{k,h}^z+s_{k+1,h}^z+s_{k,h+1}^z) \frac{\left( e_{k}^xe_{h}^y-e_{k}^ye_{h}^x\right) }{||e_k \times e_h||} \mathrm{d}u\mathrm{d}v \end{aligned}$$
(16)

With \(e_k = s_{k+1,h} - s_{k,h}\) and \(e_h = s_{k,h+1} - s_{k,h}\)

$$\begin{aligned} V(T_{k,h}^1) = \frac{1}{6}\left( e_{k}^xe_{h}^y-e_{k}^ye_{h}^x\right) \left( s_{k,h}^z+s_{k+1,h}^z+s_{k,h+1}^z\right) \end{aligned}$$
(17)

Here, x, y and z stands for the coordinates of the vectors represented on figure (Fig. 6c). A similar formula applies for the triangle \(T_{k,h}^2\).

Table 2 Comparison of speed and accuracy for the sampling-based method

In order to be able to tune the discretization parameters \(N_w^u\) and \(N_w^v\), several sampling have been performed on a final surface \(S_w\) and the results are reported in Table 2. In this table, \(D_b\) is the ratio to the best estimation, and \(D_f\) the ratio to the fastest estimation. As expected, doubling the number of sample points in each direction leads to four times more sample points over the entire surface, hence the total computation time is also greater by a factor of four. Overall, it is noticed that acceptable results (those that would be within 5 % of the true value of the volume) would require computational time of several hundreds of milliseconds.

Table 3 Comparison between sampling-based (800 points in each direction) and control points-based (1000 points in u and v) methods

Even if the simulation tool doesn’t need to sample the whole surface but just the portion being deformed, it is still interesting to explore other strategies. An alternative would be to consider that the control points are sufficiently close to the real shape to be used in an accurate calculation of the surface’s enclosed volume. In this case, formulas similar to 15 and 17 can be obtained directly from the control points and not anymore from the sampling points (Fig. 6a). A comparison between the sampling-based and control points-based methods is presented in Table 3. From those results, it is clear that the control points-based method is much faster than the sampling approach without however reducing a lot the quality of the approximation. Thus, this method has been adopted since the computation of the enclosed volume will be performed hundreds of thousands of times during the \(\mu \)EDM simulation.

3.3 Volume to be removed for each crater

Each electrical spark transfers a certain amount of energy to the tool, the workpiece and the dielectric fluid. Here, it is considered that the amount of energy brought to each element is the same at each spark. As such, it is desirable to remove the same volumes \( \Delta V_t\) and \(\Delta V_w\) when simulating the insertion of all the craters. These volumes are experimentally obtained by measuring the mean radius \(\bar{R}_e\) and mean depth \(\bar{D}_e\) of actual craters (see Sect. 4.1). Then, considering that the craters are domes, the volumes to be removed \(V_e^r\) are computed using the following formula:

$$\begin{aligned} V_e^r = \pi {\bar{D}_e \over 6} \left( 3 \bar{R}_e^2+\bar{D}_e^2\right) ,~~e \in \{t,w\} \end{aligned}$$
(18)

From these volumes and domes, the support spheres can be identified, i.e., the spheres of radii \(R_e\) equal to the dome’s radius. As explain, these two radii remain constant for the two surfaces for the crater-by-crater simulation.

3.4 Craters insertion

Following the flowchart of Fig. 5, for a given depth of the tool, if the minimum distance is smaller than the gap distance, the craters insertion process starts. Craters are inserted one by one on each surface \(S_e (e \in \{t,w\})\) and centered on \(S_e (u_e,v_e)\). For sake of clarity, the superscript [k] has not been put on the parametric coordinates \(u_e\) and \(v_e\) even if these values refer to the \(k^{th}\) craters (one on each surface). First, to identify the displacement directions, the two warping unit vectors are computed as follows:

$$\begin{aligned} \mathbf {\omega }_e^{[k]}=sg(e){ \mathbf {S}_t(u_t,v_t)- \mathbf {S}_w(u_w,v_w)\over \Vert \mathbf {S}_t(u_t,v_t)- \mathbf {S}_w(u_w,v_w) \Vert } \end{aligned}$$
(19)
$$\begin{aligned} \text {with } sg(e)= \left\{ \begin{array}{r l} 1 &{} \text {for } \, e=t\\ -1 &{} \text {for } \, e=w \end{array} \right. \end{aligned}$$

Figure 7 represents a two-dimensional version of the process after having found the minimum distance. For sake of clarity, solely the part of the workpiece is represented even if the same strategy applies to the tool. The next step consists in identifying which control points need to be moved in the surrounding of the two points \(S_e (u_e,v_e)\).

Fig. 7
figure 7

Definition of the warping vector \(\mathbf {\omega }_w^{[k]}\) for a crater to appear on the workpiece

Fig. 8
figure 8

Definition of the support sphere and removed volume \(\Delta V_w^{[k]}\)

Once the radii of the two spheres identified (Sect. 3.3), the location of the spheres’ centres has to be computed (one for the tool and one for the workpiece). As illustrated on Fig. 8, the centre of the sphere lies on the spark line. Its exact position depends on the volume \(V_e^r\) that needs to be removed. In order to find the location, an iterative dichotomy method (also known as binary search or bisection method) is used. At each step, the surface \(S_e\) is deformed and the intersecting volume (the hashed part of Fig. 8) between the sphere and the surface is computed while using the previously introduced formula (\(\Delta V_e^{[k]} = V_e^{[k]} - V_{e0}^{(k]}\)). If the volume obtained is smaller than \(V_e^r\) the sphere is moved towards the surface, and if it is bigger it is moved away from it. The process carries on until the obtained volume \(\Delta V_e^{[k]}\) falls within a specific tolerance \(T_v\). Once the \(\mathbf {C}_e^{[k]}\) adequate positions are found, it is possible to determine the \(N_e^{[k]}\) control points of the two surfaces that need to be moved. This is done by computing for each control point the distance that separates them from the centre of the sphere. If the distance is smaller than the radius of the sphere, the control point is added to the list of points to be displaced. At the end, two lists of control points are obtained.

In order to displace the control points to mimic the shape of a sphere, a reference is needed. Let \(\Pi _e^{[k]}\) be the plane that includes the centre of the sphere \(\mathbf {C}_e^{[k]}\) and that has \(\mathbf {\omega }_e^{[k]}\) as normal vector. Then, the new position of all the control points \(\mathbf {P}_{e,j}^{[k]}\) to be moved (\(e \in \{t,w\}\) and \(j \in \{1 \ldots N_e^{[k]}\}\)) are computed as follows (Fig. 9):

$$\begin{aligned} & \tilde{\mathbf {P}}_{e,j}^{[k]} = \mathbf {P}_{e,j}^{[k]} + f_{e,j}^{[k]}(r_{e,j}^{[k]}).\mathbf {\omega }_e^{[k]}\nonumber \\ & \text {with } f_{e,j}^{[k]}(r_{e,j}^{[k]})=\sqrt{R_e^2-{r_{e,j}^{[k]}}^2} - \left[ \mathbf {P}_{e,j}^{[k]}-\mathbf {\pi }_{e,j}^{[k]}\right] .\mathbf {\omega }_e^{[k]}\nonumber \\ & \text {and } r_{e,j}^{[k]}=\Vert \mathbf {\pi }_{e,j}^{[k]}-\mathbf {C}_e^{[k]} \Vert , \end{aligned}$$
(20)

where \(\mathbf {\pi }_{e,j}^{[k]}\) is the projection of \(\mathbf {P}_{e,j}^{[k]}\) on the plane \(\Pi _i^{[k]}\). In this formulation, a unique index j has been used to identify the \(j{th}\) control point \(\mathbf {P}_{e,j}^{[k]}\) of \(S_e\) to be moved to generate the \(k^{th}\) crater.

This process is repeated iteratively until no more craters can be inserted for the actual depth. Then, the tool is moved down along the z axis with an increment of \(\Delta _z\) and the craters insertion process starts again (Fig. 5).

Fig. 9
figure 9

Plane \(\Pi _w^{[k]}\) definition and a control point’s projection

4 Experimental validation

Three experiments were conducted in order to assess the accuracy of the simulation tool. The two first experiments were designed to give a rough idea of the simulation’s performances through indirect measurements of the surfaces’ quality (vertical wear and roughness) while the third used direct surfaces comparison with the use of the Hausdorff metric.

4.1 Measurements

For the first two experiments, experimental results related to roughness and crater volumes were measured with the help of a white light interferometer. The experimental vertical tool wear was measured on the \(\mu \)EDM machine using the contact detection feature. On the other side, measurements on the NURBS patches involved in the simulation were realised by numerically implementing the formula for average roughness [31]. Several measurements in different locations were made then averaged. The last experiment’s resulting surfaces were measured with the help of a micro-tomographer [32] that made it possible to obtain meshed three-dimensional models of the tool and workpiece after the experiment.

4.2 Vertical wear and surface roughness evaluation

As a validation of the new simulation process, two experiments were conducted on a Sarix SX-200 \(\mu \)EDM machine equipped with a wire dressing unit. A tungsten carbide rod, with a nominal diameter of 290 μm was used as tool electrode. Ultra-Fine Grained aluminium (Al1070) with an average grain size of 0.6 μm was chosen as workpiece material to minimise the material’s inhomogeneity while aiming at improving \(\mu \)EDM predictability, as suggested in [33].

Fig. 10
figure 10

Experimental curved tool before (a) and after (b) machining for the experiment 2

Table 4 Machining parameters

Using the wire dressing unit, the tip of the tool electrode was machined flat for the first experiment, while for the second experiment a curved shape was introduced (Fig. 10a). The electrodes were then used to erode the workpiece down to a 50 μm depth objective. Machining parameters are shown in Table 4. The final shape of the tool after machining is depicted on Fig. 10b for the experiment 2.

Table 5 Experimental results
Fig. 11
figure 11

Evolution of the workpiece’s simulated shape: a initial configuration, b 1417 craters, c 24238, d 64543, e 251425, f 285401 and g 374294

With the help of a white light interferometer, experimental crater dimensions were determined and tabulated in Table 5. The knowledge of those dimensions was then used to infer a value for the workpiece craters’ volume using Eq. 18. The volume of the tool craters’ was determined with the use of the wear ratio derived from the hole depth and the tool vertical wear. As a result, in the case of experiment 1, the target volume \(\Delta V_e\) expected to be removed per crater was 279.20 μm3 for the workpiece and 71.69 μm3 for the tool. In the case of experiment 2, the target volume \(\Delta V_e\) expected to be removed per crater was 4.05 μm3 for the workpiece and 1.04 μm3 for the tool.

Table 6 Effect of volume removal precision on roughness (Experiment 1)

For the simulation of the two experiments, both the tool and workpiece have been modeled by an untrimmed NURBS patch of degree 3 in each direction and defined by a network of \(1000\times1000\) control points.

In a first time, three simulations of Experiment 1 were performed using different tolerances \(T_v\) to assess the influence of the computational precision on roughness results (Table 6). Measurements on the NURBS patches involved in the simulation were realised by numerically implementing the formula [31] for the average roughness \(R_a\). Several measurements in different locations were made and averaged. From those results, it is clear that the tolerance level has a significant influence on the final simulated roughness.

In a second time, one simulation was performed for Experiment 2 to assess agreements in terms of geometry deformation due to tool wear, as well as achieved roughness. Based on the previous results, this simulation used a tolerance level \(T_v=1 \%\). Figure 11 presents an overview of the evolution of the workpiece during the simulation rendered as a wireframe of the NURBS’ surface. The total runtime of the process was around 20 h on a personal computer (i5 3570 K at 4.5 Ghz) and the number of craters inserted was 375494. It means that the proposed crater-by-crater insertion algorithm (Sect. 3.4) has required 375494 local surface warping to generate the final shape of the workpiece (Fig. 11g). Actually, in our context, the need for simulating accurately the local surface deformation (to get the tool wear and workpiece roughness) increases a lot the computation time. Of course, it cannot be compared to other applications targeting a global deformation inducing a single surface warping unable to capture shape deformations at the scale of the roughness. One can finally notice that, at the end of the simulation, not all the craters are visible on the outer surface since most of them have been iteratively removed during the crater-by-crater iterative deformation process. A detail of the craters is provided in Fig. 12.

Fig. 12
figure 12

Detail of the craters on the workpiece. The scale is given in the bottom-left

The simulation results are in accordance with those of the second experiment for the values of vertical tool wear and roughness (Table 7) as the experimental and simulated surfaces deviate by 0.89 % for the tool vertical wear and 6.09 % for the roughness. Additionally, the tool’s profile can be compared with the simulated one (Fig. 13). It appears that the simulation does not lead to the dissymmetry present in the experimentation. This can be due to several factors that haven’t been included yet in the simulation, notably the influence of the dielectric flow and an eventual alignment error while machining the tool by wire EDM and/or during the die-sinking process.

Table 7 Comparison experimental vs. simulation results (Experiment 2)
Fig. 13
figure 13

Tool profiles from experimentation (a) and simulation (b). Profiles differences with simulation extra volume in black (c)

During the simulation process, a certain number of difficulties had to be managed with the displacement of control points. An evident case to avoid is displacing control points leading to self-intersecting geometries. This is often the case when dealing with the sides. As a result, the geometries must be taken into account when defining the warping vector. This will be optimised in the future.

Another issue linked to the surfaces’ parameterization occurred. A simple example highlighting this issue is to consider a scenario beginning with a flat surface. As it is being deformed, the control points’ displacements will lead to some areas of the surface having a smaller density of control points than others. This phenomenon is visible on Fig. 11g on the outer flanks of the workpiece. A solution would be to regularly re-parameterize the surface to avoid this. It would however add to the computation time. This will be further studied in the future.

4.3 Shape difference assessment

Following the previous experiments, an additional one was devised with the objective of directly comparing three-dimensional meshes of the experimental results with meshed NURBS surfaces from the simulation.

The tool used is of a spherical shape obtained through wire-dressing of a tungsten carbide electrode of nominal diameter 300 μm. The tool was then measured through the use of micro-tomography [32] (with a resolution of 1 μm) and the result exported as a mesh visible in Fig. 14. The nominal diameter of the sphere is 250 μm while the measured diameter through interpolation with a sphere results in 246 μm. The experimental machining parameters are given in Table 8. The feature machined on the workpiece was also measured in the same manner and allowed the measurement of the craters directly from the meshed model. The dimensions of those are given in Table 9.

A sphere was subsequently modelled in the simulation software as a single NURBS patch and refined by knot insertions. The resulting patch is defined with a network of a 1000 \(\times \) 1000 control points. Using the same tolerance parameter \(T_v\) as for the experiments described in Sect. 4.2 and the experimental crater dimensions measured on the 3D models, a simulation was started and ended after 34 h and 18201 discharges. The resulting NURBS surfaces visible in Fig. 15 were then converted as three-dimensional meshes (a million points were sampled uniformly on each patch) and processed with the use of Meshlab (http://meshlab.sourceforge.net/) and GOM inspect (http://www.gom.com) in order to cut and align those meshes with the experimental ones using the Gaussian best fit method.

In order to compare those surfaces, the Hausdorff metric was used [34] as defined in Eq. 21 where X and Y are two sets of points.

$$\begin{aligned} d_H (X,Y) = {\rm max}\{\underset{x \in X}{{\rm sup}}~\underset{y \in Y}{{\rm inf}}~d(x,y),~\underset{y \in Y}{{\rm sup}}~\underset{x \in X}{{\rm inf}}~d(x,y)\} \end{aligned}$$
(21)

The results are tabulated in Table 10 and can be observed in Fig. 16.

Fig. 14
figure 14

Meshed model of the measuring of the initial tool

Fig. 15
figure 15

NURBS surfaces of the tool (left) and the workpiece (right)

Fig. 16
figure 16

Hausdorff metric mapped on the meshes of the experimental tool (left) and workpiece (right). The histogram is displayed on the left of each model

Table 8 Machining parameters
Table 9 Experimental craters dimensions
Table 10 Hausdorff metric results

Those results can be interpreted in comparison to the bounding box diagonal length of each model in order to appreciate the scale of the Hausdorff distance when compared to the dimensions of the models. The bounding box diagonal of the tool was 366.84 μm while the workpiece’s was 366.64 μm. Relatively to those dimensions, the two meshes are within 0.4 % on average for the tool and 0.8 % for the workpiece. In light of those results, the simulation method can be considered validated as it provides with a sensibly accurate surface profile of the tool and workpiece after machining. Additionally, the maximum distance is due to debris that have resolidifed during the process (observable in Fig. 16 as the bright blue spot on the workpiece for example) and that the simulation does not account for.

5 Conclusions

In order to overcome issues linked with the wear phenomenon in \(\mu \)EDM, it is important to be able to predict said wear. A new method of simulation involving NURBS surfaces was presented. It relies on an iterative crater-by-crater insertion algorithm. Through hundreds of thousands of local surface warping, the method is able to compute the global as well as the local shapes of the tool and workpiece. At each step, the warping vector and function are computed so as to be able to generate a spherical crater whose volume is also controlled. This is a completely different approach from the existing surface deformation techniques found in the literature. While acting very locally to simulate the real \(\mu \)EDM manufacturing process, not only is it possible to evaluate the tool wear from the overall final shape at a low resolution level, but also to estimate the workpiece roughness from the high resolution level.

The overall simulation framework being now set up, several optimization of this promising approach are foreseen. Although some discrepancies were found between experimental data and simulation results, those values remain acceptably close (deviation of 0.89 % for the tool vertical wear and 6.09 % for the roughness and a low Hausdorff metric for the third experiment). As discussed, crater dimensions measurements were of paramount importance in the final results and are extremely important if a good accuracy was to be obtained. Another approach could be to use theoretical values for crater dimensions in lieu of the experimental ones or, alternatively, derive those values from a database built from electrical measurements of the process [35]. Efforts should also be put into preserving the surfaces’ parameterization as well as reducing the computational times, even if this last criterion is not crucial in the considered context. For example, the way the volume computation is performed could be optimized so as to only consider local variations of the volume, and not global variations, on a NURBS surface defined by \(1000\times1000\) control points. The minimum distance computation could also be improved while considering the multi-resolution character of the simulation and avoid looking for a global minimum distance on the entire patch.

Finally, the new simulation tool will be integrated in a shape optimization loop so as to be able to predict the optimal shape of the initial tool for a given shape of the final workpiece.