<?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: Unexpected sound source when using kspaceFirstOrder1D</title>
		<link>http://www.k-wave.org/forum/topic/unexpected-sound-source-when-using-kspacefirstorder1d</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:34:30 +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/unexpected-sound-source-when-using-kspacefirstorder1d" rel="self" type="application/rss+xml" />

		<item>
			<title>bencox on "Unexpected sound source when using kspaceFirstOrder1D"</title>
			<link>http://www.k-wave.org/forum/topic/unexpected-sound-source-when-using-kspacefirstorder1d#post-8576</link>
			<pubDate>Wed, 13 Jul 2022 18:41:21 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">8576@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi PtL,&#60;/p&#62;
&#60;p&#62;There are two main problems. First you have placed your source in the absorbing PML. To avoid this use &#60;code&#62;source.p_mask(21,1)=1&#60;/code&#62; as the PML is 20 grid points wide, or use the optional input pair &#60;code&#62;&#38;#39;PMLInside&#38;#39;, false&#60;/code&#62;. &#60;/p&#62;
&#60;p&#62;Second, your time step is too long. Ideally the CFL number, the ratio of dt * sound speed / dx should be about 0.3. Setting the timesteps using &#60;code&#62;kgrid.makeTime(medium.sound_speed)&#60;/code&#62; will sort that out.&#60;/p&#62;
&#60;p&#62;Also, you don't need the &#60;code&#62;source.p0&#60;/code&#62; line.&#60;/p&#62;
&#60;p&#62;Best wishes&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>PtL on "Unexpected sound source when using kspaceFirstOrder1D"</title>
			<link>http://www.k-wave.org/forum/topic/unexpected-sound-source-when-using-kspacefirstorder1d#post-8559</link>
			<pubDate>Mon, 04 Jul 2022 13:39:47 +0000</pubDate>
			<dc:creator>PtL</dc:creator>
			<guid isPermaLink="false">8559@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;clear variables;&#60;br /&#62;
 Nt=10240;&#60;br /&#62;
 dt=1e-4;&#60;br /&#62;
 Nx = 2048;&#60;br /&#62;
 dx = 1e-1; %when I change dx from 1e-1 to 1e-2, an unexpected sound appears&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx);&#60;br /&#62;
medium.sound_speed =340; %[m/s]&#60;br /&#62;
medium.density = 1.29; % [kg/m^3]&#60;br /&#62;
source.p0=zeros(Nx,1);&#60;br /&#62;
source.p_mask=zeros(Nx,1);&#60;br /&#62;
source.p_mask(2,1)=1; % Define the real Sound Source's position&#60;br /&#62;
m=zeros(Nx,1);&#60;br /&#62;
m(100,1)=1;&#60;br /&#62;
sensor.mask=m;&#60;br /&#62;
kgrid.setTime(Nt, dt);&#60;br /&#62;
source.p=100 * sin(2 * pi * 150 * kgrid.t_array);&#60;br /&#62;
sensor_data = kspaceFirstOrder1D(kgrid, medium, source, sensor);&#60;/p&#62;
&#60;p&#62;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&#60;br /&#62;
My codes are above, when I change dx from 1e-1 to 1e-2, at the end of x-axis there will be an unexpected sound source which send a sound wave to the real sound source. Is this a bug or I have something wrong??
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
