<?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: heterogeneous medium with nonlinear and linear materials</title>
		<link>http://www.k-wave.org/forum/topic/heterogeneous-medium-with-nonlinear-and-linear-materials</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 00:14: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/heterogeneous-medium-with-nonlinear-and-linear-materials" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "heterogeneous medium with nonlinear and linear materials"</title>
			<link>http://www.k-wave.org/forum/topic/heterogeneous-medium-with-nonlinear-and-linear-materials#post-3862</link>
			<pubDate>Mon, 19 Aug 2013 14:57:49 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">3862@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bo,&#60;/p&#62;
&#60;p&#62;If you define &#60;code&#62;medium.BonA&#60;/code&#62;, the nonlinear equations will be used (as Anthony mentions above). However, even if you set medium.BonA to zero in some regions of the domain, the model will still include convective nonlinearity as explained &#60;a href=&#34;http://www.k-wave.org/forum/topic/accuracy-vs-mesh-density&#34;&#62;here&#60;/a&#62;. It's implemented this way as this makes the most sense physically.&#60;/p&#62;
&#60;p&#62;Having said that, if you are using the MATLAB code and want to switch off the nonlinearity in regions where BonA is 0, open up the simulation functions and find where rhox, rhoy and rhoz are calculated at the next time step (around line 900 for kspaceFirstOrder3D in V1.0). Then for each line in the nonlinear case, replace&#60;/p&#62;
&#60;p&#62;&#60;code&#62;rhox = bsxfun(@times, pml_x, ( bsxfun(@times, pml_x, rhox) - dt.*rho0 .* duxdx ) ./ (1 + 2*dt.*duxdx));&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;with something like&#60;/p&#62;
&#60;p&#62;&#60;code&#62;rhox = bsxfun(@times, pml_x, ( bsxfun(@times, pml_x, rhox) - dt.*rho0 .* duxdx ) ./ (1 + (medium.BonA ~= 0) .* 2*dt.*duxdx));&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;This will force the convective term to be zero whenever BonA is zero.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anthony on "heterogeneous medium with nonlinear and linear materials"</title>
			<link>http://www.k-wave.org/forum/topic/heterogeneous-medium-with-nonlinear-and-linear-materials#post-3860</link>
			<pubDate>Mon, 19 Aug 2013 08:24:53 +0000</pubDate>
			<dc:creator>Anthony</dc:creator>
			<guid isPermaLink="false">3860@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am only a k-wave user (it is therefore not an &#34;official response&#34;) but I would say that it is possible by using an heterogeneous &#34;medium.BonA&#34; parameter with 0 in the linear material. However, the calculation will probably be done by k-wave with the nonlinear set of equations, even in the linear part of the phantom, what should slow down the calculation compared to a linear simulation.&#60;/p&#62;
&#60;p&#62;Once again, my answer is only based on my personal experience of k-wave, the development team will probably give you a more precise answer :-)&#60;/p&#62;
&#60;p&#62;Anthony
&#60;/p&#62;</description>
		</item>
		<item>
			<title>qiangbo on "heterogeneous medium with nonlinear and linear materials"</title>
			<link>http://www.k-wave.org/forum/topic/heterogeneous-medium-with-nonlinear-and-linear-materials#post-3856</link>
			<pubDate>Wed, 14 Aug 2013 20:54:37 +0000</pubDate>
			<dc:creator>qiangbo</dc:creator>
			<guid isPermaLink="false">3856@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Is it possible to mix nonlinear and linear materials in the same phantom? Thanks.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
