% close all;
clear all;
clc;
% krakenc('pekeris');
a=dlmread('D:\krakenfinal\outptfil0001');
% %%%%%%%%example:pekeris环境参数
H=100; %深度5000m
c=1500; %%%%%%%%%%%%接收点声速
rou1=1.0; %%%%%%%%%%%%第一层密度
rou2=1.5; %%%%%%%%%%%%第二层密度
z0=20; % 发射点深度
z=10; % 接收点深度
f=50; % 发射信号频率
sum1(1:5000)=0;
kx=a(:,2)+1i*a(:,3);%水平方向本征值
k=sqrt((2*pi*f/c)^2-(kx.^2));
%%水声学原理99页
An=sqrt(2*k./(k*H-cos(k*H).*sin(k*H)-(rou1/rou2)^2*(sin(k*H)).^2.*tan(k*H))); %通用算式
% An = sqrt(2/H); %rou1/rou2约=0时可用
Z0=An.*sin(k*z0);
Z=An.*sin(k*z);
for r=1:1:5000
unit = Z0.*Z.*besselh(0,2,kx.*r);
% unit=sqrt(2*pi./kx./r).*Z0.*Z.*exp(-i.*kx*r);
p(r)=-1i*pi*sum(unit);
end
unit = Z0.*Z.*besselh(0,2,kx.*1);
% unit=sqrt(2*pi./kx./1).*Z0.*Z.*exp(-i.*kx*1);%%%1m处声压
p1 = -1i*pi*sum(unit);
n=1:5000;
tl1=-20*log10(abs(p)/abs(p1));
% figure;
% plot(abs(p));
figure;
plot(n,tl1);
axis ij
tl2=-20*log10(abs(p));
% figure;
% plot(abs(p));
figure;
plot(n,tl2);
axis ij
% save KK n tl2
评论4