<?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: Issue with a source in elastic medium</title>
		<link>http://www.k-wave.org/forum/topic/issue-with-a-source-in-elastic-medium</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 14:16:14 +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/issue-with-a-source-in-elastic-medium" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Issue with a source in elastic medium"</title>
			<link>http://www.k-wave.org/forum/topic/issue-with-a-source-in-elastic-medium#post-6838</link>
			<pubDate>Wed, 10 Apr 2019 13:32:20 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6838@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Antoine,&#60;/p&#62;
&#60;p&#62;If you have a point source, it will propagate in all directions. If you imagine a line source as a row of point sources, some of the wave front will cancel out, but you are still left with the end points. These generate so-called edge waves, which propagate in the y-direction.&#60;/p&#62;
&#60;p&#62;You could increase the directionality of the source by using a velocity source. However, you cannot create a completely collimated source in one direction unless it's a plane wave.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Antoine Malrin on "Issue with a source in elastic medium"</title>
			<link>http://www.k-wave.org/forum/topic/issue-with-a-source-in-elastic-medium#post-6805</link>
			<pubDate>Thu, 28 Mar 2019 12:07:55 +0000</pubDate>
			<dc:creator>Antoine Malrin</dc:creator>
			<guid isPermaLink="false">6805@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am new in k-wave and i tried to create a linear source with a time varying signal in an homogenous elastic medium. I want to simulate a compressional wave only (x direction). During the simulation, we can see appear à wave (in the y direction) in the source that i've not created and i can't explain where this wave comes from. Do you have an explanation please ?&#60;/p&#62;
