(No difference)

Revision as of 22:44, 19 September 2023


Abstract

This work forms the foundation for addressing high-order immersed interface methods to solve interface problems and enables us to conduct in-depth examination of this theory. Here, we focus on the introduction a fourth-order finite-difference formulation to approximate the second-order derivative of discontinuous functions. The approach is based on the combination of a high-order implicit formulation and the immersed interface method. The idea is to modify the standard schemes by introducing additional contribution terms based on jump conditions. These contributions are calculated only at grid points where the stencil intersects with the interface. Here, we discuss the issues of implementing the one-dimensional Poisson equation and the heat conduction equation with discontinuous solutions as a three-point stencil for each grid point on the computational domain. In both cases, the resulting discretization approach yields a tridiagonal linear system with matrix coefficients identical to those employed for smooth solutions. We present several numerical experiments to verify the feasibility and accuracy of the method. Thus, this high-order method provides an attractive numerical framework that can efficiently lead to the solution to more complex problems.

keywords

Immersed interface method, implicit finite difference, fourth-order accuracy, Poisson equation, heat conduction equation

1 Introduction

High-order numerical solutions to differential equations arising from discontinuous solutions find extensive utility across various research domains [1,2,3,4,5,6]. In the case of smooth solutions, the standard central finite-difference method requires a significant number of grid points to achieve a high level of accuracy in its numerical results. As a result, over the past few decades, several schemes have been developed to obtain fourth- and sixth-order finite-difference methods [7,8,9,10,11], including those one based on the implicit finite-difference (IFD) formulation [12,13,14,15].

On the other hand, although several methods have been proposed to address discontinuous problems [2,16,17,18,19,20,21], the Immersed Interface Method (IIM) [22,23,24,25] stands out as a highly accurate option that requires minimal adjustments to the standard finite-difference formulation. However, these methods typically achieve second-order accuracy. For instance, there are limited implementations of a few third-, fourth- and sixth-order IIMs available for solving Poisson equations with discontinuous solutions [26,27,28,29,30,31,32,33].

This paper focuses on the basic ideas of combining the implicit finite-difference and immersed interface method (IFD-IIM) to achieve high-order approximations for second-order derivatives of both continuous and discontinuous real-valued functions. The IFD scheme offers a highly accurate numerical method [34,35], while the IIM handles discontinuities through minimal adjustments made exclusively at grid points where the stencil intersects the interface [36,37], yielding additional terms known as jump contributions.

We illustrate the implementation of the IFD-IIM approach with two examples: the one-dimensional Poisson equation for static cases and the heat conduction equation with a fixed interface for time-evolving scenarios. Our proposed method offers several advantages. Notably, the resulting tridiagonal matrix coefficient of the finite-difference scheme remains the same as those for smooth solutions, with the additional terms arising from the jumps located in the right-hand side vector. Consequently, our algorithm is straightforward to implement, employing the efficient Thomas' algorithm.

We have organized our study as follows. In Section 2, we introduce a fourth-order implicit finite-difference method capable of handling second-order derivatives, both in smooth and discontinuous scenarios. Section 3 demonstrates the application of this implicit scheme in approximating solutions to the one-dimensional Poisson equation. Section 4 shows the combination of the IFD-IIM with the Crank-Nicolson method to solve the heat conduction equation. Sections 5 and 6 provides a series of numerical examples to illustrate the algorithm's accuracy for both equations. Lastly, Section 7 offers our conclusions and outlines directions for future research.

2 Implicit finite-difference formulation with discontinuities

In this section, we outline the key attributes of the implicit finite difference formulation, demonstrating how the scheme can be adapted for addressing discontinuous problems through the utilization of the immersed interface method.

We approximate the numerical solution on the domain that is divided into sub-intervals, as follows

(1)

where the grid size is given by . We employ and to denote the approximate and exact solution at the th-point of the grid, respectively. Here, the interface is at located between grid points and as , see Fig. 1. The distances of the closest grid points to the interface are defined as and . Note that and are positive and negative values, respectively.

Example of a discontinuous function u with an interface located between the points xI and xI+1.
Figure 1: Example of a discontinuous function with an interface located between the points and .

On the other hand, the jump for at is defined as

We employ a similar definition for the jumps such as the ones of the right-hand side and the derivatives of .

In this paper, we designate and as irregular points, while considering the rest as regular points. This classification holds significant importance as distinct schemes are applied to each category, as presented in the following theorems.

2.1 Second-order derivative approximation for regular and irregular grid points

The following two Theorems state the main results to approximate the second-order derivative using high-order schemes for regular and irregular points.

Theorem 1: Regular points [34,35]. Let us consider a real-valued function with an interface such that . Then can be approximated by the implicit finite-difference (IFD) scheme

(2)

where

(3)

, and central finite-difference formula is given by

(4)

From Taylor series expansions and under some simplifications, the second-order derivative at any regular point can be written in terms of the centered finite-difference operator, as follows

Previous equation holds due to the solution is smooth on a neighborhood around . Thus, we obtain a fourth-order IFD using a stencil of three nodes by moving the fourth-order term to the left-hand side. We get

Finally, the proof is completed by using the definition of operator , , and .

