<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: Some Really Interesting Phenomenon When Observing the Average Intensity</title>
		<link>http://www.k-wave.org/forum/topic/some-really-interesting-phenomenon-when-observing-the-average-intensity</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:32:47 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/some-really-interesting-phenomenon-when-observing-the-average-intensity" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Some Really Interesting Phenomenon When Observing the Average Intensity"</title>
			<link>http://www.k-wave.org/forum/topic/some-really-interesting-phenomenon-when-observing-the-average-intensity#post-4542</link>
			<pubDate>Thu, 22 May 2014 16:46:29 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4542@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi cge,&#60;/p&#62;
&#60;p&#62;I didn't notice any asymmetry in your actual simulation, so it's possibly related to the PML or the calculation of intensity (see discussion &#60;a href=&#34;http://www.k-wave.org/forum/topic/defining-incident-acoustic-plane-wave-intensity&#34;&#62;here&#60;/a&#62;).&#60;/p&#62;
&#60;p&#62;A couple of small suggestions. The PML size that you define must also be passed to the simulation function using the optional input &#60;code&#62;&#38;#39;PMLSize&#38;#39;, [PML_X_SIZE, PML_Y_SIZE, &#38;#39;PML_Z_SIZE&#38;#39;&#60;/code&#62;. A PML thickness of two grid points will not be very effective. Also, if you want to simulate an infinite cylinder, I would turn off the PML in the z-direction (along the axis of the cylinder) by setting the optional input &#60;code&#62;&#38;#39;PMLAlpha&#38;#39;, [2, 2, 0]&#60;/code&#62;. Finally, your simulations will run much faster if you choose grid sizes (including the PML) with small prime factors (see &#60;code&#62;checkFactors&#60;/code&#62;).&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cge on "Some Really Interesting Phenomenon When Observing the Average Intensity"</title>
			<link>http://www.k-wave.org/forum/topic/some-really-interesting-phenomenon-when-observing-the-average-intensity#post-4530</link>
			<pubDate>Wed, 21 May 2014 20:44:18 +0000</pubDate>
			<dc:creator>cge</dc:creator>
			<guid isPermaLink="false">4530@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello All&#60;/p&#62;
&#60;p&#62;I build a cylindrical transducer in a water media with alpha being 1.5 coefficient being 0.75 and sound speed being 1540m/s as the source, and I made a sin wave with magnitude being 2 and frequency being 1.4MHz&#60;/p&#62;
&#60;p&#62;It is a 3D simulation, I set PML size to be 2 and they are outside the computational domain.dx=dy=dz=0.25mm&#60;/p&#62;
&#60;p&#62;For the first simulation, the computational domain size is 64(x)*64(y)*64(z) in grid. The transducer size is 64 in height(At Z axis) and 10 in radius (both in grid), with x and y coordinates being 32. For the second simulation, the computational domain size is 128*128*80 in grid and the transducer size is 80 in height and 40 in radius with x and y coordinates being 64&#60;/p&#62;
&#60;p&#62;The sensor mask is defined as a plane at Z=32 to observe the overall distribution at the middle of the transducer.&#60;/p&#62;
&#60;p&#62;However, some really interesting thing happened:&#60;br /&#62;
In the first simulation, the distribution is symmetrical in x-y plane&#60;br /&#62;
In the second simulation, it becomes asymmetrical and the result is very strange, one half is generally higher than the other half in the plane.&#60;/p&#62;
&#60;p&#62;Here is the source code for the second simulation, one can change the size and center of the circle to change it into the first one. Can anybody help me to explain why this happen?&#60;br /&#62;
lear all;&#60;br /&#62;
PML_X_SIZE=2;&#60;br /&#62;
PML_Y_SIZE=2;&#60;br /&#62;
PML_Z_SIZE=2;&#60;/p&#62;
&#60;p&#62;% The size in 3 dimension in grid&#60;br /&#62;
Nx=132-2*PML_X_SIZE;&#60;br /&#62;
Ny=132-2*PML_Y_SIZE;   %&#60;br /&#62;
Nz=84-2*PML_Z_SIZE; &#60;/p&#62;
&#60;p&#62;%Unit in each dimension&#60;br /&#62;
dx=0.25e-3; %[m],dy dz follow the same&#60;br /&#62;
dy=0.25e-3;&#60;br /&#62;
dz=0.25e-3;&#60;/p&#62;
&#60;p&#62;%Build up the computational domain&#60;br /&#62;
kgrid=makeGrid(Nx,dx,Ny,dy,Nz,dz);&#60;/p&#62;
&#60;p&#62;%Make the circle profile of the cylindrical transducer&#60;br /&#62;
circle=makeCircle(Nx,Ny,64,64,40);  %center 1.6 cm&#60;br /&#62;
disk=makeDisc(Nx,Ny,64,64,40);&#60;br /&#62;
;&#60;/p&#62;
&#60;p&#62;%Make the mask for the source and the sensor&#60;br /&#62;
mask=zeros(Nx,Ny,Nz);&#60;br /&#62;
mask_2=zeros(Nx, Ny, Nz);&#60;br /&#62;
for l=1:Nz&#60;br /&#62;
    mask(:,:,l)=circle;&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;for l2=1:Nx&#60;br /&#62;
   for m2=1:Ny&#60;br /&#62;
    mask_2(l2,m2,40)=1;  %This make a binary mask for the sensor array&#60;br /&#62;
    end&#60;br /&#62;
