<?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; User Favorites: zhaoxiang</title>
		<link><a href='http://www.k-wave.org/forum/profile/zhaoxiang'>zhaoxiang</a></link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:06:04 +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/profile/" rel="self" type="application/rss+xml" />

		<item>
			<title>HD Y on "Using source.p to specify pressure distribution"</title>
			<link>http://www.k-wave.org/forum/topic/using-sourcep-to-specify-pressure-distribution#post-9188</link>
			<pubDate>Wed, 19 Feb 2025 23:21:34 +0000</pubDate>
			<dc:creator>HD Y</dc:creator>
			<guid isPermaLink="false">9188@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi, it seems I found some discussions on the implementation of Dirichlet boundary conditions in this post. But I still did not get how the scaling factor is set in general.&#60;/p&#62;
&#60;p&#62;On the other hand, I saw some good results in Figure 2 of the following publication:&#60;/p&#62;
&#60;p&#62;Modelling Nonlinear Ultrasound Propagation in Absorbing Media using the k-Wave Toolbox: Experimental Validation.&#60;/p&#62;
&#60;p&#62;May I ask in this reference, what exact scaling factor is used in order to get such good agreement between simulation results and experimental results.&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nhaidour on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8873</link>
			<pubDate>Fri, 28 Jul 2023 10:50:03 +0000</pubDate>
			<dc:creator>nhaidour</dc:creator>
			<guid isPermaLink="false">8873@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bradley,&#60;/p&#62;
&#60;p&#62;I'm simulating a disc element using karray.addDiscElement, but when I draw the 3D plot of this element, it seems the shape of the element is not a disc, it looks like it's rectangle, is this normal?&#60;/p&#62;
&#60;p&#62;Cordially,
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jinhyuk Kim on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8778</link>
			<pubDate>Tue, 30 May 2023 02:15:16 +0000</pubDate>
			<dc:creator>Jinhyuk Kim</dc:creator>
			<guid isPermaLink="false">8778@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks, Bradley!&#60;/p&#62;
&#60;p&#62;I have to adjust the position of the ultrasound transducer, right?&#60;/p&#62;
&#60;p&#62;I'll try and research successfully!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8761</link>
			<pubDate>Thu, 18 May 2023 06:25:54 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8761@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Jinhyuk Kim,&#60;/p&#62;
&#60;p&#62;In &#60;code&#62;kWaveArray&#60;/code&#62;, the element positions must be set in physical space (not grid space). So, in your example, there are no elements within the grid, so the mask ends up being zero (hence the error message).&#60;/p&#62;
&#60;p&#62;Brad
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Jinhyuk Kim on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8746</link>
			<pubDate>Thu, 27 Apr 2023 10:02:31 +0000</pubDate>
			<dc:creator>Jinhyuk Kim</dc:creator>
			<guid isPermaLink="false">8746@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi everyone,&#60;/p&#62;
