<?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: Unwanted Edge Waves in 3D simulation</title>
		<link>http://www.k-wave.org/forum/topic/unwanted-edge-waves-in-3d-simulation</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Fri, 05 Jun 2026 12:41:07 +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/unwanted-edge-waves-in-3d-simulation" rel="self" type="application/rss+xml" />

		<item>
			<title>tripsi on "Unwanted Edge Waves in 3D simulation"</title>
			<link>http://www.k-wave.org/forum/topic/unwanted-edge-waves-in-3d-simulation#post-9250</link>
			<pubDate>Wed, 27 May 2026 12:16:07 +0000</pubDate>
			<dc:creator>tripsi</dc:creator>
			<guid isPermaLink="false">9250@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am trying to run simulations to model the ultrasound propagation of a focused transducer in 3D.&#60;br /&#62;
My issue is that my source creates non-physical edge waves at the edges of the source. (My source is modeled as a bowl.) The edge waves also appear in a linear simulation and in 2D simulations. However, in 2D simulations, the effect is much weaker. I don't believe that the problem is a discretization issue because I have not perceived any improvements when reducing the grid spacing.&#60;br /&#62;
Is there a solution to this?&#60;/p&#62;
&#60;p&#62;I have also attached the code for more detailed information.&#60;/p&#62;
&#60;p&#62;Thank you!&#60;/p&#62;
&#60;p&#62;clearvars;   % Clears all variables&#60;br /&#62;
D = 64e-3; % Aperture diameter [m]&#60;br /&#62;
C = 98e-3; % Radius of Curvature [m]&#60;br /&#62;
c = 1482; % Speed of Sound [m/s]&#60;br /&#62;
f = 1.1e6; % Frequency [Hz]&#60;br /&#62;
mag = 3e5; % Magnitude [Pa]&#60;br /&#62;
rho = 998.2; % Density [kg/m^3]&#60;br /&#62;
cfl = 0.3;&#60;/p&#62;
&#60;p&#62;% Domain&#60;br /&#62;
x_dim = 80e-3; % [m]&#60;br /&#62;
y_dim = 160e-3; % [m]&#60;br /&#62;
z_dim = 80e-3;&#60;/p&#62;
&#60;p&#62;% Size of the domain (grid points)&#60;br /&#62;
Nx = 864;&#60;br /&#62;
Ny = 2048;&#60;br /&#62;
Nz = 864;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% SIMULATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% create the computational grid&#60;br /&#62;
dx = x_dim/Nx;        % grid point spacing in the x direction [m]&#60;br /&#62;
dy = y_dim/Ny;        % grid point spacing in the y direction [m]&#60;br /&#62;
dz = z_dim/Nz;        % grid point spacing in the z direction [m]&#60;/p&#62;
&#60;p&#62;% Create the 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&#60;br /&#62;
medium.sound_speed = c ;    % [m/s]&#60;br /&#62;
medium.density = rho ;       % [kg/m^3]&#60;br /&#62;
medium.alpha_coeff =2.17e-3;  % [dB/(MHz^y cm)] for water&#60;br /&#62;
medium.alpha_power = 2; %water&#60;br /&#62;
medium.BonA = 5.0; % solve nonlinear equations&#60;/p&#62;
&#60;p&#62;distanceTraveledAtTEnd = 160e-3;&#60;br /&#62;
tEnd = distanceTraveledAtTEnd/ min(medium.sound_speed(:));&#60;br /&#62;
kgrid.makeTime(medium.sound_speed,cfl,tEnd);&#60;/p&#62;
&#60;p&#62;grid_size = [Nx,Ny,Nz];&#60;br /&#62;
bowl_pos = [Nx/2,50,Nz/2];  % position of the center of the bowl%50&#60;br /&#62;
radius = round(C/dx);       % in grid spaces&#60;br /&#62;
diameter = 2*floor(D/(2*dx))+1; % in grid spaces&#60;br /&#62;
focus_pos = [Nx/2,400,Nz/2]; % position of the focus&#60;br /&#62;
bowl_1 = makeBowl(grid_size, bowl_pos, radius, diameter, focus_pos, 'Plot', false);&#60;/p&#62;
&#60;p&#62;source.p_mask = bowl_1;&#60;/p&#62;
&#60;p&#62;% define a time varying sinusoidal pressure burst&#60;br /&#62;
source_freq = f;  % [Hz]&#60;br /&#62;
source_mag = mag;&#60;br /&#62;
number_cycles = 4;&#60;/p&#62;
&#60;p&#62;sinePressure = source_mag * sin(2 * pi * source_freq * kgrid.t_array);&#60;/p&#62;
&#60;p&#62;% ensure smooth transition from mag=0 to mag=source_mag and the reverse&#60;br /&#62;
% model one pressure burst via Tukey window&#60;br /&#62;
burst_duration = number_cycles/source_freq;&#60;br /&#62;
t_mask = kgrid.t_array(kgrid.t_array &#38;lt;= burst_duration);&#60;br /&#62;
num_samples_in_burst = length(t_mask);&#60;br /&#62;
window = [transpose(tukeywin(num_samples_in_burst, 0.5)), ...&#60;br /&#62;
          zeros(1, length(kgrid.t_array) - num_samples_in_burst)];&#60;/p&#62;
&#60;p&#62;source.p = sinePressure .* window;  % Apply the Tukey window to the pressure signal&#60;/p&#62;
&#60;p&#62;%filter the source to remove any high frequencies not supported by the grid&#60;br /&#62;
source.p = filterTimeSeries(kgrid, medium, source.p);&#60;/p&#62;
&#60;p&#62;% create sensor - line along transducer axis&#60;br /&#62;
% sensor.mask = [Nx/2, 70, Nz/2, Nx/2,1999,Nz/2].';&#60;br /&#62;
sensor.mask = zeros(Nx, Ny,Nz);&#60;br /&#62;
sensor.mask(1:2:Nx, 1:2:799,1:2:Nz) = 1;&#60;br /&#62;
sensor.record = {'p_final'};%, 'p_max', 'p_min'};&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
input_args = {'PMLSize', 30, 'PMLInside',true, 'SaveToDisk', 'input'};&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
