<?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: Fundamental Frequency Missing?</title>
		<link>http://www.k-wave.org/forum/topic/fundamental-frequency-missing</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 22:25:08 +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/fundamental-frequency-missing" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Fundamental Frequency Missing?"</title>
			<link>http://www.k-wave.org/forum/topic/fundamental-frequency-missing#post-7089</link>
			<pubDate>Fri, 18 Oct 2019 20:08:09 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7089@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Patrick,&#60;/p&#62;
&#60;p&#62;Your simulation is pretty low resolution compared to the wavelength. If you increase your grid size does the answer get closer to the analytical values?&#60;/p&#62;
&#60;p&#62;Note, k-Wave sometimes struggles modelling transitions to air. You could try artificially increasing the density to 10 (or even 100). The reflection coefficient will still be close to -1, but you can use a much larger time step.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Patrick on "Fundamental Frequency Missing?"</title>
			<link>http://www.k-wave.org/forum/topic/fundamental-frequency-missing#post-7059</link>
			<pubDate>Thu, 26 Sep 2019 03:18:59 +0000</pubDate>
			<dc:creator>Patrick</dc:creator>
			<guid isPermaLink="false">7059@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Here is a more complete graph showing the expected frequencies of a 6.7cm cavity of water alongside the k-Wave model: &#60;a href=&#34;https://drive.google.com/file/d/1T_g7Mh9zK2TA5fSIWBU2bxTrxEGuKWJa/view?usp=sharing&#34; rel=&#34;nofollow&#34;&#62;https://drive.google.com/file/d/1T_g7Mh9zK2TA5fSIWBU2bxTrxEGuKWJa/view?usp=sharing&#60;/a&#62;. While many of these frequencies are above the maximum supported frequency of the simulation, many others that are missing from the model data are not. We have experimental data of this same setup that produces most, if not all, of the expected frequencies, however our k-Wave simulations (roughly shown above) do not. I'm very confused about all of this and am wondering where I have gone wrong.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Patrick on "Fundamental Frequency Missing?"</title>
			<link>http://www.k-wave.org/forum/topic/fundamental-frequency-missing#post-7058</link>
			<pubDate>Wed, 25 Sep 2019 22:40:48 +0000</pubDate>
			<dc:creator>Patrick</dc:creator>
			<guid isPermaLink="false">7058@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I have done a lot more digging on this. The resonant frequencies in a spherical cavity are given by Eq 18 in this paper: &#60;a href=&#34;https://www.acs.psu.edu/drussell/Publications/Basketball.pdf&#34; rel=&#34;nofollow&#34;&#62;https://www.acs.psu.edu/drussell/Publications/Basketball.pdf&#60;/a&#62;. They are dependent on zeros of the derivatives of spherical Bessel functions.&#60;/p&#62;
&#60;p&#62;I have an example configuration of a cavity of water (c = 1500 m/s) with radius 2.0 cm surrounded by a layer of glass (outer radius 3.2 cm) and then air. Since the smallest zero of the derivatives of spherical Bessel functions is 2.08, the fundamental frequency of this cavity should be 2.08*1500/(2*3.141*0.02) = 24832 Hz ~ 25 kHz. However, simulating this in k-Wave gives a fundamental of ~20 kHz. I have attached the code I am using to simulate this. I have made sure to place the PML outside of the cavity. What am I missing here? Is this a problem regarding reflections from the PML if the absorption is set improperly?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;% create the computational grid
Nx = 32;           % number of grid points in the x (row) direction
Ny = 32;           % number of grid points in the y (column) direction
Nz = 32;           % number of grid points in the z (frame) direction
dx = 0.2e-2;        % grid point spacing in the x direction [m]
dy = 0.2e-2;        % grid point spacing in the y direction [m]
dz = 0.2e-2;        % grid point spacing in the z direction [m]
kgrid = kWaveGrid(Nx, dx, Ny, dy, Nz, dz);
kgrid.dt = 1e-8;
kgrid.Nt = 100000;

