<?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: How to obtain harmonic components</title>
		<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 00:19:04 +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/how-to-obtain-harmonic-components" rel="self" type="application/rss+xml" />

		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7670</link>
			<pubDate>Sun, 28 Jun 2020 02:42:26 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7670@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;br /&#62;
   Thanks for your quick reply. I saw it early this morning.I want to make it clear that the first problem is actually what I saw in example_us_beam_patterns. M from the Kwave example, and the details are as follows:&#60;br /&#62;
% reshape the sensor data to its original position so that it can be&#60;br /&#62;
% indexed as sensor_data(x, j, t)&#60;br /&#62;
sensor_data = reshape(sensor_data, [Nx, Nj, kgrid.Nt]);&#60;/p&#62;
&#60;p&#62;% compute the amplitude spectrum&#60;br /&#62;
[freq, amp_spect] = spect(sensor_data, 1/kgrid.dt, 'Dim', 3);&#60;/p&#62;
&#60;p&#62;% compute the index at which the source frequency and its harmonics occur&#60;br /&#62;
[f1_value, f1_index] = findClosest(freq, tone_burst_freq);&#60;br /&#62;
[f2_value, f2_index] = findClosest(freq, 2 * tone_burst_freq);&#60;/p&#62;
&#60;p&#62;% extract the amplitude at the source frequency and store&#60;br /&#62;
beam_pattern_f1 = amp_spect(:, :, f1_index);&#60;/p&#62;
&#60;p&#62;% extract the amplitude at the second harmonic and store&#60;br /&#62;
beam_pattern_f2 = amp_spect(:, :, f2_index);       &#60;/p&#62;
&#60;p&#62;% extract the integral of the total amplitude spectrum&#60;br /&#62;
beam_pattern_total = sum(amp_spect, 3);&#60;/p&#62;
&#60;p&#62;% plot the beam patterns&#60;br /&#62;
figure;&#60;br /&#62;
imagesc(j_vec * 1e3, (kgrid.x_vec - min(kgrid.x_vec(:))) * 1e3, beam_pattern_f1 * 1e-3);&#60;br /&#62;
xlabel([j_label '-position [mm]']);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
title('Beam Pattern At Source Fundamental');&#60;br /&#62;
colormap(jet(256));&#60;br /&#62;
c = colorbar;&#60;br /&#62;
ylabel(c, 'Pressure [kPa]');&#60;br /&#62;
axis image;&#60;/p&#62;
&#60;p&#62;figure;&#60;br /&#62;
imagesc(j_vec * 1e3, (kgrid.x_vec - min(kgrid.x_vec(:))) * 1e3, beam_pattern_f2 * 1e-3);&#60;br /&#62;
xlabel([j_label '-position [mm]']);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
title('Beam Pattern At Second Harmonic');&#60;br /&#62;
colormap(jet(256));&#60;br /&#62;
c = colorbar;&#60;br /&#62;
ylabel(c, 'Pressure [kPa]');&#60;br /&#62;
axis image;&#60;/p&#62;
&#60;p&#62;figure;&#60;br /&#62;
imagesc(j_vec * 1e3, (kgrid.x_vec - min(kgrid.x_vec(:))) * 1e3, beam_pattern_total * 1e-6);&#60;br /&#62;
xlabel([j_label '-position [mm]']);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
title('Total Beam Pattern Using Integral Of Recorded Pressure');&#60;br /&#62;
colormap(jet(256));&#60;br /&#62;
c = colorbar;&#60;br /&#62;
ylabel(c, 'Pressure [MPa]');&#60;br /&#62;
axis image;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% PLOT DIRECTIVITY PATTERN AT FOCUS&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% compute the directivity at each of the harmonics&#60;br /&#62;
directivity_f1 = squeeze(beam_pattern_f1(round(transducer.focus_distance/dx), :));&#60;br /&#62;
directivity_f2 = squeeze(beam_pattern_f2(round(transducer.focus_distance/dx), :));&#60;/p&#62;
&#60;p&#62;% normalise&#60;br /&#62;
directivity_f1 = directivity_f1 ./ max(directivity_f1(:));&#60;br /&#62;
directivity_f2 = directivity_f2 ./ max(directivity_f2(:));&#60;/p&#62;
&#60;p&#62;% compute relative angles from transducer&#60;br /&#62;
if strcmp(MASK_PLANE, 'xy')&#60;br /&#62;
    horz_axis = ((1:Ny) - Ny/2) * dy;&#60;br /&#62;