&#60;p&#62;I have a problem with the kspaceFirstOrder2D.&#60;/p&#62;
&#60;p&#62;error message is 'source.p_mask must be a binary grid with at least one element set to 1.&#60;/p&#62;
&#60;p&#62;I want to find acoustic fiend arising from array used kwavearray class, however, I found above error messasge.&#60;/p&#62;
&#60;p&#62;Here is my code.&#60;/p&#62;
&#60;p&#62;karray = kWaveArray;&#60;br /&#62;
% define the grid parameters&#60;br /&#62;
pml_size = 20;&#60;br /&#62;
Nx = 552 - 2 * pml_size; % [grid points]&#60;br /&#62;
Ny = 552 - 2 * pml_size; % [grid points]&#60;br /&#62;
dx = 1e-3; % [m]&#60;br /&#62;
dy = 1e-3; % [m]&#60;/p&#62;
&#60;p&#62;% create the computational grid&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dy);&#60;/p&#62;
&#60;p&#62;%% ALPHA COEFF&#60;/p&#62;
&#60;p&#62;medium.alpha_coeff = 0.02 * ones(Nx, Ny); % [dB/(MHz^y cm)] WATER&#60;br /&#62;
medium.alpha_power = 1.5;&#60;/p&#62;
&#60;p&#62;%% SPEED&#60;br /&#62;
medium.sound_speed = 1500 * ones(Nx, Ny); % WATER default fill! [m/s]&#60;br /&#62;
% %skull&#60;/p&#62;
&#60;p&#62;%% DENSITY&#60;/p&#62;
&#60;p&#62;medium.density = 1000 * ones(Nx, Ny); % WATER default fill [kg/m^3]&#60;/p&#62;
&#60;p&#62;freq = 200*10^3; % [Hz]&#60;br /&#62;
amp = 0.3e6; % 0.53[MPa]&#60;/p&#62;
&#60;p&#62;radius    = 10e-3;              % [m]&#60;br /&#62;
diameter  = 15e-3;              % [m]&#60;br /&#62;
focus_pos = [Nx/2, Ny/2];        % [m]&#60;/p&#62;
&#60;p&#62;% add arc shaped element&#60;br /&#62;
elem_pos  = [Nx/10, Ny/2];    % [m]&#60;br /&#62;
karray.addArcElement(elem_pos, radius, diameter, focus_pos);&#60;/p&#62;
&#60;p&#62;% add arc shaped element&#60;br /&#62;
elem_pos  = [Nx/10, Ny/2.5];         % [m]&#60;br /&#62;
karray.addArcElement(elem_pos, radius, diameter, focus_pos);&#60;/p&#62;
&#60;p&#62;% add arc shaped element&#60;br /&#62;
elem_pos  = [Nx/10, Ny/3.0];     % [m]&#60;br /&#62;
karray.addArcElement(elem_pos, radius, diameter, focus_pos);&#60;/p&#62;
&#60;p&#62;source.p_mask = karray.getArrayBinaryMask(kgrid);&#60;/p&#62;
&#60;p&#62;display_mask = source.p_mask;&#60;/p&#62;
&#60;p&#62;% calculate the time step using an integer number of points per period&#60;br /&#62;
ppw = 100; % points per wavelength&#60;br /&#62;
cfl = 0.1; % cfl number&#60;br /&#62;
ppp = 41; % points per period&#60;br /&#62;
T = 1 / freq; % period [s]&#60;br /&#62;
dt = 4e-8; % time step [s]&#60;/p&#62;
&#60;p&#62;% calculate the number of time steps to reach steady state&#60;br /&#62;
t_end = 40.0575e-5;&#60;br /&#62;
Nt = round(t_end / dt);&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
kgrid.setTime(Nt, dt);&#60;/p&#62;
&#60;p&#62;% define the input signal&#60;/p&#62;
&#60;p&#62;source.p = createCWSignals(kgrid.t_array, freq, [amp, amp, amp], 0);&#60;/p&#62;
&#60;p&#62;sensor.mask = ones(Nx, Ny);&#60;br /&#62;
sensor.record = {'p', 'p_max_all'};&#60;/p&#62;
&#60;p&#62;% record the last 3 cycles in steady state&#60;br /&#62;
num_periods = 15;&#60;br /&#62;
T_points = round(num_periods * T ./ kgrid.dt);&#60;br /&#62;
sensor.record_start_index = Nt - T_points + 1;&#60;/p&#62;
&#60;p&#62;% set the input arguements&#60;br /&#62;
input_args = {'PMLInside', false,'PlotLayout', true, 'PlotPML', false, 'DisplayMask', display_mask, 'PlotScale', [-1, 1] * amp};&#60;/p&#62;
&#60;p&#62;% run the acoustic simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zengqw2021 on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8745</link>
			<pubDate>Fri, 21 Apr 2023 06:03:48 +0000</pubDate>
			<dc:creator>zengqw2021</dc:creator>
			<guid isPermaLink="false">8745@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi everyone,&#60;/p&#62;
