Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Spectral method
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Nonlinear example=== We wish to solve the forced, transient, nonlinear [[Burgers' equation]] using a spectral approach. Given <math>u(x,0)</math> on the periodic domain <math>x\in\left[0,2\pi\right)</math>, find <math>u \in \mathcal{U}</math> such that :<math>\partial_{t} u + u \partial_{x} u = \rho \partial_{xx} u + f \quad \forall x\in\left[0,2\pi\right), \forall t>0</math> where ρ is the [[viscosity]] coefficient. In weak conservative form this becomes :<math>\left\langle \partial_{t} u , v \right\rangle = \Bigl\langle \partial_x \left(-\tfrac12 u^2 + \rho \partial_{x} u\right) , v \Bigr\rangle + \left\langle f, v \right\rangle \quad \forall v\in \mathcal{V}, \forall t>0</math> where following [[inner product space|inner product]] notation. [[integration by parts|Integrating by parts]] and using periodicity grants :<math>\langle \partial_{t} u , v \rangle = \left\langle \tfrac12 u^2 - \rho \partial_{x} u , \partial_x v\right\rangle+\left\langle f, v \right\rangle \quad \forall v\in \mathcal{V}, \forall t>0.</math> To apply the Fourier–[[Galerkin method]], choose both :<math>\mathcal{U}^N := \biggl\{ u : u(x,t)=\sum_{k=-N/2}^{N/2-1} \hat{u}_{k}(t) e^{i k x}\biggr\}</math> and :<math>\mathcal{V}^N :=\operatorname{span}\left\{ e^{i k x} : k\in -\tfrac12 N,\dots,\tfrac12N - 1\right\}</math> where <math>\hat{u}_k(t):=\frac{1}{2\pi}\langle u(x,t), e^{i k x} \rangle</math>. This reduces the problem to finding <math>u\in\mathcal{U}^N</math> such that :<math>\langle \partial_{t} u , e^{i k x} \rangle = \left\langle \tfrac12 u^2 - \rho \partial_{x} u , \partial_x e^{i k x} \right\rangle + \left\langle f, e^{i k x} \right\rangle \quad \forall k\in \left\{ -\tfrac12N,\dots,\tfrac12N-1 \right\}, \forall t>0.</math> Using the [[orthogonality]] relation <math>\langle e^{i l x}, e^{i k x} \rangle = 2 \pi \delta_{lk}</math> where <math>\delta_{lk}</math> is the [[Kronecker delta]], we simplify the above three terms for each <math>k</math> to see :<math> \begin{align} \left\langle \partial_{t} u , e^{i k x}\right\rangle &= \biggl\langle \partial_{t} \sum_{l} \hat{u}_{l} e^{i l x} , e^{i k x} \biggr\rangle = \biggl\langle \sum_{l} \partial_{t} \hat{u}_{l} e^{i l x} , e^{i k x} \biggr\rangle = 2 \pi \partial_t \hat{u}_k, \\ \left\langle f , e^{i k x} \right\rangle &= \biggl\langle \sum_{l} \hat{f}_{l} e^{i l x} , e^{i k x}\biggr\rangle= 2 \pi \hat{f}_k, \text{ and} \\ \left\langle \tfrac12 u^2 - \rho \partial_{x} u , \partial_x e^{i k x} \right\rangle &= \biggl\langle \tfrac12 \Bigl(\sum_{p} \hat{u}_p e^{i p x}\Bigr) \Bigl(\sum_{q} \hat{u}_q e^{i q x}\Bigr) - \rho \partial_x \sum_{l} \hat{u}_l e^{i l x} , \partial_x e^{i k x} \biggr\rangle \\ &= \biggl\langle \tfrac12 \sum_{p} \sum_{q} \hat{u}_p \hat{u}_q e^{i \left(p+q\right) x} , i k e^{i k x} \biggr\rangle - \biggl\langle \rho i \sum_{l} l \hat{u}_l e^{i l x} , i k e^{i k x} \biggr\rangle \\ &= -\tfrac12 i k \biggl\langle \sum_{p} \sum_{q} \hat{u}_p \hat{u}_q e^{i \left(p+q\right) x} , e^{i k x} \biggr\rangle - \rho k \biggl\langle \sum_{l} l \hat{u}_l e^{i l x} , e^{i k x} \biggr\rangle \\ &= - i \pi k \sum_{p+q=k} \hat{u}_p \hat{u}_q - 2\pi\rho{}k^2\hat{u}_k. \end{align} </math> Assemble the three terms for each <math>k</math> to obtain :<math> 2 \pi \partial_t \hat{u}_k = - i \pi k \sum_{p+q=k} \hat{u}_p \hat{u}_q - 2\pi\rho{}k^2\hat{u}_k + 2 \pi \hat{f}_k \quad k\in\left\{ -\tfrac12N,\dots,\tfrac12N-1 \right\}, \forall t>0. </math> Dividing through by <math>2\pi</math>, we finally arrive at :<math> \partial_t \hat{u}_k = - \frac{i k}{2} \sum_{p+q=k} \hat{u}_p \hat{u}_q - \rho{}k^2\hat{u}_k + \hat{f}_k \quad k\in\left\{ -\tfrac12N,\dots,\tfrac12N-1 \right\}, \forall t>0. </math> With Fourier transformed initial conditions <math>\hat{u}_{k}(0)</math> and forcing <math>\hat{f}_{k}(t)</math>, this coupled system of ordinary differential equations may be integrated in time (using, e.g., a [[Runge Kutta]] technique) to find a solution. The nonlinear term is a [[convolution]], and there are several transform-based techniques for evaluating it efficiently. See the references by Boyd and Canuto et al. for more details.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)