<?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: Pressure starting value and how to increase the frequency range of simulation</title>
		<link>http://www.k-wave.org/forum/topic/pressure-starting-value-and-how-to-increase-the-frequency-range-of-simulation</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 03:13:17 +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/pressure-starting-value-and-how-to-increase-the-frequency-range-of-simulation" rel="self" type="application/rss+xml" />

		<item>
			<title>manuelbcabo on "Pressure starting value and how to increase the frequency range of simulation"</title>
			<link>http://www.k-wave.org/forum/topic/pressure-starting-value-and-how-to-increase-the-frequency-range-of-simulation#post-5768</link>
			<pubDate>Fri, 25 Nov 2016 15:40:23 +0000</pubDate>
			<dc:creator>manuelbcabo</dc:creator>
			<guid isPermaLink="false">5768@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks for the reply Brad, I know that I can increase the f_max value, but I obtain a  pressure greater than amplitude of pressure  that I put theoretically in input signal, even if I consider dirichlet condition in source.p_mode option.&#60;/p&#62;
&#60;p&#62;Manu
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Pressure starting value and how to increase the frequency range of simulation"</title>
			<link>http://www.k-wave.org/forum/topic/pressure-starting-value-and-how-to-increase-the-frequency-range-of-simulation#post-5767</link>
			<pubDate>Fri, 25 Nov 2016 13:51:17 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5767@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;HI manuelbcabo,&#60;/p&#62;
&#60;p&#62;You can increase the maximum frequency by increasing the value of &#60;code&#62;f_max&#60;/code&#62; in your code. &#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>manuelbcabo on "Pressure starting value and how to increase the frequency range of simulation"</title>
			<link>http://www.k-wave.org/forum/topic/pressure-starting-value-and-how-to-increase-the-frequency-range-of-simulation#post-5758</link>
			<pubDate>Tue, 22 Nov 2016 14:31:00 +0000</pubDate>
			<dc:creator>manuelbcabo</dc:creator>
			<guid isPermaLink="false">5758@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello all, &#60;/p&#62;
&#60;p&#62;I've seen that some people asked before me for this topic but I don't find the correct solution that works for me.&#60;/p&#62;
&#60;p&#62;I'm trying to obtain a relation among radius of radiating surface and parametric difference non linear beam generation.&#60;br /&#62;
I've two main question about code that I show below.&#60;/p&#62;
&#60;p&#62;- I obtain a pressure of total beam pattern greater than I putted like a entry in my code. I've read in this  forum  that  probably  this  can be  solved  using dirichlet option in source.p_mode but do not work in my case (Probably I miss something..). In any case I solved this problem finding a relationship between dx &#38;amp; dy and Nx &#38;amp; Ny.&#60;br /&#62;
How can I  solved this problem ?&#60;/p&#62;
&#60;p&#62;- With this relation that I found the maximum frequency that I can simulate is ~ 300kHz that is enough for difference frequency non linear beam but I would like observe also 2·f2 beam.&#60;br /&#62;
How can I increase the frequency range validity of the simulation without losing  good amplitude of pressure emitted (in order  to  no obtain greater amplitude that I putted like amplitude of bifrequency signal). &#60;/p&#62;
&#60;p&#62;I put my code below.&#60;/p&#62;
&#60;p&#62;Thanks in advance for your help. &#60;/p&#62;
&#60;p&#62;Cheers &#60;/p&#62;
&#60;p&#62;***************************************************************************************&#60;/p&#62;
&#60;p&#62;Amp = [100 1000 10000 100000 500000 750000 1000000 2000000 3000000 4000000 5000000];&#60;/p&#62;
&#60;p&#62;for i = 1:11&#60;/p&#62;
&#60;p&#62;USE_STATISTICS = false;&#60;/p&#62;
&#60;p&#62;f_max = 170000;&#60;br /&#62;
c0_min = 1482;&#60;br /&#62;
points_per_wavelength = 3.5;&#60;br /&#62;
x_size = 0.25;&#60;br /&#62;
y_size = 0.5;&#60;/p&#62;
&#60;p&#62;dx = (c0_min/(points_per_wavelength*f_max));&#60;br /&#62;
Nx = round(x_size/dx);&#60;br /&#62;
dy = (c0_min/(points_per_wavelength*f_max));&#60;br /&#62;
Ny = round(y_size/dy);&#60;/p&#62;
&#60;p&#62;kgrid = makeGrid(Nx, dx, Ny, dy);&#60;br /&#62;
[kgrid.t_array, dt] = makeTime(kgrid, c0_min)&#60;/p&#62;
&#60;p&#62;medium.sound_speed = 1482*ones(Nx, Ny); % [m/s]&#60;br /&#62;
medium.density = 1000*ones(Nx, Ny); % [kg/m^3] &#60;/p&#62;
&#60;p&#62;att1 = 2.17e-3; %Attenuation dB/cm·MHz2&#60;br /&#62;
medium.alpha_coeff=att1*ones(Nx, Ny);&#60;br /&#62;
medium.alpha_power=2;&#60;br /&#62;
medium.BonA = 4.96;&#60;/p&#62;
&#60;p&#62;radio_dist = 0.0375;&#60;br /&#62;
r = radio_dist/dx;&#60;br /&#62;
em_pos_y = round(0.01/dy);&#60;br /&#62;
source.p_mask = zeros(Nx, Ny);&#60;br /&#62;
source.p_mask(round((Nx/2)-r):round((Nx/2)+r),em_pos_y) = 1;&#60;/p&#62;
&#60;p&#62;f1 = 120000;&#60;br /&#62;
f2 = 170000;&#60;/p&#62;
&#60;p&#62;Mag_Pa = Amp(i);&#60;br /&#62;
signal = Mag_Pa.*(0.5.*sin(2*pi*f1.*kgrid.t_array) + 0.5.*sin(2*pi*f2.*kgrid.t_array));&#60;br /&#62;
source.p = signal;&#60;br /&#62;
source.p_mode = 'dirichlet';&#60;br /&#62;
source.p = signal(1:375);&#60;br /&#62;
source.p = filterTimeSeries(kgrid, medium, source.p);&#60;/p&#62;
&#60;p&#62;%% Define a Cartesian sensor mask Directividad&#60;/p&#62;
&#60;p&#62;sensor.mask = [1, 1, Nx, Ny].';&#60;/p&#62;
&#60;p&#62;sensor.record = {'p','p_max'};&#60;br /&#62;
input_args = { 'DisplayMask', source.p_mask, 'RecordMovie', true, 'MovieType', 'image', 'MovieName', 'Directividad_Piston_2D', 'PMLInside', false, 'PlotScale', [-Mag_Pa-0.2*Mag_Pa, Mag_Pa+0.2*Mag_Pa]};&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor,input_args{:});&#60;/p&#62;
&#60;p&#62;% Post-Procesado&#60;/p&#62;
&#60;p&#62;[freq, amp_spect] = spect(sensor_data.p, 1/dt, 'Dim', 3);&#60;/p&#62;
&#60;p&#62;%Compute and plot the fundamental beam&#60;br /&#62;
 [f1_value, f1_index] = findClosest(freq, f1);&#60;/p&#62;