else&#60;br /&#62;
    horz_axis = ((1:Nz) - Nz/2) * dz;&#60;br /&#62;
end&#60;br /&#62;
angles = 180 * atan2(horz_axis, transducer.focus_distance) / pi;&#60;/p&#62;
&#60;p&#62;% plot the directivity&#60;br /&#62;
figure;&#60;br /&#62;
plot(angles, directivity_f1, 'k-', angles, directivity_f2, 'k--');&#60;br /&#62;
axis tight;&#60;br /&#62;
xlabel('Angle [deg]');&#60;br /&#62;
ylabel('Normalised Amplitude');&#60;br /&#62;
legend('Fundamental', 'Second Harmonic', 'Location', 'NorthWest'); &#60;/p&#62;
&#60;p&#62;For the second question, I don't know how to upload photos, please forgive me.&#60;br /&#62;
Is my with phased array (in water) emission is focused on the sound waves, respectively by fat and muscle, focus of sound waves in the waters, result in focus position I saw there was a shock (axial and radial pressure curve, the focus position there will be a small dent or bulging xiao feng), I am using p_max or p_min records of axial pressure curve, has this kind of phenomenon, if I use p_rms is very smooth.&#60;br /&#62;
I don't quite understand,Hope to get your answer.&#60;br /&#62;
jackYANG
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7669</link>
			<pubDate>Sat, 27 Jun 2020 20:20:53 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7669@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Jack,&#60;/p&#62;
&#60;p&#62;Unless I'm missing something, your code (1) above does not compute the root-mean-square of the pressure field. In general though, the &#60;code&#62;p_rms&#60;/code&#62; is probably not the most useful measure if you are simulating nonlinear fields. Another unrelated point, I'm assuming you have reshaped &#60;code&#62;sensor_data.p&#60;/code&#62;. If not, the time dimension when using a binary or Cartesian sensor mask is dim 2 not dim 3.&#60;/p&#62;
&#60;p&#62;I don't understand your second question I'm afraid.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7664</link>
			<pubDate>Sat, 27 Jun 2020 14:16:16 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7664@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi brad,&#60;br /&#62;
I'm excited to see you answering our learner's questions.I would like to ask what is the difference between the two kinds of calculation of RMS sound pressure, I clearly see in my simulation results that these two kinds of calculation results are very different,I would like to ask what is the difference between the two kinds of calculation of RMS sound pressure, I clearly see in my simulation results that these two kinds of calculation results are very different.&#60;br /&#62;
1&#60;br /&#62;
[freq, amp_spect] = spect(sensor_data.p, 1/kgrid.dt, 'Dim', 3);&#60;br /&#62;
[f11_value, f11_index] = findClosest(freq, tone_burst_freq);&#60;br /&#62;
[f12_value, f12_index] = findClosest(freq, 2 * tone_burst_freq);&#60;br /&#62;
beam_pattern_total = sum(amp_spect, 3);&#60;br /&#62;
2&#60;br /&#62;
sensor.record={'p_rms'};&#60;/p&#62;
&#60;p&#62;I would like to ask you another question, why I simulate the acoustic axis (radial) sound pressure curve with P_max and P_min after the phased array focused ultrasound passes through two layers of tissue (fat and muscle), and the focus will be oscillated, as if the waveform is distorted
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7610</link>
			<pubDate>Sat, 13 Jun 2020 14:00:44 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7610@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Ps:f0=1MHz,fmax=5MHz,I am sure that there is a strong nonlinear change at the focal point and that the spectrum analysis at the focal point yields a normal distribution (1-5mhz)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7609</link>
			<pubDate>Sat, 13 Jun 2020 13:57:15 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7609@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;br /&#62;
