1 / 47

Chapter 13 More about Boundary conditions

Chapter 13 More about Boundary conditions. Speaker: Lung-Sheng Chien. Book: Lloyd N. Trefethen, Spectral Methods in MATLAB. Preliminary: Chebyshev node and diff. matrix [1]. Consider. Chebyshev node on. for. Uniform division in arc. Even case:. Odd case:.

redell
Download Presentation

Chapter 13 More about Boundary conditions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 13 More about Boundary conditions Speaker: Lung-Sheng Chien Book: Lloyd N. Trefethen, Spectral Methods in MATLAB

  2. Preliminary: Chebyshev node and diff. matrix [1] Consider Chebyshev node on for Uniform division in arc Even case: Odd case:

  3. Preliminary: Chebyshev node and diff. matrix [2] Given Chebyshev nodes and corresponding function value We can construct a unique polynomial of degree , called is a basis. where differential matrix is expressed as for for where with identity Second derivative matrix is

  4. Preliminary: Chebyshev node and diff. matrix [3] and Let be the unique polynomial of degree with define and for , then impose B.C. ,that is, We abbreviate In order to keep solvability, we neglect ,that is, zero neglect zero neglect Similarly, we also modify differential matrix as

  5. Asymptotic behavior of spectrum of Chebyshev diff. matrix In chapter 10, we have showed that spectrum of Chebyshev differential matrix (second order) approximates with eigenmode 1 Eigenvalue of is negative (real number) and Large eigenmode of does not approximate to 2 Since ppw is too small such that resolution is not enough Mode N is spurious and localized near boundaries

  6. Preliminary: DFT [1] Given a set of data point with is even, Then DFT formula for for for Definition: band-limit interpolant of , is periodic sinc function If we write , then Also derivative is according to

  7. Preliminary: DFT [2] , we have Direct computation of derivative of Example: is a Toeplitz matrix. Second derivative is

  8. Preliminary: DFT [3] For second derivative operation second diff. matrix is explicitly defined by using Toeplitz matrix (command in MATLAB) Symmetry property:

  9. Preliminary: DFT [4] is corresponding to eigenvector Eigenvalue of Fourier differentiation matrix has multiplicity 2 and for and when and , we have

  10. How to deal with boundary conditions • Method I: Restrict attention to interpolants that satisfy the boundary conditions. Example: chapter 7. Boundary value problems Linear ODE: Nonlinear ODE: Eigenvalue problem: Poisson equation: Helmholtz equation: • Method II: Do not restrict the interpolants, but add additional equations to enforce the boundary condition.

  11. Recall linear ODE in chapter 7 with exact solution Chebyshev nodes: be unique polynomial of degree with and Let 1 for Method I Set for 2 zero neglect zero neglect

  12. Inhomogeneous boundary data [1] Method I and be unique polynomial of degree with Let 1 for Set for 2 1 neglect zero neglect or say

  13. Inhomogeneous boundary data [2] Method of homogenization , decompose , then satisfies which can be solved by method I Solution under N = 16 method I directly method of homogenization method I is good even for inhomogeneous boundary data exact solution

  14. Mixed type B.C. [1] Method I and be unique polynomial of degree with Let 1 for How to do? Set for 2 Method II and be unique polynomial of degree with Let 1 for easy to do Set for 2 zero neglect neglect

  15. Mixed type B.C. [2] , we add one more constraint (equation) Set 3 zero zero Active variable with governing equation from interior point from Neumann condition In general, replace by since the method works for

  16. Mixed type B.C. [3] exact solution Solution under N = 16

  17. Allen-Cahn (bistable equation) [1] Nonlinear reaction-diffusion equation: where is a parameter 1 This equation has three constant steady state, , equilibrium occurs at zero forcing ) ( consider ODE is unstable and is attractor. 2 is Logistic equation. for

  18. Allen-Cahn (bistable equation) [2] for , separated by interfaces Solution tends to exhibit flat areas close to 3 That may coalesce or vanish on a long time scale, called metastability. interface boundary value:

  19. Allen-Cahn : example 1 [1] with parameter and initial condition Method I and be unique polynomial of degree with Let 1 for Set for 2 1 neglect -1 neglect or say

  20. Allen-Cahn : example 1 [2] Temporal discretization: forward Euler with CFL condition ( eigenvalue of is negative (real number) and ) One can simplify above equation by using equilibrium of at boundary point.

  21. Allen-Cahn : example 1 [3] with parameter and initial condition Solution under N = 20 boundary value: interface Metastability up to followed by rapid transition to a solution with just one interface.

  22. Allen-Cahn : example 2 [1] with parameter and initial condition Method I be unique polynomial of degree with Let 1 and for Set for 2 Second, set

  23. Allen-Cahn : example 2 [2] However we cannot simplify as following form is NOT an equilibrium. since Method II for be unique polynomial of degree with Let 1 2 Set for 3 Neglect computed from 2 , and reset

  24. Allen-Cahn : example 2 [3] Step 1: Step 2: Solution under N = 20,method II Final interface is moved from to and transients vanish earlier at instead of and

  25. Allen-Cahn : example 2 [4] graph concave up ? Threshold is In fact we can estimate trend of transient at point and , then but

  26. Laplace equation [1] subject to B.C. boundary data is continuous for be unique polynomial, Let 1 Method I for (interior point) and for Set 2 Briefly speaking, method I take active variables as However method 1 is not intuitive to write down linear system if we choose Kronecker-product

  27. Laplace equation [2] Method II for be unique polynomial, Let 1 (all points) (interior points) for Set 2 Additional constraints (equations) for boundary condition. 3 for method II take active variables as Technical problem: 1. How to order the active variables 2. How to build up linear system (matrix) (including second derivative and additional equation) 3. How to write down right hand side vector

  28. Laplace equation : order active variable [3] MATLAB use column-major, so we index active variable by column-major and 31 25 19 13 7 1 32 26 20 14 8 2 33 27 21 15 9 3 column-major 34 28 22 16 10 4 35 29 23 17 11 5 18 36 30 24 12 6

  29. Laplace equation : order active variable [4]

  30. Laplace equation : find boundary point [5]

  31. Laplace equation : find boundary point [6] b is index set of boundary points, if we write down equations according to index of active variables, then we can use index setb to modify the linear system. Chebyshev differentiation matrix: (second order)

  32. Laplace equation : construct matrix [7] (interior points) for Set 2 Definition: Kronecker product is defined by

  33. Laplace equation : construct matrix [8] Additional constraints (equations) for boundary condition. 3 for on boundary points by We need to replace equation of Index of boundary points for such that (boundary point) where four corner points each edge has N-1 points

  34. Laplace equation : right hand side vector [9] Boundary data: identify 31 25 19 13 7 1 32 26 20 14 8 2 33 27 21 15 9 3 34 28 22 16 10 4 35 29 23 17 11 5 18 36 30 24 12 6

  35. Laplace equation : right hand side vector [10] Boundary data: identify 31 25 19 13 7 1 32 26 20 14 8 2 33 27 21 15 9 3 34 28 22 16 10 4 35 29 23 17 11 5 18 36 30 24 12 6

  36. Laplace equation : results [11] Solution under N = 5,method II Solution under N = 24,method II

  37. Wave equation [1] subject to B.C. Separation of variables leads to Fourier discretization in x Periodic B.C. in x-coordinate 1 2 Chebyshev discretization in y, we must deal with Neumann B.C. 3 Leap-frog formula in time Leap-frog eigenvalue of (chebyshev diff. matrix) is negative and eigenvalue of (Fourier diff. matrix) is eigenvalue of (Fourier diff. matrix) is negative and Hence stability requirement of is ( author chooses )

  38. Wave equation [2] Fourier discretization in x Periodic B.C. in x-coordinate 1 2 Chebyshev discretization in y Method II be unique polynomial of degree with Let for 1 Set for 2 3 replace computed from 2 by Neumann B.C. Chebyshev diff. matrix

  39. Wave equation: order active variable [3] 1 7 13 19 25 31 2 14 20 26 32 8 9 21 27 33 column-major 3 15 4 22 28 10 16 34 23 29 35 5 11 17 6 18 24 30 36 12 In this example, we don’t arrange as vector but keep in 2-dimensional form say , the same arrangement of xx and yy generated by meshgrid(x,y)

  40. Wave equation: action of Chebyshev operator [4] Chebyshev 2nd diff. matrix 1 7 13 19 25 31 2 14 20 26 32 8 9 21 27 33 3 15 4 22 28 10 16 34 23 29 35 5 11 17 6 18 24 30 36 12 index ( i,j ) is logical index according to index of ordinates x, y

  41. Wave equation: action of Fourier operator [5] Fourier 2nd diff. matrix 6 5 4 3 2 1 12 11 10 9 8 7 18 17 16 15 14 13 24 23 22 21 20 19 30 29 28 27 26 25 36 35 34 33 32 31 Take transpose

  42. Wave equation: action of operator [6] , then operator for Laplacian is Let active variable be Combine with Leap-frog formula in time where initial condition is Gaussian pilse traveling rightward at speed 1 Question: how to match Neumann boundary condition

  43. Wave equation: Neumann B.C. in y-coordinate [7] 3 replace computed from 2 by Neumann B.C. We require or say for

  44. Wave equation: Neumann B.C. in y-coordinate [8] or say where written as Procedure of wave equation simulation Given Step 1: time evolution by Leap-frog Step 2: correct boundary data where

  45. Wave equation: result [9] Solution under , method II Theoretical optimal value is (see exercise 13.4)

  46. Exercise 13.2 [1] The lifetime of metastable state depends strongly on the diffusion constant The value of t at which first becomes monotonic in x. with parameter and initial condition what is graph of 1 Asymptotic behavior of 2 as

  47. Exercise 13.2 [2] • Resolution is adaptive and • Monotone under tolerance

More Related