It is important to remark that formula (2) is applicable exclusively for regular points. In order to address this limitation for the two irregular points near the interface, we introduce a modified implicit finite-difference scheme using the IIM, specifically tailored to handle discontinuous solutions. Furthermore, instead of having a fourth-order local truncation error for the irregular points, we proceed as other IIMs [22,23,24,29,33,32] by taking one order lower at these points. We will numerically show that the global order of convergence can be still even if the local truncation error at and is .

Theorem 2: Irregular points [14]. Let us consider the known jump conditions

(5)

at such that . Then can be approximated at and by the implicit finite-difference immersed interface method (IFD-IIM) given by

(6)

where and are defined in (3) and (4), respectively, and

(7)

and where .

We obtain a third-order scheme for at and following similar ideas as the ones developed for the generalized Taylor expansion proposed by Xu & Wang [36] and the IIM for elliptic interface problems with straight interfaces proposed by Feng & Li [37]. The idea is to consider extended smooth solutions of such that we can apply the standard central scheme to and . For instance, a function based on the original left solution is defined as

Using Taylor series expansions of around , the definition of jumps (5), and some simplification yield

Thus,

Finally, we get (6) which complete the proof. The same procedure can be applied for the proof at . We refer to the reader to the work of Itza Balam and Uh Zapata [14] for more details.

Remark 1: If , then Theorem 1 yields the standard second-order finite-difference method for regular points given by

(8)

and Theorem 1 results in an IIM of first-order for irregular points as follows

(9)

where

(10)

Note that, in this case, we only require to explicitly know jump conditions , and .

2.2 Implicit approximation for a real-valued function

Before to apply the previous results for approximations to differential equations, it would be useful to express with finite differences the operator for a real-valued function and not its second-order derivative . The finite-difference formula is obtained by approximating with the central finite differences, as presented in (1)-(10) for regular and irregular points, respectively.

For regular points (), it follows from equation (1):

Thus, if we define as the resulting finite-difference

(11)

then, we have that

(12)

However, we still have the same issue to overcome for a discontinuous function . We remark that this second-order derivative of is already multiplied for . Consequently, we can use the IIM technique where the contribution term is only first-order accurate to ; thus, we still have a local to keep a global fourth-order accurate method. Then for irregular points, the IIM applied for this term follows

(13)

where is given by finite difference (11) and

(14)

Finally, for regular and irregular points, we have high-order finite-difference approximations of the implicit operator applied to a real-valued function as in (12) and (13), and to its second-order derivative as in (2) and (6). Now, we proceed to implement them to the solution of differential equations, as presented in the following two sections.

3 Poisson equation

In this section, we developed a fourth-order finite difference scheme for the Poisson equation. Let us consider and as the solution of the problem and known right-hand side function, respectively. Thus the interface problem is given by

We divide in two regions, and , separated by an immersed interface . Dirichlet boundary conditions are defined on . We assume that and may have discontinuities at the interface . Thus, we require additional conditions known as jumps. Note that the principal jump conditions, and , are known functions defined on . Here, is the derivative in the normal direction.

In the context of the general problem, the computational domain can be considered into multiple dimensions. Nevertheless, since the primary objective of this paper is to illustrate the fundamental attributes of the proposed implicit high-order method, we concentrate on investigating the one-dimensional (1D) Poisson problem as defined by

(15)
(16)
(17)
(18)

Here, and can be discontinuous functions at a given point , and principal jump conditions and are known values at .

3.1 IFD-IIM for the 1D Poisson problem

Let us consider that is located between the adjacent grid points and as . If we apply operator at both sides of (15), then we get

(19)

For and , the grid points are at the boundary, thus the Dirichlet boundary condition can be directly applied. Thus, using the IFD scheme (2) and approximation (12) in (19) at , we have that the finite-difference scheme for regular points is given by

(20)

Similarly, using formulas (6) and (13), the scheme for irregular points is given by

(21)

where and are given by (7) and (14), respectively. Thus, combining the results for all grid points, the IFD-IIM for the 1D Poisson equation (15) at is given by

(22)

where total contribution is with

(23)

and

(24)

We remark that scheme (22)-(24) results in an approximation with local truncation error of fourth- and third-order for regular and irregular grid points, respectively. Thus, a global method is expected.

3.2 IFD-IIM and principal jump conditions

Note that , , , , and must be known to apply the proposal fourth-order IFD-IIM. Thus, it seems that more jump conditions of rather than the principal jump conditions (17) and (18) are required to have a fourth-order accurate method. However, we can use the Poisson equation (15) to obtain them as follows

(25)

Thus, the total jump contribution for the one-dimensional Poisson problem is given by

(26)

Thus contribution depends only on the principal jump conditions, and , and right-hand side jumps: , , and . The additional jumps derivatives from the right-hand side can be approximated using the current values of . In this paper, we will assume that we know them.

Remark 2: For the 1D Poisson problem, a global second-order IIM () only requires to know the principal jump conditions , and .

Remark 3: If , then and both weight terms next to second-order derivative jump of are equal to zero in (26). Thus, we do not require to know jump condition to obtain a fourth-order method when the interface is located at a grid point.

4 Heat equation with a fixed interface

For the second differential equation, we consider the heat conduction equation with initial, boundary, and principal jump conditions, as follows

Here, the source and initial value may be discontinuous or singular across a fixed interface . The interface is immersed in the domain and divides into two parts, and . As the Poisson equation, this paper only focuses on the one-dimensional problem given by

