In order to numerically examine the convergence and stability of the proposed methods, an exact solution
is defined over a finite domain
and used in all examples in this section. In all tests, we will employ a uniform mesh with
in space. The initial time is fixed,
, while the final time
T varies depending the types of tests. The initial condition
and boundary conditions
are obtained using the exact solution (
31). The source term
can be obtained by using the governing equation. Consider an interface point with the normal direction being
, where
is the angle between the normal direction and the positive
x direction. The jump conditions at this point can be calculated via Equation (
31) and (
37)
where
and
are the limiting values of
at this interface point. We note that both jump conditions are temporally and spatially dependent to represent the most general jump conditions imposed on the interface
.
3.2. Variable Coefficient Examples
In all examples of this subsection, the diffusion coefficient
is defined as a piecewise smooth function
Example 1. In the first example, the interface Γ is an ellipse constructed by the level set functionContour plots of the diffusion coefficient (37) and exact solution (31) over the whole domain Ω
are shown in Figure 5. Discontinuity on the interface can be easily observed in both graphs. Spatial convergence tests are conducted first to compare the performance of the two spatial discretization methods, MIB and GFM. To this end, the time step is fixed to be small,
, and
varies from 41 to 201 with an increment of 10 for all four proposed numerical methods. Log–log plots of
and
errors at the final time
are shown in
Figure 6a,b, respectively. All four methods are found to converge and be capable of achieving reasonable accuracy. The two MIB-involved methods achieve similar accuracy in the range of
for
error and
for
error, respectively, which are about two-magnitude smaller than those achieved by the two GFM-involved methods in all tested cases. Moreover, convergent rates are calculated using MATLAB subroutine
polyfit and reported in
Figure 6a,b as well. It can be seen that for the
errors, the rates of the MIB schemes are about 1.6, while those of the GFM schemes are essentially 1. We believe the difference is caused by the hypothesis made in the GFM—it not only lowers the accuracy but also degrades the convergence rate. By considering a fixed number of time steps, wall clock times against
are presented using log–log plot in
Figure 6c. Execution times of all four methods are found to be almost same and increase at a similar rate slightly less than two. It is thus our belief that all methods are essentially equivalently efficient and they are all fast
-methods where
N stands for the number of grids per direction.
We next test the stability of four methods. To this end, we will consider various
values, and for each
, a very long time integration is conducted with the number of time steps being 10,000. By considering two spatial meshes with
and
, stability results are presented in
Table 1. All computations are found to be stable, except for one case of the MIB-ADIPR method with
and
. The errors for this unstable case are skipped and marked with dash signs in
Table 1. The present study suggests that the MIB-ADIPR is the least stable method among the four methods. Moreover, the results shown in
Table 1 also indicate that the two MIB-involved methods are usually more accurate than two GFM schemes.
It is meaningful to numerically study the condition of in terms of h when the MIB-ADIPR converges. To this end, are selected and for each value, and the largest stable value is searched via the bisection method. The least square fitting of the resulting ’s and h’s lead to a numerical stability condition for the MIB-ADIPR scheme, i.e., .
Temporal convergence is studied next. In this set of tests, the spatial mesh is fixed to be reasonably large,
, while the time step varies from
down to
. The resulting
- and
- errors at the final time
are reported in
Table 2. Corresponding convergent rates are calculated by errors obtained at two consecutive tested time steps in
Table 2.
A few important observations can be made on the results obtained in the temporal convergence tests. First, several entries are skipped in
Table 2, because the MIB-ADIPR is unstable when
. We note that the errors of unstable cases are much less than those in
Table 1 in terms of magnitude. This is because the stopping time is fixed to be
in the present study. Thus, the number of time steps is actually quite small for large
values. Consequently, the error accumulation is not significant. On the other hand, all other three methods produce reasonably small errors and are believed to converge in all tested cases. Secondly, the convergence rates of the two MIB-involved methods are mostly within the range between one and two as expected. For the MIB-ADID1, the temporal convergence rate is about one initially but becomes close to two as
is small enough. This is believed to be rooted in how the jump conditions are treated in the MIB method, i.e., tangential derivatives
and
at the next time step are approximated by their values at the current time step. The order of such approximation is
, which significantly affects the temporal precision when
is large. When
is small enough, such approximation becomes negligible so that the temporal convergence is dominated by the ADI scheme itself. Thus the MIB-ADID1 method attains a second order temporal convergence when
. For the MIB-ADIPR method, once it is stable, its temporal convergence rate is about two, as shown in
Table 2. However, the rates obtained by MIB-ADIPR are not seen to be significantly higher than those obtained by MIB-ADID1. Thirdly, the temporal rates of two GFM methods are about one initially but quickly drop to zero as
becomes smaller. This means that the GFM spatial discretization invokes a quite large error, which finally dominates the computation. The refinement in time does not reduce the total error any further so that the temporal order becomes zero. In comparing with two GFM schemes, the two MIB-involved methods produce relatively larger errors when
, but far fewer errors when
. A similar trend was observed when the diffusion coefficient is piecewise constant and is reported in Reference [
15].
Results obtained in this example suggest that all four methods are able to produce satisfying numerical solutions when the step size is small. However, the MIB-ADID1 method is by far our most favorable method considering it is the most accurate and stable method. The geometric shape of the interface used in this example is rather simple, and we thereby continue to test the four methods in the next example with a more complicated interface.
Example 2. In the second example, the interface Γ is similar to that shown in the work [35]. The level set function is given bywith parametersContour plots of the diffusion coefficient and exact solution are shown in Figure 7. It is obvious that the shape of the interface in Example 2 is much more complex than that in Example 1. We want to see how the geometry of the interface impacts the proposed methods. Results obtained in spatial convergence, stability tests, and temporal convergence using the same numerical setup as that in Example 1 are shown in Figure 8, Table 3 and Table 4, respectively. In
Figure 8a,b, it is found that convergence rates obtained by the two MIB-involved methods are reduced to slightly less than one but are still much greater than the convergence rates obtained by the two GFM-involved methods. It is believed that the reduction of spatial convergence rates is due to the more complicated shape of the interface when jump conditions need to be taken care of at more irregular and corner pointers in the numerical procedure. Moreover, the corresponding wall clock time shown in
Figure 8c is found to be higher than those obtained in Example 1 due to additional calculations required for additional jump conditions. However, the overall complexity is still
for both MIB and GFM methods.
The “negative” impact of the interface can also be observed in stability tests. In
Table 3, both MIB-ADIPR and GFM-ADIPR become unstable for
and
. It is definitely different from the results we obtained for solving problems with a piecewise constant diffusion coefficient in the work of [
15], because all GFM-ADI methods are unconditionally stable in that context. For constant coefficient problems, the GFM finite difference matrices for
and
are symmetric. However, such symmetry is lost for the present variable coefficient problems. Consequently, the GFM-ADIPB becomes conditionally stable.
The temporal convergence tests are shown in
Table 4. Both the MIB-ADID1 and GFM-ADID1 schemes produce larger errors than those obtained in
Table 2, while the convergence patterns are very similar. Limited by the spatial accuracy of the GFM, the ADID1 stops to convergence as
decreases. For the MIB-ADID1, the temporal order increases from one to two, as
is decreasing. Moreover, more cases of the two ADIPR-involved methods are found to diverge, no matter which spatial discretization, either MIB or GFM, is used. As a matter of fact, it is hard to tell which spatial discretization method is better in terms of stability when solving problems with variable diffusion coefficient
.
Based on results presented in Examples 1 and 2, it is reasonable to believe that ADID1 is superior to ADIPR to be used for temporal discretization in terms of convergence and stability—both ADID1-involved methods converge in almost all tested cases, and the two ADIPR-involved methods converge only when the time step is small, and the results they obtain are not seen to be more accurate than those obtained by MIB-ADID1. Moreover, it seems that the MIB-ADID1 method, which maintains reasonable convergence rates in both spatial and temporal convergence tests, is the best method among all four proposed methods. In the examples that follow, we will just focus on testing the two ADID1-involved methods.
Example 3. In our first example, a grid line cuts the interface at most at two irregular interface points due to the simplicity of the interface’s geometry. In the second example, a grid line can cut the interface more than twice, but corner interface points only occurred in a few cases. In the examples which follow, we would like to have both irregular and corner interface points occurring in many interface locations in order to earn more profound insight on how they are going to affect the proposed numerical methods. To this end, an interface constructed by a parametric functionis used in this and next example. Here governs the magnitude and curvature of the interface, is a positive integer determining the number of “heads” of the curve, and η is an angle in the range of . By choosing parameters , a four-head interface, together with imposed β and exact solution, is demonstrated in Figure 9. When compared to the interfaces used in Examples 1 and 2, this interface has sharper curvature at four corners so that corner interface points are encountered in almost all tested cases. Using the same numerical setup, results obtained for spatial, temporal and stability tests on the two ADID1-invloved methods are reported in
Figure 10,
Table 5 and
Table 6, respectively. No significant differences are observed in the results obtained in this example when compared to those obtained in the previous two examples. In fact, the rates obtained in spatial tests (
Figure 10) and temporal tests (
Table 6) are similar to those obtained in Examples 1 and 2, and no divergence is found in stability tests (
Table 5). It suggests that the numerical treatments introduced in both MIB and GFM methods are equally accurate when dealing with the jumps imposed at irregular and corner interface points. Moreover, wall clock time shown in
Figure 10b is between those shown in
Figure 6c and
Figure 8c, suggesting that the efficiency of both methods is not jeopardized significantly by the corner points either.
Example 4. The results obtained in Example 3 have clearly demonstrated the robustness and efficiency of the two proposed methods when treating jump conditions at both irregular and corner interface points. In the last example, we continue to make the interface sharper with more interface points by choosing in Equation (40), resulting in a six-head interface with fast changing curvature shown in Figure 11. Similar numerical results are shown in Figure 12 and Table 7 and Table 8. Once again, no significant differences are observed, and both methods well maintain their performance in previous examples as expected. In fact, the ADI-ADID1 attains the second order convergence in space for this variable coefficient example. Provided the interface used in this example is the most general one reported in this work, one additional set of tests is conducted to study one more factor, the contrast of
’s values inside and outside the interface, which could also affect the convergence and stability of the methods. To this end, the diffusion coefficient
in Equation (
37) is redefined as
with an additional ratio coefficient
so that the contrast of
values inside and outside the interface can be varied. Results obtained by varying the value of
r from
to
are presented in
Table 9, with the other numerical parameters being fixed as:
,
, and
. One can see that both methods are stable and able to produce reasonable errors when the contrast ratio
r is small, while MIB-ADID1 starts to become unstable and produce relatively large errors when
r is large, i.e.,
. On the other hand, GFM-ADID1 is still able to maintain its stability and produce reasonable errors even when the ratio
r is as large as 320. Moreover, one may also notice that, in
Table 9, errors obtained by GFM-ADID1 are smaller than those obtained by MIB-ADID1. Based on the results shown in
Table 9, we conclude that GFM-ADID1 has a better chance to converge when the contrast of
’s values and time step
are large, while MIB-ADID1 shall be better when small
is utilized. This conclusion matches what we observed for piecewise constant
in [
15].