<?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: Kangyi Feng</title>
		<link><a href='http://www.k-wave.org/forum/profile/kangyi-feng'>kangyi-feng</a></link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:39:54 +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>Kangyi Feng on "How to solve using GPU increases the usage space of the C drive"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-solve-using-gpu-increases-the-usage-space-of-the-c-drive#post-9094</link>
			<pubDate>Fri, 17 May 2024 04:49:13 +0000</pubDate>
			<dc:creator>Kangyi Feng</dc:creator>
			<guid isPermaLink="false">9094@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,I am a beginner in k-wave. When I use  kspaceFirstOrder3DG for acceleration calculations, I find that every time I run the code in MATLAB, it increases the memory usage of the C drive. How to change the code so that when I run kspaceFirstOrder3DG calculations, it does not increase the usage space of the C drive. Thanks a lot
&#60;/p&#62;</description>
		</item>
		<item>
			<title>shahwaiz on "Problem about use kspaceFirstOrder2DG"</title>
			<link>http://www.k-wave.org/forum/topic/problem-about-use-kspacefirstorder2dg#post-8991</link>
			<pubDate>Mon, 18 Dec 2023 04:06:22 +0000</pubDate>
			<dc:creator>shahwaiz</dc:creator>
			<guid isPermaLink="false">8991@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;i have resolve this problem by install the matlab2016a
&#60;/p&#62;</description>
		</item>
		<item>
			<title>shahwaiz on "Problem about use kspaceFirstOrder2DG"</title>
			<link>http://www.k-wave.org/forum/topic/problem-about-use-kspacefirstorder2dg#post-8990</link>
			<pubDate>Sun, 17 Dec 2023 10:33:47 +0000</pubDate>
			<dc:creator>shahwaiz</dc:creator>
			<guid isPermaLink="false">8990@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello&#60;/p&#62;
&#60;p&#62;I get the following error when i use the kspaceFirstOrder2DG:&#60;/p&#62;
&#60;p&#62;Running k-Wave simulation...&#60;br /&#62;
  start time: 17-Dec-2023 17:28:54&#60;br /&#62;
  reference sound speed: 2783.7252m/s&#60;br /&#62;
  dt: 10.7769ns, t_end: 48.2699us, time steps: 4480&#60;br /&#62;
  input grid size: 512 by 512 grid points (51.2 by 51.2mm)&#60;br /&#62;
  maximum supported frequency: 7.5MHz&#60;br /&#62;
  expanding computational grid...&#60;br /&#62;
  computational grid size: 552 by 552 grid points&#60;br /&#62;
  WARNING: Highest prime factors in each dimension are 23  23&#60;br /&#62;
           Use dimension sizes with lower prime factors to improve speed&#60;br /&#62;
  precomputation completed in 0.083601s&#60;br /&#62;
  saving input files to disk...&#60;br /&#62;
函数或变量 'attvalue_size' 无法识别。&#60;/p&#62;
&#60;p&#62;出错 h5writeatt&#38;gt;createDatatypeId (line 186)&#60;br /&#62;
        elseif attvalue_size &#38;gt; 0&#60;/p&#62;
&#60;p&#62;出错 h5writeatt (line 86)&#60;br /&#62;
datatypeId  = createDatatypeId(Attvalue, useUtf8);&#60;/p&#62;
&#60;p&#62;出错 writeMatrix (line 211)&#60;br /&#62;
    h5writeatt(filename, ['/' matrix_name], DOMAIN_TYPE_ATT_NAME, domain_type, 'TextEncoding', 'system');&#60;/p&#62;
&#60;p&#62;出错 kspaceFirstOrder_saveToDisk (line 462)&#60;br /&#62;
        writeMatrix(flags.save_to_disk, eval(variable_list{cast_index}), variable_list{cast_index}, hdf_compression_level);&#60;/p&#62;
&#60;p&#62;出错 kspaceFirstOrder2D (line 620)&#60;br /&#62;
    kspaceFirstOrder_saveToDisk;&#60;/p&#62;
