Examples shown that IIM produces second order accurate solution and the first order derivatives in 1D Nnenna Anoruo, Kevin Luna, William Reese, Justin Rivera Faculty Mentor: Dr.Zhilin Li NC State University REU 2015 (June 1-July 31) 1 Introduction Here are some sample computations demonstrating the second order accurate derivative at the interface for the 1-D interface problem presented in ”The Immersed Interface Method” by Dr.Li by using a two sided method directly related to the IIM. The 1-D Interface problem where x ∈ (0, α) ∪ (α, 1) is often expressed as: (βx u)x − σu = f In the examples presented here, all the functions have finite jumps at the interface α. The same β and σ are used throughout, and the proper Dirichlet boundary condition according the the actual solution are always chosen. Note 1 + cos(x) if x ≤ α 2 β(x) = 1 + x2 if x > α and σ(x) = ln(2 + x) . 2 (1 + x)2 if x ≤ α if x>α Example 1 Consider the problem where (120)2 (−( cos(x) + 1)) sin(120x) − 120 sin(x) cos(120x) − (1 + x)2 cos(120x) if x < α 2 2 f (x) = 2 (30)(−30(x + 1) cos(30x) − 2x sin(30x)) − ln(2 + x) cos(30x) if x < α. The exact solution can be shown to be u(x) = sin(120x) if x ≤ α cos(30x) if 1 x>α (β ux (x)) x -σ(x)u(x)=f(x) + cδ (x-α) Approximation and Exact Solution with DBC 1.5 1 ×10 -3 Error (difference) Plot Exact Approximation 0 1 -1 -2 u(x) 0.5 -3 0 -4 -5 -0.5 -6 -1 -7 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x Figure 1: (a): An example of a computed solution with n = 1280 grid divisions. Note the actual solution has its discontinuity connected by the plotter. (b): The error difference of the solution and actual solution at the grid points. loglog Plot of U +x (α) Error Solution Error Plot on a log-log Scale for the IIM 1 1 0 0 log10( ||U +x (α)-u +x (α)|| ∞ ) log10( ||U-u||∞ ) -1 -2 -3 -4 -1 -2 -3 -4 -5 -5 Two-Sided Method(IIM) One-sided method Immersed Interface Method -5 -4 -3 -2 -1 0 1 -5 log10(h) -4 -3 -2 -1 0 1 log10(h) Figure 2: (a): Grid refinement analysis of the approximate solution with 15 refinements starting at n = 20. Note that the axis has been adjusted so some points may not be visible. The slope of the regression line fit is 2.1 (b):Grid refinement analysis of the right derivative at the interface with the one-sided and two-sided(IIM) methods. Note that a linear regression fit shows that the slope of the line of best fit is 1.08 and 1.90 for the one-sided and two-sided methods respectively. This shows the IIM two sided method gave an order 2 accurate approximation while standard one-sided methods gave a first order accurate approximation. 3 Example 2 Consider the problem where cos(x) 120 (120)2 (−( 2 + 1)) sin(120x) − 2 sin(x) cos(120x) − (1 + x)2 sin(120x) if x ≤ α f (x) = 2 x +200x−1 − ln(2 + x) ln(100 + x) if x > α. (x+100)2 2 The exact solution can be shown to be u(x) = sin(120x) if ln(100 + x) (β ux (x)) x -σ(x)u(x)=f(x) + cδ (x-α) Approximation and Exact Solution with DBC 5 8 x≤α if x>α ×10 -3 Error (difference) Plot Exact Approximation 7 4 6 3 5 u(x) U-u(x) 2 4 1 3 0 2 -1 1 -2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 x 0.6 0.7 0.8 0.9 1 x Figure 3: (a): An example of a computed solution with n = 1280 grid divisions. Note the actual solution has its discontinuity connected by the plotter. Note that the axis has been adjusted so some points may not be visible. (b): The error difference of the solution and actual solution at the grid points. loglog Plot of U -x (α) Error Solution Error Plot on a log-log Scale for the IIM 1 0 -0.5 0 -1 log10( ||U -x(α)-u -x(α)|| ∞ ) log10( ||U-u||∞ ) -1 -2 -3 -1.5 -2 -2.5 -3 -3.5 -4 -4 -4.5 Immersed Interface Method -5 -5 -4 -3 -2 -1 0 Two-Sided Method(IIM) One-sided method -5 1 -5 log10(h) -4 -3 -2 -1 0 log10(h) Figure 4: (a): Grid refinement analysis of the approximate solution with 14 refinements starting at n = 20 . Note that the axis has been adjusted so some points may not be visible. The slope of the regression line fit is 2.1 (b):Grid refinement analysis of the left derivative at the interface with the one-sided and two-sided(IIM) methods. Note that a linear regression fit shows that the slope of the line of best fit is about 1.06 and 1.96 for the one-sided and two-sided methods respectively. This shows the IIM two sided method gave an order 2 accurate approximation while standard one-sided methods gave a first order accurate approximation. 3 4 Example 3 Consider the problem where (15)2 (1 + cos(x) ) sinh(15x) − (15) sin(x) cosh(15x) − (1 + x)2 sinh(15x) if 2 2 f (x) = 2 (−(x + 1) cosh(x) − 2x sinh(x)) − ln(2 + x) cosh(x) if x > α. x≤α The exact solution can be shown to be u(x) = sinh(15x) if cosh(x) if (β ux (x)) x -σ(x)u(x)=f(x) + cδ (x-α) Approximation and Exact Solution with DBC 60 3 x≤α x>α ×10 -3 Error (difference) Plot 50 2.5 40 2 U-u(x) u(x) Exact Approximation 30 1.5 20 1 10 0.5 0 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 x 0.5 0.6 0.7 0.8 0.9 1 x Figure 5: (a): An example of a computed solution with n = 640 grid divisions. Note the actual solution has its discontinuity connected by the plotter. (b): The error difference of the solution and actual solution at the grid points. loglog Plot of U -x (α) Error Solution Error Plot on a log-log Scale for the IIM -0.5 -1 0 -1.5 -1 log10( ||U -x(α)-u -x(α)|| ∞ ) log10( ||U-u||∞ ) -2 -2.5 -3 -3.5 -2 -3 -4 -4 -4.5 Immersed Interface Method -5 -5 -4.5 -4 -3.5 -3 -2.5 -2 -1.5 -1 Two-Sided Method(IIM) One-sided method -5 -0.5 -5 log10(h) -4 -3 -2 -1 0 log10(h) Figure 6: (a): Grid refinement analysis of the approximate solution with 14 refinements starting at n = 20.Note that the axis has been adjusted so some points may not be visible. The slope of the regression line fit is 1.96 (b):Grid refinement analysis of the left derivative at the interface with the one-sided and two-sided(IIM) methods. Note that a linear regression fit shows that the slope of the line of best fit is about 1.02 and 2.02 for the one-sided and two-sided methods respectively. This shows the IIM two sided method gave an order 2 accurate approximation while standard one-sided methods gave a first order accurate approximation. 4 5 Acknowledgments This project was funded by the following agencies and grants: NSF DMS-1461148 NSA H98230-15-1-0024 5
© Copyright 2025 Paperzz