0
$\begingroup$

I would like to solve PDE in a numerical way (Fourier spectral method, actually). And I think I should find some particular solution of the equation to apply the method, but I don't know how.

The equation is:

$$\frac {\partial y}{\partial t} - \frac{\partial ^2 y}{\partial x^2} + \frac{\partial ^4 y}{\partial x^4} = 0.$$

I thought $y = e^{-12t} \sin{2x}$ might be a particular solution. So I used following modified MATLAB code:

(Originally, it was made to solve KdV equation, and it put particular solution of KdV equation to u. I just put the particular solution above to u.

%         FFT with integrating factor v = exp(-ik^3t)*u-hat.

% Set up grid and two-soliton initial data:
  N = 256; dt = .4/N^2; x = (2*pi/N)*(-N/2:N/2-1)';
  A = 2; B = -12; clf, drawnow, set(gcf,'renderer','zbuffer')
  u = sin(A*x)*exp(12*t);
  v = fft(u); k = [0:N/2-1 0 -N/2+1:-1]'; ik3 = 1i*k.^3;

% Solve PDE and plot results:
  tmax = 0.006; nplt = floor((tmax/25)/dt); nmax = round(tmax/dt);
  udata = u; tdata = 0; h = waitbar(0,'please wait...');
  for n = 1:nmax
    t = n*dt; g = -.5i*dt*k;
    E = exp(dt*ik3/2); E2 = E.^2;
    a = g.*fft(real( ifft(     v    ) ).^2);
    b = g.*fft(real( ifft(E.*(v+a/2)) ).^2);     % 4th-order
    c = g.*fft(real( ifft(E.*v + b/2) ).^2);     % Runge-Kutta
    d = g.*fft(real( ifft(E2.*v+E.*c) ).^2);
    v = E2.*v + (E2.*a + 2*E.*(b+c) + d)/6;
    if mod(n,nplt) == 0 
      u = real(ifft(v)); waitbar(n/nmax)
      udata = [udata u]; tdata = [tdata t];
    end
  end
  waterfall(x,tdata,udata'), colormap(1e-6*[1 1 1]); view(-20,25)
  xlabel x, ylabel t, axis([-pi pi 0 tmax 0 2000]), grid off
  set(gca,'ztick',[0 2000]), close(h), pbaspect([1 1 .13])

But it doesn't seem that it works pretty well.

  • 0
    What domain $\mathbb{R}\times [0,\infty)$ ? What initial (and/or boundary) condition?2017-02-14
  • 0
    Taking the Fourier transform wrt $x$ we can solve the resulting ODE analytically to give $\hat{y}(k,t) = \hat{y}(k,0) e^{-(k^2+k^4)t}$ so the solution at any time $t$ can be obtain from two simple Fourier transforms: $$y(x,t) = \mathcal{F}^{-1}\left[\mathcal{F}[y_0]e^{-(k^2+k^4)t}\right]$$ I'm assuming here the domain is $(x,t)\in \mathbb{R}\times [0,\infty)$ and that $y(x,0)$ is given.2017-02-14
  • 0
    Well, any boundary condition or domain that suits this equation is fine, But unfortunately I don't know how to set appropriate ones. What I gotta do is to know how the fourier spectral method works for high-order linear PDEs.2017-02-14
  • 0
    Note that $e^{-12t}\sin(2x)$ is not a solution of the given PDE. You probably forgot the minus sign in front of $-y_{xx}$. A correct solution is $y(x,t) = e^{-(a^2+a^4)t}\sin(ax)$ so for $a=2$ we get $e^{-20t}\sin(2x)$.2017-02-14

0 Answers 0