File:Method_of_lines.gif
From Wikipedia, the free encyclopedia
![File:Method of lines.gif](http://upload.wikimedia.org/wikipedia/commons/thumb/5/5b/Method_of_lines.gif/798px-Method_of_lines.gif)
Size of this preview: 798 × 599 pixels. Other resolutions: 320 × 240 pixels | 639 × 480 pixels | 840 × 631 pixels.
Original file (840 × 631 pixels, file size: 818 KB, MIME type: image/gif, looped, 100 frames, 5.0 s)
![]() | This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionMethod of lines.gif |
English: Method of lines - the example, which shows the origin of the name of method.
Solid line represents an analytical solution, and lines show evolution in time of numerical solution by means of method of lines. For details see: Schiesser, W. E. (1991) The Numerical Method of Lines, Academic Press ISBN: 0-12-624130-9. Click full resolution to see an animation. The source code: function mol
u = @(t,x)0.5./sqrt(4*t+1)*(exp(3*(2*x+1)/(4*t+1))+2).*exp(-(x+2).^2/(4*t+1));
M = 40;
N = 100;
x = linspace(-5,5,M+1);
y0 = 0.5*exp(-(x-1).^2)+exp(-(x+2).^2);
[t,y] = ode45(@dmol,linspace(0,0.5,N),y0(2:end));
y = [zeros(N,1) y];
hold on
for tt=1:numel(t)
cla
stem(x,y(tt,:),'k')
plot(x,u(t(tt),x),'k')
text(0.8,0.8,['t = ' num2str(t(tt)) 's']);
ylim([0 1])
xlabel('x')
ylabel('u(x,t)')
drawnow
end
function dy=dmol(~,y)
dx = 10/M;
y0 = 0;
for m=M:-1:1
if m==1
dy(m,1) = (y(m+1)-2*y(m)+y0)/(dx^2);
elseif m==M
dy(m,1) = 0;
else
dy(m,1) = (y(m+1)-2*y(m)+y(m-1))/(dx^2);
end
end
end %dmol function
end %mol function
Polski: Metoda linii - przykład, który przedstawia pochodzenie nazwy metody. Kliknij Pełna rozdzielczość żeby zobaczyć animację. |
Date | |
Source | Own work |
Author | Grzegorz Knor |
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
![w:en:Creative Commons](https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png)
![attribution](https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png)
![share alike](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/24px-Cc-sa_white.svg.png)
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
depicts
some value
23 July 2013
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 10:50, 23 July 2013 | ![]() | 840 × 631 (818 KB) | Gknor | User created page with UploadWizard |
File usage
The following pages on the English Wikipedia use this file (pages on other projects are not listed):
Global file usage
The following other wikis use this file:
- Usage on pl.wikipedia.org
Retrieved from "https://en.wikipedia.org/wiki/File:Method_of_lines.gif"