<?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: accuracy vs mesh density</title>
		<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:39:17 +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/accuracy-vs-mesh-density" rel="self" type="application/rss+xml" />

		<item>
			<title>Ernst Uzhansky on "accuracy vs mesh density"</title>
			<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density#post-8897</link>
			<pubDate>Fri, 18 Aug 2023 18:21:04 +0000</pubDate>
			<dc:creator>Ernst Uzhansky</dc:creator>
			<guid isPermaLink="false">8897@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Many thanks for your explanation.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qiangbo on "accuracy vs mesh density"</title>
			<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density#post-3828</link>
			<pubDate>Thu, 25 Jul 2013 20:25:09 +0000</pubDate>
			<dc:creator>qiangbo</dc:creator>
			<guid isPermaLink="false">3828@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "accuracy vs mesh density"</title>
			<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density#post-3824</link>
			<pubDate>Thu, 25 Jul 2013 18:44:19 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3824@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bo,&#60;/p&#62;
&#60;p&#62;The short answer is no. To use a linear model, you must leave &#60;code&#62;medium.BonA&#60;/code&#62; undefined rather than setting it to zero.&#60;/p&#62;
&#60;p&#62;To explain, there are two parts to the acoustic nonlinearity that is modelled in k-Wave. The first comes from the convection of mass, while the second comes from a nonlinear relationship between the acoustic pressure and acoustic density. The nonlinearity parameter  B/A only defines the contribution of the latter. (In some models, the two parts are described by a single coefficient of nonlinearity beta = 1 + B/2A.)&#60;/p&#62;
&#60;p&#62;If you define &#60;code&#62;medium.BonA&#60;/code&#62; (as anything), k-Wave will include both of these effects in the model. This means if you set &#60;code&#62;medium.BonA = 0&#60;/code&#62;, you will still be including convective nonlinear effects. If you leave &#60;code&#62;medium.BonA&#60;/code&#62; undefined, k-Wave instead solves linearised equations.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qiangbo on "accuracy vs mesh density"</title>
			<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density#post-3822</link>
			<pubDate>Thu, 25 Jul 2013 17:07:51 +0000</pubDate>
			<dc:creator>qiangbo</dc:creator>
			<guid isPermaLink="false">3822@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;One more question: if BonA = 0, is it a linear model?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qiangbo on "accuracy vs mesh density"</title>
			<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density#post-3821</link>
			<pubDate>Thu, 25 Jul 2013 16:11:38 +0000</pubDate>
			<dc:creator>qiangbo</dc:creator>
			<guid isPermaLink="false">3821@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "accuracy vs mesh density"</title>
			<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density#post-3815</link>
			<pubDate>Thu, 25 Jul 2013 10:29:26 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3815@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bo,&#60;/p&#62;
&#60;p&#62;In addition to Ben's comments, it's a very good idea to check the numerical accuracy of your simulations by decreasing the grid point spacing and the size of the time step, running a second simulation, and then checking that the results match. (This is true for both your FEM model and k-Wave.) Keep in mind, for FEM and finite-difference models, as you increase the domain size, you will also need to use more points per wavelength to avoid the accumulation of numerical dispersion. &#60;/p&#62;
&#60;p&#62;For nonlinear simulations, I would also suggest recording the time-varying pressure in the focus of the transducer, and then look at the frequency spectrum (for example using &#60;code&#62;spect&#60;/code&#62;). The amplitudes of the harmonics should decay smoothly. If there is a large peak in amplitude at the highest harmonic captured by the model, this generally means the grid size is not small enough. There is some more detailed discussion in the nonlinear paper mentioned above.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "accuracy vs mesh density"</title>
			<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density#post-3814</link>
			<pubDate>Thu, 25 Jul 2013 08:43:11 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">3814@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bo, &#60;/p&#62;
&#60;p&#62;One of the advantages of k-Wave is that it is a spectral method, so the spatial gradients are calculated by using FFTs rather than by using a finite difference stencil (k-Wave is not a finite difference method). This means that for linear simulations only 2 points per wavelength (ppw) are required (Nyquist) unlike the 16 or so that you mention for FEM or standard finite difference simulations. &#60;/p&#62;
&#60;p&#62;When there are heterogeneities in the medium properties then using a few more ppw will improve the accuracy of k-Wave. For nonlinear simulations, the number of points per wavelength at the fundamental frequency will depend on how many harmonics you expect to need to model. The spacing &#60;code&#62;dx&#60;/code&#62; needs to be small enough so that there are two ppw at the highest frequency of interest. If you are interested in large scale simulations of nonlinear propagation in a fluid-like medium then k-Wave is one of the better choices. &#60;/p&#62;
&#60;p&#62;For more details, have a look in the &#60;a href=&#34;http://www.k-wave.org/manual/k-wave_user_manual_1.0.1.pdf&#34;&#62;k-Wave manual&#60;/a&#62;, &#60;a href=&#34;http://www.k-wave.org/papers/2012-Treeby-JASA.pdf&#34;&#62;this paper on modelling nonlinear acoustics&#60;/a&#62; and the &#60;a href=&#34;http://www.k-wave.org/doxygen/index.html&#34;&#62;documentation for the C++ code&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qiangbo on "accuracy vs mesh density"</title>
			<link>http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density#post-3812</link>
			<pubDate>Wed, 24 Jul 2013 17:02:13 +0000</pubDate>
			<dc:creator>qiangbo</dc:creator>
			<guid isPermaLink="false">3812@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am doing FEM simulations for nonlinear acoustic effects and trying to compare with k-wave. So far it works fairly well. One of the drawbacks about FEM approach is that it generally needs very fine mesh to get the right result. The FEM program I use recommends at 16 points per ultrasound wavelength, which creates a huge model for 3D problems. Nonlinear simulations have to even go beyond.&#60;/p&#62;
&#60;p&#62;Does K-wave have this limitation? My (shallow) understanding is K-wave is based on finite difference method and finite difference method is affected by mesh density a lot. Is this true?&#60;/p&#62;
&#60;p&#62;Thanks a lot!&#60;/p&#62;
&#60;p&#62;Bo
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
