You are on page 1of 3

1.

Consistent nite-dierence forward-in-time approximation of the PDE model. 2. L=300.0; 3. d = 0.06; 4. g = -0.6; 5. 6. xmax=L; 7. tmax=100.0; 8. 9. dt=0.05; 10. dx=1.0; 11. 12. N=tmax/dt; %%temporal amount of points 13. M=xmax/dx; %%spatial amount of points. 14. u=zeros(N,M); 15. 16. 17. %% Initialisation 18. for i=4:M-3 19. u(1:2,i)=exp(-(i*L/M)^2/16); 20. end 21. u(1:N,1:3)=1.0; 22. u(1:N,M-2:M)=0.0; 23. 24. %Forward in time. 25. for n=1:(N-1) 26. for i=4:M-3 27. k = u(n,i-3)-6*u(n,i-2)+15*u(n,i-1)28. 29. 30. 31. 32. 33.
end end 20*u(n,i)+15*u(n,i+1)-6*u(n,i+2)+u(n,i+3); l = u(n,i-2)-4*u(n,i-1)+6*u(n,i)4*u(n,i+1)+u(n,i+2); u(n+1,i) = dt*(d*(k)/dx^6-g*(l)/dx^4+(u(n,i+1)2*u(n,i)+u(n,i-1))/dx^2+u(n,i)u(n,i)^3)+u(n,i);

2. Choose the stepsizes t and x carefully, such that a stable and accurate numerical solution is obtained. Motivate the validity of your numerical results. 3. Goal: reproduce the results of Figure 1 on page 11031 of the paper Pattern formation... (see webpage). Can you nd other types of solutions as well? (check Figure 2).

As we can see in the picture below, the forward in time approximation of the code has the pattern as depicted in the paper almost exactly with the values of gamma, delta, delta x and delta t. As we can see from the figure on the left from the paper, the values below the curve shows presence of a pattern as we see from figures below and value combinations above the curve corresponds to absence of patterns.

As we can see in the above two pictures, the left picture is the one for negative gamma = -0.6, delta = 0.06 and the image on the right is for the same delta but a positive 0.6 gamma. This supports the claim made by the paper. The same/ similar behaviour was observed with positive values of gamma under vs above the curve. The left picture corresponds to gamma 0.

Now we experiment with gamma and delta to verify the results observed above and get the following figures:

The above images shows the issue of stability and accuracy with the value of delta x. The left image shows for delta = 0.06, gamma = 2, dt = 0.05, dx = 1 whereas the right image shows for dx = 2. The simulation in the right is the result for values, delta = 0.06, g = 1, dt=0.08, dx = 1, which again verifies the fact that higher values dx give stable results and the value of gamma and delta x have a similar effect and should be changed synchronously to keep the pattern. And the solution again becomes stable for dx=2. As we can see it is a combination of gamma , dt and dx, changing which can result in stable or unstable results. For a higher dt, we need a higher dx to get stable solutions for a given gamma,

You might also like