<?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: attenuation</title>
		<link>http://www.k-wave.org/forum/topic/attenuation</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:43:13 +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/attenuation" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "attenuation"</title>
			<link>http://www.k-wave.org/forum/topic/attenuation#post-5629</link>
			<pubDate>Wed, 10 Aug 2016 17:02:07 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5629@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi maryam,&#60;/p&#62;
&#60;p&#62;It looks like your source is within the perfectly matched layer (PML), so this is responsible for the additional attenuation you observe. If you want to use your PML size values and set the PML to be outside the domain, you need to set the following additional input arguments:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;#39;PMLInside&#38;#39;, false, &#38;#39;PMLSize&#38;#39;, [PML_X_SIZE, PML_Y_SIZE, PML_Z_SIZE]&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>maryam.parto on "attenuation"</title>
			<link>http://www.k-wave.org/forum/topic/attenuation#post-5609</link>
			<pubDate>Wed, 27 Jul 2016 13:28:46 +0000</pubDate>
			<dc:creator>maryam.parto</dc:creator>
			<guid isPermaLink="false">5609@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi&#60;br /&#62;
I simulated a point velocity source in a 3D medium with sound properties of soft tissue. When I run it, I have the pressure of 0.02571 in 2*dx after source place and the pressure of 0.0002777 in 3*dx. I think that the attenuation seems to be a lot. Isn’t it? According to the simple formula of attenuation after 1*dx the pressure becomes 0.9987 of first one. I appreciate if you help me.&#60;br /&#62;
This is my code:&#60;/p&#62;
&#60;p&#62;(clear all;&#60;br /&#62;
% simulation settings&#60;br /&#62;
DATA_CAST = 'single';&#60;br /&#62;
RUN_SIMULATION  = true;&#60;br /&#62;
USE_STATISTICS = true;&#60;br /&#62;
medium.alpha_mode='no_dispersion';&#60;br /&#62;
% =========================================================================&#60;br /&#62;
% DEFINE THE K-WAVE GRID&#60;br /&#62;
% =========================================================================&#60;br /&#62;
PML_X_SIZE = 20;            % [grid points]&#60;br /&#62;
PML_Y_SIZE = 20;            % [grid points]&#60;br /&#62;
PML_Z_SIZE = 20;  &#60;/p&#62;
&#60;p&#62;% set total number of grid points not including the PML&#60;br /&#62;
Nx = 326;    % [grid points]&#60;br /&#62;
Ny = 250;   % [grid points]&#60;br /&#62;
Nz = 126;   % [grid points]&#60;/p&#62;
&#60;p&#62;% set desired grid size in the x-direction not including the PML&#60;br /&#62;
dx =4e-04;      %6.355932203389830e-04;            % [m]&#60;br /&#62;
dy = dx;                    % [m]&#60;br /&#62;
dz = dx;                    % [m]&#60;/p&#62;
&#60;p&#62;% set desired grid size in the x-direction not including the PML&#60;br /&#62;
x = dx*Nx;                  % [m]&#60;/p&#62;
&#60;p&#62;% create the k-space grid&#60;br /&#62;
kgrid = makeGrid(Nx, dx, Ny, dy, Nz, dz);&#60;/p&#62;
&#60;p&#62;c0 = 1550; &#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE MEDIUM PARAMETERS&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
medium.alpha_coeff=0.58;&#60;br /&#62;
medium.alpha_power=1;&#60;br /&#62;
medium.sound_speed = 1550; % [m/s]&#60;br /&#62;
medium.density = 1030;     % [kg/m^3]&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
Nt = 600;&#60;br /&#62;
dt =7e-8;&#60;br /&#62;
kgrid.t_array = (1:Nt)*dt;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE ULTRASOUND TRANSDUCER&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;y1=126;&#60;br /&#62;
x1=1;&#60;br /&#62;
tr = zeros(Nx,Ny,Nz);&#60;br /&#62;
k=0;&#60;br /&#62;
tr(x1,y1,Nz/2)=1;&#60;br /&#62;
voxelPlot(tr);&#60;/p&#62;
&#60;p&#62;source_positions = find(tr == 1);&#60;br /&#62;
source.u_mask = zeros(Nx, Ny,Nz);&#60;br /&#62;
source.u_mask(source_positions) =  1;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE INPUT SIGNAL&#60;br /&#62;
% =========================================================================&#60;br /&#62;
% define a toneBurst source&#60;br /&#62;
source_strength = 1;          % [Pa]&#60;br /&#62;
tone_burst_freq = 0.5e6;      % [Hz]&#60;br /&#62;
tone_burst_cycles = 1;&#60;/p&#62;
&#60;p&#62;source_signal=toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles );&#60;br /&#62;
source.ux = (source_strength./(1550*1030)).*source_signal;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE SENSOR MASK&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% create a binary sensor mask with four detection positions&#60;br /&#62;
sensor.mask = zeros(Nx, Ny, Nz);&#60;br /&#62;
sensor.mask(1:326,1:250,Nz/2) = 1;&#60;br /&#62;
sensor.record = {'I','p'};&#60;br /&#62;
% =========================================================================&#60;br /&#62;
% RUN THE SIMULATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% set the input settings&#60;br /&#62;
input_args = {...&#60;br /&#62;
    'DataCast', DATA_CAST, 'DataRecast', true ,'PlotLayout', true, 'RecordMovie', true};&#60;/p&#62;
&#60;p&#62;sensor_data = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