(27)
(28)
(29)
(30)
(31)

where the source and initial value may be discontinuous or singular across a fixed interface located at .

4.1 IFD-IIM for the 1D heat conduction problem

Since the interface is fixed and all the quantities are continuous with time, we can approximate the time derivative using the Crank-Nicolson method, as follows

(32)

Applying the fourth-order operator (3) to equation (32) yields

(33)

For regular points, using the IFD method (2) and approximation (12), equation (33) can be approximated as follows

(34)

For irregular points, using the IFD-IIM (6) and approximation (13), the implicit scheme is given by

(35)

where

(36)

Here, and are defined as (14), and is given by (7). Thus, for 1D heat conduction equation (27), the IFD-IIM reads

(37)

where and is given by (36). Here, we have that for regular points.

Remark 4: The IFD-IIM (37) is unconditionally stable and the local truncation error is of and for regular and irregular grid points, respectively. Thus a global fourth-order method is expected by taking .

Remark 5: As the Crank-Nicolson method is implicit in time, the IFD-IIM solves a linear system at each time step. To address this efficiently, we employed Thomas' algorithm, given that the resulting matrix is tridiagonal. Furthermore, the implicit method in space preserves the original structure of this system of equations, thus yielding a higher-order method without compromising the efficiency of the standard scheme.

Remark 6: In addition to accounting for the contributions of the source term and its derivatives, the finite-difference scheme presented in equation (37) requires additional knowledge of the jump conditions for the solution given by , , and . It is worth noting that, although not presented here, there are techniques available for deriving all the necessary jump conditions from the principal jump conditions [14].

5 Numerical results for the Poisson equation

In this section, we test the IFD-IIM for different examples of the Poisson equation. In the following simulations, we numerically solve the equation for a given right-hand side function and compare it with its analytic solution. In all cases the resulting linear system is solved using the Thomas' algorithm.

The numerical method is tested using three different examples. Example 1 considers a smooth solution to verify the fourth-order implicit method for smooth solutions. Example 2 studies a Poisson equation with a discontinuous solution in a single interface point. The Matlab code for this example can be found in Appendix A. Finally, Example 3 presents a discontinuous problem with multiple interface points.

For the all these examples, the computational domain is the interval , and the grid spacing is for different sub-intervals. The errors are reported using the -norm and the discrete -norm calculated as

(38)

respectively, where and corresponds to the numerical and exact solution at , respectively. The estimated order of accuracy is computed as

(39)

where and indicates the different number of sub-intervals.

5.1 Example 1. Poison equation with smooth solution

Example 1 considers an infinitely smooth and differentiable exact solution of the one-dimensional Poisson problem (15) given by the following expression

(40)

The right-hand side function, , is obtained directly from (40). We impose Dirichlet boundary conditions according to the function . Due to the regularity of the solution, the jump contributions and in equation (26) are equal to zero.

Table 1 presents the convergence analysis of Example 1 for different grid resolutions. If , then we recover the standard central finite-difference method of second-order accuracy. On the other hand, the fourth-order implicit scheme is recovered when . Last row of table 1 shows the numerical order calculated by the regression-line slope based on a least squares method (LSM) of the - and -norm error. A complete analysis of the IFD method for smooth solutions can be found in [12].


Table. 1 Convergence analysis of Example 1 testing a Poisson equation with smooth solution.
-norm Order -norm Order -norm Order -norm Order
10 7.52e-02 --- 2.84e-02 --- 9.30e-03 --- 3.56e-03 ---
20 1.70e-02 2.15 6.52e-03 2.12 5.05e-04 4.20 1.93e-04 4.21
40 4.15e-03 2.03 1.60e-03 2.03 3.06e-05 4.04 1.17e-05 4.04
80 1.03e-03 2.01 3.98e-04 2.01 1.90e-06 4.01 7.27e-07 4.01
160 2.57e-04 2.00 9.95e-05 2.00 1.18e-07 4.00 4.54e-08 4.00
LSM 2.04 2.04 4.06 4.06

5.2 Example 2. Poison equation with a single interface

For Example 2, we show the method's capability by solving a single interface problem located at . The exact solution is given by the function

(41)

The right-hand side, , is obtained directly from equation (41). We test two different points: and . For the first case, we always have for (); thus the interface is always located at one grid point of that resolution. In general, for , we have different values for different numbers. Figure 2 shows the numerical and exact solution when the interface is located at these two values using . As expected, the exact solution is accurately recovered for both cases.

Numerical and exact solution of Example 2 using N = 40 using (a) x_α= 0.4, and (b) x_α= 0.63.
Figure 2: Numerical and exact solution of Example 2 using using (a) , and (b) .

Table 2 shows the convergence analysis for Example 2 for the two values. Observe that a second-order method is recovered for and a fourth-order method for . As expected, the IFD-IIM numerical order does not depend on the location of the interface. However, the magnitude of the error may present minor variations due to the interface position. Figure 3 shows the error analysis corresponding to interface locations and for .