&#60;p&#62;   Is there a way for me to get grid points form part of the specified element. As for example_at_array_as_sensor.m, I got a sensor_data array of size 6748 by 1207. There is 20 elements.&#60;br /&#62;
 But, how could I tell which transducer these 6748 time series belong to.&#60;/p&#62;
&#60;p&#62; I find a property named 'getElementBinaryMask' may be work. But when I run it in the following way, I get an error 'Method, attribute, or field 'getElementBinaryMask' of class 'kWaveArray' not recognized.'.&#60;/p&#62;
&#60;p&#62;mask2 = karray.getElementBinaryMask(kgrid, 1); % grid points form part of the specified element&#60;/p&#62;
&#60;p&#62;Does anyone know how to solve this problem？
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8673</link>
			<pubDate>Mon, 28 Nov 2022 15:56:34 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8673@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi HN,&#60;/p&#62;
&#60;p&#62;Yes at the moment you need to define them manually. The &#60;a href=&#34;http://www.k-wave.org/documentation/example_at_linear_array_transducer.php&#34;&#62;Modelling A Linear Array Transducer Example&#60;/a&#62; shows one way to do this.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nhaidour on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8672</link>
			<pubDate>Mon, 28 Nov 2022 13:37:46 +0000</pubDate>
			<dc:creator>nhaidour</dc:creator>
			<guid isPermaLink="false">8672@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thank you for your response ! &#60;/p&#62;
&#60;p&#62;I want to modelise a 2D Probe that contain elements and an inter-space element in 3D, and I think the best way is to use KwaveArray class! But I did not find the function that would allow me to declare the number of elements with an inter-space and their position. Or do I have to declare each element manually?  &#60;/p&#62;
&#60;p&#62;Best Regards,&#60;br /&#62;
HN
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8670</link>
			<pubDate>Tue, 22 Nov 2022 21:11:11 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8670@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Yes - there are several examples in the included documentation under “modelling transducer arrays”.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nhaidour on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources/page/2#post-8669</link>
			<pubDate>Tue, 22 Nov 2022 16:12:49 +0000</pubDate>
			<dc:creator>nhaidour</dc:creator>
			<guid isPermaLink="false">8669@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;Is there some examples for using the KwaveArray ?&#60;/p&#62;
&#60;p&#62;Best Regards,&#60;br /&#62;
HN
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8642</link>
			<pubDate>Tue, 08 Nov 2022 10:13:50 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8642@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Noting that &#60;code&#62;kWaveArray&#60;/code&#62; is now part of k-Wave v1.4.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "Doubts converting pressure into heat deposition"</title>
			<link>http://www.k-wave.org/forum/topic/doubts-converting-pressure-into-heat-deposition#post-8579</link>
			<pubDate>Wed, 13 Jul 2022 18:56:12 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">8579@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi ganrielcathoud, &#60;/p&#62;
&#60;p&#62;That expression comes from 2*alpha*I_av where I is the time-averaged intensity. In a plane wave, which is a good approximation in many practical cases, such as at the focus of a transducer, I_av is related to the acoustic pressure by 0.5*p_max^2/(density*sound speed), where p_max incorporates the effect of the absorption on the wave amplitude.&#60;/p&#62;
&#60;p&#62;Going back a step, 2*alpha*I_av is the gradient of the average intensity: if the average intensity in a plane wave is decreasing, there must be energy being left behind. That is the energy that is being converted to heat.&#60;/p&#62;
&#60;p&#62;Look up some reviews on ultrasound therapy for more details on this.&#60;/p&#62;
&#60;p&#62;Best wishes&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8573</link>
			<pubDate>Wed, 13 Jul 2022 17:31:30 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">8573@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi quetaijiangchu and LewisR, &#60;/p&#62;