&#60;p&#62;出错 kspaceFirstOrder3DC (line 532)&#60;br /&#62;
eval(run_string);&#60;/p&#62;
&#60;p&#62;出错 kspaceFirstOrder2DG (line 76)&#60;br /&#62;
sensor_data = kspaceFirstOrder3DC(varargin{:});&#60;/p&#62;
&#60;p&#62;出错 mydataset (line 69)&#60;br /&#62;
    sensor_data = kspaceFirstOrder2DG(kgrid, medium, source, sensor, input_args{:});
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lschlieder on "hdf5 problems"</title>
			<link>http://www.k-wave.org/forum/topic/hdf5-problems#post-8736</link>
			<pubDate>Fri, 07 Apr 2023 12:27:33 +0000</pubDate>
			<dc:creator>lschlieder</dc:creator>
			<guid isPermaLink="false">8736@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;After a week of fiddeling around, I found out, that there is an environment Variable under linux called HDF5_USE_FILE_LOCKING (&#60;a href=&#34;https://docs.hdfgroup.org/hdf5/develop/_h5public_8h.html#a347a82c5915f93e3f03265aac4f7a795&#34; rel=&#34;nofollow&#34;&#62;https://docs.hdfgroup.org/hdf5/develop/_h5public_8h.html#a347a82c5915f93e3f03265aac4f7a795&#60;/a&#62;)&#60;/p&#62;
&#60;p&#62;You can just:&#60;br /&#62;
export HDF5_USE_FILE_LOCKING='FALSE'
&#60;/p&#62;</description>
		</item>
		<item>
			<title>lschlieder on "hdf5 problems"</title>
			<link>http://www.k-wave.org/forum/topic/hdf5-problems#post-8735</link>
			<pubDate>Wed, 05 Apr 2023 17:33:18 +0000</pubDate>
			<dc:creator>lschlieder</dc:creator>
			<guid isPermaLink="false">8735@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I posted a similar topic in general, and still have found no solution. I am running into a very weird situation, where kspaceFirstOrder-CUDA fails to open the input h5 file. It seems unable to open or locate the file: &#60;/p&#62;
&#60;p&#62;me@cluster_node:/clusterpath/KWaveSimulationsCorrect/rng806480170$ kspaceFirstOrder-CUDA -i ./rholo3d_kwave_input.h5 -o test.h5&#60;/p&#62;
&#60;p&#62;┌───────────────────────────────────────────────────────────────┐&#60;br /&#62;
│                  kspaceFirstOrder-CUDA v1.3                   │&#60;br /&#62;
├───────────────────────────────────────────────────────────────┤&#60;br /&#62;
│ Reading simulation configuration:                      Failed │&#60;br /&#62;
└───────────────────────────────────────────────────────────────┘&#60;br /&#62;
┌───────────────────────────────────────────────────────────────┐&#60;br /&#62;
│            !!! K-Wave experienced a fatal error !!!           │&#60;br /&#62;
├───────────────────────────────────────────────────────────────┤&#60;br /&#62;
│ Error: File ./rholo3d_kwave_input.h5 was not found or cannot  │&#60;br /&#62;
│        be opened.: iostream error                             │&#60;br /&#62;
├───────────────────────────────────────────────────────────────┤&#60;br /&#62;
│                      Execution terminated                     │&#60;br /&#62;
└───────────────────────────────────────────────────────────────┘&#60;/p&#62;
&#60;p&#62;The weird thing is, that the same program can use the same input files and it works, when i start the program on my local pc, instead of the cluster i want to use everything works fine. &#60;/p&#62;
&#60;p&#62;me@mypc:/cluster_remote_smtp_access/KWaveSimulationsCorrect/rng806480170$ kspaceFirstOrder-CUDA -i rholo3d_kwave_input.h5 -o test.h5&#60;/p&#62;
&#60;p&#62;┌───────────────────────────────────────────────────────────────┐&#60;br /&#62;
│                  kspaceFirstOrder-CUDA v1.3                   │&#60;br /&#62;
├───────────────────────────────────────────────────────────────┤&#60;br /&#62;
│ Reading simulation configuration:                        Done │&#60;br /&#62;
│ Selected GPU device id:                                     0 │&#60;br /&#62;
│ GPU device name:                   NVIDIA GeForce GTX 1650 Ti │&#60;br /&#62;
│ Number of CPU threads:                                     16 │&#60;br /&#62;
│ Processor name:     Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz │&#60;br /&#62;
├───────────────────────────────────────────────────────────────┤&#60;br /&#62;
│                      Simulation details                       │&#60;br /&#62;
├───────────────────────────────────────────────────────────────┤&#60;br /&#62;
│ Domain dimensions:                            256 x 256 x 128 │&#60;br /&#62;
│ Medium type:                                               3D │&#60;br /&#62;
│ Simulation time steps:                                    828 │&#60;br /&#62;
├───────────────────────────────────────────────────────────────┤&#60;br /&#62;
│                        Initialization                         │&#60;br /&#62;
├───────────────────────────────────────────────────────────────┤&#60;br /&#62;
│ Memory allocation:                                       Done │&#60;/p&#62;
&#60;p&#62;The files are created by Matlab2019b, since newer versions crash in various ways, i.e. 2022a:&#60;/p&#62;
&#60;p&#62;Error using hdf5lib2&#60;br /&#62;
Unable to open the file because of HDF5 Library error. Reason:Unknown&#60;/p&#62;
&#60;p&#62;Error in H5F.open (line 130)&#60;br /&#62;
file_id = H5ML.hdf5lib2('H5Fopen', filename, flags, fapl, is_remote);&#60;/p&#62;
&#60;p&#62;Error in h5write (line 108)&#60;br /&#62;
    file_id    = H5F.open(Filename,flags,fapl);&#60;/p&#62;
&#60;p&#62;Error in writeMatrix (line 204)&#60;br /&#62;
h5write(filename, ['/' matrix_name], matrix);&#60;/p&#62;
&#60;p&#62;Error in kspaceFirstOrder_saveToDisk (line 462)&#60;br /&#62;
        writeMatrix(flags.save_to_disk, eval(variable_list{cast_index}), variable_list{cast_index}, hdf_compression_level);&#60;/p&#62;
&#60;p&#62;Error in kspaceFirstOrder3D (line 673)&#60;br /&#62;
    kspaceFirstOrder_saveToDisk;&#60;/p&#62;
&#60;p&#62;Error in init_kwave_sim (line 169)&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;Now i do not even know where to start debugging this.&#60;br /&#62;
First problem could be, that the file isn't there, but i checked that like 100 times. It could be some weird access stuff, but i never ran into problems before, though i obviously do not have sudo rights on the cluster.&#60;/p&#62;
&#60;p&#62;I assume, since the binaries are statically linked everything is contained within them, and i do not need to worry about CUDA versions or hdf5 versions. Is that correct? Also does the Card i run it on matter? I assume it just works for all new Nvidia cards, like A100, Tesla V100 etc, correct? &#60;/p&#62;
&#60;p&#62;Does anyone have any ideas that go beyond &#34;have you checked if the file is really there?&#34;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6736</link>
			<pubDate>Tue, 29 Jan 2019 23:24:32 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6736@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi an803355,&#60;/p&#62;
&#60;p&#62;I can't immediately spot anything wrong in your code. Do you mean the focal pressure is higher when you include attenuation compared to without? Or that the focal pressure is higher when you include the skull compared to without? Or something else?&#60;/p&#62;
&#60;p&#62;Keep in mind the focal pressure will always be much higher than the surface pressure due to the focusing gain of the transducer. &#60;/p&#62;
&#60;p&#62;For single frequency simulations, I would suggest using &#60;code&#62;alpha_coeff = 2&#60;/code&#62;, and then adjust the alpha_coeff values accordingly. One way is to use the new function &#60;a href=&#34;http://www.k-wave.org/downloads/fitPowerLawParamsMulti.m&#34;&#62;&#60;code&#62;fitPowerLawParamsMulti&#60;/code&#62;&#60;/a&#62; (this will be included in a future release of k-Wave). The reason for using &#60;code&#62;alpha_coeff = 2&#60;/code&#62; is explained in Sec. 2.2 in &#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2018-Robertson-PMB.pdf&#34;&#62;this paper&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;If you're still stuck, can you post an example with an artificial skull that has the same problem, or email me the skull image?&#60;/p&#62;
&#60;p&#62;Brad
&#60;/p&#62;</description>
		</item>
		<item>
			<title>an803355 on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6716</link>
			<pubDate>Thu, 17 Jan 2019 17:39:01 +0000</pubDate>
			<dc:creator>an803355</dc:creator>
			<guid isPermaLink="false">6716@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Bradley,  here is my code.   The image mask is not included, but essentially it is black and white skull curved strip.   The masks apply well (I've checked the matrix).&#60;/p&#62;
&#60;p&#62;Not sure why the amplitude isn't attenuating at the focus though, and I'm getting really weird behaviour within the skull (seems to be amplifying everything) instead of attenuating&#60;/p&#62;
&#60;p&#62;Thanks for your help&#60;/p&#62;
&#60;p&#62;clearvars;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% ACOUSTIC SIMULATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% define the PML size&#60;br /&#62;
pml_size = 20;              % [grid points]&#60;/p&#62;
&#60;p&#62;% define the grid parameters&#60;br /&#62;
Nx = 256 - 2 * pml_size;    % [grid points]&#60;br /&#62;
Ny = 256 - 2 * pml_size;    % [grid points]&#60;br /&#62;
dx = 0.25e-3;               % [m]&#60;br /&#62;
dy = 0.25e-3;               % [m]&#60;/p&#62;
&#60;p&#62;% create the computational grid&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dy);&#60;/p&#62;
&#60;p&#62;%define the properties of the propagation medium&#60;/p&#62;
&#60;p&#62;   %% ALPHA COEFF&#60;/p&#62;
&#60;p&#62;medium.alpha_coeff = 0.05 * ones(Nx, Ny);    % [dB/(MHz^y cm)]  WATER &#60;/p&#62;
&#60;p&#62;%skull&#60;br /&#62;
pix=loadimagecustom('skull216.png');&#60;br /&#62;
pix = pix .* (8/ max(pix(:)));    %set all black pixels to 8, all white to 0.&#60;br /&#62;
medium.alpha_coeff =medium.alpha_coeff + pix;   %  add 8 to the 0.05 water, making the skull layer&#60;/p&#62;
&#60;p&#62; medium.alpha_power = 1.43;&#60;/p&#62;
&#60;p&#62;   %% SPEED&#60;br /&#62;
medium.sound_speed = 1450 * ones(Nx, Ny);   % WATER default fill! [m/s]&#60;/p&#62;
&#60;p&#62;% %skull&#60;br /&#62;
pix=loadimagecustom('skull216.png');&#60;br /&#62;
pix = pix .* (700/ max(pix(:)));    *add 700 to the water speed&#60;br /&#62;
medium.sound_speed =medium.sound_speed +pix;   % 2500   bone! [kg/m^3]&#60;/p&#62;
&#60;p&#62;%% DENSITY&#60;/p&#62;
&#60;p&#62; medium.density = 1000 * ones(Nx, Ny);       % WATER default fill [kg/m^3]&#60;/p&#62;
&#60;p&#62;%skull&#60;br /&#62;
pix=loadimagecustom('skull216.png');&#60;br /&#62;
pix = pix .* (732 / max(pix(:)));&#60;br /&#62;
medium.density =medium.density +pix;   %   bone! [kg/m^3]&#60;/p&#62;
&#60;p&#62;%% define the source parameters&#60;br /&#62;
diameter = 0.03;           % [m]&#60;br /&#62;
radius   = 0.03;           % [m]&#60;br /&#62;
freq     = 500000;             % [Hz]&#60;br /&#62;
amp      = 0.53e6;           % 0.53[MPa]&#60;/p&#62;
&#60;p&#62;% define a focused ultrasound transducer&#60;br /&#62;
source.p_mask = makeArc([Nx, Ny], [1, Ny/2], round(radius / dx), round(diameter / dx) + 1, [Nx/2, Ny/2]);&#60;/p&#62;
&#60;p&#62;% create a display mask to display the transducer&#60;br /&#62;
display_mask = source.p_mask;&#60;/p&#62;
&#60;p&#62;% calculate the time step using an integer number of points per period&#60;br /&#62;
ppw = 12.08; % points per wavelength&#60;br /&#62;
cfl = 0.3;                              % cfl number&#60;br /&#62;
ppp = 41;                  % points per period&#60;br /&#62;
T   = 1 / freq;                         % period [s]&#60;br /&#62;
dt  = 4.878e-8;                          % time step [s]&#60;/p&#62;
&#60;p&#62;% calculate the number of time steps to reach steady state&#60;br /&#62;
t_end = 5.0575e-5;&#60;br /&#62;
Nt = round(t_end / dt);&#60;/p&#62;
&#60;p&#62;% create the time array&#60;br /&#62;
kgrid.setTime(Nt, dt);&#60;/p&#62;
&#60;p&#62;% define the input signal&#60;br /&#62;
source.p = createCWSignals(kgrid.t_array, freq, amp, 0);&#60;/p&#62;
&#60;p&#62;% set the sensor mask to cover the entire grid&#60;br /&#62;
sensor.mask = ones(Nx, Ny);&#60;br /&#62;
sensor.record = {'p', 'p_max_all'};&#60;/p&#62;
&#60;p&#62;% record the last 3 cycles in steady state&#60;br /&#62;
num_periods = 3;&#60;br /&#62;
T_points = round(num_periods * T / kgrid.dt);&#60;br /&#62;
sensor.record_start_index = Nt - T_points + 1;&#60;/p&#62;
&#60;p&#62;% set the input arguements&#60;br /&#62;
input_args = {'PMLInside', false,'PlotLayout', true, 'PlotPML', false, 'DisplayMask', ...&#60;br /&#62;
    display_mask, 'PlotScale', [-1, 1] * amp};&#60;/p&#62;
&#60;p&#62;% run the acoustic simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% CALCULATE PRESSURE&#60;br /&#62;
%===================&#60;/p&#62;
&#60;p&#62;% extract the pressure amplitude at each position&#60;br /&#62;
p = extractAmpPhase(sensor_data.p, 1/kgrid.dt, freq);&#60;/p&#62;
&#60;p&#62;% reshape the data,&#60;br /&#62;
p = reshape(p, Nx, Ny);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% VISUALISATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% plot the thermal dose and lesion map&#60;br /&#62;
figure;&#60;/p&#62;
&#60;p&#62;% plot the acoustic pressure&#60;br /&#62;
subplot(2, 3, 1);&#60;br /&#62;
imagesc(kgrid.y_vec * 1e3, kgrid.x_vec * 1e3, p * 1e-6);&#60;/p&#62;
&#60;p&#62;h = colorbar;&#60;br /&#62;
xlabel(h, '[MPa]');&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;&#60;br /&#62;
title('Acoustic Pressure Amplitude');&#60;br /&#62;
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);&#60;/p&#62;
&#60;p&#62;% set colormap and enlarge figure window&#60;br /&#62;
colormap(jet(256));&#60;br /&#62;
scaleFig(1.5, 1);
&#60;/p&#62;</description>
		</item>
		<item>
			<title>an803355 on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6715</link>
			<pubDate>Thu, 17 Jan 2019 17:31:56 +0000</pubDate>
			<dc:creator>an803355</dc:creator>
			<guid isPermaLink="false">6715@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi @Brad.  Yes that was a typo.  I am setting my coefficient to  about +8.00.  Nevertheless, it is not adequately running.&#60;br /&#62;
Question: Do I need to set a different &#34;alpha power&#34; for my skull mask?  Or does the alpha power stay as, say 1.43, for the entire field?&#60;br /&#62;
I'm a bit confused on this point.  ]&#60;/p&#62;
&#60;p&#62;When I try to run &#34; fitPowerLawParams(8, 1.43, 2850, 400000, 500000, true) &#34;, the function gives me an error &#34;not enough input arguments&#34;. &#60;/p&#62;
&#60;p&#62;A bit confused about the whole alpha power.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6712</link>
			<pubDate>Thu, 17 Jan 2019 00:26:45 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6712@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Are you using a negative absorption coefficient, or is that a typo? If so, that would cause an increase in pressure.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>an803355 on "Simulating bony skull attenuation- why is it amplifying instead?"</title>
			<link>http://www.k-wave.org/forum/topic/simulating-bony-skull-attenuation-why-is-it-amplifying-instead#post-6711</link>
			<pubDate>Wed, 16 Jan 2019 21:30:35 +0000</pubDate>
			<dc:creator>an803355</dc:creator>
			<guid isPermaLink="false">6711@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Dear all,&#60;/p&#62;
&#60;p&#62;I am trying to simulate a focused 0.5 MHz transducer directed at the inside of a skull (initial pressure 0.5 MPa).&#60;/p&#62;
&#60;p&#62;Of course, the skull will attenuate the pressure significantly, but in my code, it seems to make it stronger at the focus!&#60;/p&#62;
&#60;p&#62;I am using parameters from this paper:&#60;br /&#62;
&#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2017-Robertson-PMB.pdf&#34; rel=&#34;nofollow&#34;&#62;http://bug.medphys.ucl.ac.uk/papers/2017-Robertson-PMB.pdf&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Specifically, I am using  a 2D image mask to define a skull bone layer and the following parameters:&#60;/p&#62;
&#60;p&#62;medium.alpha_coeff = 0.75 for  WATER&#60;br /&#62;
medium.alpha_coeff= -8.83   for SKULL (0.8 cm thick)&#60;br /&#62;
 medium.alpha_power = 1.43&#60;/p&#62;
&#60;p&#62;I am using standard values for bone speed 2850 m/s and density was 1732 kg/m 3&#60;/p&#62;
&#60;p&#62;For some reason, my simulation is generating a larger value at the focus (1 MPA), even though the wave had to pass through the skull layer!  &#60;/p&#62;
&#60;p&#62;I am confused about what I am doing wrong.  Any help would be appreciated. The mask appears to be applied properly.&#60;/p&#62;
&#60;p&#62;I suspect my coefficients are off or I used the wrong sensor mask method?&#60;/p&#62;
&#60;p&#62;PS: I used the &#34;Heating By A Focused Ultrasound Transducer&#34; as a template script, removed the heating parts and left the &#34;pressure&#34; simulation there, with the addition of a skull.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Modeling ultrasonic absorption with varying alpha power"</title>
			<link>http://www.k-wave.org/forum/topic/modeling-ultrasonic-absorption-with-varying-alpha-power#post-6177</link>
			<pubDate>Sun, 29 Oct 2017 11:17:33 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6177@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Henning,&#60;/p&#62;
&#60;p&#62;Are you comparing the amplitude of the time trace, or the spectrum? If I run your absorbing simulation, and then replace &#60;code&#62;medium.alpha_coeff&#60;/code&#62; with &#60;code&#62;alpha_coef_water&#60;/code&#62; and compare the spectrum of the two signals using:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;spect(scan(19000:23000), 1/kgrid.dt, &#38;#39;Plot&#38;#39;, [true, false]);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;At 5 MHz, the signal reduction is around 128 dB, which is roughly what you might expect given the absorption in the layers. &#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>H_Frechen on "Modeling ultrasonic absorption with varying alpha power"</title>
			<link>http://www.k-wave.org/forum/topic/modeling-ultrasonic-absorption-with-varying-alpha-power#post-6170</link>
			<pubDate>Thu, 26 Oct 2017 13:08:40 +0000</pubDate>
			<dc:creator>H_Frechen</dc:creator>
			<guid isPermaLink="false">6170@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;I made a few more investigations. I uploaded the scripts  for the 2D case and comparison figures between simple model and 2D-k-Wave for the cases:&#60;br /&#62;
1. No Absorption (k-Wave CFL 0.2)&#60;br /&#62;
2. Absorption (k-Wave CFL 0.2)&#60;br /&#62;
3. Absorption (k-Wave CFL 0.1)&#60;/p&#62;
&#60;p&#62;You can find the on my gitlab.&#60;/p&#62;
&#60;p&#62;For the first case without absorption, both models agree rather well. Of course there are some smaller deviations due to the geometry of the sample, which cannot be represented by the simple model. For cases 2 and 3 on the other hand, there is still the huge deviation in amplitude. A change of the CFL from 0.2 to 0.1 did not change the results very much.&#60;/p&#62;
&#60;p&#62;Best regards&#60;br /&#62;
Henning
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Modeling ultrasonic absorption with varying alpha power"</title>
			<link>http://www.k-wave.org/forum/topic/modeling-ultrasonic-absorption-with-varying-alpha-power#post-6166</link>
			<pubDate>Thu, 26 Oct 2017 09:16:47 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6166@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Henning,&#60;/p&#62;
&#60;p&#62;I took a brief look at your code (although didn't run it), and no immediate red flags. As you have quite large sound speed changes, you will need to watch out for numerical dispersion. A good approach is to set the reference sound speed to the background medium, and then make sure your time step is small enough for stability.&#60;/p&#62;
&#60;p&#62;Did you double check that your k-Wave simulation gives you the expected results when no absorption is included?&#60;/p&#62;
&#60;p&#62;If you can replicate your problem in a simple script that's fast to run (e.g., in 2D), I can dig a bit further.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>H_Frechen on "Modeling ultrasonic absorption with varying alpha power"</title>
			<link>http://www.k-wave.org/forum/topic/modeling-ultrasonic-absorption-with-varying-alpha-power#post-6159</link>
			<pubDate>Fri, 20 Oct 2017 15:26:58 +0000</pubDate>
			<dc:creator>H_Frechen</dc:creator>
			<guid isPermaLink="false">6159@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;many thanks for your reply and your great support in this forum. I already learned alot just by reading the different posts of other authors.&#60;/p&#62;
&#60;p&#62;I tried the fitPowerLawParams function and got the new &#60;code&#62;y_fit = 1.2041&#60;/code&#62; and &#60;code&#62;a0_fit = 4.3499&#60;/code&#62; using the above mentioned values. But as you said, this will most probably not explain the four orders of magnitude.&#60;/p&#62;
&#60;p&#62;I also tried your approach with different values for alpha_power_ref&#60;br /&#62;
&#60;code&#62;alpha_coeff_new = alpha_coeff * f_ref^(alpha_power - alpha_power_ref);&#60;/code&#62;&#60;br /&#62;
But this also did not improve the results.&#60;/p&#62;
&#60;p&#62;Lastly, I did double check the simple model another time. But since the amplitude reduction fits really well to the values of the lab measurements on the sample, I am currently a little bit confused.&#60;/p&#62;
&#60;p&#62;If by any chance, you have the time to look on my code I uploaded it here (since it is rather long):&#60;br /&#62;
&#60;a href=&#34;https://git.rwth-aachen.de/frechen/US_Simulation&#34; rel=&#34;nofollow&#34;&#62;https://git.rwth-aachen.de/frechen/US_Simulation&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Best regards&#60;br /&#62;
Henning
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Modeling ultrasonic absorption with varying alpha power"</title>
			<link>http://www.k-wave.org/forum/topic/modeling-ultrasonic-absorption-with-varying-alpha-power#post-6154</link>
			<pubDate>Thu, 19 Oct 2017 09:20:05 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6154@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Henning,&#60;/p&#62;
&#60;p&#62;If you are modelling very high attenuation values, you need to adjust the parameters you input into k-Wave. You can get the adjusted values using the function &#60;code&#62;fitPowerLawParams&#60;/code&#62;. There is an example of this &#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2014-Treeby-JASA.pdf&#34;&#62;here&#60;/a&#62; (see Fig. 2). However, this is not going to change the amplitude by four orders of magnitude. Have you double checked against your simple model when no attenuation is included?&#60;/p&#62;
&#60;p&#62;You are correct that only one power law can be used. One option is to then adjust the alpha_coeff parameters for the other layers so you can get the correct absorption at a particular frequency, e.g., &#60;/p&#62;
&#60;p&#62;&#60;code&#62;alpha_coeff_new = alpha_coeff * f_ref^(alpha_power - alpha_power_ref);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;In principle, it is possible to have spatially varying alpha_power, however, this means we would have to compute the inverse transform using a spatially-weighted Fourier transform, which has to be implemented as a matrix multiplication rather than an FFT (the same holds for the k-space operator). We don't have any immediate plans to do this. Although at some point we might add it as an option.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>H_Frechen on "Modeling ultrasonic absorption with varying alpha power"</title>
			<link>http://www.k-wave.org/forum/topic/modeling-ultrasonic-absorption-with-varying-alpha-power#post-6147</link>
			<pubDate>Tue, 10 Oct 2017 14:51:34 +0000</pubDate>
			<dc:creator>H_Frechen</dc:creator>
			<guid isPermaLink="false">6147@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I have a setup, where I measure and simulate ultrasonics on multi-layer polymeric structures. The materials can have high attenuation coefficients, e.g y = 1.18, alpha_coeff = 4 dB/(MHz^y*cm) or even higher. Furthermore the exponent is not always the same for all materials. For my larger samples (d=20.5 mm) I expected an amplitude reduction of the initial 5 MHz impulse based on the acoustical paramters of the main material:&#60;br /&#62;
alpha = 4*5^1.18 = 26.7 dB/cm&#60;br /&#62;
Resulting amplitude reduction ca. 110 dB (alpha*2*d)&#60;/p&#62;
&#60;p&#62;For verification, I first compared measurement results with a simple A-Scan model, where a plane wave and just reflection/transmission and attenuation coefficients of the different layers are taken into account (cf. H. Azhari, Basics of biomedical ultrasound for engineers). I could get a good agreement for the amplitude reduction, i.e. the amplitude of a reflection at an inner interface is in the range of 5e-6 compared to the reflection on the surface of the sample (amplitude normalized to 1). But this simplified model of course does not contain a frequency dependent attenuation. Thus, the shape of the measured and simulated signal differed greatly.&#60;/p&#62;
&#60;p&#62;After that I performed 1D and 3D k-wave simulations with the same sample setup and acoustical parameters. CFL was varied down to 0.1. In all cases I could achieve a frequency dependent attenuation and the signal shape showed an improved resemblance to the measured signal. But the amplitude of the k-wave simulated signal is in the range of 2e-2, which is four orders of magnitude larger than the measurement/simplified model results.&#60;/p&#62;
&#60;p&#62;Therefore three questions:&#60;br /&#62;
1.) In many comments it was written, that the k-wave toolbox may not function properly at high attenuation values. Could this already be the explanation for the amplitude difference?&#60;br /&#62;
2.) The alpha_power exponent can only be put as a scalar for the whole domain. Since the materials in the domain have different exponents, I chose the exponent of the material of the thickest layer in the domain. All other attenuation coefficients are therefore slightly off (e.g. y1 = 1.18, y2 = 1.01). Is there any experience how large the effect of different exponents is?&#60;br /&#62;
3.) Will a variation of the alpha_power exponent across the simulation domain be possible in the future?&#60;/p&#62;
&#60;p&#62;Kind regards&#60;br /&#62;
Henning
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