Table. 2 Convergence analysis of Example 2 using the IFD-IIM.
-norm Order -norm Order -norm Order -norm Order
10 1.69e-02 --- 5.19e-03 --- 5.75e-05 --- 3.42e-05 ---
20 4.21e-03 2.00 1.18e-03 2.13 3.58e-06 4.00 1.97e-06 4.12
40 1.05e-03 2.00 3.07e-04 1.95 2.24e-07 4.00 1.39e-07 3.82
80 2.63e-04 2.00 7.53e-05 2.03 1.40e-08 4.00 7.75e-09 4.16
160 6.57e-05 2.00 1.86e-05 2.01 8.74e-10 4.00 5.37e-10 3.85
LSM 2.04 2.02 4.00 3.99
Convergence analysis of Example 2 for N = 10,\dots ,320 using (a) x_α= 0.40, and (b) x_α= 0.63.
Figure 3: Convergence analysis of Example 2 for using (a) , and (b) .

The contribution formula includes jumps , , , , and to obtain a fourth-order accurate method. Fig. 4 shows that if we add additional jumps of high-order derivatives to , such as , we observe that the error oscillation decreases in comparison with Fig. 3 results. It is expected because the method is for the whole computational domain, including the irregular points. Thus, we can mitigate error oscillations due to interface position by adding high-order jumps.

Convergence analysis of Example 2 for N = 10,\dots ,320 using (a) α= 0.40, and (b) α= 0.63. The contribution term includes jumps up to fifth-order ([uₓₓₓₓₓ]=[fₓₓₓ]).
Figure 4: Convergence analysis of Example 2 for using (a) , and (b) . The contribution term includes jumps up to fifth-order ().

Now we study the effect of removing jumps in . Let us consider a contribution term up to the third derivative jump by dropping . Thus, the numerical approximation is only third-order accurate, as shown in Fig. 5 for different interface values. Note that error oscillations may have a clear pattern or a random distribution depending on the interface location. In general, the error magnitude perturbations are related to the variations coming from and values in the formula (26).

Convergence analysis of Example 2 for N = 10,\dots ,320 using (a) α= 0.40, and (b) α= 0.63. The contribution term includes jumps up to third-order ([uₓₓₓ]=[fₓ]).
Figure 5: Convergence analysis of Example 2 for using (a) , and (b) . The contribution term includes jumps up to third-order ().

Note that there are some points in Fig. 5, marked with circles, that are close to the fourth-order line. Those circled markers correspond to the values with : for , and for . Both set of points satisfy that the interface is located at a grid point . In the case of , we observe that the global order (black points) is close to ; meanwhile, the circled points order is four. Similar behavior is obtained for . Thus, for a given mesh resolution , the IFD-IIM is still fourth-order accurate for , as proven theoretically in Section 3.2.

5.3 Example 3. Poison equation with multiple interface points

Example 3 investigates the numerical scheme capability to solve a multiple interface problem. We only focus on two interface points located at and . However, the methodology could be applied for multiple interfaces by doing minor modifications in the implementation. For this problem, the exact solution of the Poisson problem is given by

(42)

The right-hand function is obtained directly from the exact solution (42). We consider the same computational domain and grid resolution as previous 1D examples. Fig. 6 presents the analytical and numerical solution when the interface is located at and using . This figure also shows the error analysis. As expected, the IFD-IIM is a fourth-order accurate method.

(a) Numerical and exact solution of Example 3 with multiple interfaces using N = 40, and (b) convergence error analysis using different grid resolutions.
Figure 6: (a) Numerical and exact solution of Example 3 with multiple interfaces using , and (b) convergence error analysis using different grid resolutions.

6 Numerical results for the Heat equation

This section tests the IFD-IIM for the Heat conduction equation in different scenarios. Example 4 verifies the fourth-order implicit method for smooth solutions. Example 5 studies a Heat equation with a discontinuous solution in a single interface point and no source term. Finally, Example 6 presents a general discontinuous problem. For the all these examples, the computational domain is the same interval and space step, , used for the Poisson examples. Here, the final time is at and the time step is . The error and estimated order of accuracy are reported using (38) and (39), respectively, at the final step.

6.1 Example 4. Heat equation with smooth solution

This example is constructed so that the exact solution is

(43)

where the source term is derived from (27) and (43). The initial and boundary conditions are also obtained from the exact solution. The convergence analysis of this example is presented in Table 3 with the final time being . As expected, the high-order methods reach their corresponding order of accuracy.


Table. 3 Convergence analysis of Example 4 testing a heat equation with smooth solution.
-norm Order -norm Order -norm Order -norm Order
10 1.66e-02 --- 1.07e-02 --- 1.84e-04 --- 1.18e-04 ---
20 4.12e-03 2.01 2.65e-03 2.01 1.14e-05 4.01 7.34e-06 4.01
40 1.03e-03 2.00 6.60e-04 2.00 7.15e-07 4.00 4.58e-07 4.00
80 2.58e-04 2.00 1.65e-04 2.00 4.47e-08 4.00 2.86e-08 4.00
160 6.44e-05 2.00 4.12e-05 2.00 2.79e-09 4.00 1.79e-09 4.00
LSM 2.00 2.00 4.00 4.00

6.2 Example 5. Heat equation with discontinuous solution

In this example, the exact solution is defined as

(44)

The source term of this problem is . In this example, both the function and their derivatives have jumps, and these jumps vary in time. The boundary condition, initial condition, and all jumps are specified by .

The figure of numerical solution and absolute error plot using for different time stages are shown in Fig. 7. On the other hand, the one-dimensional results at are presented in Figs. 8 and 9. More details of the grid refinement analysis at is presented in Table 4 for two different interface point locations. As expected, a fourth-order method is obtained for both interfaces. We remark that the variation of the errors using is because the different values resulting from the discretization.

