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

		<item>
			<title>Bradley Treeby on "medium.alpha_coeff"</title>
			<link>http://www.k-wave.org/forum/topic/mediumalpha_coeff#post-5426</link>
			<pubDate>Thu, 17 Mar 2016 14:36:11 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5426@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi maryam,&#60;/p&#62;
&#60;p&#62;The very high value of absorption inside the layer is making the simulation unstable (you can see this on the display as the screen becoming black). You can counteract this by using a smaller time step (or CFL number if using &#60;code&#62;makeTime&#60;/code&#62;). In your case, the stability is made worse by the power law exponent (&#60;code&#62;alpha_power&#60;/code&#62;) being less than 1. Unfortunately, I don't have an answer off hand as to why this should be the case. If you change &#60;code&#62;alpha_power&#60;/code&#62; to 1.1 (for example), and reduce the size of your time step to use a CFL of 0.1, then the simulation runs stably.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>maryam.parto on "medium.alpha_coeff"</title>
			<link>http://www.k-wave.org/forum/topic/mediumalpha_coeff#post-5408</link>
			<pubDate>Mon, 29 Feb 2016 15:08:45 +0000</pubDate>
			<dc:creator>maryam.parto</dc:creator>
			<guid isPermaLink="false">5408@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;HI&#60;br /&#62;
I changed the “example_us_defining_transducer” Example of the k-wave so that  medium.alpha_coeff having different values in different parts of the medium. But actually I didn’t get any data in my sensor-data matrix after running it . can somebody help me what happens?&#60;br /&#62;
Here are my codes:&#60;/p&#62;
&#60;p&#62;clear all;&#60;br /&#62;
DATA_CAST = 'single';&#60;br /&#62;
% =========================================================================&#60;br /&#62;
% DEFINE THE K-WAVE GRID&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% set the size of the perfectly matched layer (PML)&#60;br /&#62;
PML_X_SIZE = 20;            % [grid points]&#60;br /&#62;
PML_Y_SIZE = 10;            % [grid points]&#60;br /&#62;
PML_Z_SIZE = 10;            % [grid points]&#60;/p&#62;
&#60;p&#62;% set total number of grid points not including the PML&#60;br /&#62;
Nx = 128 - 2*PML_X_SIZE;    % [grid points]&#60;br /&#62;
Ny = 128 - 2*PML_Y_SIZE;    % [grid points]&#60;br /&#62;
Nz = 64 - 2*PML_Z_SIZE;     % [grid points]&#60;/p&#62;
&#60;p&#62;% set desired grid size in the x-direction not including the PML&#60;br /&#62;
x = 40e-3;                  % [m]&#60;/p&#62;
&#60;p&#62;% calculate the spacing between the grid points&#60;br /&#62;
dx = x/Nx;                  % [m]&#60;br /&#62;
dy = dx;                    % [m]&#60;br /&#62;
dz = dx;                    % [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;% =========================================================================&#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.sound_speed = 1540*ones(Nx, Ny, Nz); % [m/s]&#60;br /&#62;
medium.density = 1030*ones(Nx, Ny, Nz );     % [kg/m^3]&#60;br /&#62;
medium.sound_speed((0.01*Nx+5):(0.01*Nx+5)+16,:,:) = 2300;   % [m/s]&#60;br /&#62;
medium.density((0.01*Nx+5):(0.01*Nx+5)+16,:,:) = 1912;&#60;br /&#62;
medium.alpha_coeff=0.435*ones(Nx, Ny, Nz );&#60;br /&#62;
medium.alpha_power=0.9;&#60;br /&#62;
medium.alpha_coeff(8:24,:, :) = 22;&#60;br /&#62;
medium.BonA = 6;&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
t_end = 40e-6;                  % [s]&#60;br /&#62;
kgrid.t_array = makeTime(kgrid, medium.sound_speed, [], t_end);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE INPUT SIGNAL&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define properties of the input signal&#60;br /&#62;
source_strength = 1e6;          % [Pa]&#60;br /&#62;
tone_burst_freq = 0.5e6;        % [Hz]&#60;br /&#62;
tone_burst_cycles = 1;&#60;/p&#62;
&#60;p&#62;% create the input signal using toneBurst&#60;br /&#62;
input_signal = toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% DEFINE THE ULTRASOUND TRANSDUCER&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% physical properties of the transducer&#60;br /&#62;
transducer.number_elements = 72;    % total number of transducer elements&#60;br /&#62;
transducer.element_width = 1;       % width of each element [grid points]&#60;br /&#62;
transducer.element_length = 1;     % length of each element [grid points]&#60;br /&#62;
transducer.element_spacing = 0;     % spacing (kerf width) between the elements [grid points]&#60;br /&#62;
transducer.radius = inf;            % radius of curvature of the transducer [m]&#60;/p&#62;
&#60;p&#62;% calculate the width of the transducer in grid points&#60;br /&#62;
transducer_width = transducer.number_elements*transducer.element_width ...&#60;br /&#62;
    + (transducer.number_elements - 1)*transducer.element_spacing;&#60;/p&#62;
&#60;p&#62;% use this to position the transducer in the middle of the computational grid&#60;br /&#62;
transducer.position = round([1, Ny/2 - transducer_width/2, Nz/2 - transducer.element_length/2]);&#60;/p&#62;
&#60;p&#62;% properties used to derive the beamforming delays&#60;br /&#62;
transducer.sound_speed = 1540;              % sound speed [m/s]&#60;br /&#62;
transducer.focus_distance = 20e-3;          % focus distance [m]&#60;br /&#62;
transducer.steering_angle = 0;              % steering angle [degrees]&#60;/p&#62;
&#60;p&#62;% apodization&#60;br /&#62;
transducer.transmit_apodization = 'Rectangular';    &#60;/p&#62;
&#60;p&#62;% append input signal used to drive the transducer&#60;br /&#62;
transducer.input_signal = input_signal;&#60;/p&#62;
&#60;p&#62;% create the transducer using the defined settings&#60;br /&#62;
transducer = makeTransducer(kgrid, transducer);&#60;/p&#62;
&#60;p&#62;% print out transducer properties&#60;br /&#62;
transducer.properties;&#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([Nx/4, Nx/2, 3*Nx/4], Ny/2, Nz/2) = 1;&#60;/p&#62;
&#60;p&#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 = {'DisplayMask', transducer.all_elements_mask &#124; sensor.mask, ...&#60;br /&#62;
    'PMLInside', false, 'PlotPML', false, 'PMLSize', [PML_X_SIZE, PML_Y_SIZE, PML_Z_SIZE], ...&#60;br /&#62;
    'PMLInside', false, 'DataCast', DATA_CAST, 'PlotScale', [-source_strength/2, source_strength/2]};&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
[sensor_data] = kspaceFirstOrder3D(kgrid, medium, transducer, sensor, input_args{:});
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
