<?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: Artefacts when changing from initial pressure to varying stress source</title>
		<link>http://www.k-wave.org/forum/topic/artefacts-when-changing-from-initial-pressure-to-varying-stress-source</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 05:21:03 +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/artefacts-when-changing-from-initial-pressure-to-varying-stress-source" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Artefacts when changing from initial pressure to varying stress source"</title>
			<link>http://www.k-wave.org/forum/topic/artefacts-when-changing-from-initial-pressure-to-varying-stress-source#post-5932</link>
			<pubDate>Sun, 21 May 2017 15:37:55 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5932@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi g.schober,&#60;/p&#62;
&#60;p&#62;You should set &#60;code&#62;source.sxx = source.syy;&#60;/code&#62;, rather than &#60;code&#62;source.sxx = -source.syy;&#60;/code&#62;. As an aside, your source is also within the PML.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>g.schober@skz.de on "Artefacts when changing from initial pressure to varying stress source"</title>
			<link>http://www.k-wave.org/forum/topic/artefacts-when-changing-from-initial-pressure-to-varying-stress-source#post-5921</link>
			<pubDate>Wed, 10 May 2017 08:19:00 +0000</pubDate>
			<dc:creator>g.schober@skz.de</dc:creator>
			<guid isPermaLink="false">5921@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi @all,&#60;br /&#62;
I have a problem when changing the type of source in the Example Explosive Source In A Layered Medium, I get two 'sources' at the medium changes that are not disappearing.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;Nx = 256;           % number of grid points in the x (row) direction
Ny = 256;           % number of grid points in the y (column) direction
dx = 0.1e-3;        % grid point spacing in the x direction [m]
dy = 0.1e-3;        % grid point spacing in the y direction [m]
kgrid = makeGrid(Nx, dx, Ny, dy);

% define the properties of the upper layer of the propagation medium
medium.sound_speed_compression = 1500*ones(Nx, Ny); % [m/s]
medium.sound_speed_shear       = zeros(Nx, Ny);     % [m/s]
medium.density                 = 1000*ones(Nx, Ny); % [kg/m^3]

% define the properties of the lower layer of the propagation medium
medium.sound_speed_compression(Nx/2:end, :) = 2000; % [m/s]
medium.sound_speed_shear(Nx/2:end, :)       = 800;  % [m/s]
medium.density(Nx/2:end, :)                 = 1200; % [kg/m^3]

% define the absorption properties
medium.alpha_coeff_compression = 0.1; % [dB/(MHz^2 cm)]
medium.alpha_coeff_shear       = 0.5; % [dB/(MHz^2 cm)]

% create the time array
cfl   = 0.1;    % Courant-Friedrichs-Lewy number
t_end = 20e-6;   % [s]
kgrid.t_array = makeTime(kgrid, max(medium.sound_speed_compression(:)), cfl, t_end);

% create initial pressure distribution using makeDisc
disc_magnitude = 5; % [Pa]
disc_x_pos = 30*128/Nx;    % [grid points]
disc_y_pos = Ny/2;    % [grid points]
disc_radius = 5*128/Nx;    % [grid points]
source.s_mask = makeDisc(Nx, Ny, disc_x_pos, disc_y_pos, disc_radius);
source.syy=1e-3*filterTimeSeries(kgrid,medium,toneBurst(1/kgrid.dt,218e3,1));
source.syy=[source.syy,0 0 0 0 ];
source.sxx=-source.syy;
% source.s_mode=&#38;#39;dirichlet&#38;#39;;

% define a centered circular sensor
sensor.mask = makeCircle(Nx, Ny, Nx/2, Ny/2, 20);

% define a custom display mask showing the position of the interface from
% the fluid side
display_mask = false(Nx, Ny);
display_mask(Nx/2 - 1, :) = 1;

% define input arguments
input_args = {&#38;#39;PlotScale&#38;#39;, [-0.25, 0.25, -0.05, 0.05], &#38;#39;PlotPML&#38;#39;, false,...
    &#38;#39;DisplayMask&#38;#39;, display_mask,&#38;#39;DataCast&#38;#39;,&#38;#39;gpuArray-single&#38;#39;,&#38;#39;DataRecast&#38;#39;,true};

% run the simulation
sensor_data = pstdElastic2D(kgrid, medium, source, sensor, input_args{:});

%% reorder the simulation data
sensor_data_reordered = reorderSensorData(kgrid, sensor, gather(sensor_data));

% =========================================================================
% VISUALISATION
% =========================================================================

% plot source, sensor, and position of the interface
% figure;
% imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, double(source.p0 &#124; sensor.mask &#124; display_mask), [-1 1]);
% colormap(getColorMap);
% ylabel(&#38;#39;x-position [mm]&#38;#39;);
% xlabel(&#38;#39;y-position [mm]&#38;#39;);
% axis image;

%% plot the re-ordered sensor data
figure;
imagesc(sensor_data_reordered,[-1e-6 1e-6]);
colormap(getColorMap);
ylabel(&#38;#39;Sensor Position&#38;#39;);
xlabel(&#38;#39;Time Step&#38;#39;);
colorbar;&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
