1 Introduction

The erosive damage of various materials exposed to external loads in the form of falling drops is still not recognised due to the coexistence of fine details, including the kinematic properties of the drops, the mechanical properties of the materials, and the influence of the environment in which the erosion occurs. Related to these are the practical problems occurring in nuclear power plants, where the inner walls of the pipeline are eroded at the leading edges of the wind turbines and the jet engines. In addition to elucidating the basic phenomena related to the interaction of water droplets with the material, another emerging problem is the prediction of the erosion evolution in the material. Solving this problem would result not only in the elimination of the already mentioned problems, but would also show the possibility of controlled erosion using water droplets as a tool. Currently, there are many devices for generating droplets; these devices interact with materials by means of erosion agents that utilise impact pressure followed by lateral outflow. Among the most popular are rotating discs, continuous water jets acting from a high standoff distance, or so-called ultrasound-generated pulsating water jets (PWJs). The last option, developed by [1] is the most flexible from the point of view of erosive action in terms of the volume of drops and their kinematic parameters. In addition, high frequencies make it possible to shorten experimental tests. The PWJ is a technological modification of a continuous water jet, which changes a continuous jet a discontinuous one. A PWJ can generate water droplets with a frequency of 20 kHz and 40 kHz. In a short time, it utilises the impact pressures [2] to fatigue the material in the given incident location [3]. The working principle, the jet morphology and the jet interaction with the material can be better visualised in Fig. 1.

Fig. 1
figure 1

a Working principle of the ultrasonically excited pulsating water jet, b jet morphology downstream from the nozzle exit and c interaction of the jet with the material [4]

The scope of the research has recently expanded due to the need to deepen the theory of the interaction of drops and ductile materials. The issue of water droplet erosion is very well summarised in Adler's work [5] and in a review article [6]. For reasons of both theoretical and practical importance, various testing devices are used [1, 2]. At the same time, the accumulated knowledge also enables the practical use of the phenomena associated with the controlled impact of water droplets on the desired location. There are known attempts to use the erosive action of drops in PWJ [7] technology for material modification: the roughening of titanium alloys [8] and surface modification for the purpose of inducing subsurface dislocations [9]. Also, due to the natural temperature, this technique is highly suitable for use in the disintegration of thermolabile materials [10]. The essence of erosion is a change in mechanical properties over time, which subsequently leads to fatigue and material loss. Cumulative erosion progress is divided into stages namely, the incubation, accumulation, attenuation and steady stages [11]. An initial or incubation period is a phase during which no significant loss in material mass can be detected, and it is also usually accompanied by changes in the surface profile roughness parameters [12]. The affected surface may contain tilted grains and small depressions. In this stage, impact pressure prevails. When the surface is exposed to further impacts, a fracture in the material occurs. The breakup of exposed grains is caused by the lateral outflow arising after droplet collapse. This phase is generally acknowledged as an accumulation phase. This phase is similar to cumulative fatigue fracture, and it is called an energy accumulation zone [13]. The eroded surface will create a prerequisite for the attenuation of further impact pressure due to easier disruption of the surface tension of the drop. Such a surface can absorb a larger number of water droplets. Sapoval [14] hypothesised that it is a self-stabilising system and that it can be considered as a negative feedback loop based on the observation of coastal erosion. As a result, a steady stage occurs in which the erosion rate decreases, during which it can reach constant wear parameters.

Although there are details that are not recognised in this field, the key efforts of researchers involve the tendency to use the existing body of knowledge to predict the erosion progress in all possible erosion stages. Some authors [15] analysed the erosion characteristics of the materials to determine the value of the relative erosion resistance of the material, which is the inverse value of the volume loss of the tested material. In another work, the surface roughness of the finished product was predicted using ensemble learning and a differential evolution algorithm while using the water jet polishing method [16]. In another work [17], the authors developed an analytical model that enables the prediction of the threshold velocity in the erosion of metallic materials by water droplets. The essence of the model rests on the mechanical properties of materials and their erosion damage in the form of crack propagation. Several studies concentrate on the prediction of erosion development in the incubation phase [18]. This area is the most important because it determines the nature and extent of further potential damage to the machine components [19]. With this aim, the present work focusses on the prediction and classification of erosion crater characteristics while utilising pulsating water jet machining on two different materials. The prediction is performed using the random forest approach, and the classification of the process parameters is performed using the support vector method (SVM). The details are provided in the following subsections.

