<?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: jullambert</title>
		<link><a href='http://www.k-wave.org/forum/profile/jullambert'>jullambert</a></link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:32:45 +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>Bradley Treeby on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-5232</link>
			<pubDate>Fri, 04 Sep 2015 17:10:50 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5232@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Ju,&#60;/p&#62;
&#60;p&#62;You can replace your pressure (mass) source with a velocity (force) source. This will act as a dipole rather than a monopole, and thus be more directional. You can do this by replacing &#60;code&#62;source.p_mask&#60;/code&#62; with &#60;code&#62;source.u_mask&#60;/code&#62;, and &#60;code&#62;source.p&#60;/code&#62; with &#60;code&#62;source.uy&#60;/code&#62;. Note, you will need to scale your input to be in units of velocity rather than pressure (divide by the impedance), and I'm not sure if the &#60;code&#62;&#38;#39;PlotLayout&#38;#39;&#60;/code&#62; option works with a velocity source.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jullambert on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-5226</link>
			<pubDate>Tue, 01 Sep 2015 10:46:01 +0000</pubDate>
			<dc:creator>jullambert</dc:creator>
			<guid isPermaLink="false">5226@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello everybody,&#60;/p&#62;
&#60;p&#62;I am a beginner in the ultrasound field and I just started to use k-wave to modelize my experimental setup. I have some difficulties to modelize a focused single element transducer. &#60;/p&#62;
&#60;p&#62;I created a line of source and defined a pression source (so to modelize the transducer as a piston). In front of the line I defined an acoustical lens ( so I define two different media on the grid) to create the focus of the transducer (as the hardware is).&#60;br /&#62;
It is working but for me it doens't reproduce the behaviour of the transducer because every point of the line generate a pressure wave in every direction and not only along one axis.&#60;/p&#62;
&#60;p&#62;Is there a way to define the source.p as a directional source ? Is there another way to modelize it ?&#60;/p&#62;
&#60;p&#62;Thank you in advance,&#60;/p&#62;
&#60;p&#62;Ju&#60;/p&#62;
&#60;p&#62;Here is my code :&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;%% create the computational grid
Nx = 216;           % number of grid points in the x (row) direction
Ny = 216;           % number of grid points in the y (column) direction
dx = 50e-3/Nx;    	% grid point spacing in the x direction [m]
dy = dx;            % grid point spacing in the y direction [m]
kgrid = makeGrid(Nx, dx, Ny, dy);

%% define the properties of the propagation medium

% medium 1 : water
medium.sound_speed = 1500*ones(Nx, Ny);         % [m/s]
medium.density = 1000*ones(Nx, Ny);             % [kg/m^3]

% medium 2 : lens ( create = put 1 for the lens limit + depth)
lens_y_offset = 10;       %[grid points]
lens_radius = 100;        %[grid points]
lens_center_x = Nx/2;     %[grid points]
lens_center_y = lens_radius+lens_y_offset;      %[grid points]
lens_radians = pi/6;
Z = makeCircle(Nx, Ny, lens_center_x, lens_center_y, lens_radius, lens_radians);

