<?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: How to choose reference sound speed</title>
		<link>http://www.k-wave.org/forum/topic/how-to-choose-reference-sound-speed</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:08:50 +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/how-to-choose-reference-sound-speed" rel="self" type="application/rss+xml" />

		<item>
			<title>bencox on "How to choose reference sound speed"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-choose-reference-sound-speed#post-1104</link>
			<pubDate>Fri, 07 Dec 2012 12:52:27 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">1104@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Zak,&#60;/p&#62;
&#60;p&#62;Thanks for this; it's raised an interesting point. If you replace &#60;code&#62;kgrid.k_max&#60;/code&#62; by &#60;code&#62;max(kgrid.k)&#60;/code&#62; it should work. &#60;/p&#62;
&#60;p&#62;The reason that these are not the same is because we have defined &#60;code&#62;kgrid.k_max&#60;/code&#62; as the maximum wavenumber supported by the grid in every direction, in other words it is defied as &#60;code&#62;kgrid.k_max = min([kgrid.kx_max, kgrid.ky_max])&#60;/code&#62;. However, there will be components whose wavenumbers in both directions are maximum, and so the absolute value &#60;code&#62;sqrt(kgrid.kx_max.^2 + kgrid.ky_max.^2)&#60;/code&#62; will be bigger than &#60;code&#62;kgrid.k_max&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zak on "How to choose reference sound speed"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-choose-reference-sound-speed#post-1099</link>
			<pubDate>Wed, 05 Dec 2012 21:23:56 +0000</pubDate>
			<dc:creator>zak</dc:creator>
			<guid isPermaLink="false">1099@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Dr. Cox,&#60;/p&#62;
&#60;p&#62;I tried your suggestion by setting c_ref = c_min and dt &#38;lt; (2/(c_ref * max(k))) * asin(c_ref/max(c)), but the code prompted a warning saying &#34;time step may be too large for a stable simulation&#34; and the simulated results blowed up.&#60;/p&#62;
&#60;p&#62;Here are my codes:&#60;/p&#62;
&#60;p&#62;Nx=512;&#60;br /&#62;
dx=0.5e-3;&#60;br /&#62;
kgrid=makeGrid(Nx,dx,Nx,dx);&#60;/p&#62;
&#60;p&#62;medium.sound_speed=1500*ones(Nx,Nx);&#60;br /&#62;
medium.sound_speed(:,200:300)=3000;&#60;br /&#62;
medium.density=1000*ones(Nx,Nx);&#60;br /&#62;
medium.density(:,200:300)=2000;&#60;br /&#62;
medium.sound_speed_ref=1500;&#60;/p&#62;
&#60;p&#62;(2/(medium.sound_speed_ref*kgrid.k_max))*asin(medium.sound_speed_ref/max(medium.sound_speed(:)))&#60;br /&#62;
ans =&#60;br /&#62;
     1.111111111111111e-07&#60;/p&#62;
&#60;p&#62;kgrid.t_array=(0:2000)*1e-7;&#60;/p&#62;
&#60;p&#62;source.p0=makeDisc(Nx,Ny,Nx/2,100,10);&#60;/p&#62;
&#60;p&#62;sensor.mask=zeros(Nx,Nx);&#60;br /&#62;
sensor.mask(Nx/2,400)=1;&#60;/p&#62;
&#60;p&#62;input_args = {'Smooth', true, 'PMLInside', true, 'PMLSize', 10, 'DataCast', 'gpuArray-single', 'DataRecast', true,'PlotPML', false, 'PlotSim', false};&#60;/p&#62;
&#60;p&#62;p=kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;However, if I used the default dt=5e-8 which is calculated by the criteria dt = CFL * dx_min / c_max, then there's no problem.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "How to choose reference sound speed"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-choose-reference-sound-speed#post-850</link>
			<pubDate>Tue, 23 Oct 2012 21:06:18 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">850@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Zak,&#60;/p&#62;