2 Materials and methods

2.1 Materials

An austenitic stainless steel AISI 304 and the aluminium alloy AW-6060 were used in the experiments to predict the effect of erosion time and supply pressure variations on the magnitude of the erosion of the material. These materials were selected because of their wide acceptance in various industries due to their enhanced corrosion properties against humid environments. AISI 304 austenitic stainless steel has excellent corrosion resistance properties, which is why it is commonly used for the manufacturing of parts used in the shipbuilding, water distribution and plumbing, automotive, aerospace and chemical industries. Also, AW-6060 aluminium alloy primarily contains a considerable amount of magnesium and silicon, which makes it corrosion-resistant towards water droplets, and it is commonly used for making parts used in the automobile, outdoor sporting, heating, ventilation and air conditioning (HVAC), and transportation industries. The components used for all the above-mentioned domains are exposed to water droplets during their operational time and slowly degrade after a certain period of time, depending on the magnitude, period and repeatability of the impacts. This degradation of the parts also impacts the efficiency of the entire process because parts need to be replaced if not maintained over time. Therefore, an accurate estimation of the erosion time that is required to cause damage to the working component for a specific flow condition is required. The chemical and mechanical properties of both the AW-6060 aluminium alloy and the AISI 304 stainless steel used in the current experiments are mentioned in Tables 1 and 2, respectively.

Table 1 Chemical and mechanical composition of the AW-6060 aluminium alloy
Table 2 Chemical and mechanical composition of the AIS 304 stainless steel

2.2 Methods

PWJ technology is used in the current study. The experimental technology uses a high-pressure pump with an operating pressure of up to p = 160 MPa and a volumetric flow of Q = 67 L/min. Pressurised tap water enters the high-pressure acoustic chamber, where a sonotrode, driven by piezoceramics, oscillates at a frequency of 20 kHz. The titanium sonotrode gives additional momentum, which causes the generation of the standing waves in the pressurised liquid in the acoustic chamber. They travel through a waveguide in the direction of the nozzle exit. These are converted into a velocity fluctuation downstream from the exit [20]. This causes the jet to modulate and transform into a series of bunches of water clusters after travelling a certain distance; the clusters’ behaviours depend on the flow properties. The manipulation of the motion of the PWJ head, as desired for the experimental run, is carried out by a robotic manipulator, giving precise control over the movement. Before the main experiments, pilot experiments are carried out to optimise or to keep the non-investigated technological parameters at fixed values. Firstly, the acoustic chamber length is optimised for each flow condition, i.e. for p = 20 and 30 MPa. It is determined by varying the acoustic chamber across its entire range which is lc = 0 to 25 mm. For each setting of the acoustic chamber length, the output ultrasonic power and the frequency also change. According to the manufacturer’s instructions, the chamber length setting for which the output frequency shows the lowest value along with the optimal power value must be selected as the optimal acoustic chamber length setting for the specific flow rate. A detailed explanation of the determination process can be found in the primary author's other publication [21]. Therefore, the determination of the optimal acoustic chamber length was carried out twice for p = 20 and 30 MPa. An optimal standoff distance of lc = 12 and 18 mm was determined for p = 20 and 30 MPa, respectively. Once the lc is fixed, the next important technological parameter, i.e. standoff distance (z) needs to be fixed to a level which delivers a better erosion response. To determine the optimal standoff distance, an erosion test was carried out on an aluminium sample as a pilot test, in which the standoff distance, i.e. the distance between the nozzle exit and the sample, was varied from z = 1 to 51 mm. After the pilot test, it was observed that z = 5 and 7 mm for the selected pressure levels, p = 20 and 30 MPa, respectively, produced the deepest erosion grooves. Therefore, z = 5 and 7 mm were selected as optimal standoff distances for p = 20 and 30 MPa, respectively. The difference in the optimal standoff distance for different pressure levels is due to the effective interaction of the ultrasonic disturbances into the water flow. With larger flow rate, longer standoff distance is required to achieve optimal erosion. The detailed procedure for determining the optimal standoff distance with different supply pressures can be found in the primary author’s previous publication [22]. The main experiments were performed by varying the exposure times from t = 1 to 20 s for the supply pressures p = 20 and 30 MPa. The same experimental runs were carried out for the aluminium and stainless steel samples. Each experimental condition was repeated three times to keep the statistical accuracy and repeatability of the process. The detailed experimental conditions are shown in Table 3 (Fig. 2).