&#60;p&#62;There is not such an example yet, no, although the idea behind kWaveArray does have the capability of modelling just such sources. Essentially, given a desired surface, it is necessary to convolve it with the bandlimited interpolant, which has the form &#60;code&#62;sinc(x * pi / dx)&#60;/code&#62;, and then sample the resulting function at the grid points to give the weights used in kWaveArray. The details are given in &#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2019-Wise-JASA.pdf&#34;&#62;this paper&#60;/a&#62;. We will add more functionality in due course when we integrate it into k-Wave properly.&#60;/p&#62;
&#60;p&#62;Best wishes&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gabrielcathoud on "Doubts converting pressure into heat deposition"</title>
			<link>http://www.k-wave.org/forum/topic/doubts-converting-pressure-into-heat-deposition#post-8565</link>
			<pubDate>Wed, 13 Jul 2022 14:51:26 +0000</pubDate>
			<dc:creator>gabrielcathoud</dc:creator>
			<guid isPermaLink="false">8565@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I'm simulating the heating generated by the use of ultrasound in the brain. The ultrasound simulation is working fine, but I am having difficulties with the temperature simulation. How do I convert pressure aplied into deposited heat? I found a conversion here on the forum, but I don't understand why:&#60;/p&#62;
&#60;p&#62;source.Q                              = alpha_np.*sensor_data.p_max_all.^2./(medium.density .* medium.sound_speed);&#60;/p&#62;
&#60;p&#62;I appreciate any help.&#60;/p&#62;
&#60;p&#62;The whole temperatura simulation is:&#60;/p&#62;
&#60;p&#62;clear source;&#60;/p&#62;
&#60;p&#62;medium.thermal_conductivity           = thermal_conductivity_water*ones(Nx,Ny);&#60;br /&#62;
medium.thermal_conductivity(head_mask==1) = thermal_conductivity_bone;&#60;/p&#62;
&#60;p&#62;medium.specific_heat                  = specific_heat_water*ones(Nx,Ny);&#60;br /&#62;
medium.specific_heat(head_mask==1)    = specific_heat_bone;&#60;br /&#62;
alpha_np                              = db2neper(medium.alpha_coeff, medium.alpha_power)...&#60;br /&#62;
                                        *(2 * pi * source_freq).^medium.alpha_power;                       &#60;/p&#62;
&#60;p&#62;dt                                    = 0.001;&#60;/p&#62;
&#60;p&#62;source.Q                              = alpha_np.*sensor_data.p_max_all.^2./(medium.density .* medium.sound_speed);&#60;br /&#62;
source.T0                             = 37;&#60;/p&#62;
&#60;p&#62;input_args                            = {'PlotSim', true};&#60;/p&#62;
&#60;p&#62;kdiff                                 = kWaveDiffusion(kgrid, medium, source, [], input_args{:});&#60;/p&#62;
&#60;p&#62;on_time                               = duration_of_stimulus; % [s]&#60;br /&#62;
off_time                              = 60; % [s]&#60;/p&#62;
&#60;p&#62;kdiff.takeTimeStep(round(on_time / dt), dt);&#60;br /&#62;
T1 = kdiff.T;&#60;/p&#62;
&#60;p&#62;kdiff.Q = 0;&#60;br /&#62;
dt = 0.1;&#60;br /&#62;
kdiff.takeTimeStep(round(off_time / dt), dt);&#60;br /&#62;
T2 = kdiff.T;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>quetaijiangchu on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8552</link>
			<pubDate>Wed, 15 Jun 2022 08:28:47 +0000</pubDate>
			<dc:creator>quetaijiangchu</dc:creator>
			<guid isPermaLink="false">8552@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Is there an example of how to create 3D irregularities using function addCustomElement?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>LewisR on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8524</link>
			<pubDate>Wed, 04 May 2022 14:19:03 +0000</pubDate>
			<dc:creator>LewisR</dc:creator>
			<guid isPermaLink="false">8524@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;Can kWaveArray support rectangular curved elements? Specifically curvature to both the height and width of the element. Or would this need to be done using the custom element option? I'm a little confused with how to use the addCustomElement method, would it be possible for you to do an example? If in fact it can be used to solve my problem.&#60;/p&#62;