&#60;p&#62; beam_pattern_f1 = amp_spect(:, :, f1_index);&#60;/p&#62;
&#60;p&#62;figure;&#60;br /&#62;
 subplot(2,2,1); imagesc((kgrid.y_vec+max(kgrid.y_vec)).*100, (kgrid.x_vec+max(kgrid.x_vec)).*100, sensor_data.p_max);&#60;br /&#62;
 colormap(jet(1024));&#60;br /&#62;
 colorbar&#60;br /&#62;
 ylabel('x-position [cm]');&#60;br /&#62;
 xlabel('y-position [cm]');&#60;br /&#62;
title('Total Beam Pattern');&#60;br /&#62;
 axis image;&#60;/p&#62;
&#60;p&#62;%Compute and plot the difference beam&#60;br /&#62;
diff_freq = f2-f1;&#60;br /&#62;
[f2_value, f2_index] = findClosest(freq, diff_freq);&#60;/p&#62;
&#60;p&#62;beam_pattern_f2 = amp_spect(:, :, f2_index);&#60;/p&#62;
&#60;p&#62;subplot(2,2,2);imagesc((kgrid.y_vec+max(kgrid.y_vec)).*100, (kgrid.x_vec+max(kgrid.x_vec)).*100, beam_pattern_f2, [0 0.025*Mag_Pa]);&#60;br /&#62;
colormap(jet(1024));&#60;br /&#62;
colorbar&#60;br /&#62;
ylabel('x-position [cm]');&#60;br /&#62;
xlabel('y-position [cm]');&#60;br /&#62;
axis image;&#60;br /&#62;
title('f_2-f_1 Beam Pattern');&#60;/p&#62;
&#60;p&#62;%Compute and plot the difference beam&#60;br /&#62;
diff2_freq = 2*f1;&#60;br /&#62;
[f3_value, f3_index] = findClosest(freq, diff2_freq);&#60;/p&#62;
&#60;p&#62;beam_pattern_f3 = amp_spect(:, :, f3_index);&#60;/p&#62;
&#60;p&#62;subplot(2,2,3);imagesc((kgrid.y_vec+max(kgrid.y_vec)).*100, (kgrid.x_vec+max(kgrid.x_vec)).*100, beam_pattern_f3);&#60;br /&#62;
colormap(jet(1024));&#60;br /&#62;
colorbar&#60;br /&#62;
ylabel('x-position [cm]');&#60;br /&#62;
xlabel('y-position [cm]');&#60;br /&#62;
axis image;&#60;br /&#62;
title('2·f1 Beam Pattern');&#60;/p&#62;
&#60;p&#62;%Compute and plot the difference beam &#60;/p&#62;
&#60;p&#62;f1_f2_freq = f1+f2;&#60;br /&#62;
[f4_value, f4_index] = findClosest(freq, f1_f2_freq);&#60;/p&#62;
&#60;p&#62;beam_pattern_f4 = amp_spect(:, :, f4_index);&#60;/p&#62;
&#60;p&#62;subplot(2,2,4);imagesc((kgrid.y_vec+max(kgrid.y_vec)).*100, (kgrid.x_vec+max(kgrid.x_vec)).*100, beam_pattern_f4);&#60;br /&#62;
colormap(jet(1024));&#60;br /&#62;
colorbar&#60;br /&#62;
ylabel('x-position [cm]');&#60;br /&#62;
xlabel('y-position [cm]');&#60;br /&#62;
axis image;&#60;br /&#62;
title('f1 + f2 Beam Pattern');&#60;/p&#62;
&#60;p&#62;end
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