Table 3 Experimental conditions
Fig. 2
figure 2

Schematic representation of the experimental setup

After the experimental runs, the generated samples were evaluated to determine the erosion extent with regard to the crater depth, area and volume. Samples were measured using an InfiniteFocus optical microscope. The measurement system works on the principle of Focus Variation, a surface scanning method that combines the shallow depth of field of the optical system with vertical scanning to provide topographic information from different planes of focus. The method uses white coaxial adjustable illumination of the sample. The light rays are reflected from the sample surface and their reflection is recorded by a sensor in the optical part of the microscope. Moving the sensor in the z-axis changes the distance from the surface to be measured and thus the planes of focus. Based on the change in the degree of sharpness, an elevation coordinate is assigned to the point. For each individual point, the coordinates of its position in the x, y and z axes are defined. The working range of the device in the x, y, z axes is 200; 200; 100 mm. A magnification of 10 × was used, where the working distance is 17.5 mm, the lateral measurement range in the x, y axes is 1.62 mm, the vertical resolution is 100 nm. Then, the captured data were imported to MountainsMap analysis software to measure the crater depth, opening area and volume for all the generated craters, following the flow process shown in Fig. 3. All the evaluated data were compiled and processed to generate box whisker graphs representing minimum, maximum and median values to understand the effects of the input parameters (exposure time and supply pressure) on the erosion magnitude for both experimental materials, i.e. AISI 304 and AW-6060. Topographical studies of the generated craters were also carried out using MountainsMap 2D images under different technological conditions for both materials.

Fig. 3
figure 3

Methodology for measurement of erosion characteristics, i.e. erosion depth, area and volume removed

3 Machine learning models

In artificial intelligence, machine learning (ML) is a key area of study because it helps machines to learn from their past mistakes and to make more precise predictions about the future [23]. There are two main types of ML methods: supervised learning and unsupervised learning. Classification problems are more characteristic of unsupervised learning, while clustering problems are more typical of supervised learning. Neural networks, support vector machines, and decision trees are frequently used for classification, whereas k-means is the most popular clustering method. Many industries, including medicine, teaching, wireless sensor networks and even the financial sector, have effectively implemented ML methods. This report gives a survey of the manufacturing industry's adoption of ML methods. In this paper, two regression models, i.e. decision trees [24] and decision stumps [25] and three classification models, i.e. the support vector method (SVM) [26], Naïve Bayes and J48, were used to analyse the results. The details are given below.

3.1 Predictive modelling with random forest approach

In the realm of ML, the random forest (RF) stands as a prominent ensemble algorithm that holds significant sway due to its potent predictive capabilities. By amalgamating multiple decision trees (DTs), the RF achieves a remarkable balance amid bias and variance. The schematic of the RF is presented in Fig. 4. Each DT is trained on a unique subset of the training data, and, when predictions are made, the outcomes from these numerous trees are aggregated. This ensemble approach drastically diminishes the risk of overfitting while enhancing predictive accuracy. Furthermore, RFs are renowned for their versatility in handling diverse data types, adeptly managing missing values and yielding valuable feature importance rankings. They exhibit proficiency across both classification and regression tasks, and their robustness against outliers, combined with their ability to capture intricate data patterns, establishes them as an indispensable tool in the machine learning toolbox and makes them an excellent choice for research endeavours in various domains.