&#60;p&#62;%% %% Test de  sensor.record_start_index et verif des vitesses et temps de vol&#60;/p&#62;
&#60;p&#62;clear all&#60;br /&#62;
close all&#60;/p&#62;
&#60;p&#62;%% On définit le maillage&#60;/p&#62;
&#60;p&#62;Nx = 600;           % number of grid points in the x (row) direction&#60;br /&#62;
Ny = 600;           % number of grid points in the y (column) direction&#60;br /&#62;
dx = 0.1e-3;        % grid point spacing in the x direction [m]&#60;br /&#62;
dy = 0.1e-3;        % grid point spacing in the y direction [m]&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dy);&#60;/p&#62;
&#60;p&#62;%% Medium properties&#60;/p&#62;
&#60;p&#62;medium.sound_speed_compression = 1000*ones(Nx,Ny);  % [m/s]&#60;br /&#62;
medium.sound_speed_shear = 0*ones(Nx,Ny);    % [m/s]&#60;br /&#62;
medium.density = 1000*ones(Nx,Ny);  % [kg/m^3]&#60;br /&#62;
medium.alpha_coeff_compression = 0.1*ones(Nx,Ny);     % [dB/(MHz^2 cm)]&#60;br /&#62;
medium.alpha_coeff_shear       = 0.00001;     % [dB/(MHz^2 cm)]&#60;/p&#62;
&#60;p&#62;Nb_pt_par_lambda = 30;&#60;/p&#62;
&#60;p&#62;%% Vecteur temps&#60;/p&#62;
&#60;p&#62;cfl   = 0.1;    % Courant-Friedrichs-Lewy number&#60;br /&#62;
t_end = 35e-6;   % [s]&#60;br /&#62;
kgrid.makeTime(max(medium.sound_speed_compression(:)), cfl, t_end);&#60;/p&#62;
&#60;p&#62;% Signal d'émission&#60;/p&#62;
&#60;p&#62;source_freq = 1e6;       % [Hz]&#60;br /&#62;
Nb_periode = 1.5;&#60;br /&#62;
t = (0:kgrid.dt:Nb_periode/source_freq);&#60;br /&#62;
magnitude = 400; % [Pa]           % [Pa]&#60;br /&#62;
w = zeros(1,size(kgrid.t_array,2));&#60;br /&#62;
w(1,1:size(t,2)) = hann(size(t,2));&#60;br /&#62;
source.sxx = magnitude * sin(2 * pi * source_freq * kgrid.t_array).*w;&#60;br /&#62;
source.syy = 0;&#60;br /&#62;
source.sxy = 0;&#60;/p&#62;
&#60;p&#62;%% Position emetteur&#60;/p&#62;
&#60;p&#62;x_pos = Nx/4;    % [grid points]&#60;br /&#62;
y_pos = Ny/2;    % [grid points]&#60;/p&#62;
&#60;p&#62;source.s_mask = zeros(Nx,Ny);&#60;br /&#62;
source.s_mask(x_pos,270:330) =1;&#60;/p&#62;
&#60;p&#62;%% Position recepteur&#60;/p&#62;
&#60;p&#62;D_E_R1 = round(0.02/dx); % distance emetteur/recepteur1 en terme d'échantillon&#60;br /&#62;
D_R1_R2 = round(0.01/dx);&#60;/p&#62;
&#60;p&#62;Recep1_x = Nx/4 + D_E_R1;&#60;br /&#62;
Recep1_y = y_pos ;&#60;/p&#62;
&#60;p&#62;Recep2_x = Recep1_x + D_R1_R2;&#60;br /&#62;
Recep2_y = y_pos ;&#60;/p&#62;
&#60;p&#62;Recep_start1 = [Recep1_x Recep1_y];&#60;br /&#62;
Recep_start2 = [Recep2_x Recep2_y];&#60;/p&#62;
&#60;p&#62;Recep_angle = 0;&#60;br /&#62;
length = 10;&#60;/p&#62;
&#60;p&#62;SM1 = makeLine(Nx, Ny, Recep_start1, Recep_angle, length); % Le Premier point est le point le plus bas à gauche&#60;br /&#62;
SM2 = makeLine(Nx, Ny, Recep_start2, Recep_angle, length);&#60;br /&#62;
sensor_mask = SM1+SM2;&#60;/p&#62;
&#60;p&#62;% Map with E and R1-R2&#60;/p&#62;
&#60;p&#62;figure&#60;br /&#62;
imagesc(source.s_mask + sensor_mask)&#60;br /&#62;
axis equal&#60;br /&#62;
title('carte emetteur/recepteur')&#60;/p&#62;
&#60;p&#62;cartesian_pos_center = [Nx/2*dx, Ny/2*dy];&#60;/p&#62;
&#60;p&#62;[x_SM1, y_SM1] = find(SM1&#38;gt;0);&#60;br /&#62;
x_SM1 = x_SM1';&#60;br /&#62;
y_SM1 = y_SM1';&#60;/p&#62;
&#60;p&#62;for i = 1:size(x_SM1,2)&#60;br /&#62;
    x_SM1(i) = x_SM1(i)*dx - cartesian_pos_center(1);&#60;br /&#62;
    y_SM1(i) = y_SM1(i)*dy - cartesian_pos_center(2);&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;[x_SM2, y_SM2] = find(SM2&#38;gt;0);&#60;br /&#62;
x_SM2 = x_SM2';&#60;br /&#62;
y_SM2 = y_SM2';&#60;/p&#62;
&#60;p&#62;for i = 1:size(x_SM2,2)&#60;br /&#62;
    x_SM2(i) = x_SM2(i)*dx - cartesian_pos_center(1);&#60;br /&#62;
    y_SM2(i) = y_SM2(i)*dy - cartesian_pos_center(2);&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;x_SM = [x_SM1, x_SM2];&#60;br /&#62;
y_SM = [y_SM1, y_SM2];&#60;/p&#62;
&#60;p&#62;sensor.mask = [x_SM&#60;br /&#62;
y_SM];&#60;/p&#62;
&#60;p&#62;sensor.record = {'p', 'u','p_final'};&#60;br /&#62;
sensor.record_start_index = 1;&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
 sensor_data = pstdElastic2D(kgrid, medium, source, sensor );&#60;/p&#62;
&#60;p&#62;for i=1:size(sensor_data.p,2)&#60;br /&#62;
    p_somme_R1(i) = mean(sensor_data.p(1:size(sensor_data.p,1)/2,i));&#60;br /&#62;
    p_somme_R2(i) = mean(sensor_data.p(size(sensor_data.p,1)/2+1:end,i));&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;figure&#60;br /&#62;
plot(kgrid.t_array,p_somme_R1)&#60;br /&#62;
hold on&#60;br /&#62;
plot(kgrid.t_array,p_somme_R2,'r')&#60;br /&#62;
hold off&#60;br /&#62;
hhh = legend('R1','R2','R3');&#60;br /&#62;
xlabel('temps (s)')&#60;br /&#62;
ylabel('Amplitude')&#60;br /&#62;
title('signaux recus par chaque recepteur')&#60;/p&#62;
&#60;p&#62;sensor_data.p_final = sensor_data.p_final/max(max(sensor_data.p_final));&#60;/p&#62;
&#60;p&#62;Thank you by advance for your answer.&#60;br /&#62;
Antoine Malrin
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
