Fitxer:Heat_eqn.gif
From Wikipedia, the free encyclopedia
Heat_eqn.gif (200 × 136 píxels, mida del fitxer: 500 Ko, tipus MIME: image/gif, en bucle, 181 fotogrames, 6,0 s)
![]() | Aquest fitxer i la informació mostrada a continuació provenen del dipòsit multimèdia lliure Wikimedia Commons.![]() |
Resum
DescripcióHeat eqn.gif |
English: Illustration of the Heat equation. Русский: Решение уравнения теплопроводности. |
Data | (UTC) |
Font |
Treball propi![]() Aquesta GIF imatge rasteritzada ha estat creada amb MATLAB. |
Autor | Oleg Alexandrov |
Altres versions |
![]() |
Llicència
Public domainPublic domainfalsefalse |
![]() |
Jo, el titular del copyright d'aquesta obra, l'allibero al domini públic. Això s'aplica a tot el món. En alguns països això pot no ser legalment possible, en tal cas: Jo faig concessió a tothom del dret d'usar aquesta obra per a qualsevol propòsit, sense cap condició llevat d'aquelles requerides per la llei. |
MATLAB source code
% illustration of the heat equation
% Solve the heat equation using finite differences and Forward Euler
function main()
% the number of data points. More points means prettier picture.
N = 400;
L = 2.5; % the box size is [-L, L] x [-L, L]
XX = linspace(-L, L, N);
YY = linspace(-L, L, N);
[X, Y] = meshgrid(XX, YY);
scale = 2;
Z = get_step_function (N, scale, X, Y);
CFL = 0.125; % CourantFriedrichsLewy
dx = XX(2)-XX(1); dy = dx; % space grid
dt = CFL*dx^2;
plot_dt = 0.004; % plot every plot_dt iterations
cmap = rv_matrix_rows(autumn); % colormap
% Solve the heat equation with zero boundary conditions
T = 0:dt:1;
iter = 0;
frame_no = 0;
for t=T
% plot the current temperature distribution
if floor(t/plot_dt) + 1 > frame_no
frame_no = frame_no + 1
% plot the surface
figure(2); clf;
surf(X, Y, Z);
% make the surface beautiful
shading interp; colormap(cmap);
% add in a source of light
camlight (-50, 54);
lighting phong;
% viewing angle
view(-40, 38);
axis equal; axis off;
axis([-L, L, -L, L, 0, scale])
hold on; plot3(0, 0, 3.4, 'g*'); % a marker to help with cropping
pause(0.1);
%return
file = sprintf('Movie_frame%d.png', 1000+frame_no);
%saveas(gcf, file) %save the current frame
print(gcf, '-dpng', '-r400', file) %save the current frame
disp(file); %show the frame number we are at
% cut at max_fr_no frames
max_fr_no = 15;
if frame_no >= max_fr_no
break
end
end
% advance in time
W = 0*Z;
for i=2:(N-1)
for j=2:(N-1)
W(i, j) = Z(i, j) + dt * ( Z(i+1, j) + Z(i-1, j) + Z(i, j-1) + Z(i, j+1) - 4*Z(i, j))/dx^2;
end
end
Z = W;
end
% The gif image was creating with the command
% convert -antialias -loop 10000 -delay 20 -compress LZW Movie_frame10* Heat_eqn.gif
% get a function which is 1 on a set, and 0 outside of it
function Z = get_step_function(N, scale, X, Y)
c = 2;
d=-1;
e=1;
f=0.5;
k=1.2;
shift=10;
Z = (c^2-(X/e-d).^2-(Y/f).^2).^2 + k*(c+d-X/e).^3-shift;
Z = 1-max(sign(Z), 0);
Z = scale*Z;
function X = rv_matrix_rows(X)
[m, n] = size(XL);
for i = 1:m
j = m + 1 - i;
if i < j
tmp = X(i, :); X(i, :) = X(j, :); X(j, :) = tmp;
end
end
Llegendes
Afegeix una explicació d'una línia del que representa aquest fitxer
Animación de la ecuación del calor.
Elements representats en aquest fitxer
representa l'entitat
Algun valor sense element de Wikidata
23 nov 2007
image/gif
Historial del fitxer
Cliqueu una data/hora per veure el fitxer tal com era aleshores.
Data/hora | Miniatura | Dimensions | Usuari/a | Comentari | |
---|---|---|---|---|---|
actual | 20:01, 2 feb 2024 | ![]() | 200 × 136 (500 Ko) | Jahobr | more frames (by user Emil Dalalyan) |
03:25, 12 abr 2019 | ![]() | 200 × 136 (172 Ko) | Jorge Stolfi | Duplicated some framed at beginning so that readers can see the initial state. Added a couple blank frames at end to make it clear that the simulation ended. Slowed down the movie a bit. | |
21:58, 24 abr 2011 | ![]() | 200 × 136 (116 Ko) | Oleg Alexandrov | Reverse the colormap (red is high). | |
08:11, 23 nov 2007 | ![]() | 199 × 140 (126 Ko) | Oleg Alexandrov | Tweak, same license | |
07:51, 23 nov 2007 | ![]() | 200 × 129 (112 Ko) | Oleg Alexandrov | {{Information |Description=Illustration of the en:Heat equation |Source=self-made with Matlab |Date=~~~~~ |Author= Oleg Alexandrov |Permission=PD-self, see below |other_versions= }} {{PD-self}} ==MATLAB source code== <pre> |
Ús del fitxer
Les 2 pàgines següents utilitzen aquest fitxer:
Ús global del fitxer
Utilització d'aquest fitxer en altres wikis:
- Utilització a ar.wikipedia.org
- Utilització a ast.wikipedia.org
- Utilització a bn.wikipedia.org
- Utilització a cs.wikipedia.org
- Utilització a de.wikipedia.org
- Utilització a el.wikipedia.org
- Utilització a en.wikipedia.org
- Utilització a eo.wikipedia.org
- Utilització a es.wikipedia.org
- Utilització a et.wikipedia.org
- Utilització a fr.wikipedia.org
- Utilització a gl.wikipedia.org
- Utilització a hy.wikipedia.org
- Utilització a ja.wikipedia.org
- Utilització a ko.wikipedia.org
- Utilització a ms.wikipedia.org
- Utilització a nl.wikipedia.org
- Utilització a pl.wikipedia.org
- Utilització a pt.wikipedia.org
- Utilització a ro.wikipedia.org
- Utilització a ru.wikipedia.org
- Utilització a sco.wikipedia.org
- Utilització a ta.wikipedia.org
- Utilització a th.wikipedia.org
- Utilització a tl.wikipedia.org
- Utilització a www.wikidata.org
- Utilització a zh-yue.wikipedia.org
- Utilització a zh.wikipedia.org
Obtingut de «https://ca.wikipedia.org/wiki/Fitxer:Heat_eqn.gif»