File:Helmholtz solution.png

原始文件(975 × 1,957像素,文件大小:23 KB,MIME类型:image/png


描述 Illustration of en:Helmholtz equation.
日期 (UTC)
来源 self-made with en:Matlab. See the source code below.
作者 Oleg Alexandrov
 
本PNG 位图使用MATLAB创作.
Public domain 我,本作品著作权人,释出本作品至公有领域。这适用于全世界。
在一些国家这可能不合法;如果是这样的话,那么:
我无条件地授予任何人以任何目的使用本作品的权利,除非这些条件是法律规定所必需的。


Source code (MATLAB)

 

% Plot the solution to the Helmholtz equation with a given source
clear all;

Box_x = 3;
Scale = 0.5;
Box_y = Box_x/Scale;

Nx = 200;
Ny = Nx/Scale;

wavenumber = 10;

XX = linspace(-Box_x, Box_x, Nx);
YY = linspace(-Box_y, Box_y, Ny);
hx = XX(2) - XX(1);
hy = YY(2) - YY(1);
[X, Y] = meshgrid(XX, YY);

Source_size  = 0.5;
Source_shift = 2;
Source =  max(Source_size^2 - X.^2-(Y-Source_shift).^2, 0) + max(Source_size^2 - X.^2-(Y+Source_shift).^2, 0) ;

% plot the source
figure(1); clf; hold on; axis equal; axis off;
imagesc(Source);


% plot the solution to the Helmholtz equation
I = sqrt(-1);
Field = 0*X;

[m, n] = size(Source);
for i=1:m
   i
   for j=1:n

      if Source(i, j) ~= 0

	 x0 = X(i, j);
	 y0 = Y(i, j);

	 % add the contribution from the current source
	 Field = Field + (I/4)*besselh(0, 1, wavenumber*sqrt((X-x0).^2+(Y-y0).^2) + eps)*Source(i, j)*hx*hy;
      end
      
   end
end


figure(2); clf; hold on; axis equal; axis off;
imagesc(real(Field));

% Save to disk and convert to png right away
figure(1); 
saveas(gcf, 'Helmholtz_source.eps', 'psc2');
%! convert -density 200 Helmholtz_source.eps Helmholtz_source.png

figure(2); 
saveas(gcf, 'Helmholtz_solution.eps', 'psc2');
%! convert -density 200 Helmholtz_solution.eps Helmholtz_solution.png
此math图片可使用矢量图形重新创建为SVG文件。这具有很多好处;更多信息请参见共享资源:待清理媒体。如果存在此图片的SVG格式,请将其上传,然后将此模板替换为{{vector version available|新图片名称}}


建议您将SVG命名为“Helmholtz solution.svg”,这样在使用Vector version available(或Vva)模板时就不需要填写新图片名称参数。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2007年7月7日 (六) 19:502007年7月7日 (六) 19:50版本的缩略图975 × 1,957(23 KB)Oleg AlexandrovTweak
2007年7月7日 (六) 04:182007年7月7日 (六) 04:18版本的缩略图500 × 989(22 KB)Oleg AlexandrovHigher res.
2007年7月7日 (六) 03:592007年7月7日 (六) 03:59版本的缩略图500 × 989(15 KB)Oleg Alexandrov{{Information |Description=Illustration of en:Helmholtz equation. |Source=self-made with en:Matlab. See the source code below. |Date=03:56, 7 July 2007 (UTC) |Author= Oleg Alexandrov }} {{PD-self}} ==MATLAB source code

以下页面使用本文件:

全域文件用途

以下其他wiki使用此文件: