1. Introduction
Cavitation is a phase transformation from liquid to vapor due to a pressure drop. When the pressure in the liquid drops below a threshold, nuclei suspended in the liquid will grow to microbubbles due to vaporization. These bubbles implode under a recovery pressure, releasing a great amount of energy in the form of microjets, shock waves, and heat. The violent implosion of bubbles is mostly viewed as a negative effect in engineering systems to be avoided. The implosion of bubbles may corrode the material and may cause unwanted vibrations and noise. Meanwhile, the energy release by bubble implosion may also be exploited in some scenarios such as emulsification processes, surface treatment, and particle dispersion. Whether avoiding the negative effects of cavitation or exploiting its positive effects, insight into the bubble dynamic calls for robust models which govern the bubble growth and collapse.
The Rayleigh–Plesset (RP) equation is definitely a milestone of establishment of a cavitation model and has been manifested to be legitimate by extensive experiments. It governs the bubble growth and collapse, which occur in response to the ambient pressure and temperature. The RP equation is derived from the Navier–Stoke equation and continuity equation under the assumptions that the bubble remains spherical, the fluid is incompressible, and homogenous pressure fields prevail outside bubbles. The thermal effect on bubble response, which has been demonstrated by extensive experiments [
1,
2,
3,
4,
5,
6,
7], can be incorporated by the RP equation, but it calls for coupling with the heat equation. The RP equation in this study assumes the isothermal condition and is given by Equation (1). It is a highly non-linear second-order ordinary differential equation of the bubble radius. A schematic diagram of the bubble modeled by the RP equation is shown in
Figure 1.
There are various numerical methods of modeling and simulating multiphase fluid systems. Some of the methods such as the central-type space–time schemes are aimed at overcoming computational stability and computational efficiency [
8,
9]. One of classic methods is to treat the multiphase fluid as a mixture and solve the conservation equations of the mixture. In this method, the transport equation of the phase volume fraction is added to close the solution. The Rayleigh–Plesset equation is developed as the cavitation model by Singal et al. [
10], Zwart et al. [
11], and Schnerr-Sauer et al. [
12] and serves as the keystone for this transport equation. These cavitation models mainly use a reduced form of the RP equation where the acceleration, gas, and viscous and surface tension terms are neglected. A so-called Rayleigh Solution Equation (2) derived from this reduced form is converted as the source or sink term of the mass transfer rate between phases in the transport equation. In the Singhal model [
10], two empirical coefficients are included in the source or sink term to calibrate the evaporation and condensation rate. These two coefficients were proved to be generally valid for various flow conditions. The Zwart model [
11] and Sauer model [
12] use different mass transfer terms, but their terms share the common groundwork—that is, Rayleigh Solution. Variants of these types of cavitation models that only consider the pressure-driven term are discussed in Owis et al. [
13], Bakir [
14], Deimel et al. [
15], and Bicer et al. [
16].
Since the foregoing cavitation models only keep the linear term and pressure term, they are robust and stable in various scenarios of cavitating flow when they are coupled with the Volume of Fluid method to solve the phase transport equation. Their robustness and stability, which are manifested by extensive numerical studies on the cavitating flows, facilitate their application in CFD analysis. Such simplification of the RP equation sustains in certain cases of cavitation development. For example, in the late stage of bubble growth where the bubble size is relatively large. However, the significance of the ignored terms, such as the acceleration term, gas term, surface tension term, and viscous term, need to be reassessed. In the study of evolution of bubbles generated by laser ablation, Soliman et al. [
17] discovered the significance of the surface tension and the liquid viscosity when they compared the radius of the bubbles obtained experimentally and numerically. Ye et al. [
18,
19] found out that bubble growth rate was greatly reduced when the bubble–bubble interaction and second-order derivative term (acceleration term) were considered. Žnidarčič et al. [
20] also reported the significance of the acceleration term in bubble growth and collapse when the pressure rapidly changes. Lomakin et al. [
21] studied the effects of contaminant gas content on cavitation intensity in the centrifugal pump with a three-phase model. Their results showed that cavitation intensity increased with the gas content, which is beyond the capability of the Schnerr–Sauer model. In fact, some researchers have calibrated or modified the Rayleigh solution-based cavitation model case by case to compensate for the simplifications. Deimel et al. [
15] and Bicer et al. [
16] calibrated empirical numbers in the cavitation model or added a coefficient to the pressure-driven term to tune the bubble growth and collapse rate for their specific case.
The benefits of solving the full form of the RP equation are clear compared to using the simplified Rayleigh Solution, but the full form of RP poses challenges related to the stability of the solution. A large variation of the ambient pressure leads to a rapid change in bubble radius, prompting the stiffness issue of the RP equation. The stiffness issue caused by a rapid reversion of the bubble wall movement in the rebounding phase may lead to numerical solution instability. The solution stability calls for tiny time steps. Using the adaptive time step is a valid solution strategy to compromise between numerical solution stability and computational cost. Shams et al. [
22] employed a fine time step at the singularity point of the bubble radius to ensure stability and a large time step for the rest of the portions to reduce computational time. The fine time step works when the pressure variation is large and the initial bubble size is small. Alehossein et al. [
23] developed a finite difference model for a cavitating nozzle. An adaptive time-step technique was applied, and the modified Euler method equipped with this technique successfully solved the RP equation for wide ranges of pressure variation and bubble initial sizes with high efficiency. In their method, the time step was dictated by the change in the ratio of bubble radius between adjacent steps.
By employing different time steps for singular and non-singular portions of the solution, the scheme equipped with the adaptive time-step technique ensures its stability with less computational cost compared to solution schemes which employ constant time steps. However, it is confronted with some limitations, especially in the framework of engineering application and CFD analysis. The slow advance in time at the singularity point of the RP equation is time-consuming and may not be cost-effective for the CFD software packages. The time step used at the singularity point of the RP equation may be incompatible with the convergence criteria of other fluid dynamics equations, which may require using fine time steps, thus increasing computational cost. Another possibility is that the coarse time step used in non-singular proportions may have to be refined to comply with the convergence criteria of other equations, making the adaptive time-step technique less attractive.
This study aims at solving the full form of Rayleigh–Plesset equation for better accuracy, even if the bubble undergoes a steep pressure variation. Distinguished from the adaptive time-step strategy, the proposed scheme tackles the stiffness issue via an approximation of the minimum bubble size in the collapse stage and can tolerate a time step dictated from somewhere else. This makes it more compatible with time marching of other conservation equations. The specific objectives are to (a) develop the robust solution scheme for RP equation, which is given by Equation (1) when the isothermal condition is assumed, (b) solve the RP equation for the bubble radius under various types of the ambient pressure and prove the legitimacy of the proposed solution schemes by comparing their results with published work, and (c) analyze the convergence of the proposed solution schemes by varying the time step size.
2. Solution Strategy and Discretization of Equations
The bubble wall velocity at the final stage of collapse is so high that a coarse time step results in a misleading estimation of the minimum bubble radius, which may be even negative. Subsequent to the minimum bubble radius, the gas inside the bubble that is substantially compressed in the collapse stage will rapidly reverse the bubble wall velocity. Change in the bubble radius in this period causes the singularity or stiffness issue and therefore is where the adaptive time-step technique refines the step size. Both solution schemes presented in this study employ a truncation bubble radius to approximate the minimum bubble radius when the calculated one is negative. Meanwhile, the time step size is set as a constant. The first scheme employs the finite difference method and prediction–correction method to solve the RP equation for wall velocity and bubble radius. It is therefore referred to as the FD PC algorithm. The second scheme employs the Euler method to solve for the wall acceleration, wall velocity, and bubble radius. It is referred to in this study as the Euler algorithm.
The proposed scheme can be coupled with the transport equation of the vapor phase (Equation (3)) to solve for the cavitation in the CFD software packages. As summarized in the introduction, the current cavitation models used in the CFD software, such as the Singhal model [
10], Zwart model [
11], and Schnerr–Sauer model [
12], calculate the mass transfer rate between the liquid and gas phases (Equations (4) and (5)) from the reduced form of the RP equation (Equation (2)). Equations (4) and (5) indicate that the mass transfer rate, either vaporization or condensation, is a function of the wall velocity, which is derived from the reduced form, and the vapor volume fraction. As the reduced form of RP equation excludes the effect of the second order term, viscous term, and gas term, the bubble growth and collapse rate are either overestimated or underestimated [
17,
18,
19,
20,
21].
2.1. Finite Difference Prediction–Correction Scheme (FD PC Algorithm)
The finite difference prediction–correction scheme (FD PC Algorithm) explicitly solves for the wall velocity. In this scheme, the RP equation is transformed, and the procedure is divided into two steps—the prediction step and correction step. As shown in Equation (6), the left side of the RP equation (Equation (1)) is transformed to the first derivative of a function of the bubble radius and bubble wall velocity. The viscous term is excluded first, and the bubble wall velocity is predicted. Subsequently, the bubble wall velocity predicted in the previous step is corrected by introducing the viscous term back.
In accordance with the prediction and correction step, the bubble wall velocity
is decomposed into two parts as shown in Equation (7): (i)
, which is predicted without the viscous term, and (ii)
, which is used to correct
by taking into account the viscous effects. The governing equation for
and
are given by Equations (8) and (9), respectively. Equation (9) can be rewritten as Equation (10) by plugging Equation (7) into it. As a result, solving the RP equation becomes equivalent to solving Equations (8) and (10) in sequence.
The proposed solution scheme adopts the finite difference method and is established on the discrete form of Equations (8) and (10). Using the backward and forward difference method, Equation (8) ends up as Equation (13) after a series of transformations shown by Equations (11) and (12). Meanwhile, using the backward difference method, Equation (10) can be temporally discretized as Equation (14) to calculate
.
The flowchart of the proposed solution scheme is shown in
Figure 2. After inputting the known variables such as the ambient pressure and initial conditions, the prediction and correction steps are carried out in sequence using Equations (13) and (14). If the bubble radius at the current time step is smaller than a threshold
, which is set as a small value, correction of the bubble wall velocity is made. Otherwise, no correction occurs. This is because the viscous term mainly dominates the bubble behavior in the collapse stage, where the bubble is tiny and wall velocity is considerable, rather than in the growth stage. After the bubble radius of the next time step is calculated from the bubble radius and wall velocity of the current time step, this new bubble radius is filtered by a near-zero truncation radius
to ensure it is non-negative. A negative bubble radius may occur when the time advances too aggressively at the final stage of bubble collapse. When a negative bubble radius occurs, it is replaced with the minimum bubble radius
and the bubble wall velocity is correspondingly updated based on
.
2.2. Euler Method-Based Scheme (Euler Algorithm)
In the Euler method-based scheme (Euler Algorithm), the RP equation is cast into a system of two first order ODE equations (Equation (15)). The variables
and
in (15) represent
and
, respectively. Based on the Euler method, the discrete form of
and
are derived as Equations (16)–(18). As shown in the equations above, this scheme is a 2nd order method which computes
twice for
. The variable
is computed the first time and
is computed the second time. Meanwhile, the ambient pressure of the next time step
needs to be input in this scheme. In contrast, the FD PC algorithm is a 1st order scheme and only requires the ambient pressure of the current time step,
.
The flow chart of the Euler Algorithm is shown in
Figure 3. If the
is less than the truncation radius,
, it is replaced by
and the current states of bubble including the wall velocity are correspondingly updated. The updated states will be used to calculate the wall velocity for the next time step.
Both the solution schemes presented here employ the truncation radius and accept a constant time step size. The solution schemes differ in three aspects: (i) the FD PC algorithm is a 1st order scheme while the Euler algorithm is a 2nd order scheme; (ii) the former algorithm only needs the ambient pressure of the current time step to be known, but the latter algorithm requires the ambient pressure of the next time step , which makes it unfriendly to the case where the ambient pressure profile transiently interplays with the vapor phase and is not known throughout; (iii) the former one takes into account the viscous effect in the collapse stage and the latter one includes the viscous effect all over the bubble development.
4. Robustness
The previous section showed that two proposed solvers can give a fair prediction of bubble radius in the general cases of hydrodynamic and ultrasonic cavitation. Its accuracy should be able to satisfy requirements of most analyses in engineering. It was reported that the stiffness issue caused by a large pressure variation limits the capacity of the RP equation solver and reduces its efficiency [
22,
23,
26]. Since two proposed schemes make an approximation of the bubble radius and wall velocity at the final stage of the bubble collapse using a truncation radius (
in
Figure 2), it can overcome that singularity point with a relatively coarse time step.
A large pressure variation can be observed in the pressure pulsation created by the hydraulic machinery, such as the pump and valve. In order to test if the proposed scheme performs well in the case of a large pressure variation, an ambient pressure which mimics the pressure pulsation created by opening and closing of a valve is used. As shown in Equation (21), this ambient pressure is parametrized by w, A, B, which affect the period, amplitude, and location of the midline, respectively. Two parametric analyses (Analysis A and B) are carried out to study effects of A and B on the robustness of the proposed schemes. Values for parameters A and B are listed in
Table 4. In addition to two proposed solution schemes, a commercial Matlab, ODE15s is used in Analysis A and B. ODE15s of Matlab is a variable-step, variable-order (VSVO) solver based on numerical differentiation formulas (NDFs) of orders 1 to 5. The results from this solver are used as the baseline.
The ambient pressure used in Analysis A is shown in
Figure 10 With A increasing from
to
, four ambient pressure curves with different variations are created and labeled as Tests 1–4 respectively. When parameter A is less or equal to
, ODE15s and the two proposed schemes present similar bubble radius evolution as shown in
Figure 11a–c. The Euler algorithm agrees with ODEs15s in terms of the bubble radius being better than in the FD PC algorithm. There was no substantial difference in the computational time between the proposed schemes and ODE15s. The solutions were completed within 6 s using a Dell computer (with 16 cores of Intel Xeon Processor E5-2630
[email protected] GHz and RAM of 128 GB). When a parameter A of
was used, ODE15s stopped working because the variable time step size became much smaller than the built-in lower limit of
s. In contrast, the two proposed algorithms were able to predict the bubble radius as shown in
Figure 11d.
The performance of ODE15s and two proposed solution schemes is also benchmarked under different values of parameter B. In Analysis B, four ambient pressure curves shown in
Figure 12 corresponding to values of B from
to
were used. As shown in
Figure 13, apart from the case of
, ODE15s and two proposed solution schemes yielded similar results of the bubble radius. In the case of
, only two proposed solution schemes were able to solve the RP equation, as seen in
Figure 13a.
In summary, variation in the ambient pressure profiles, which predetermines cavitation in fluid flows, can significantly affect the stiffness of the RP equation and functionality of the solver. The proposed solution schemes have shown to exhibit superiority in managing a wide range of ambient pressure compared to the general ODE solver available in Matlab.
5. Convergence
The truncation error in the finite difference method depends on the discretization size. As the discretization size approaches zero, a legitimate finite difference scheme should give results which converge and finally are consistent with the true solution of the equation. Convergence of the two proposed solution schemes is evaluated by varying the time step size from
to
s. The ambient pressure used in this case is Test 4 discussed in
Section 4. As shown in
Figure 14, regardless of the time step size, curves of the bubble radius coincide before the first collapse but differ in the rebounding phase. However, as the time step is refined below
s, the rebounding phase starts to converge in the case of the FD PC algorithm. Similarly, the convergence of the Euler algorithm occurs at the time step size of
s (
Figure 15).
The convergence rate and computational efficiency of the two proposed schemes are compared. The error is defined in Equation (22), where
is the approximate bubble radius and
is the real bubble radius. It is assumed that the error is zero at the finest time step of
s. As shown in
Table 5, the Euler algorithm has a higher convergence rate than the FD PC algorithm. In contrast, the FD PC algorithm exhibits superior computational efficiency to the Euler algorithm.
n is the number of time steps.