% Find the limit of the half lens
[Wu_x,Wu_y] = find(Z==1);
Wu_x_sorted = sort(Wu_x);
Wu_y_sorted = sort(Wu_y,&#38;#39;descend&#38;#39;);

%Loop to fill with one the half lens depth + set the density and the sound
%speed within the lens
for i = 1: length(Wu_x_sorted)
    Z(Wu_x_sorted(i),min(Wu_y_sorted):Wu_y_sorted(i))=1;
    medium.sound_speed(Wu_x_sorted(i),min(Wu_y_sorted):Wu_y_sorted(i)) = 1700;    % [m/s]
    medium.density(Wu_x_sorted(i),min(Wu_y_sorted):Wu_y_sorted(i)) = 1200;       % [kg/m^3]
end

%Loop to create the symmetrical of the half lens
for i = 1:round(lens_radius*sin(lens_radians))
    Z(lens_center_x+i,:) = Z(lens_center_x-i,:);
    medium.sound_speed(lens_center_x+i,:) = medium.sound_speed(lens_center_x-i,:);    % [m/s]
    medium.density(lens_center_x+i,:) = medium.density(lens_center_x-i,:);       % [kg/m^3]
end

% create the time array
[kgrid.t_array, dt] = makeTime(kgrid, medium.sound_speed);

%% define a line along X axis transducer element
transducer_line_length = lens_radius ; % [grid points]
transducer_center_x = Nx/2;     %[grid points]
transducer_center_y = lens_y_offset;     %[grid points]

source.p_mask = zeros(Nx,Ny);
source.p_mask(transducer_center_x-(transducer_line_length/2):transducer_center_x+(transducer_line_length/2)-1,transducer_center_y) = 1;

% define a time varying sinusoidal source
source_freq = 0.25e6;       % [Hz]
source_mag = 0.5;           % [Pa]
source.p = source_mag*sin(2*pi*source_freq*kgrid.t_array);

% filter the source to remove high frequencies not supported by the grid
source.p = filterTimeSeries(kgrid, medium, source.p);

% create a display mask to display the transducer
display_mask = source.p_mask;

%% create a sensor mask covering the entire computational domain using the
% opposing corners of a rectangle
sensor.mask = [1, 1, Nx, Ny].&#38;#39;;

%% set the record mode capture the final wave-field and the statistics at
% each sensor point
sensor.record = {&#38;#39;p_final&#38;#39;, &#38;#39;p_max&#38;#39;, &#38;#39;p_rms&#38;#39;};

%% assign the input options
input_args = {&#38;#39;DisplayMask&#38;#39;, display_mask, &#38;#39;PMLInside&#38;#39;, false,&#38;#39;PlotLayout&#38;#39;, true, &#38;#39;PlotPML&#38;#39;, false};

% run the simulation
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-5118</link>
			<pubDate>Wed, 08 Jul 2015 08:59:36 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5118@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi ericott25,&#60;/p&#62;
&#60;p&#62;I agree this function isn't the easiest to use. We have been writing some better ones for the next release. In the meantime, you could query the size of the matrix returned by this function, and then place it at the desired position within the grid.&#60;/p&#62;
&#60;p&#62;For example:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;% create spherical section
ss = makeSphericalSection(10, 5);

% create mask
Nx = 64;
Ny = 64;
Nz = 64;
mask = zeros(Nx, Ny, Nz);

% place section within the mask
x_pos = 10;
y_pos = 20;
z_pos = 30;
mask(x_pos:x_pos + size(ss, 1) - 1, ...
     y_pos:y_pos + size(ss, 2) - 1, ...
     z_pos:z_pos + size(ss, 3) - 1) = ss;

% plot
voxelPlot(mask);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ericott25 on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-5093</link>
			<pubDate>Tue, 02 Jun 2015 16:44:24 +0000</pubDate>
			<dc:creator>ericott25</dc:creator>
			<guid isPermaLink="false">5093@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I was browsing the forum looking for help with a similar focused ultrasound application and figured this was the most relevant place to ask for it. I am having difficulty using makeSphericalSection to create a spherical probe. This function doesn't provide the option to specify the size of the grid in which the spherical section is created (in contrast to makeSphere, for example), and I am having trouble figuring out how to position the spherical section inside source.p_mask, which has to be the same size as the simulation space. I've considered changing the elements of the binary source.p_mask matrix from 0 to 1 by hand in the appropriate positions, but I feel there must be a better way. I'm very new to k-Wave so any help would be appreciated!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qiangbo on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-3809</link>
			<pubDate>Wed, 24 Jul 2013 04:49:42 +0000</pubDate>
			<dc:creator>qiangbo</dc:creator>
			<guid isPermaLink="false">3809@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;I got the model working and the results roughly match with FEM results. K-wave works great.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-3801</link>
			<pubDate>Tue, 23 Jul 2013 08:19:30 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3801@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bo,&#60;/p&#62;
&#60;p&#62;You could start with the &#60;a href=&#34;http://www.k-wave.org/documentation/example_tvsp_3D_simulation.php&#34;&#62;3D Time Varying Source&#60;/a&#62; example. You will need to change the source from a square aperture to a spherical probe (you could use &#60;a href=&#34;http://www.k-wave.org/documentation/makeSphericalSection.php&#34;&#62;makeSphericalSection&#60;/a&#62; for this purpose), add the required absorption and nonlinearity properties by setting &#60;code&#62;medium.alpha_coeff&#60;/code&#62;, &#60;code&#62;medium.alpha_power&#60;/code&#62;, and &#60;code&#62;medium.BonA&#60;/code&#62;, and then change the sensor mask to the desired region. Keep in mind when running nonlinear simulations that your grid spacing must be defined to have at least two points per wavelength at the highest frequency harmonic. &#60;/p&#62;
&#60;p&#62;There is a lot more information about how to use the toolbox in the &#60;a href=&#34;http://www.k-wave.org/documentation.php&#34;&#62;k-Wave Manual&#60;/a&#62;. We will endeavour to include some specific focused ultrasound examples with the next release.&#60;/p&#62;
&#60;p&#62;Good luck with your simulations! &#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qiangbo on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-3795</link>
			<pubDate>Thu, 18 Jul 2013 19:36:35 +0000</pubDate>
			<dc:creator>qiangbo</dc:creator>
			<guid isPermaLink="false">3795@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;I am trying to validate a FEM program for nonlinear acoustics. For some reason, I couldn't get an agreement from KZK solutions so current look for an alternative.&#60;/p&#62;
&#60;p&#62;The geometry would be really simple: a spherical probe with a single focus. Material has power-law attenuation and a B/A ratio. Excitation is CW.&#60;/p&#62;
&#60;p&#62;Is there an example I can start with for this purpose? Thanks.&#60;/p&#62;
&#60;p&#62;Bo
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-3794</link>
			<pubDate>Thu, 18 Jul 2013 09:36:06 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3794@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bo,&#60;/p&#62;
&#60;p&#62;There are no specific examples in the current release of the toolbox (V1.0), but it is fairly straightforward to create one. For example, you could create a bowl-shaped transducer using &#60;code&#62;makeSphericalSection&#60;/code&#62; and then drive this with a CW source at the desired frequency. Are then any particular aspects you need some help with?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qiangbo on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-3786</link>
			<pubDate>Wed, 17 Jul 2013 19:57:02 +0000</pubDate>
			<dc:creator>qiangbo</dc:creator>
			<guid isPermaLink="false">3786@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Sorry for stealing this thread but it seems like the topic is related. &#60;/p&#62;
&#60;p&#62;Is there an example available for simulating a focused ultrasound transducer? &#60;/p&#62;
&#60;p&#62;Thanks.&#60;/p&#62;
&#60;p&#62;Bo
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-3750</link>
			<pubDate>Mon, 24 Jun 2013 21:04:13 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">3750@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi John,&#60;/p&#62;
&#60;p&#62;A typical single element piezo transducer works like a piston, so if you know the velocity at each point on the face of the transducer you could enter those values as your source term. However, you probably won't go too far wrong if you define the acoustic pressure over the transducer surface, if you are interested in the field in front of the transducer.&#60;/p&#62;
&#60;p&#62;It is not always easy to measure the velocity of the face, and much easier to measure the acoustic pressure in a plane close to the face. &#60;a href=&#34;http://www.k-wave.org/papers/2012-Wang-IEEEIUS.pdf&#34;&#62;This paper&#60;/a&#62; used measurements of the pressure close to the transducer surface which were then used as the input in 'Dirichlet' mode.&#60;/p&#62;
&#60;p&#62;In answer to your second point, you are right about pressure sources, but you can specify the source directionality if you use velocity sources, as the velocity is a vector.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>haeseonii on "Focused single element simulation"</title>
			<link>http://www.k-wave.org/forum/topic/focused-single-element-simulation#post-3715</link>
			<pubDate>Sat, 15 Jun 2013 18:53:09 +0000</pubDate>
			<dc:creator>haeseonii</dc:creator>
			<guid isPermaLink="false">3715@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;First of all, I am quite new to k-wave but thanks for such a great tool.&#60;/p&#62;
&#60;p&#62;I am trying to simulate (in 2D) ultrasound wave pattern of a focused single element transducer. I have set up the source by using modified makeCircle function.&#60;/p&#62;
&#60;p&#62;First question is when to use pressure source or particle velocity distribution. If I want to accurately model pulsed imaging using a single element transducer, which one should be used? In real testing setup (hardware), I am giving a negative square wave voltage pulse to the transducer.&#60;/p&#62;
&#60;p&#62;Second question is regarding emulating backing layer. I read an old post asking a similar question. I understand that the source is just a point on the grid generating a pressure wave, so there is no directionality. Should I just make medium of all grids &#34;behind&#34; the source high speed of sound and high density? I did try this, but the simulation seems to blow up when I do this.&#60;/p&#62;
&#60;p&#62;Thanks!&#60;br /&#62;
John
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
