Coding angular spectrum of waves in a fluid

Click For Summary

Discussion Overview

The discussion revolves around coding the angular spectrum of ultrasonic transducer radiation in water, focusing on issues related to sampling and fast Fourier transform (FFT) implementation. Participants are seeking assistance with specific coding challenges and understanding certain aspects of existing simulation software.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant describes their approach to coding the radiation pattern, including assumptions about constant velocity on the transducer surface and the calculation of a directivity function.
  • Another participant requests more details and code to better understand how they might assist.
  • A participant expresses uncertainty about the correctness of their code and outlines their process involving FFT and pressure calculations.
  • There is mention of the FOCUS simulation software and a request for clarification on specific parts of its angular spectrum module.

Areas of Agreement / Disagreement

Participants do not appear to have reached a consensus, as multiple viewpoints and requests for clarification remain. The discussion includes uncertainties and varying levels of understanding regarding the coding and theoretical aspects.

Contextual Notes

Some limitations include the need for clearer definitions of terms and assumptions in the coding process, as well as unresolved mathematical steps in the participants' approaches.

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
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
Replies
5
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K