Fig. 4
figure 4

Architecture of random forest

3.2 Classification with SVM models

Machine learning relies on supervised learning algorithms like support vector machines (SVMs) to perform classification and regression tasks. SVMs excel at tackling binary classification issues, which involve categorising data points into one of two groups. The goal of any support vector machine technique is to discover the optimal decision boundary, or line, between two sets of data points. For high-dimensional feature spaces, this border is referred to as a hyperplane. In more precise terms, a hyperplane in an n-dimensional space is defined as an (n – 1)-dimensional affine subspace. An affine subspace is a flat geometric object that does not necessarily pass through the origin and can be translated to any position in space. The goal is to create a clear delineation between data classes by increasing the margin or the space between the hyperplane and the closest data points in each category. SVMs are helpful in the analysis of data that are too complicated to be divided by a linear scale. Nonlinear SVMs are mathematical tools that can easily locate boundaries by projecting data into higher-dimensional space. The mechanism of the SVM method is shown in Fig. 5.

Fig. 5
figure 5

SVM method used in this work [27]

The primary principle underlying SVMs involves the mapping of the input data onto a set of features with more dimensions. Using this modification, a linear separation can be found more quickly, or the dataset can be classified more precisely. A kernel function is used by SVMs to carry this out. With the help of the kernel function, the SVM can avoid dealing with expensive, needless computations for extreme circumstances by indirectly computing the dot products between the altered feature vectors. SVMs are capable of processing, both linearly and nonlinearly, separable data. Different kernel functions, such as the linear kernel, polynomial kernel and radial-basis function (RBF) kernel, are used for this purpose. Using these kernels, SVMs accurately capture intricate data relationships and patterns. To locate the best hyperplane in a higher-dimensional space (the kernel space), support vector machines (SVMs) employ a mathematical formulation during the training phase. To minimise classification mistakes while maximising the separation between data points in various classes, this hyperplane is critical. The nature of the given data determines which kernel function is the most appropriate for a given situation, and this choice can have a major effect on the SVM algorithm's efficiency.

4 Results and discussion

4.1 Crater depth

The effects of the exposure times and supply pressures on the crater depths are shown in Figs. 6 and 7. The trend shows a direct relationship between the crater depth and both the exposure time and supply pressure. The PWJ generates an erosion crater from t = 1 s by itself. The crater is formed due to the fatigue failure of the material, which is due to the repetitive loading of the material with 20,000 impacts of water droplets per second. These water droplets, when interacting with the surface, cause the induction of compressive stress in the direction parallel to the jet axis, followed by shear stress in the perpendicular direction of the impact along the material surface, which is known as lateral jetting. The entire phenomenon is known as the water hammer effect. Due to the repetitive action of the PWJ, the material does not receive the relaxation time needed to restore the strain to its original state. Therefore, the cumulative magnitude of the induced stresses exceeds the ultimate strength of the material, which leads to material failure by breaking out from the parent material and creating an erosion crater. The extent of the crater depth depends on the magnitude of the impact pressure and its duration. The impact pressure largely depends on the jet velocity, which is a function of supply pressure, and therefore depends directly on the supply pressure. The graphs shown in Figs. 6 and 7 correspond to these relationships. Therefore, by increasing either the exposure time or the supply pressure, the erosion crater depth increases. Initially, with a shorter exposure time (t < 5 s), the rate of the increase in the erosion depth with time exposure is higher, while it slowly becomes constant with longer exposure time. This decline in the erosion rate or the depth magnitude is due to the resistance of the incoming water droplets by the water layer already present on the material surface due to the preceding impacts. Another reason for the decline in the depth magnitude is the improper interaction of the water droplets with the generated crater, which diverts the impact epicentre and cumulative loading effect. The magnitude of the crater depth formed by supply pressure p = 30 MPa is consistently higher than that at p = 20 MPa. This increased impact velocity increases the impact pressure exerted at the impact epicentre, resulting in deeper depths. By comparing the erosion results between both the materials, i.e. AISI 304 and AW-6060, it was found that the crater depth was nearly 10 times greater in the aluminium alloy compared to that in the stainless steel samples. For p = 30 MPa, the increase in the crater depth was calculated to be seven times more for the aluminium alloy than for the stainless steel. These results are attributed to the mechanical properties of both materials (Tables 1 and 2). The enhanced mechanical properties of the stainless steel (σ = 560 MPa and 195 MPa for stainless steel and aluminium alloy, respectively) help it to resist the repetitive impacts of the water droplets and to undergo plastic deformation followed by material erosion. It can be inferred that, for the stainless steel sample, the droplet impacts with a shorter exposure time only change the surface features and cause stress concentration sites, which later, with a longer exposure time, merge into an erosion crater. The range of the crater depths measured for p = 20 MPa varies from 0.894 to 2.044 mm and from 0.037 to 0.227 mm for the aluminium alloy and stainless steel, respectively, for t = 1 to 20 s. Similarly, for p = 30 MPa, the crater depth increases from 1.487 to 3.017 mm and from 0.287 to 0.409 mm for aluminium alloy and stainless steel, respectively, for t = 1 to 20 s. The minor irregularities in the increasing depth trend for both the material and the supply pressure can be largely associated with the local properties of the sample at the impact epicentre.

