<?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; User Favorites: Crusher</title>
		<link><a href='http://www.k-wave.org/forum/profile/crusher'>crusher</a></link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:08:55 +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/profile/" rel="self" type="application/rss+xml" />

		<item>
			<title>frezaei on "I want to do a 2D elastic wave simulation on step geometry"</title>
			<link>http://www.k-wave.org/forum/topic/i-want-to-do-a-2d-elastic-wave-simulation-on-step-geometry#post-9225</link>
			<pubDate>Tue, 29 Jul 2025 02:59:04 +0000</pubDate>
			<dc:creator>frezaei</dc:creator>
			<guid isPermaLink="false">9225@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I have a follow-up question: when I change the frequency, I observe that the sensor signal is higher for a higher frequency than lower frequency. Why does this happen? The material has an attenuation coefficient that depends on frequency, so for higher frequencies, we should see a lower amplitude at the sensor. Why do I see the reverse behavior? I also tried to use the same number of cycles for each case, but again seeing the same behavior, I am interested to learn how the following papers simulated with reasonable results?&#60;br /&#62;
paper1.K‑wave modelling of ultrasound wave propagation in aerogels and the effect of physical parameters on attenuation and loss&#60;br /&#62;
paper2.Simultaneous use of pulse-echo and through-transmission methods in determining a combined reflection coefficient
&#60;/p&#62;</description>
		</item>
		<item>
			<title>frezaei on "I want to do a 2D elastic wave simulation on step geometry"</title>
			<link>http://www.k-wave.org/forum/topic/i-want-to-do-a-2d-elastic-wave-simulation-on-step-geometry#post-9224</link>
			<pubDate>Mon, 28 Jul 2025 19:05:11 +0000</pubDate>
			<dc:creator>frezaei</dc:creator>
			<guid isPermaLink="false">9224@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am new to k-wave simulation, and I am trying to simulate the attenuation through media. First of all, for medium.alpha_coeff, what should the unit be? dB/MHz.cm or Np/MHz.cm? Secondly, how do I make sure the attenuation through the medium is correct? I placed two sensors, one near the source and the other 1.1mm away, and now by looking at sensor signals, I see there is an attenuation, but if I consider the peak-to-peak value of the sensor signal, it does not follow this relationship: P=P0*exp(-alpha*f*x), why? Here is my code:&#60;br /&#62;