&#60;p&#62;You could neglect the k-space adjustment, but there would be no advantage to doing so (other than no having to make a decision about c_ref!) There would be disadvantages though: there would be no phase error correction at all, and you would have to satisfy a stability requirement which is always going to be more stringent:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;dt &#38;lt; 2/(k_max * c_max)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zak on "How to choose reference sound speed"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-choose-reference-sound-speed#post-848</link>
			<pubDate>Tue, 23 Oct 2012 14:45:47 +0000</pubDate>
			<dc:creator>zak</dc:creator>
			<guid isPermaLink="false">848@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Dr. Cox&#60;/p&#62;
&#60;p&#62;Thanks for your help.&#60;/p&#62;
&#60;p&#62;From your suggestion, I can set c_ref = c_min, then estimate the upper bound of the time step. As such, the phase errors is not worse than the k-space adjustment being left out. But I wonder if we can just neglect the k-space adjustment when doing simulations in heterogeneous media so there is no c_ref to be determined in the first place.&#60;/p&#62;
&#60;p&#62;Zak
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "How to choose reference sound speed"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-choose-reference-sound-speed#post-843</link>
			<pubDate>Tue, 23 Oct 2012 10:34:08 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">843@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Zak,&#60;/p&#62;
&#60;p&#62;Good question. The k-space model is certainly unconditionally stable if you choose c_ref &#38;gt; max(c), in other words the solution won't 'blow up'. Unfortunately the phase errors can become very large, so while the solution will be stable it might also be completely wrong.&#60;/p&#62;
&#60;p&#62;The alternative is to choose c_ref&#38;lt;min(c) in which case the phase errors are bounded (they will never be worse than if the k-space correction term sinc(ckdt/2) were just left out) but now the model could become unstable and it is necessary for the timesteps to satisfy the stability criterion:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;dt &#38;lt; (2/(c_ref * max(k))) * asin(c_ref/max(c))&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Hope that helps you choose,&#60;/p&#62;
&#60;p&#62;Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>zak on "How to choose reference sound speed"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-choose-reference-sound-speed#post-838</link>
			<pubDate>Tue, 23 Oct 2012 04:11:22 +0000</pubDate>
			<dc:creator>zak</dc:creator>
			<guid isPermaLink="false">838@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi, Dr. Cox and Dr. Treeby,&#60;/p&#62;
&#60;p&#62;I am trying to model the photoacoustic wave propagation in heterogeneous media, where the heterogeneity is only a small part but very strong (in terms of both sound speed and mass density) compared to rest of the media, e.g. bone or skull in soft tissue.&#60;/p&#62;
&#60;p&#62;In heterogeneous media, &#60;a href=&#34;http://link.aip.org/link/jasman/v111/i1/p53/s1/html&#34;&#62;this paper&#60;/a&#62; says that the k-space method is expected to be unconditionally stable if the reference sound speed c_ref in the k-space operator is chosen to be the maximum sound speed in the media (c_max), and this is also the default choice of the k-Wave.&#60;/p&#62;
&#60;p&#62;However, in your recent paper of nonlinear wave propagation, it says the phase errors will be introduced in the simulation if the c_ref doesn't match the local sound speed. The k-space operator will over compensate for the actual phase error introduced by the ﬁnite difference time step if c_ref is much larger than the local sound speed.&#60;/p&#62;
&#60;p&#62;So I am not sure how to choose the proper c_ref in my case. On one hand, it seems I should choose c_max as c_ref given what the first paper says; on the other hand, this choice is problematic according to your paper since the sound speed in most part of the media (c_0) is much smaller than c_max; it indicates that I should set c_ref = c_0.&#60;/p&#62;
&#60;p&#62;Should I choose c_ref be to c_max or c_0? Or is there any other choice?&#60;/p&#62;
&#60;p&#62;Thank you very much!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