Fig. 6
figure 6

Influence of erosion time (t = 1–20 s) and supply pressure (p = 20 and 30 MPa) on the crater depth after the action of PWJ on AW-6060 aluminium alloy sample

Fig. 7
figure 7

Influence of erosion time (t = 1–20 s) and supply pressure (p = 20 and 30 MPa) on the crater depth after the action of PWJ on AISI 304 stainless steel sample

4.2 Crater area analysis

Figures 8 and 9 show the influence of the input parameters on the crater opening areas for the aluminium alloy and stainless steel, respectively. The crater area trend is similar to that observed for the depth, i.e. with an increase in the exposure time or the supply pressure, the crater area increases simultaneously. This is due to the increased interaction time and the number of water droplet impingements impacting the material surface with the increasing exposure time. The crater opening area increases from 2.075 to 3.256 mm2 and from 3.038 to 4.469 mm2 for p = 20 and 30 MPa, respectively, with the increase in the exposure time from t = 1 to 20 s for the aluminium alloy. The spread of the opening area depends upon the action of the lateral outflow of the jet after impacting the material surface. These radial jets travel over the material surface, interacting with the surface asperities present. The induction of the shear stresses deforms the material surface and pushes the material radially outward from the impact epicentre. For the ductile materials, this action causes the material to upheave, forming a peripheral boundary around the impact site. With higher supply pressure, the magnitude of the lateral velocity of the jet also increases, which in turn increases the shear stress induced, and a wider crater opening is found. The crater opening area trend for the stainless steel sample showed a stiffer value increase with the variations in the exposure time and supply pressure. The crater area increased from 0.661 to 1.391 mm2 and from 1.366 to 2.900 mm2 for p = 20 and 30 MPa, respectively, with the increase in the exposure time from t = 1 to 20 s. The magnitude of the average crater area for the stainless steel samples was nearly three times and two times lower for p = 20 and 30 MPa, respectively, than that for the aluminium samples, when keeping the same exposure time. The reason for this increased resistance against erosion is the better mechanical properties of stainless steel than aluminium alloy [28]. However, the trend of the crater area for the aluminium alloy was much smoother for both supply pressure levels compared to the stiffer trend for the stainless steel samples, especially for p = 30 MPa. A similar trend with increasing exposure time was also reported by other researchers.

Fig. 8
figure 8

Influence of erosion time (t = 1–20 s) and supply pressure (p = 20 and 30 MPa) on the crater area after the action of PWJ on AW-6060 aluminium alloy sample

Fig. 9
figure 9