Numerical solution and absolute error of Example 5 using N = 40, x_α=0.4 for tퟄ[0,0.5].
Figure 7: Numerical solution and absolute error of Example 5 using , for .
Numerical results at final time simulation T=0.5 and x_α=0.4 of Example 5.
Figure 8: Numerical results at final time simulation and of Example 5.
Numerical results at final time simulation T=0.5 and x_α=0.63 of Example 5.
Figure 9: Numerical results at final time simulation and of Example 5.
Table. 4 Convergence analysis of Example 5 using the IFD-IIM for the heat equation with a discontinuous solution.
-norm Order -norm Order -norm Order -norm Order
10 1.11e-07 --- 6.52e-08 --- 7.57e-08 --- 4.49e-08 ---
20 6.90e-09 4.01 4.01e-09 4.02 3.75e-09 4.34 2.25e-09 4.32
40 4.29e-10 4.00 2.49e-10 4.01 3.58e-10 3.39 2.09e-10 4.43
80 2.68e-11 4.00 1.55e-11 4.00 1.53e-11 4.55 8.93e-12 4.55
160 1.63e-12 4.03 9.39e-13 4.04 1.35e-12 3.50 7.82e-13 3.51
LSM 4.01 4.02 3.95 3.96

From Table 5, we can find the results when the time step is chosen as . As expected, the proposed IFD-IIM is stable and has two-order convergence either we take a second- or fourth-order approximation in space. We remark that this is a property of the selected time integration method. For instance, similar findings as Table 5 can be obtained for smooth solutions.


Table. 5 Convergence analysis of Example 5 testing the heat equation with .
-norm Order -norm Order -norm Order -norm Order
10 2.94e-04 --- 1.87e-04 --- 3.78e-05 --- 2.67e-05 ---
20 8.53e-05 1.78 4.85e-05 1.95 1.03e-05 1.87 7.22e-06 1.89
40 2.11e-05 2.01 1.26e-05 1.94 2.74e-06 1.91 1.92e-06 1.91
80 5.31e-06 1.99 3.15e-06 2.00 6.91e-07 1.99 4.83e-07 1.99
160 1.34e-06 1.99 7.83e-07 2.00 1.72e-07 2.00 1.21e-07 2.00
LSM 1.96 1.97 1.95 1.95

6.3 Example 6. Heat equation with a general discontinuous solution

Finally, Example 6 investigates the capability to solve a heat interface problem with a general discontinuous solution. For this problem, we slightly modified the previous example such that the exact solution of the heat conduction problem is given by

(45)

Here, the source term is a general function that varies both in time and space. It is directly derived from equation (27) as well as the exact solution (45). Furthermore, the exact solution is utilized to specify the boundary condition, initial condition, and all jumps contributions.

In Fig. 10, we depict the temporal evolution of the numerical solution and absolute errors using parameters and . It is noteworthy that the behavior of the solution differs from the previous example. More in-depth analysis of the results at are illustrated in Figs. 11 and 12, corresponding to values of and , respectively. Grid refinement analyses are also provided in these figures. As anticipated, the IFD-IIM method demonstrates fourth-order accuracy, a validation that is further detailed in Table 6.

Numerical solution and absolute error of Example 6 using N = 40, x_α=0.4 for tퟄ[0,0.5].
Figure 10: Numerical solution and absolute error of Example 6 using , for .
Numerical results at final time simulation T=0.5 and x_α=0.4 of Example 6.
Figure 11: Numerical results at final time simulation and of Example 6.
Numerical results at final time simulation T=0.5 and x_α=0.63 of Example 6.
Figure 12: Numerical results at final time simulation and of Example 6.
Table. 6 Convergence analysis of Example 6 using the IFD-IIM for the heat equation with a general discontinuous solution.
-norm Order -norm Order -norm Order -norm Order
10 3.91e-04 --- 2.18e-04 --- 4.32e-04 --- 2.43e-04 ---
20 2.50e-05 3.97 1.34e-05 4.02 2.48e-05 4.12 1.45e-05 4.07
40 1.56e-06 4.00 8.37e-07 4.01 2.38e-06 3.38 1.12e-06 3.69
80 9.72e-08 4.00 5.22e-08 4.00 9.48e-08 4.65 5.56e-08 4.34
160 6.08e-09 4.03 3.26e-09 4.00 9.29e-09 3.35 4.37e-09 3.69
LSM 4.00 4.01 3.90 3.95

7 Conclusions

This work serves as the general foundation for addressing high-order IIMs to solve interface problems, facilitating comprehensive investigations into this theoretical framework. Here, we present a fourth-order finite-difference scheme for approximating the second-order derivative of real-valued continuous and discontinuous functions. This method combines an implicit formulation with the immersed interface method. Our proposed scheme employs a three-point stencil, achieving different accuracy at regular and irregular points. To illustrate the effectiveness of the proposed IFD-IIM approach, we applied it to solve the one-dimensional Poisson equation and the heat conduction equation. The global accuracy of the fourth order was demonstrated using several numerical examples for both equations. Hence, this study establishes a general strategy for high-order immersed interface methods, enabling their application to elliptic and time-evolving problems in several dimensions. Additionally, the implicit procedure lends itself to developing of higher-order numerical schemes based on the IIM, including sixth-order methods.