% make the spherical water ball surrounded by air
air_speed = 343;
air_density = 1;
interior_speed = 1500;
interior_density = 1000;
exterior_speed = 2500;
exterior_density = 2000;

medium.density = air_density*ones(Nx,Ny,Nz);
medium.sound_speed = air_speed*ones(Nx,Ny,Nz);

interior = makeBall(Nx, Ny, Nz, Nx/2, Ny/2, Nz/2, 10);
exterior = makeBall(Nx, Ny, Nz, Nx/2, Ny/2, Nz/2, 16);

medium.density(logical(exterior)) = exterior_density;
medium.sound_speed(logical(exterior)) = exterior_speed;

medium.density(logical(interior)) = interior_density;
medium.sound_speed(logical(interior)) = interior_speed;

% initial pressure at center of the domain
disc_magnitude = 30; % [Pa]
disc_x_pos = Nx/2;    % [grid points]
disc_y_pos = Ny/2;    % [grid points]
disc_z_pos = Nz/2;    % [grid points]
disc_radius = 5;    % [grid points]
disc_2 = disc_magnitude * makeBall(Nx, Ny, Nz, disc_x_pos, disc_y_pos, disc_z_pos, disc_radius);

source.p0 = disc_2;

% sensor mask uniformly distributed over space
sensor.mask = zeros(Nx,Ny,Nz);
sensor.mask(1:5:Nx,1:5:Ny,1:5:Nz)=1;

% run the simulation
input_args = {&#38;#39;DataCast&#38;#39;,&#38;#39;single&#38;#39;,&#38;#39;DeviceNum&#38;#39;, 2, &#38;#39;PMLInside&#38;#39;, false,&#38;#39;PMLSize&#38;#39;,16};
sensor_data = kspaceFirstOrder3DG(kgrid, medium, source, sensor,input_args{:});

% sum over the spacial domain, fft the signal, and plot the frequency domain
FD = abs(fft(sum(sensor_data,1)));
FD = FD/max(FD,[],&#38;#39;all&#38;#39;);

freq = (0:(kgrid.Nt-1))*(1/kgrid.dt)/kgrid.Nt;

semilogx(freq(1:end/2),FD(1:end/2));&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Here is the output I am getting from the above code: &#60;a href=&#34;https://drive.google.com/file/d/1R5G82cPa7DsZB4attrFqCW7Rqv5hy9Pq/view?usp=sharing&#34; rel=&#34;nofollow&#34;&#62;https://drive.google.com/file/d/1R5G82cPa7DsZB4attrFqCW7Rqv5hy9Pq/view?usp=sharing&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;PC
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Patrick on "Fundamental Frequency Missing?"</title>
			<link>http://www.k-wave.org/forum/topic/fundamental-frequency-missing#post-7029</link>
			<pubDate>Mon, 02 Sep 2019 02:38:10 +0000</pubDate>
			<dc:creator>Patrick</dc:creator>
			<guid isPermaLink="false">7029@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;/p&#62;
&#60;p&#62;I am looking at the frequency domain of an acoustic simulation in a spherical cavity and having some issues producing the first fundamental frequency: f = c/(2r) where c is the speed of sound inside the cavity and r is the radius of the sphere. Instead, the frequencies I get are f = c/r and all of its harmonics.&#60;/p&#62;
&#60;p&#62;Curiously, running the simulation in 2D (circular cavity) gives the expected frequencies. I have also tried using linear propagation only (by not setting BonA) and surrounding the sphere with air so that an entire wavelength of the expected frequency should fit in the media but I still produce only f = c/r and its harmonics instead of f=c/(2r) and its harmonics.&#60;/p&#62;
&#60;p&#62;Any help would be very much appreciated,&#60;/p&#62;
&#60;p&#62;PC
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