Influence of erosion time (t = 1–20 s) and supply pressure (p = 20 and 30 MPa) on the crater area after the action of PWJ on AISI 304 stainless steel sample

4.3 Crater volume analysis

Figures 10 and 11 show the crater volume trend with the increasing exposure time and supply pressure for the aluminium alloy and stainless steel samples after exposure to the PWJ. The crater volume is the most critical response as it contains information about both the crater depth and the crater area. Therefore, for practical applications, direct evaluation or prediction of the crater volume is essential to estimate the extent of erosion by the action of the water droplets. The volume of the crater is measured by the MountainsMap software, which considers the entire void volume below the selected reference plane as the eroded volume formed after the action of the PWJ. A representative image of the extent of the material erosion viewed from the cross-sectional plane is shown in Fig. 12. The cross-sectional image is plotted for the minimum and maximum erosion times, i.e. t = 1 s and 20 s, for both of the supply pressures and for both of the materials. The trend for the crater volume is similar to that for both the crater depth and the opening area, as it is the final product of both responses. For the aluminium samples, the crater volume varies from 0.530 to 2.943 mm3 and from 1.719 mm3 to 4.764 mm3 for p = 20 and 30 MPa, respectively, for the erosion times from t = 1 to 20 s. The reason for the increased crater volume with the increasing erosion time is the same as that given before for the crater depth and opening area. Also, the larger crater volume measured for p = 30 MPa compared to that of the lower pressure level is due to a higher flow rate and impact velocity for 30 MPa than 20 MPa. For the stainless steel samples, a higher rate of increase in the crater volume is observed, and it is similar to the crater width trend. The crater volume for the stainless steel samples increases from 0.002 mm3 to 0.101 mm3 and from 0.073 to 0.0373 mm3 for p = 20 and 30 MPa, respectively, with erosion times from t = 1 to 20 s. Therefore, from the practical application point of view, the prediction and measurement of the final crater volume formed due to the action of water droplets with different flow conditions are essential to estimate the lifetime of the components. An accurate prediction model for estimating the erosion volume would reduce the need for several pilot experiments for different flow conditions and industrial materials when predicting the component lifetime. Therefore, in the next section, different machine learning tools are used and developed for predicting the erosion magnitude in terms of crater volume using the experimental values obtained in this study.

Fig. 10
figure 10

Influence of erosion time (t = 1–20 s) and supply pressure (p = 20 and 30 MPa) on the crater volume after the action of PWJ on AW-6060 aluminium alloy sample

Fig. 11
figure 11

Influence of erosion time (t = 1–20 s) and supply pressure (p = 20 and 30 MPa) on the crater volume after the action of PWJ on AISI 304 stainless steel sample

Fig. 12
figure 12

Cross-sectional view of volumetric erosion caused by the action of PWJ using supply pressures p = 20 and 30 MPa and erosion times t = 1 and 20 s and for both aluminium alloy and stainless steel samples

4.4 Surface topography