&#60;p&#62;Thanks in advance,&#60;/p&#62;
&#60;p&#62;Lewis
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Deepak Sonker on "Differences in focus pressure between k-Wave and analytical transducer model"</title>
			<link>http://www.k-wave.org/forum/topic/differences-in-focus-pressure-between-k-wave-and-analytical-transducer-model#post-8283</link>
			<pubDate>Fri, 06 Aug 2021 21:03:18 +0000</pubDate>
			<dc:creator>Deepak Sonker</dc:creator>
			<guid isPermaLink="false">8283@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thank you I have got the correct pressure with kWaveArray class.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Differences in focus pressure between k-Wave and analytical transducer model"</title>
			<link>http://www.k-wave.org/forum/topic/differences-in-focus-pressure-between-k-wave-and-analytical-transducer-model#post-8254</link>
			<pubDate>Wed, 21 Jul 2021 16:13:41 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8254@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi deepak11,&#60;/p&#62;
&#60;p&#62;There are some examples of doing this comparison in the new &#60;a href=&#34;http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources&#34;&#62;kWaveArray&#60;/a&#62; class that might show you where you're going wrong. Note, if you're using a grid-based source, you'll have to include an extra scaling factor (or weight the source amplitudes) as discuss in &#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2016-Martin-IEEETUFFC.pdf&#34;&#62;this paper&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;Brad
&#60;/p&#62;</description>
		</item>
		<item>
			<title>deepak11 on "Differences in focus pressure between k-Wave and analytical transducer model"</title>
			<link>http://www.k-wave.org/forum/topic/differences-in-focus-pressure-between-k-wave-and-analytical-transducer-model#post-8244</link>
			<pubDate>Tue, 20 Jul 2021 23:51:29 +0000</pubDate>
			<dc:creator>deepak11</dc:creator>
			<guid isPermaLink="false">8244@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
