Coding angular spectrum of waves in a fluid

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
chiraganand
Messages
111
Reaction score
1
Hi,
I am trying to code ultrasonic transducer radiation in water using angular spectrum of plane waves. I am having difficulties in the sampling and fft. If anybody has an idea about this can you please help me out? I can paste the code once i get some response.
Thanks for your help!
 
Physics news on Phys.org
The thing is, it is hard to know whether I can help before I know more details. Perhaps post the code and explain in detail what you have and where you need to go with it.
 
mfig said:
The thing is, it is hard to know whether I can help before I know more details. Perhaps post the code and explain in detail what you have and where you need to go with it.
I don't know if the code makes any sense. Initially i assume the velocity on the trnasdcuer surface as constant and 1. I find the directivity function yy and then multiply this with the pressure in the fluid. This multiplied pressure I fast Fourier transform to get the required pressure at the point. Let me know if I am right. Thank you for your help anyways!
tic;
clear all;
c=1480000; %speed of sound in water mm/sec.
f=5000000; %freq. in Hz
w=20; %transducer width in mm
xx=[];
fss=0.01
xx=[-40:fss:40];
zz=[];
zz=[1:0.1:400];
yy=sinc(w*(f/c)*(((xx))));
bbb=[];
dd = 1;
gg=length(xx);
x(1:gg)=0;
x(gg/2-w/(2*fss):gg/2+w/(2*fss))=1;
y=x;
%y=fft(x);
figure; plot(abs(y));
zzz=length(zz);
for ii =1:zzz
d=dd*zz(ii); %distance from transducer in mm
df(ii)=d;
p=y.*exp(1i*2.*(f/c).*pi.*d.^2.*sqrt(((((((xx.^2+d.^2))))))));
h=p.*yy;
u=fft(h);
g=u;
g=fftshift(u);
aaa(ii)=abs(g(round(gg/2)));
bbb(ii,:)=abs(w);
bbb(ii,:)=bbb(ii,:)/max(bbb(ii,:));
end
figure; plot(df,aaa);
toc;
 
mfig said:
The thing is, it is hard to know whether I can help before I know more details. Perhaps post the code and explain in detail what you have and where you need to go with it.
I also chanced upon the FOCUS simulation software and they have an angular spectrum module. There are a few places in that code which I am not able to understand. If you could help me understand these parts of the code I would be extremely grateful