end&#60;br /&#62;
%Visualization of the source(transducer)'s profile&#60;br /&#62;
voxelPlot(mask);&#60;br /&#62;
view([50,15]);&#60;br /&#62;
voxelPlot(mask_2);&#60;br /&#62;
view([50,15]);&#60;br /&#62;
%Define the media properties&#60;br /&#62;
medium.sound_speed = 1540;  % [m/s]&#60;br /&#62;
medium.alpha_power = 1.5;   % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_coeff = 0.75;  % [dB/(MHz^y cm)]&#60;br /&#62;
medium.density=1000;        % [Kg/m^3]&#60;/p&#62;
&#60;p&#62;%Define the simulation time length&#60;br /&#62;
t_end = 40e-6;                  % [s]&#60;br /&#62;
[kgrid.t_array,dt] = makeTime(kgrid, medium.sound_speed, [], t_end);&#60;/p&#62;
&#60;p&#62;%Define the source&#60;br /&#62;
source.p_mask=mask;&#60;br /&#62;
source_freq = 1.5e6;       % [Hz]&#60;br /&#62;
source_mag = 2;           % [Pa]&#60;br /&#62;
source.p = source_mag*sin(2*pi*source_freq*kgrid.t_array); %The square wave for the source&#60;br /&#62;
source.p = filterTimeSeries(kgrid, medium, source.p); %Filter the frequency not supported by the grid&#60;/p&#62;
&#60;p&#62;%Define the sensor array to record the data&#60;/p&#62;
&#60;p&#62;sensor.mask=mask_2;&#60;br /&#62;
sensor.record={'p_rms','p_final','I_avg'}; % Here two types of data are recorded: root mean square of the pressure and average intensity over the simulation time&#60;br /&#62;
display_mask = source.p_mask;&#60;br /&#62;
input_args = {'DisplayMask', display_mask, 'PMLInside', false, 'PlotPML', false,'RecordMovie', true, 'MovieName','Cylindrical'}; %Set the arguments of the display&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:}); %Run the simulation function of 3D simulation&#60;/p&#62;
&#60;p&#62;%Visualization of the Simulation Result&#60;br /&#62;
%Reorder the average acoustic intensity recorded here. The data returns as the&#60;br /&#62;
%Matlab column wise order&#60;br /&#62;
intensity_1=sensor_data.Iy_avg;&#60;br /&#62;
intensity_2=sensor_data.Ix_avg;&#60;br /&#62;
intensity_3=sensor_data.Iz_avg;&#60;br /&#62;
Map_intensity_1=zeros(Nx,Ny);&#60;br /&#62;
Map_intensity_2=zeros(Nx,Ny);&#60;br /&#62;
Map_intensity_3=zeros(Nx,Ny);&#60;br /&#62;
Map_intensity_4=zeros(Nx,Ny);&#60;/p&#62;
&#60;p&#62; for p=1:Nx&#60;br /&#62;
    for q=1:Ny&#60;br /&#62;
        if(disk(q,p)==1)&#60;br /&#62;
            continue;&#60;br /&#62;
        end;&#60;br /&#62;
        Map_intensity_1(q,p)=abs(intensity_1((p-1)*64+q,1));&#60;br /&#62;
        Map_intensity_2(q,p)=abs(intensity_2((p-1)*64+q,1));&#60;br /&#62;
        Map_intensity_3(q,p)=abs(intensity_3((p-1)*64+q,1));&#60;br /&#62;
        Map_intensity_4(q,p)=( Map_intensity_1(q,p)^2+   Map_intensity_2(q,p)^2+Map_intensity_3(q,p)^2)^0.5;&#60;br /&#62;
    end;&#60;br /&#62;
 end;&#60;/p&#62;
&#60;p&#62;figure;&#60;br /&#62;
surf(kgrid.x_vec*1000,kgrid.y_vec*1000+64,Map_intensity_1);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
title('Average Acoustic Intensity At Y direction');&#60;/p&#62;
&#60;p&#62;figure;&#60;br /&#62;
surf(kgrid.x_vec*1000,kgrid.y_vec*1000,Map_intensity_2);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
title('Average Acoustic Intensity At X direction');&#60;/p&#62;
&#60;p&#62;figure;&#60;br /&#62;
surf(kgrid.x_vec*1000,kgrid.y_vec*1000,Map_intensity_3);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
title('Average Acoustic Intensity At Z direction');&#60;/p&#62;
&#60;p&#62;figure;&#60;br /&#62;
surf(kgrid.x_vec*1000,kgrid.y_vec*1000,Map_intensity_4);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
title('Average Acoustic Intensity ');
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