Figure 13 shows the evolution of the generation of the erosion crater with increasing erosion times for both the supply pressures (p = 20 and 30 MPa) and both materials, i.e. the AW-6060 aluminium alloy and AISI 304 stainless steel. For the aluminium alloy samples, material erosion is detected from the starting erosion time, i.e. t = 1 s, which then gradually deepens and widens with a longer erosion time. The topography images also show the peripheral section of the generated erosion crater containing the upheaved material. With the increase in the erosion time, the cumulative effect of the impacting water droplets increases, which further pushes material radially outwards from the collision epicentre of the jet, resulting in the increased amount of upheaved material around the generated crater. With an increase in the pressure level, the magnitude of the erosion characteristics becomes more evident, resulting in the formation of deeper and wider craters. This phenomenon is attributed to the increase in the impact speed from v = 180 m/s for p = 20 MPa to v = 220 m/s for p = 30 MPa. Also, the magnitude of the upheaved area resulting from the action of the shear force generated by the lateral jetting also increases in comparison to the lower supply pressure. The irregular shape of the crater opening varies greatly and is not circular in shape, which can be attributed to the local properties of the material and the orientation of the jet impact with the material surface. However, the exact reason is still unknown. For the stainless steel samples, the formation of the erosion crater is largely diminished and corresponds to the magnitude of the depth, width and volume removal already shown in Figs. 7, 9, and 11, respectively. The reason for the lower erosion magnitude is the enhanced mechanical and erosion-resistant properties of the AISI 304 material. For the supply pressure p = 20 MPa and the erosion time t = 1 s, no material removal is detectable, which corresponds to the incubation phase of hydrodynamic erosion. In this phase, due to the jet impact, the subsurface properties of the material change, along with a minor increase in the surface roughness, but negligible or no erosion depth is observed. However, with prolonged impact, the induced stress exceeds the ultimate limit and material failure takes place. This can be observed for the samples exposed to the PWJ for erosion times longer than t = 5 s. The crater area and the depth increase with an increase in the erosion time due to a larger number of droplet impacts. However, the crater opening shape for the stainless steel sample is also not well defined, and the crater opening expands in the direction of less resistance in the form of local material defects and irregularities. This can also be due to the orientation of the sample relative to the impacting jet. For the higher supply pressure, p = 30 MPa, the erosion craters are better visualised due to the higher magnitude of the impact pressure, which depends directly on the impacting speed of the jet. The magnitude of the upheaved material observed for the stainless steel samples for all the experimental conditions is lower compared to that of the aluminium alloy. This can also be due to the more ductile property of aluminium, which allows the material to be pushed away and to pile up to form an upheaval structure surrounding the erosion crater.

Fig. 13
figure 13

Surface topography evolution of aluminium alloy AW-6060 and stainless steel AISI 304 after PWJ impact with erosion times t = 1, 5, 10, 15 and 20 s for supply pressures p = 20 and 30 MPa

4.5 Actual vs. predicted values

In the context of the RF, actual refers to the true or observed values of the target variable, while predicted signifies the values generated by the ensemble model for the same set of input data. The crater volume values under pressures of 20 MPa and 30MPa were trained, validated and tested with the help of the RF. In total, 40 responses were taken; of these, the first 20 responses were related to aluminium, and the remaining 20 responses belonged to steel. A close alignment between the actual and predicted values across the training, validation and testing sets, along with minimal variation, indicates that the RF model exhibits strong generalisation and robustness, making it a reliable predictor for the given dataset. To quantify the outcomes of the RF, R2, MAE, RMSE, RAE and RRSE were employed. R2 measures the proportion of the variance in the dependent variable that is predictable from the independent variables in a regression model. It ranges from 0 to 1, with higher values indicating a better fit. MAE quantifies the average absolute variance between the actual and predicted values, providing a straightforward measure of prediction accuracy. It is less sensitive to outliers compared to RMSE. RMSE calculates the square root of the mean of the squared differences between the actual and predicted values. It provides a measure of the model's accuracy while penalising larger errors more heavily. RAE is a relative error metric that expresses MAE as a proportion of the mean of the actual values, helping to gauge prediction accuracy in relation to the scale of the data. RRSE is a relative error metric that incorporates RMSE. It measures RMSE as a proportion of the square root of the sum of the squares of the actual values, allowing the evaluation of prediction errors in the context of the overall variability in the data. Figure 14a–c presents the R2, MAE, RMSE, RAE and RRSE values with the RF algorithm at pressures of 20 MPa and 30 MPa. Under the RF condition, the fluctuation of the R2, MAE, RMSE, RAE and RRSE values was slightly varied with 20 MPa and 30 MPa. The variation under the RF condition is less (Figs. 15, 16).

Fig. 14
figure 14

Crater volume data used in RF prediction models at a supply pressure of p = 20 MPa: a training, b validation and c testing

Fig. 15
figure 15

Crater volume data used in RF prediction models at a supply pressure of p = 30 MPa: a training, b validation and c testing

Fig. 16
figure 16

Performance metrics comparison of RF predictive models at 20 MPa and 30 MPa pressure: a training, b validation and c testing

