<?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: Embeddings with larger sound speed and density</title>
		<link>http://www.k-wave.org/forum/topic/embeddings-with-larger-sound-speed-and-density</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Thu, 14 May 2026 00:41:48 +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/embeddings-with-larger-sound-speed-and-density" rel="self" type="application/rss+xml" />

		<item>
			<title>healsea on "Embeddings with larger sound speed and density"</title>
			<link>http://www.k-wave.org/forum/topic/embeddings-with-larger-sound-speed-and-density#post-9121</link>
			<pubDate>Thu, 01 Aug 2024 01:27:27 +0000</pubDate>
			<dc:creator>healsea</dc:creator>
			<guid isPermaLink="false">9121@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am using k-Wave to simulate some embeddings within tissue and have been referencing your example, example_us_bmode_phased_array.m. I encountered an issue when adjusting the wave speed and density of the embedding.&#60;/p&#62;
&#60;p&#62;When the embedding's wave speed and density are half that of the tissue, the simulation works perfectly. However, when I set the wave speed and density to twice that of the tissue, the sensor data becomes unstable, increasing exponentially and eventually resulting in NaN values. Consequently, the B-mode image is not visible.&#60;/p&#62;
&#60;p&#62;I have attached my code defining the properties for your reference. Thank you very much for your software and assistance!&#60;/p&#62;
&#60;p&#62;Best wishes&#60;br /&#62;
Haohui Zhang&#60;/p&#62;
&#60;p&#62;'% define properties&#60;br /&#62;
sound_speed_map = c0 * ones(Nx, Ny, Nz) ;&#60;br /&#62;
density_map = rho0 * ones(Nx, Ny, Nz) ;&#60;br /&#62;
sound_speed_iron = c0*2;&#60;br /&#62;
density_iron = rho0*2;&#60;/p&#62;
&#60;p&#62;% define a cylinder for Iron oxide&#60;br /&#62;
radius = 4e-3;&#60;br /&#62;
x_pos = 28e-3;&#60;br /&#62;
y_pos = dy * Ny/2;&#60;br /&#62;
x_loc = round(x_pos / dx);&#60;br /&#62;
height = 4e-3;&#60;br /&#62;
x_height = round(height / dx);&#60;br /&#62;
neighbor = 12e-3;&#60;/p&#62;
&#60;p&#62;scattering_plane1 = makeDisc(Ny, Nz, round(y_pos / dx), Nz/2, round(radius / dx)); % Center array&#60;br /&#62;
scattering_plane2 = makeDisc(Ny, Nz, round((y_pos-neighbor)/ dx), Nz/2, round(radius / dx)); % Left array&#60;br /&#62;
scattering_plane3 = makeDisc(Ny, Nz, round((y_pos+neighbor)/ dx), Nz/2, round(radius / dx)); % Right array&#60;br /&#62;
scattering_plane = scattering_plane1 + scattering_plane2 + scattering_plane3;&#60;/p&#62;
&#60;p&#62;scattering_region = repmat(scattering_plane,[1,1,Nx]);&#60;br /&#62;
scattering_region = permute(scattering_region,[3,1,2]);&#60;br /&#62;
tmp = scattering_region;&#60;br /&#62;
tmp([1:x_loc,x_loc+x_height:end],:,:) = 0;&#60;br /&#62;
% assign region&#60;br /&#62;
sound_speed_map(tmp == 1) = sound_speed_iron;&#60;br /&#62;
density_map(tmp == 1) = density_iron;&#60;/p&#62;
&#60;p&#62;% assign to the medium inputs&#60;br /&#62;
medium.sound_speed = sound_speed_map;&#60;br /&#62;
medium.density = density_map;'
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