This is  my code. I hope you can take some time to help me analyze it. Thank you very much for your help and kindness in learning Kwave.&#60;br /&#62;
clc;&#60;br /&#62;
clear all;&#60;br /&#62;
close all;&#60;br /&#62;
DATA_CAST = 'single';       % set to 'single' or 'gpuArray-single' to speed up computations&#60;br /&#62;
MASK_PLANE = 'xz';          % set to 'xy' or 'xz' to generate the beam pattern in different planes&#60;br /&#62;
USE_STATISTICS = true;      % set to true to compute the rms or peak beam patterns, set to false to compute the harmonic beam patterns&#60;br /&#62;
% =========================================================================&#60;br /&#62;
% SIMULATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% 创建完美匹配层(PML)&#60;br /&#62;
PML_X_SIZE = 10;            % [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;Nx = 430;           % number of grid points in the x (row) direction&#60;br /&#62;
Ny =430;           % number of grid points in the y (column) direction&#60;br /&#62;
Nz =430;&#60;br /&#62;
% x_size=72e-3;&#60;br /&#62;
dx = 0.15e-3;    	% grid point spacing in the x direction [m]&#60;br /&#62;
dy = dx;            % grid point spacing in the y direction [m]&#60;br /&#62;
dz = dx;&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx, Ny, dy, Nz, dz);&#60;br /&#62;
% 定义传播介质的属性&#60;/p&#62;
&#60;p&#62;medium.sound_speed = 1500*ones(Nx,Ny,Nz) ; % [m/s] 2nd&#60;br /&#62;
medium.alpha_coeff = 0.0022*ones(Nx,Ny,Nz); % [dB/(MHz^y cm)] 2nd&#60;br /&#62;
medium.density = 1000*ones(Nx,Ny,Nz); % [kg/m^3] 2nd&#60;/p&#62;
&#60;p&#62;% medium.sound_speed(:,:,60:70) = 1615 ; % [m/s] 1st 101&#60;br /&#62;
% medium.density(:,:,60:70) = 1090; % [kg/m^3] 1st&#60;br /&#62;
% medium.alpha_coeff(:,:,60:70)=1.8 ; % [dB/(MHz^y cm)] 1st&#60;/p&#62;
&#60;p&#62;medium.sound_speed(:,:,100:300) = 1479 ; % [m/s] 1st 101&#60;br /&#62;
medium.density(:,:,100:300) = 928; % [kg/m^3] 1st&#60;br /&#62;
medium.alpha_coeff(:,:,100:300)=0.6 ; % [dB/(MHz^y cm)] 1st&#60;br /&#62;
%&#60;br /&#62;
medium.sound_speed(:,:,301:end) = 1588 ; % [m/s] 1st 101&#60;br /&#62;
medium.density(:,:,301:end) = 1130; % [kg/m^3] 1st&#60;br /&#62;
medium.alpha_coeff(:,:,301:end)=0.7; % [dB/(MHz^y cm)] 1st&#60;br /&#62;
%&#60;br /&#62;
medium.alpha_power = 2;&#60;br /&#62;
medium.BonA=zeros(Nx,Ny,Nz);&#60;br /&#62;
medium.BonA = 5*ones(Nx,Ny,Nz);&#60;br /&#62;
medium.BonA(:,:,100:300) =10;&#60;br /&#62;
medium.BonA(:,:,301:end)=7.8;&#60;br /&#62;
% medium.BonA=18*ones(Nx,Ny,Nz);&#60;br /&#62;
% kgrid.t_array = 0:2e-8:2.352e-5;&#60;br /&#62;
% dt=2e-8;&#60;br /&#62;
% Nt=1176;&#60;br /&#62;
% kgrid.t_array=0:dt:Nt;&#60;br /&#62;
kgrid.makeTime(medium.sound_speed);&#60;/p&#62;
&#60;p&#62;%% creat element&#60;br /&#62;
diameter = 60*1e-3;&#60;br /&#62;
radius = 60*1e-3;&#60;br /&#62;
center_pos = [1,1,0.05]*(dx*Nx)/2;&#60;br /&#62;
num_per_loop = [4,8,12,16,24];&#60;br /&#62;
number_element = sum(num_per_loop);&#60;br /&#62;
bowl_pos  = makeCartLoopBowl(diameter,radius, center_pos,num_per_loop, true);&#60;/p&#62;
&#60;p&#62;%% mask setting&#60;br /&#62;
source.p_mask = zeros(Nx,Ny,Nz);&#60;br /&#62;
bowl_pos_n = round(bowl_pos/dx);&#60;br /&#62;
for j = 1:number_element&#60;br /&#62;
    source.p_mask(bowl_pos_n(1,j),bowl_pos_n(2,j),bowl_pos_n(3,j))=1;&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;%% create the input signal using toneBurst&#60;br /&#62;
