Computing Spectra of UW Applied Mathematics Using Finite...
Transcript of Computing Spectra of UW Applied Mathematics Using Finite...
![Page 1: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/1.jpg)
UW
App
lied
Mat
hem
atic
s
Computing Spectra of Linear Operators
Using Finite Differences
J. Nathan Kutz
Department of Applied Mathematics University of WashingtonSeattle, WA 98195-2420 Email: ([email protected])
Stability Workshop, Seattle, September 6-8, 2006
![Page 2: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/2.jpg)
Introduction: Spectral Stability
Consider the nonlinear PDE evolution
Equilibrium solution
Linear stability
UW
App
lied
Mat
hem
atic
s
perturbation
B. Deconinck and J. N. Kutz, J. Comp. Phys. (2006)
![Page 3: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/3.jpg)
Associated Eigenvalue Problem
Separation of variables
Eigenvalue problem
Linear stability
€
Re(λ) ≤ 0Re(λ) > 0
spectrally stable
spectrally unstable
UW
App
lied
Mat
hem
atic
s
![Page 4: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/4.jpg)
Finite Differences and Taylor Series
Taylor expand
slope formula with error
UW
App
lied
Mat
hem
atic
s
Adderrorapproximation
![Page 5: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/5.jpg)
Higher-Order Accuracy
Taylor expand again
slope formula with improved error
UW
App
lied
Mat
hem
atic
s
8 x (first) and subtracterrorapproximation
![Page 6: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/6.jpg)
Finite Difference Tables
neighboring points determine accuracy
UW
App
lied
Mat
hem
atic
s
![Page 7: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/7.jpg)
Forward and Backward Differences
asymmetric neighboring points
UW
App
lied
Mat
hem
atic
s
Required for incorporating boundary conditions
![Page 8: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/8.jpg)
Numerical Round-Off
round-off error dominates below
UW
App
lied
Mat
hem
atic
s
Consider the error in approximating the first derivative
The error includes round-off and truncation
Assume round-off and
minimum at
truncationround-off
![Page 9: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/9.jpg)
Boundary Conditions: Pinned
tri-diagonal matrix structure
UW
App
lied
Mat
hem
atic
s
pinned boundaries
![Page 10: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/10.jpg)
Boundary Conditions: Periodic
tri-diagonal matrix structure with corners
UW
App
lied
Mat
hem
atic
s
periodic boundaries
![Page 11: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/11.jpg)
Boundary Conditions: No Flux
no longer symmetry matrix
UW
App
lied
Mat
hem
atic
s
no flux condition
![Page 12: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/12.jpg)
General Boundaries
no longer symmetry matrix
UW
App
lied
Mat
hem
atic
s
General (Sturm-Liouville) boundary conditions
Difficult to incorporate into matrix structure
• shooting methods
• relaxation methods
![Page 13: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/13.jpg)
Algorithm
Easily extends to vectors and higher dimensions
• choose domain length and discretization size
• construct linear operator
• implement boundary conditions
• use eigenvalue/eigenvector solver: O(N3) (or shooting/relaxation methods)
• construct eigenfunctionsUW
App
lied
Mat
hem
atic
s
![Page 14: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/14.jpg)
Example: Mathieu Equation
compute with matlab, maple, mathematica, or homemade code
UW
App
lied
Mat
hem
atic
s
Classic Example
Operator is self-adjoint (real spectrum)
![Page 15: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/15.jpg)
Spectrum for Mathieu Equation
a is eigenvalue
q
a
UW
App
lied
Mat
hem
atic
s
![Page 16: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/16.jpg)
Computing the Ground StateU
W A
pplie
d M
athe
mat
ics
Convergence study and CPU time (q=2)
0.43 sec0.01 sec
1 hour0.77 sec
- 2.5 min
• increase domain length
• Floquet theory
beyond Matlab7’s ability
What about band-gap structure
![Page 17: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/17.jpg)
Calculating the Bands: Domain LengthU
W A
pplie
d M
athe
mat
ics
Increase the domain length (q=2)
traditional way: very costly for recovering bands
doubling gives 8x computational increase
![Page 18: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/18.jpg)
Calculating the Bands: Floquet TheoryU
W A
pplie
d M
athe
mat
ics
Make use of Floquet (Bloch) theory
with Floquet (characteristic) exponents
• keep fixed domain
• discretize
• solve D O(N3) equations
larger period solutions
![Page 19: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/19.jpg)
Implementing Floquet TheoryU
W A
pplie
d M
athe
mat
ics
Floquet theory modifies matrix corners
with Floquet slices
![Page 20: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/20.jpg)
Floquet Theory vs. Domain LengthU
W A
pplie
d M
athe
mat
ics
Compare methods for computing band (q=2)
band density
beyond Matlab7’s ability
9 min8 sec
-1 min
-10 min
Use Floquet Theory!
![Page 21: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/21.jpg)
Example: Periodic NLS
Consider the system
with
UW
App
lied
Mat
hem
atic
s
and Jacobi sine function
![Page 22: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/22.jpg)
Spectrum of Periodic NLS
k=0.7k=0 k=0.9 k=1
UW
App
lied
Mat
hem
atic
s
![Page 23: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/23.jpg)
Importance of Floquet Slicing
€
µ ≠ 0
€
µ = 0
UW
App
lied
Mat
hem
atic
s
![Page 24: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/24.jpg)
Accuracy and Convergence U
W A
pplie
d M
athe
mat
ics
![Page 25: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/25.jpg)
Example: 2D Mathieu Equation
Consider
with
UW
App
lied
Mat
hem
atic
s
Operation Count: O((N2)3)=O(N6)
![Page 26: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/26.jpg)
Laplacian in 2DU
W A
pplie
d M
athe
mat
ics
must stack 2D data: periodic boundaries add structure
Consider
Discretize:
Let
![Page 27: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/27.jpg)
Laplacian in 2DU
W A
pplie
d M
athe
mat
ics
nx=ny=4
![Page 28: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/28.jpg)
Laplacian in 2DU
W A
pplie
d M
athe
mat
ics
Matlab easily builds 2D Laplacian
nx=ny=4
![Page 29: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/29.jpg)
Band Gap Structure
Quasi-momentum representation
First three band-gap structures
UW
App
lied
Mat
hem
atic
s
A=1A=-0.3 A=0
![Page 30: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/30.jpg)
2D Dominant Eigenfunctions
First three eigenfunctions for µx = µy=0UW
App
lied
Mat
hem
atic
s
![Page 31: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/31.jpg)
2D Eigenfunctions
First three eigenfunctions for µx = µy=1/4
UW
App
lied
Mat
hem
atic
s
![Page 32: Computing Spectra of UW Applied Mathematics Using Finite ...depts.washington.edu/bdecon/workshop2012/c1_stability.pdf · UW Applied Mathematics Computing Spectra of Linear Operators](https://reader034.fdocuments.in/reader034/viewer/2022051607/603580bb41141c2d174df632/html5/thumbnails/32.jpg)
Summary and ConclusionsU
W A
pplie
d M
athe
mat
ics
• simple, simple, simple
• boundary conditions at edge of matrices
• eigenvalue solvers make use of sparse structure
• Floquet theory for resolution of bands
• costly/impractical for 2D-3D problems
B. Deconinck and J. N. Kutz, J. Comp. Phys. (2006)