Acknowledgments

This work was partially supported by CONAHCYT under the program Investigadoras e Investigadores por México.

Appendix A: Matlab code to solve the 1D Poisson equation

This Appendix is focused on the Matlab code to solve Example 2, corresponding to a one-dimensional Poison equation with Dirichlet boundary conditions. For better exposition, the code was divided in four sections. In the first part, we provide the computational domain, the location of the interface, and a vector of different sub-divisions Mvec. Next, we present the main loop corresponding to the IFD-IIM implementation. The third part complement this loop solving the the linear system by the Thomas' Algorithm and the estimation of the order of accuracy using the exact solution. In the fourth section, we display the norm errors and order of accuracy. Finally, the program plots the solution for the last entree of Mvec. This program can be also download at https://github.com/CIMATMerida/IFD-IIM.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                                         %
%                  HIGH-ORDER IMMERSED INTERFACE METHOD                   %
%            H. EScamilla Puc,  R. Itza Balam & M. Uh Zapata              %
%                                Sept 2023                                %
%  It solves the one-dimensional Poisson equation:                        %
%                           u_xx  = f                                     %
%  knowing jump conditions: [u], [u_x], [f], [fx], and [fxx] at the       %
%  interface and Dirichlet boundary conditions.                           %
%                                                                         %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PROBLEM PARAMETERS & FUNCTIONS
clear
%––––––––––––––––
% Discretization
xI   = 0.0;               % Initial of the domain: (xI,xF)
xF   = 1.0;               % Final   of the domain: (xI,xF)
alf  = 0.4;               % Location of the interface
Mvec = [10,20,40,80,160]; % Number of sub-divitions (vector) 
%––––––––––––––––
% Method
b = 1/12;                 % b=1/12 (4th-order), b=0 (2nd-order)
%––––––––––––––––
% Functions
fun_uL    = @(x)         sin(pi*x);
fun_uxL   = @(x)      pi*cos(pi*x);
fun_fL    = @(x) -(pi^2)*sin(pi*x);
fun_fxL   = @(x) -(pi^3)*cos(pi*x);
fun_fxxL  = @(x)  (pi^4)*sin(pi*x);

fun_uR    = @(x)         cos(pi*x);
fun_uxR   = @(x)     -pi*sin(pi*x);
fun_fR    = @(x) -(pi^2)*cos(pi*x);
fun_fxR   = @(x)  (pi^3)*sin(pi*x);
fun_fxxR  = @(x)  (pi^4)*cos(pi*x);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% WORKSPACE

M = length(Mvec);
hvec     = zeros(M,1);
NormE1   = zeros(M,1);
NormE2   = zeros(M,1);
OrderOr1 = zeros(M,1);
OrderOr2 = zeros(M,1);