% Define medium properties&#60;br /&#62;
medium.sound_speed = zeros(Nx, Ny);&#60;br /&#62;
medium.density     = zeros(Nx, Ny);&#60;/p&#62;
&#60;p&#62;medium.sound_speed(:,:) = 5555;&#60;br /&#62;
medium.density(:,:)     = 2440;&#60;/p&#62;
&#60;p&#62;% Define attenuation coefficients (Np/(MHz^y cm))&#60;br /&#62;
medium.alpha_coeff = zeros(Nx, Ny);   % in dB/(MHz^y cm) but K-Wave expects Np/(MHz^y m)&#60;br /&#62;
medium.alpha_coeff(:,:) = 0.1;     % low loss (converted to Np/(MHz^y m))&#60;br /&#62;
medium.alpha_power = 1.0;        % frequency power&#60;br /&#62;
medium.alpha_mode = 'no_dispersion';&#60;/p&#62;
&#60;p&#62;% Simulation time&#60;br /&#62;
cfl=0.3;&#60;br /&#62;
t_end = 16e-6;       % [s]&#60;br /&#62;
sound_speed=5555;&#60;br /&#62;
dt = cfl * dx / sound_speed;&#60;br /&#62;
kgrid.makeTime(sound_speed, cfl,t_end)&#60;br /&#62;
% Tone burst source settings&#60;br /&#62;
sample_freq = 20e6;             % [Hz]&#60;br /&#62;
signal_freq = 1e6;            % [Hz]&#60;br /&#62;
num_cycles = 3;&#60;br /&#62;
signal=toneBurst(sample_freq,signal_freq,num_cycles,'Plot',true);&#60;/p&#62;
&#60;p&#62;%Defining a single source point&#60;br /&#62;
source.p_mask = zeros(Nx, Ny);&#60;br /&#62;
source.p_mask(round(Nx/2), 1) = 1;&#60;/p&#62;
&#60;p&#62;% define a time varying sinusoidal source&#60;br /&#62;
source_mag = 1e2;   % Amplitude in Pascals&#60;br /&#62;
source.p=source_mag *signal;&#60;/p&#62;
&#60;p&#62;% Initialize sensor mask with unique labels&#60;br /&#62;
sensor.mask = zeros(Nx, Ny);&#60;/p&#62;
&#60;p&#62;% Sensor 1: label '1' in second row (just below source)&#60;br /&#62;
sensor.mask(round(Nx/2), 2) = 1;&#60;/p&#62;
&#60;p&#62;% Sensor 2: label '2' in the row right after the glass layer&#60;br /&#62;
sensor.mask(round(Nx/2), 24) = 1;&#60;/p&#62;
&#60;p&#62;sensor.record = {'p', 'p_final','I'};&#60;/p&#62;
&#60;p&#62;% Run the simulation with memory-safe options&#60;br /&#62;
input_args = {'PMLInside', false, 'PMLSize', 20, 'PMLAlpha',3, 'PlotPML', true, 'DataCast', 'single', 'PlotLayout', true,'RecordMovie', true};&#60;br /&#62;
% input_args = {'DisplayMask', display_mask,'PMLInside', false, 'PMLSize', 20, 'PMLAlpha',2, 'PlotPML', true, 'DataCast', 'single', 'PlotLayout', true};&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor,input_args{:});&#60;/p&#62;
&#60;p&#62;% Extract pressure signals&#60;br /&#62;
p_signals = sensor_data.p;           % [2 x Nt]&#60;br /&#62;
Nt = length(kgrid.t_array);&#60;br /&#62;
t_micro = (0:Nt-1) * kgrid.dt * 1e6;&#60;/p&#62;
&#60;p&#62;% Plot recorded signals&#60;br /&#62;
figure;&#60;br /&#62;
plot(t_micro, p_signals(1,:), 'b-', 'LineWidth', 1.5);&#60;br /&#62;
xlabel('Time (µs)');&#60;br /&#62;
ylabel('Pressure (Pa)');&#60;br /&#62;
legend('Sensor 1 (near source)');&#60;br /&#62;
title('Pressure1 Time‑Series Recorded by Sensors');&#60;br /&#62;
figure;&#60;br /&#62;
plot(t_micro, p_signals(2,:), 'r-', 'LineWidth', 1.5);&#60;br /&#62;
xlabel('Time (µs)');&#60;br /&#62;
ylabel('Pressure (Pa)');&#60;br /&#62;
legend('Sensor 2 (after 1.1mm)');&#60;br /&#62;
title('Pressure2 Time‑Series Recorded by Sensors');&#60;br /&#62;
grid on;&#60;br /&#62;
[row_sens, col_sens] = find(sensor.mask);&#60;br /&#62;
figure;&#60;br /&#62;
imagesc(x_mm, y_mm, medium.sound_speed'); axis image tight;&#60;br /&#62;
colormap(jet); colorbar;&#60;br /&#62;
xlabel('x (mm)'); ylabel('y (mm)');&#60;br /&#62;
title('Medium with Sensor and Source Locations');&#60;br /&#62;
hold on;&#60;/p&#62;
&#60;p&#62;% Plot source in red&#60;br /&#62;
[row_src, col_src] = find(source.p_mask);&#60;br /&#62;
plot(x_mm(row_src), y_mm(col_src), 'rs', 'MarkerSize', 8, 'LineWidth', 1.5);&#60;/p&#62;
&#60;p&#62;% Plot sensors in green&#60;br /&#62;
plot(x_mm(row_sens), y_mm(col_sens), 'go', 'MarkerSize', 8, 'LineWidth', 1.5);&#60;br /&#62;
legend('Source', 'Sensor');
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "I want to do a 2D elastic wave simulation on step geometry"</title>
			<link>http://www.k-wave.org/forum/topic/i-want-to-do-a-2d-elastic-wave-simulation-on-step-geometry#post-8959</link>
			<pubDate>Fri, 24 Nov 2023 17:39:56 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">8959@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;k-Wave probably isn't the best tool for modelling structures like this. I'd suggest looking at different FEM tools, or even the FEM tools within MATLAB.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Crusher on "I want to do a 2D elastic wave simulation on step geometry"</title>
			<link>http://www.k-wave.org/forum/topic/i-want-to-do-a-2d-elastic-wave-simulation-on-step-geometry#post-8920</link>
			<pubDate>Tue, 03 Oct 2023 11:53:34 +0000</pubDate>
			<dc:creator>Crusher</dc:creator>
			<guid isPermaLink="false">8920@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I want to do a 2D elastic wave simulation on step geometry, like a small rectangle of different property placed on a big rectangle of different property. How to do that?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