4.6 Classifications of results

The SVM is a robust classification technique that looks for the hyperplane that maximises the difference between classes to divide data into discrete groups. Using kernel functions, the SVM is capable of dealing with both linearly and nonlinearly separable datasets. The following metrics are essential for evaluating the performance of classification models.

True positive rate (TP rate). A classification model's success is evaluated by the percentage of true positives for which it provides an accurate prediction. It is calculated as (true positives)/(true positives + false negatives) and indicates a model's ability to avoid false negatives.

False positive rate (FP rate). FPR measures the proportion of negative cases incorrectly classified as positive. It is calculated as (false positives)/(false positives + true negatives) and is crucial in assessing a model's specificity or its ability to avoid false alarms.

Precision. The precision of a model is the degree to which its correct predictions can be reliably measured. Model accuracy in avoiding false positives is measured by this metric, which is computed as (true positives)/(true positives + false positives).

Recall (sensitivity). Recall, often synonymous with sensitivity, measures the proportion of actual positive cases correctly classified by the model. It is calculated as (true positives)/(true positives + false negatives) and gauges the model's ability to capture all relevant positive cases.

The results of the above-mentioned considered metrics are shown in Tables 4 and 5, whereas the confusion matrix plots are shown in Figs. 17 and 18. The outcomes demonstrated that all the parameters predicted with the ML algorithms are close to the actual values because the performance metrics are near to 1, which means that the models are significantly developed and that they can be used for prediction at specific data ranges.

Table 4 Results of detailed accuracy by class at supply pressure p = 20 MPa
Table 5 Results of detailed accuracy by class at supply pressure p = 20 MPa
Fig. 17
figure 17

Confusion matrix plot at supply pressure p = 20 MPa: a training, b validation and c testing

Fig. 18
figure 18

Confusion matrix plot at 30 MPa pressure: a training, b validation and c testing

5 Conclusions

The study investigates the utilisation of different machine learning models to predict the erosion characteristics of samples exposed to repetitive water droplet erosion. The ultrasonically excited PWJ was used as a droplet generator with the supply pressures p = 20 and 30 MPa and the erosion times t = 1 to 20 s for the AW-6060 aluminium alloy and AISI 304 stainless steel samples. The main results of the study can be summarised as follows:

  1. (1)

    Crater depth increased with an increase in the erosion time and supply pressure for both materials. The maximum erosion depths were measured for the erosion time of t = 20 s and were equal to 2.044 mm and 3.017 mm for p = 20 and 30 MPa, respectively, for the AW-6060 samples. In comparison, the erosion depths measured for the AISI 304 samples were 0.227 mm and 0.409 mm for p = 20 and 30 MPa, respectively, for the erosion time of t = 20 s.

  2. (2)

    Crater width followed a similar trend with increasing erosion time and higher supply pressure. The maximum widths for the AW-6060 samples were measured as 3.256 mm2 and 4.469 mm2 for p = 20 and 30 MPa, respectively, for t = 20 s. For the AISI 304 samples, the maximum widths measured were 1.391 mm2 and 2.900 mm2 for p = 20 and 30 MPa, respectively, for t = 20 s.

  3. (3)

    Crater volume also increased with an increase in the erosion time and supply pressure. The maximum crater volumes were measured as 2.943 mm3 and 4.764 mm3 for p = 20 and 30 MPa, respectively, for the AW-6060 samples; they were 0.101 mm3 and 0.373 mm3 for p = 20 and 30 MPa, respectively, for the AISI 304 samples for the erosion time of t = 20 s.

  4. (4)

    The surface topography studies showed the evolution of the crater opening area with erosion times for both supply pressures and the investigated materials. They also exhibited the extent of the upheaved material volume formed by the action of the PWJ when impacting the aluminium alloy samples.

  5. (5)

    The performance of the random forest and SVM method was verified, and it was concluded that the prediction levels were very close to the actual values, which means that the developed models were suitable and could be used for prediction within a specific range of parameters.