for s=1:M
   %–––––––––––––––––––––––––––––––––––
   % DISCRETIZATION
   n = Mvec(s);
   %––––––––––-
   % Points and step size
   x  = linspace(xI,xF,n+1)';
   h  = x(2)-x(1); 
   h2 = h*h;
   %––––––––––-
   % Find I: the interval where alpha is
   for i=1:n
      if  (x(i)<=alf) && (alf<x(i+1))
         I = i;
         break;
      end
   end 
   %–––––––––––––––––––––––––––––––––––
   % MATRIX & RIGHT-HAND SIDE
   A1 = zeros(n,1);
   A2 = zeros(n+1,1);
   A3 = zeros(n,1);
   rhs= zeros(n+1,1);
   %––––––––––-
   f(1:I)     = fun_fL(x(1:I));
   f(I+1:n+1) = fun_fR(x(I+1:n+1));    
   %––––––––––-
   % Boundary
   A2(1)    = 1/h2;
   rhs(1)   = fun_uL(x(1))/h2; 
   A2(n+1)  = 1/h2;
   rhs(n+1) = fun_uR(x(n+1))/h2;
   %––––––––––-
   % Regular points: Equation (22) in Escamilla et al. 2023
   A1(1:n-1) =  1/h2;
   A3(2:n)   =  1/h2;
   A2(2:n)   = -2/h2;
   rhs(2:n)  =  b*f(3:n+1)+(1-2*b)*f(2:n)+b*f(1:n-1);
   %––––––––––-
   % Irregular points: Equation (26) in Escamilla et al. 2023
   hL   = x(I)   - alf;
   hR   = x(I+1) - alf;
   %––-  
   uJ   = fun_uR(alf)   - fun_uL(alf);    % [u]
   uxJ  = fun_uxR(alf)  - fun_uxL(alf);   % [ux]
   fJ   = fun_fR(alf)   - fun_fL(alf);    % [f]
   fxJ  = fun_fxR(alf)  - fun_fxL(alf);   % [fx]
   fxxJ = fun_fxxR(alf) - fun_fxxL(alf);  % [fxx]
   %––-
   CI   =  (1/h2)*(uJ + hR*uxJ + 0.5*(hR^2)*fJ) ...
          - b*(fJ + hR*(1-2*hR^2/h2)*fxJ + 0.5*hR^2*(1-hR^2/h2)*fxxJ);
   CIp1 = -(1/h2)*(uJ + hL*uxJ + 0.5*(hL^2)*fJ) ...
          + b*(fJ + hL*(1-2*hL^2/h2)*fxJ + 0.5*hL^2*(1-hL^2/h2)*fxxJ);
   %––-    
   rhs(I)   = rhs(I)   + CI;
   rhs(I+1) = rhs(I+1) + CIp1;
    %–––––––––––––––––––––––––––––––––––
    % LINEAR SYSTEM SOLUTION BY THOMAS
    U = zeros(n+1,1);
    for i=1:n
       A2(i+1)=A2(i+1)-A3(i)*A1(i)/A2(i);
       rhs(i+1)=rhs(i+1)-rhs(i)*A1(i)/A2(i);
    end
    U(n+1)=rhs(n+1)/A2(n+1);
    for i=n:-1:1
       U(i)=(rhs(i)-U(i+1)*A3(i))/A2(i);
    end       
   %–––––––––––––––––––––––––––––––––––
    % ERRORS & ORDER
    %––––––––––-
    % Exact solution
    Uexact(1:I)     = fun_uL(x(1:I));
    Uexact(I+1:n+1) = fun_uR(x(I+1:n+1));
    %––––––––––-
    % Norm errors
    Err       = abs(Uexact'-U);
    NormE1(s) = norm(Err,inf);
    NormE2(s) = sqrt(h*sum(Err.^2));
    %––––––––––-
    % Estimated order
    hvec(s) = h;
    if s =1
       div = log((hvec(s-1))/(hvec(s)));
       OrderOr1(s) = log(NormE1(s-1)/NormE1(s))/div;
       OrderOr2(s) = log(NormE2(s-1)/NormE2(s))/div;
    end
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DISPLAY & PLOT

disp('   N   — Max-norm Order — L2-norm  Order')
disp('––––––––––––––––––––')
fprintf(' %5i — %.2e  –– — %.2e  –– \n',...
Mvec(1),NormE1(1),NormE2(1))
for i=2:M
   fprintf(' %5i — %.2e  %.2f — %.2e  %.2f \n', ...
   Mvec(i),NormE1(i),OrderOr1(i),NormE2(i),OrderOr2(i))
end

figure
hold on
plot(x,U,'o')
plot([x(1:I);alf],[Uexact(1:I)';fun_uL(alf)],'-k','LineWidth',2)
plot([alf;x(I+1:end)],[fun_uR(alf);Uexact(I+1:end)'],'-k','LineWidth',2)
plot([alf,alf],[min(U),max(U)],'–r')
legend('Numerical','Analytical')
xlabel('x')
ylabel('u')
title(sprintf('Solution (N=%d)',n))

figure
hold on
plot(x,Err,'-k','LineWidth',2)
plot([alf,alf],[min(Err),max(Err)],'–r')
xlabel('x')
ylabel('—U-u—')
title(sprintf('Absolute error (N=%d)',n))

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


BIBLIOGRAPHY

[1] H. J. Diersch, Fletcher, C.A.J. (1988). Computational Techniques for Fluid Dynamics. Vol. I: Fundamental and General Techniques. Vol. II: Specific Techniques for Different Flow Categories. Springer-Verlag.
[2] Sethian, J. A. (1999). Level Set Methods and Fast Marching Methods: Evolving Interfaces in Geometry, Fluid Mechanics, Computer Vision, and Materials Sciences, Cambridge University Press.
[3] Li, Z. & Ito, K. (2006). The Immersed Interface Method: Numerical Solutions of PDEs Involving Interfaces and Irregular Domains, SIAM: Frontiers in Applied Mathematics.
[4] Javierre E., Vuik C., Vermolen, F. J. & Van der Zwaag, S. (2006). A comparison of numerical models for one-dimensional Stefan problems. Journal of Computational and Applied Mathematics, 192(2), 445–459.
[5] Shi, Y. E., Ray, R. K., & Nguyen, K. D. (2013). A projection method-based model with the exact C-property for shallow-water flows over dry and irregular bottom using unstructured finite-volume technique. Computers & Fluids, 76, 178–195.
[6] Uh, M. & Xu, S. (2014). The immersed interface method for simulating two-fluid flows, Numerical Mathematics: Theory, Methods and Applications, 7(4), 447–472.
[7] Li M., Fornberg B. & Tang T. (1995). A compact fourth order finite difference scheme for the steady incompressible Navier-Stokes equations, Int. J. Numer. Methods Fluids 20, 1137–1151.
[8] Zhang, J. (2002). Multigrid method and fourth-order compact scheme for 2D Poisson equation with unequal mesh-size discretization. J. Comput. Phys. 179(1), 170–179.
[9] Nabavi, M., Siddiqui, M.H.K., & Dargahi J. (2007). A new 9-point sixth-order accurate compact finite difference method for the Helmholtz equation, J. Sound Vib. 307, 972–982.
[10] Wang Y., & Zhang J. (2009). Sixth order compact scheme combined with multigrid method and extrapolation technique for 2D poisson equation, J. Comput. Phys. 228, 137–146.
[11] Zhai, S., Feng, X., & He, Y. (2014). A new method to deduce high-order compact difference schemes for two-dimensional Poisson equation. Applied Mathematics and Computation, 230, 9–26.
[12] Uh Zapata, M. , & Itzá Balam, R. (2017). High-order implicit finite difference schemes for the two-dimensional Poisson equation. Applied Mathematics and Computation, 309, 222–244.
[13] Itzá Balam, R., & Uh Zapata, M (2020). A new eighth-order implicit finite difference method to solve the three-dimensional Helmholtz equation. Computers & Mathematics with Applications, 80(5), 1176–1200.
[14] Itza Balam, R., & UhZapata, M. (2022). A fourth-order compact implicit immersed interface method for 2D Poisson interface problems. Computers & Mathematics with Applications, 119, 257–277.
[15] Uh Zapata, M., Itza Balam, R., & Montalvo-Urquizo, J. (2023). A compact sixth-order implicit immersed interface method to solve 2D Poisson equations with discontinuities. Mathematics and Computers in Simulation, 210, 384–407.
[16] Peskin, C. S. (2002). The immersed boundary method, Acta Numer. 11, 479–517.
[17] Liu, X. D., & Soderis, T. C. (2003). Convergence of the ghost fluid method for elliptic equations with interfaces, J. Math. Comp. 72, 1731–1746.
[18] Hu, H., Pan, K., & Tan, Y. (2010). An interpolation matched interface and boundary method for elliptic interface problems, J. Comput. Appl. Math. 234, 73–94.
[19] Mu, L., Wang, J., Ye, X., & Zhao, S. (2016). A new weak Galerkin finite element method for elliptic interface problems, J. Comput. Phys., 325, 157–173.
[20] Cho, H., Han, H., Lee, B., Ha, Y., & Kang, M. (2019). A second-order boundary condition capturing method for solving the elliptic interface problems on irregular domains, Journal of Scientific Computing, 81(3), 217–251.
[21] Itzá Balam, R. , Hernandez-Lopez, F., Trejo-Sánchez, J., & Uh Zapata, M (2020). An immersed boundary neural network for solving elliptic equations with singular forces on arbitrary domains. Mathematical Biosciences and Engineering: MBE, 18(1), 22–56.
[22] Leveque R.J., & Li Z. (1994). The immersed interface method for elliptic equations with discontinuous coefficients and singular sources, SIAM J. Numer. Anal. 31 (4), 1019-1044.
[23] Wiegmann A., & Bube K.P. (2000) The explicit-jump immersed interface method: finite difference methods for PDEs with piecewise smooth solutions, SIAM J. Numer. Anal. 37 (3), 827–862.
[24] Berthelsen, P. A. (2004). A decomposed immersed interface method for variable coefficient elliptic equations with non-smooth and discontinuous solutions. J. Comput. Phys. 197(1), 364–386.
[25] Seo, J. H. & Mittal, R. (2011). A high-order immersed boundary method for acoustic wave scattering and low-Mach number flow-induced sound in complex geometries, J. Comput. Phys., 230, 1000–1019.
[26] Ito, K., Li, Z., & Kyei, Y. (2005). Higher-order, Cartesian grid based finite difference schemes for elliptic equations on irregular domains. SIAM Journal on Scientific Computing, 27(1), 346-367.
[27] Gibou, F., & Fedkiw, R. (2005). A fourth order accurate discretization for the Laplace and heat equations on arbitrary domains, with applications to the Stefan problem. J. Comput. Phys., 202(2), 577-601.
[28] Linnick, M. N., & Fasel, H. F. (2005). A high-order immersed interface method for simulating unsteady incompressible flows on irregular domains. J. Comput. Phys., 204(1), 157-192.
[29] Zhou, Y. C., Zhao, S., Feig, M., & Wei, G. W. (2006). High order matched interface and boundary method for elliptic equations with discontinuous coefficients and singular sources. J. Comput. Phys., 213(1), 1–30.
[30] Zhong, X. (2007). A new high-order immersed interface method for solving elliptic equations with imbedded interface of discontinuity. J. Comput. Phys., 225(1), 1066-1099.
[31] Feng, X., Li, Z., & Qiao, Z. (2011). High order compact finite difference schemes for the Helmholtz equation with discontinuous coefficients. J. of Comput. Math., 324–340.
[32] Pan, K., He, D., & Li, Z. (2021). A high order compact FD framework for elliptic BVPs involving singular sources, interfaces, and irregular domains. J. Sci. Comput. 88(3), 1–25.
[33] Colnago, M., Casaca, W., & de Souza, L. F. (2020). A high-order immersed interface method free of derivative jump conditions for Poisson equations on irregular domains. J. Comput. Phys. 423, 109791.
[34] Claerbout, J.F. The craft of wave-field extrapolation, in Imaging the Earth's Interior, Blackwell Scientific Publications, Oxford (1985), 260-265.
[35] Liu, Y., & Sen, M. K. (2009). A practical implicit finite-difference method: examples from seismic modeling. Journal of Geophysics and Engineering, 6(3), 231.
[36] Xu S., & Wang Z.J., (2006). Systematic Derivation of Jump Conditions for the Immersed Interface Method in Three-Dimensional Flow Simulation, J. Sci. Comput., 27(6), 1948-1980.

[37] Feng, X., & Li, Z. (2012). Simplified immersed interface methods for elliptic interface problems with straight interfaces. Num. Meth. for Par. Diff. Eqs. 28(1), 188–203.

Back to Top

Document information

Published on 16/11/23
Submitted on 19/09/23

Licence: CC BY-NC-SA license

Document Score

5

Views 17
Recommendations 1

Share this document

claim authorship

Are you one of the authors of this document?