First of all thank you for building this amazing toolbox.&#60;/p&#62;
&#60;p&#62;I have simulated the bowel transducer in 3D and then compared the focus pressure amplitude with the analytical model of a concave spherical transducer (from Theory of Focusing Radiators by H.T. O'Neil). I also checked this analytical model results from the Sonic Concepts transducer (H-276) and it was correct. I couldn't find the mistake in my code I think I have done everything correctly but the results shouldn't deviate that much (like the peak pressure at the focus must be 58 MHz but the simulated pressure is 46.8 MHz ). I have posted the code below:&#60;/p&#62;
&#60;p&#62;(`% define the grid parameters 3D&#60;br /&#62;
Nx = 150;   % [grid points]&#60;br /&#62;
Ny = 150;    % [grid points]&#60;br /&#62;
Nz = 92;&#60;br /&#62;
dx = 0.1e-3;               % [m]&#60;br /&#62;
dy = 0.1e-3;               % [m]&#60;br /&#62;
dz = 0.1e-3;               % [m]&#60;/p&#62;
&#60;p&#62;% create the computational grid&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dy, Nz, dz);&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium water&#60;/p&#62;
&#60;p&#62;medium.sound_speed = 1500;	% [m/s]&#60;br /&#62;
medium.density = 1000;       % [kg/m^3]&#60;br /&#62;
medium.alpha_coeff = 0.025;  % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_power = 1.5;&#60;/p&#62;
&#60;p&#62;% define parameters&#60;br /&#62;
grid_size = [150,150,92];&#60;br /&#62;
bowl_pos  = [Nx/2, Ny/2, 2];&#60;br /&#62;
diameter = 15e-3;           % [m]&#60;br /&#62;
radius   = 8.5e-3;           % [m]&#60;br /&#62;
focus_pos = [Nx/2, Ny/2, 87];&#60;br /&#62;
freq = 1.5e6;       % [Hz]&#60;br /&#62;
amp = 2.06e6;        % [Pa] &#60;/p&#62;
&#60;p&#62;% create bowl&#60;br /&#62;
source.p_mask = makeBowl(grid_size, bowl_pos, round(radius / dx), round(diameter / dx)+1, focus_pos, 'Plot', true);&#60;/p&#62;
&#60;p&#62;% calculate the time step using an integer number of points per period&#60;br /&#62;
ppw = max(medium.sound_speed(:)) / (freq * dx); % points per wavelength&#60;br /&#62;
cfl = 0.3;                              % cfl number&#60;br /&#62;
ppp = ceil(ppw / cfl);                  % points per period&#60;br /&#62;
T   = 1 / freq;                         % period [s]&#60;br /&#62;
dt  = T / ppp;                          % time step [s]&#60;/p&#62;
&#60;p&#62;% calculate the number of time steps to reach steady state&#60;br /&#62;
t_end = sqrt( kgrid.x_size.^2 + kgrid.y_size.^2 + kgrid.z_size.^2 ) / max(medium.sound_speed(:));&#60;br /&#62;
Nt = round(t_end / dt);&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
kgrid.setTime(Nt, dt);&#60;/p&#62;
&#60;p&#62;% define the input signal&#60;br /&#62;
source.p = createCWSignals(kgrid.t_array, freq, amp, 0);&#60;/p&#62;
&#60;p&#62;% set the sensor mask to cover the entire grid&#60;br /&#62;
sensor.mask = ones(Nx, Ny, Nz);&#60;br /&#62;
sensor.record = {'p','p_rms','u','u_rms', 'I','I_avg'};&#60;/p&#62;
&#60;p&#62;% record the last 3 cycles in steady state&#60;br /&#62;
num_periods = 3;&#60;br /&#62;
T_points = round(num_periods * T / kgrid.dt);&#60;br /&#62;
sensor.record_start_index = Nt - T_points + 1;&#60;/p&#62;
&#60;p&#62;% set the input arguements&#60;br /&#62;
input_args = {'PMLInside', false, 'PlotPML', false, 'DisplayMask', ...&#60;br /&#62;
    'off', 'PlotScale', [-1, 1] * amp};&#60;/p&#62;
&#60;p&#62;% run the acoustic simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;% convert the absorption coefficient to nepers/m&#60;br /&#62;
alpha_np = db2neper(medium.alpha_coeff, medium.alpha_power) * ...&#60;br /&#62;
    (2 * pi * freq).^medium.alpha_power;&#60;/p&#62;
&#60;p&#62;% extract the pressure amplitude at each position&#60;br /&#62;
p = extractAmpPhase(sensor_data.p, 1/kgrid.dt, freq);&#60;/p&#62;
&#60;p&#62;% reshape the data, and calculate the volume rate of heat deposition&#60;br /&#62;
p = reshape(p, Nx, Ny, Nz);
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Eric Miller on "Alpha version of kWaveArray (off-grid sources)"</title>
			<link>http://www.k-wave.org/forum/topic/alpha-version-of-kwavearray-off-grid-sources#post-8211</link>
			<pubDate>Fri, 11 Jun 2021 21:21:05 +0000</pubDate>
			<dc:creator>Eric Miller</dc:creator>
			<guid isPermaLink="false">8211@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad, &#60;/p&#62;
&#60;p&#62;Works like a charm!&#60;/p&#62;
&#60;p&#62;Another question: I have an annular array with a rectangular central aperture. Trying to work though the kWaveArray class to see what I'll need to tweak. I have my ring inner and outer diameters, I only need to remove the parts of the rings that overlap with the rectangular aperture. Any guidance on doing this such that the grid weights come out correct? &#60;/p&#62;
&#60;p&#62;-Eric
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