source_strength = 1e6;          % [Pa]&#60;br /&#62;
tone_burst_freq = 1e6 ;     % [Hz]&#60;br /&#62;
tone_burst_cycles = 5;&#60;br /&#62;
input_signal = source_strength*toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles,'SignalLength',kgrid.Nt);&#60;br /&#62;
source.p = input_signal;&#60;br /&#62;
% source.p_mode='additive';&#60;br /&#62;
source.p_mode='dirichlet';&#60;br /&#62;
%% caltuate phase_control delay time&#60;br /&#62;
sound_speed =1500;&#60;br /&#62;
focus_position = [0 ,0, 0.0294]; %笛卡尔坐标表示&#60;br /&#62;
input_signal_mat = focus(kgrid, source.p, source.p_mask, focus_position, sound_speed);&#60;br /&#62;
row = find(source.p_mask==1);&#60;br /&#62;
source.p = input_signal_mat;&#60;/p&#62;
&#60;p&#62;%% creat area elemrnt&#60;br /&#62;
bowl_pos            = round(bowl_pos'/dx);&#60;br /&#62;
radius              = 400;&#60;br /&#62;
diameter            = 41;&#60;br /&#62;
focus_pos           = [216, 216, 412];&#60;br /&#62;
grid_size = [Nx,Ny,Nz];&#60;br /&#62;
[bowl_pos,bowls_labelled] = makeMultiBowl(grid_size, bowl_pos, radius, diameter, focus_pos, 'Plot', true);&#60;br /&#62;
%source.p_mask = zeros(Nx, Ny,Nz);&#60;br /&#62;
%[grid_data, order_index, reorder_index] = cart2grid(kgrid, sensor.mask);&#60;br /&#62;
source.p_mask=bowl_pos;&#60;/p&#62;
&#60;p&#62;%% apply the signal in the area element&#60;br /&#62;
num = find(source.p_mask==1);&#60;br /&#62;
input_signal_mat = input_signal_mat(:,1:kgrid.Nt);&#60;br /&#62;
input_signal_new = [];&#60;br /&#62;
input_signal_spread = zeros(length(num),kgrid.Nt);&#60;br /&#62;
for j = 1:number_element&#60;br /&#62;
    ind = find(bowls_labelled==j);&#60;br /&#62;
    index_element = length(ind);&#60;br /&#62;
    index_row = [];&#60;br /&#62;
    for i = 1:index_element&#60;br /&#62;
        index_label = find(abs(row - ind(i))&#38;lt;=2);&#60;br /&#62;
        index_row = [index_row;index_label];&#60;br /&#62;
    end&#60;/p&#62;
&#60;p&#62;    index_row = index_row(1);&#60;br /&#62;
    input_signal_new = [input_signal_new;input_signal_mat(index_row,:)];&#60;br /&#62;
end&#60;br /&#62;
for j = 1:number_element&#60;br /&#62;
    ind = find(bowls_labelled==j);&#60;br /&#62;
    index_element = length(ind);&#60;br /&#62;
    for i = 1:index_element&#60;br /&#62;
        cal = find(abs(num-ind(i))&#38;lt;1);&#60;br /&#62;
        input_signal_spread(cal(1),:) = input_signal_new(j,:);&#60;br /&#62;
    end&#60;br /&#62;
end&#60;br /&#62;
source.p = input_signal_spread;&#60;br /&#62;
% source.p_mode='additive';&#60;br /&#62;
source.p_mode='dirichlet';&#60;br /&#62;
sensor.mask= zeros(Nx, Ny,Nz);&#60;/p&#62;
&#60;p&#62;switch MASK_PLANE&#60;br /&#62;
    case 'xy'&#60;/p&#62;
&#60;p&#62;        % 定义掩膜&#60;br /&#62;
        sensor.mask(:, :, Nz/2+1) = 1;&#60;/p&#62;
&#60;p&#62;        % 存储y轴属性&#60;br /&#62;
        Nj = Ny;&#60;br /&#62;
        j_vec = kgrid.y_vec;&#60;br /&#62;
        j_label = 'y';&#60;/p&#62;
&#60;p&#62;    case 'xz'&#60;/p&#62;
&#60;p&#62;        % 定义掩膜&#60;br /&#62;
        sensor.mask(:, Ny/2+1, :) = 1;&#60;/p&#62;
&#60;p&#62;        % 存储z轴属性&#60;br /&#62;
        Nj = Nz;&#60;br /&#62;
        j_vec = kgrid.z_vec;&#60;br /&#62;
        j_label = 'z';&#60;/p&#62;
&#60;p&#62;end&#60;br /&#62;
input_args = {'PMLInside', false, 'PlotPML', false, 'PMLSize', [PML_X_SIZE, PML_Y_SIZE, PML_Z_SIZE],'PlotLayout',false, 'Smooth',[true,true,true], 'PlotPML', false,'PlotScale',[-source_strength,source_strength]};&#60;br /&#62;
% run the simulation&#60;br /&#62;
sensor.record={'p_max','p','p_rms','p_final','p_min'};&#60;br /&#62;
sensor_data = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});&#60;br /&#62;
sensor_data.p= reshape(sensor_data.p, [Nx, Nz,kgrid.Nt]);&#60;br /&#62;
p1 = zeros(1,kgrid.Nt);&#60;br /&#62;
p1 = reshape(sensor_data.p(216,412,:),[1,kgrid.Nt]);&#60;br /&#62;
spect(p1,1/kgrid.dt,'Plot',true)&#60;/p&#62;
&#60;p&#62;if USE_STATISTICS&#60;/p&#62;
&#60;p&#62;    sensor_data.p_rms = reshape(sensor_data.p_rms, [Nx, Nz]);&#60;br /&#62;
    sensor_data.p_max = reshape(sensor_data.p_max, [Nx, Nz]);&#60;br /&#62;
    sensor_data.p_min = reshape(sensor_data.p_min, [Nx, Nz]);&#60;/p&#62;
&#60;p&#62;    figure(1);&#60;br /&#62;
    imagesc(j_vec * 1e3, (kgrid.x_vec - min(kgrid.x_vec(:))) * 1e3, sensor_data.p_max * 1e-6);&#60;br /&#62;
    xlabel([j_label '-position [mm]']);&#60;br /&#62;
    ylabel('x-position [mm]');&#60;br /&#62;
    title('Total Beam Pattern Using Maximum Of Recorded Pressure');&#60;br /&#62;
    colormap(jet(256));&#60;br /&#62;
    c = colorbar;&#60;br /&#62;
    ylabel(c, 'Pressure [MPa]');&#60;br /&#62;
    axis image&#60;/p&#62;
&#60;p&#62;    figure(2);&#60;br /&#62;
    imagesc(j_vec * 1e3, (kgrid.x_vec - min(kgrid.x_vec(:))) * 1e3, sensor_data.p_rms * 1e-6);&#60;br /&#62;
    xlabel([j_label '-position [mm]']);&#60;br /&#62;
    ylabel('x-position [mm]');&#60;br /&#62;
    title('Total Beam Pattern Using RMS Of Recorded Pressure');&#60;br /&#62;
    colormap(jet(256));&#60;br /&#62;
    c = colorbar;&#60;br /&#62;
    ylabel(c, 'Pressure [MPa]');&#60;br /&#62;
    axis image;&#60;/p&#62;
&#60;p&#62;    figure(3);&#60;br /&#62;
    imagesc(j_vec * 1e3, (kgrid.x_vec - min(kgrid.x_vec(:))) * 1e3, sensor_data.p_min * 1e-6);&#60;br /&#62;
    xlabel([j_label '-position [mm]']);&#60;br /&#62;
    ylabel('x-position [mm]');&#60;br /&#62;
    title('Total Beam Pattern Using p_min Of Recorded Pressure');&#60;br /&#62;
    colormap(jet(256));&#60;br /&#62;
    c = colorbar;&#60;br /&#62;
    ylabel(c, 'Pressure [MPa]');&#60;br /&#62;
    axis image;&#60;/p&#62;
&#60;p&#62;    return&#60;br /&#62;
    end
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7608</link>
			<pubDate>Sat, 13 Jun 2020 13:28:15 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7608@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi jackYANG,&#60;/p&#62;
&#60;p&#62;It's impossible to say without studying the problem in some detail, which unfortunately I don't have capacity to do. The only things I can suggest are that you (1) setup a simple scenario and compare with analytical solutions to make sure you are using k-Wave correctly, and (2) run a proper convergence test (e.g., decreasing the grid spacing and CFL) to make sure you can trust your numerical results for the more complicated case.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7607</link>
			<pubDate>Sat, 13 Jun 2020 13:24:48 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7607@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;br /&#62;
I hope you can see the question.I recently reduced the DX by a factor of 0.15E-3m, equivalent to one-tenth of the wavelength. I used FCous function to conduct the in-water focus under linear conditions, and the focus shift position was 0.3mm. When I added tissue, the focus shift position was 0.8mm,do you find it credible?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7577</link>
			<pubDate>Sun, 07 Jun 2020 03:58:21 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7577@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;br /&#62;
   First of all, thank you for your answer.In fact,I am trying to exactly replicate a published paper,but the approach is slightly different,in the published paper is FDTD,but I wanted to do it with the KWAVE (PSTD),then observe the effect of some parameters on the focus shift and sound field method,But I did change a lot of the parameters and didn't get a deviation of around 3mm (actually only around 0.3mm).Other sound field patterns seem to be consistent.I'm now running the reduced dx case to allow more harmonics to pass through, hopefully to see what I want to see, by the way, do you have any questions or Suggestions about the code that I sent you in the program.Finally, thank you for your patience and for your guidance.&#60;/p&#62;
&#60;p&#62;   jackYANG
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7566</link>
			<pubDate>Sat, 06 Jun 2020 18:08:25 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7566@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;HI jackYANG,&#60;/p&#62;
&#60;p&#62;Any shifts in the focus will depend on many factors, including the exact geometry, sound speed, level of nonlinearity, etc. You can definitely use k-Wave to simulate the shift in focus due to nonlinearity, although the shift is very small if the nonlinearity is weak (your reported grid parameters only let you simulate the second harmonic). Are you trying to exactly replicate a published paper, or just observe these shifts in general? &#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7531</link>
			<pubDate>Wed, 27 May 2020 15:10:27 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7531@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;hello Brad and the others,&#60;br /&#62;
I really hope someon e can help me understand and solve this problem,I've been working on this problem for a few days,my biological tissue(fat and muscle) parameters are as follows:&#60;br /&#62;
medium.sound_speed = 1500*ones(Nx,Ny,Nz) ; % [m/s] 2nd&#60;br /&#62;
medium.alpha_coeff = 0.0022*ones(Nx,Ny,Nz); % [dB/(MHz^y cm)] 2nd&#60;br /&#62;
medium.density = 1000*ones(Nx,Ny,Nz); % [kg/m^3] 2nd&#60;/p&#62;
&#60;p&#62;medium.sound_speed(:,:,80:150) = 1478 ; % [m/s] 1st 101&#60;br /&#62;
medium.density(:,:,80:150) = 925; % [kg/m^3] 1st&#60;br /&#62;
medium.alpha_coeff(:,:,80:150)=0.6 ; % [dB/(MHz^y cm)] 1st&#60;/p&#62;
&#60;p&#62;end=240,dx=0.3e-3;&#60;br /&#62;
medium.sound_speed(:,:,151:end) = 1588 ; % [m/s] 1st&#60;br /&#62;
medium.density(:,:,151:end) = 1090; % [kg/m^3] 1st&#60;br /&#62;
medium.alpha_coeff(:,:,151:end)=0.7 ; % [dB/(MHz^y cm)] 1st&#60;/p&#62;
&#60;p&#62;medium.alpha_power = 2;&#60;br /&#62;
medium.BonA=6;&#60;br /&#62;
My transducer is a concave sphere with multiple elements(64),R=D=60mm,r=d=21*dx;&#60;br /&#62;
When I use the Fcous implementation to focus through these biological tissues,&#60;br /&#62;
the actual focus location overlaps with the default fcous_pos.&#60;br /&#62;
When I change the speed of sound of fat from 1478 to 3000, t&#60;br /&#62;
he focus position will have a big deviation of 1.3cm.I learned from relevant literature that through this fcous focusing method, the focus is generally shifted by about 0.3cm.&#60;/p&#62;
&#60;p&#62;PS:dt=60ns,Nt=1500;&#60;/p&#62;
&#60;p&#62;Another question,when I multiply media.alpha_coeff for each layer (except for the first layer) by 2 or 4,medium.alpha_power no change,according to the literature, the focus is also slightly shifted forward,but I haven't seen such a change in the kwave simulation so far,anybody know why?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7516</link>
			<pubDate>Thu, 21 May 2020 12:37:10 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7516@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;br /&#62;
   Thank you for your response.I will have a try.Now another problem began to haunt me,I used the foucs function in Kwave to focus nonlinearly on multiple layers of tissue,theoretically, due to refraction, absorption, and nonlinearity, the desired focus is shifted,however, in my simulation, a strange phenomenon occurs, that is, the actual focus and the expected focus are basically in the same position,I changed a lot of parameters, but none of them allowed me to see the shift in focus,the concave spherical multielement phased array I used, f0=1MHz,fmax= 2.5mhz.I'm looking forward to your quick answer. It's so important to me.&#60;br /&#62;
   sincerrly&#60;br /&#62;
   JackYANG
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7513</link>
			<pubDate>Thu, 21 May 2020 11:11:21 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7513@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Jack,&#60;/p&#62;
&#60;p&#62;Unfortunately, if you want to simulate high frequencies in a large domain, you need a large grid. Currently, there is no way in k-Wave to use a non-uniform grid. If your transducer and medium are axisymmetric, using the axisymmetric code will significantly reduce the computational load.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jackYANG on "How to obtain harmonic components"</title>
			<link>http://www.k-wave.org/forum/topic/how-to-obtain-harmonic-components#post-7504</link>
			<pubDate>Mon, 18 May 2020 03:12:07 +0000</pubDate>
			<dc:creator>jackYANG</dc:creator>
			<guid isPermaLink="false">7504@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,Brad,&#60;br /&#62;
   Sorry to bother you again,the simulation I'm doing right now has a wide range of domains,I want to capture more harmonic components that propagate through the grid,but this will cause my grid to be very large (2048*2048*2048),this would be an impossible task on my computer,I have tried using gpu for simulation before,but it  failed,can you tell me how to do it? Can you give me a simple actual example?In addition,I wonder in what way can I define a non-uniform grid to capture more harmonic component simulations,I hope to get your reply.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
