• 大小: 2.28MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-06
  • 语言: Matlab
  • 标签: 波场模拟  MATLAB  

资源简介

基于MATLAB的波场模拟,内附模拟动画

资源截图

代码片段和文件信息

% 此程序用于模拟声波波场(未加边界条件和未消数值频散)
clear;clc;figure(2);
% 雷克子波
tic;
dt=0.001;t=(0:40)*dt;f=30;
R=(1-2*(pi*f*t).^2).*exp(-(pi*f*t).^2);

% 模型参数设置
dx=2;dy=2;v=1000;%采样间隔和声波速度
x=-100:dx:100;y=-100:dy:100;%采样区间
x0=0;y0=0;t0=0.10;%炮点激发地点和时刻
m=length(x);n=length(y);

%数值计算与FCT消频散
data0=zeros(mn);data1=data0;data2=data0;
m0=find(x==x0);n0=find(y==y0);l0=round(t0/dt)+1;
for k=1:l0
    if k<=length(t);
       data1(m0n0)=R(k);
    end
    for i=2:m-1
        for j=2:n-1
            data2(ij)=2*data1(ij)-data0(ij)+(v*dt)^2*...
               ((data1(i+1j)-2*data1(ij)+data1(i-1j))/dx^2+...
               (data1(ij+1)-2*data1(ij)+data1(ij-1))/dy^2);
        end
    end
    %data2 = FCTforAW(data0data1data2);
    data0=data1;data1=data2;
end

%数据成图
[XY]=meshgrid(xy);
surf(XYdata2);shading interp;
h=title(‘Numerical Stimulation without FCT for Acoustic Wave‘);
set(h‘FontSize‘14‘Color‘‘b‘);
xlabel(‘X(m)‘‘FontSize‘14‘Color‘‘b‘);
ylabel(‘Y(m)‘‘FontSize‘14‘Color‘‘b‘);
view(090);colormap(‘gray‘);
axis square;

toc;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1146  2009-06-01 15:31  WaveFieldNumericalSimulation(StaggeredGrid)\AcousticWE_RGD_Simulation.m

     文件       1252  2005-01-01 02:31  WaveFieldNumericalSimulation(StaggeredGrid)\DCoef.m

     文件       3084  2007-11-14 19:36  WaveFieldNumericalSimulation(StaggeredGrid)\FCTforAW.m

     文件       2690  2009-05-30 09:27  WaveFieldNumericalSimulation(StaggeredGrid)\FCTforEW.m

     文件     288344  2009-05-30 11:20  WaveFieldNumericalSimulation(StaggeredGrid)\matlab.mat

     文件    1084416  2009-06-01 15:10  WaveFieldNumericalSimulation(StaggeredGrid)\Model2XVector.avi

     文件    1142784  2009-06-01 15:10  WaveFieldNumericalSimulation(StaggeredGrid)\Model2YVector.avi

     文件     266240  2009-05-30 19:24  WaveFieldNumericalSimulation(StaggeredGrid)\Staggered-Grid Difference.doc

     文件      10958  2009-05-30 09:28  WaveFieldNumericalSimulation(StaggeredGrid)\Staggered-Grid Difference.txt

     文件       5856  2009-06-01 15:30  WaveFieldNumericalSimulation(StaggeredGrid)\TotalWES.m

     文件       5140  2009-06-01 14:55  WaveFieldNumericalSimulation(StaggeredGrid)\TotalWES111.m

     文件       4971  2009-06-01 15:25  WaveFieldNumericalSimulation(StaggeredGrid)\totolwes112.m

     文件     450560  2009-06-01 10:53  WaveFieldNumericalSimulation(StaggeredGrid)\新建 Microsoft Word 文档.doc

     文件        655  2009-06-01 14:40  WaveFieldNumericalSimulation(StaggeredGrid)\新建 文本文档.txt

     目录          0  2009-12-01 18:22  WaveFieldNumericalSimulation(StaggeredGrid)

----------- ---------  ---------- -----  ----

              3268096                    15


评论

共有 条评论