<?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: Spurious wave generation in absorbing media</title>
		<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:09:20 +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/spurious-wave-generation-in-absorbing-media" rel="self" type="application/rss+xml" />

		<item>
			<title>DNF on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4984</link>
			<pubDate>Mon, 09 Feb 2015 15:04:54 +0000</pubDate>
			<dc:creator>DNF</dc:creator>
			<guid isPermaLink="false">4984@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thank you, Bradley. At this point, it isn't terribly urgent to get the files quickly, but I am very interested in the content.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4975</link>
			<pubDate>Wed, 04 Feb 2015 23:46:05 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4975@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi DNF,&#60;/p&#62;
&#60;p&#62;If you capture the time-varying pressure over a 2D plane, and then enforce this as a Dirichlet boundary condition in the next simulation, this is sufficient (you don't also need particle velocity). However, the problem is that if you are enforcing a boundary condition, any waves that are reflected from heterogeneities will again be reflected from the plane over which you are enforcing the boundary condition (with an amplitude dependent on the exact value of pressure you happen to be enforcing at that time). This means your simulations results will not match the non-split case.&#60;/p&#62;
&#60;p&#62;I'm currently away for a meeting, but when I'm back at my desk, I'll tidy up the codes and email them to you.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>DNF on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4963</link>
			<pubDate>Wed, 28 Jan 2015 09:38:27 +0000</pubDate>
			<dc:creator>DNF</dc:creator>
			<guid isPermaLink="false">4963@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thank you, Bradley.&#60;/p&#62;
&#60;p&#62;I am interested both in the elastic code, and in the SimSonic wrapper you mentioned previously.&#60;/p&#62;
&#60;p&#62;As for splitting the simulation, I would have thought that recording the pressure field a slightly before the first interface, then re-transmitting it into the layered structure (with much higher sampling), and then recording the pressure again, I would be able to capture multiple reflections. Anyway, is capturing the pressure sufficient? Are not the particle velocities required?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4960</link>
			<pubDate>Fri, 23 Jan 2015 17:46:44 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4960@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi DNF,&#60;/p&#62;
&#60;p&#62;The function &#60;code&#62;kspaceElastic2D&#60;/code&#62; is a k-space code for elastic media with power law absorption, as discussed in &#60;a href=&#34;http://www.homepages.ucl.ac.uk/~rmapbtr/papers/JOURN_23_2014_Treeby_JASA_PowerLawAbsorptionElastic.pdf&#34;&#62;this paper&#60;/a&#62;. This model is still under development, so is not in the current release code. At the moment, there is only a 2D version and no PML is implemented. However, I'd be happy to send you a copy to try out if that's helpful.&#60;/p&#62;
&#60;p&#62;If you are only interested in the first transmitted wave, then dividing your simulation into chunks in this way will work. If you record the pressure field over a plane in the first simulation, you can enforce this as a Dirichlet boundary condition in the next simulation. However, keep in mind that you will not be able to model multiple reflections, etc.&#60;/p&#62;
&#60;p&#62;If you are using the C++ code, there is a checkpoint-restart facility that can be easily used (see the &#60;a href=&#34;http://www.k-wave.org/doxygen/index.html&#34;&#62;doxygen documentation&#60;/a&#62; for more details). Unfortunately, the same facility doesn't exist in the MATLAB code at the moment&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>DNF on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4956</link>
			<pubDate>Fri, 23 Jan 2015 09:01:06 +0000</pubDate>
			<dc:creator>DNF</dc:creator>
			<guid isPermaLink="false">4956@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks for looking into this.&#60;/p&#62;
&#60;p&#62;Now, &#60;code&#62;pstdElastic2D&#60;/code&#62; is not not a k-space method, as you say, but I recently came over a reference to a function &#60;code&#62;kspaceElastic2D&#60;/code&#62;, inside the script &#60;code&#62;kspaceFirstOrder_inputChecking&#60;/code&#62; (line 45). Is that code which is under development?&#60;/p&#62;
&#60;p&#62;I am considering splitting up the calculation into several chunks. Since I have a layered structure, I thought it might be possible to propagate in one homogeneous layer, save the state, propagate across a boundary with higher sampling, save the state, etc. Might this be a viable approach? &#60;/p&#62;
&#60;p&#62;Is it easy or even possible to save the state of the simulation? This would also enable me to pause and resume the simulation, or interrupt/fail while keeping the results up to that point, which is something I miss a bit.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4945</link>
			<pubDate>Thu, 22 Jan 2015 16:28:49 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">4945@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi DNF,&#60;/p&#62;
&#60;p&#62;Unfortunately, I haven't managed to get to the bottom of the behaviour you have observed. It seems to be related the fractional absorption operator in the case &#60;code&#62;medium.alpha_power&#60;/code&#62; is not equal to 2, and &#60;code&#62;medium.alpha_coeff&#60;/code&#62; is high. Using &#60;code&#62;medium.alpha_mode = &#38;#39;no_absorption&#38;#39;&#60;/code&#62; causes the effect to disappear, so it doesn't appear to be related to the dispersion term. It's possible it's related the particle velocity used in the absorption term being temporally offset by dt/2 from the acoustic density to which it's added. I will keep digging.&#60;/p&#62;
&#60;p&#62;In the elastic case, my guess is you're just seeing classic instability. Unfortunately, we have not derived a closed form expression for stability in the absorbing elastic case using the PSTD model. However, remember the elastic code &#60;code&#62;pstdElastic2D&#60;/code&#62; does not use a k-space corrected time-stepping scheme, so is not unconditionally stable. You will need to use a smaller time step than in the associated fluid case, both to achieve stability, and to avoid numerical dispersion from the time-stepping scheme.&#60;/p&#62;
&#60;p&#62;One point to note, if you are interested in modelling very strong impedance discontinuities, spectral methods might not be your best choice. In &#60;a href=&#34;http://www.k-wave.org/papers/2014-Robertson-IEEEIUS.pdf&#34;&#62;this paper&#60;/a&#62; there is a plot of the accuracy in the reflection coefficient versus the strength of the discontinuity. Roughly speaking, as the code stands, for contrasts stronger than 4:1, finite difference methods will give you more accurate reflection coefficients. If your domain size isn't very large (so the accumulation of dispersion error isn't a problem), you might be better served using a tool like &#60;a href=&#34;http://www.simsonic.fr&#34;&#62;SimSonic&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;The only other thing to mention is that when viewing the simulations with a log scale, small-scale behaviour becomes magnified. Given the perfectly matched layer will only be accurate to a few decimal places at best, in some cases the spurious waves you have observed might not be a problem.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>DNF on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4938</link>
			<pubDate>Fri, 16 Jan 2015 09:32:59 +0000</pubDate>
			<dc:creator>DNF</dc:creator>
			<guid isPermaLink="false">4938@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Yes, I am aware of the basic reason why this happens. But absorption and the choice of alpha_power can increase the effect dramatically. The effect is very noticeable. Even using 30-40 points per wavelength, it is still clearly present. I am in a situation where a 1D simulation can take up to 20 hours on a new and powerful pc.&#60;/p&#62;
&#60;p&#62;And in the elastic simulations, as I said, the effect grows without bounds, eventually completely drowning out the real solution.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ouelletn on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4937</link>
			<pubDate>Thu, 15 Jan 2015 16:09:15 +0000</pubDate>
			<dc:creator>ouelletn</dc:creator>
			<guid isPermaLink="false">4937@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Run the 1D code for a very short time and stop it. If you zoom into the actual wave you should notice that the wave is undergoing a ringing effect that extends into the second media. This ringing effect is inherent of the high discontinuities in your simulation and a limitation of expressing the wave as a Fourier series. &#60;/p&#62;
&#60;p&#62;The only way to minimize this is to increase the number of grid points within the simulations.Changing the frequency distribution of the impulse may also help reduce this effect. You should consider mostly if this is necessary for your simulation, as the amplitude of this effect is fairly low and may not influence any statements made about the effect of the layers.&#60;br /&#62;
-Andrew
&#60;/p&#62;</description>
		</item>
		<item>
			<title>DNF on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4934</link>
			<pubDate>Wed, 14 Jan 2015 11:06:52 +0000</pubDate>
			<dc:creator>DNF</dc:creator>
			<guid isPermaLink="false">4934@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;This effect is also visible in the 2D version of the code.&#60;/p&#62;
&#60;p&#62;Worse, when using &#60;code&#62;pstdElastic2D.m&#60;/code&#62; with strong impedance contrasts, spurious waves are generated that in some cases grow exponentially and without bound, to the point that they reach a value of &#60;code&#62;inf&#60;/code&#62;, causing the visualization to give an error. Both spurious shear and pressure waves are generated, and grow wildly.&#60;/p&#62;
&#60;p&#62;This happens even when I use no absorption at all.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>DNF on "Spurious wave generation in absorbing media"</title>
			<link>http://www.k-wave.org/forum/topic/spurious-wave-generation-in-absorbing-media#post-4925</link>
			<pubDate>Mon, 05 Jan 2015 10:42:52 +0000</pubDate>
			<dc:creator>DNF</dc:creator>
			<guid isPermaLink="false">4925@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I am using k-Wave to simulate wave propagation in strongly contrasting media. A strange effect shows up during propagation when there is strong absorption. The attached figure illustrates the effect: Shortly after starting the excitation, and before the pulse arrives, a wave is generated inside the neighbouring layer.&#60;/p&#62;
&#60;p&#62;The magnitude of this effect is apparently influenced by several factors:&#60;br /&#62;
* The level of absorption — more absorption _increases_ the effect, contrary to my intuition.&#60;br /&#62;
* The distance from the source to the medium interface.&#60;br /&#62;
* The number of layers in the total medium (four layers is worse than three).&#60;br /&#62;
* When the wave reaches the PML it gets even worse.&#60;br /&#62;
* Using a power law exponent of 2 seems to remove the problem (this was pointed out to me by Dr. Treeby.)&#60;/p&#62;
&#60;p&#62;I can reduce the effect by increasing the temporal and spatial sampling rates, but some times even using 40 points per wavelength and a timestep less than a 1ns is not good enough for a transmit frequency of 500kHz.&#60;/p&#62;
&#60;p&#62;I have enclosed an example script that illustrates the effect. It seems that the effect gets worse at some ’sweet spot’ of combined impedances and layer thicknesses, which I cannot quite re-create.&#60;/p&#62;
&#60;p&#62;My questions:&#60;br /&#62;
* Do you see why this is happening? Could there be a bug in the absorption implementation, or is this more or less expected behaviour?&#60;br /&#62;
* What can I do to reduce this effect? For certain geometries, cranking up the sampling rates leads to 20h+ long 1D simulation.&#60;/p&#62;
&#60;p&#62;Here's an example script:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;%%
% This example shows a strange effect where a spurious wave is generated inside a
% medium layer before the excitation wave arrives in that layer.
%
% This happens when there is strong absorption inside one of the layers (e.g. 10dB/cm/MHz), and the
% effect is smaller when the absorption is reduced (e.g. to 1dB/cm/MHz). Tweaking the
% geometry in various ways also seems to change the effect, having four layers seems
% to be worse than having three layers, and the thickness of the various layers also
% make a difference.
%
% The effect can be reduced by reducing the timestep, but sometimes to extreme levels.

%% Geometry
padding = 5e-3;
Lx = [6,2,10,20]*1e-3;

%% Material properties
c = [600, 3000, 6000, 3000];
rho = [200, 2000, 8000, 2000];
attn = [0.2, 10, 0.05, 0.1];
% attn = [0.2, 1.0, 0.05, 0.1]; % reducing the absorption reduces the effect
attn_power = 1.0; % changing it to 2.0 removes the problem

useattn = true;

%% Transmit pulse
Npulse = 2;
fc = 0.5e6;

%% Computational grid
ppw = 20; % points per wavelength
cfl = 0.1; % Courant-Friedrich-Lewy

% grid size
dx = min(c)/(ppw*fc);
Nx = ceil(sum([Lx,padding])/dx);
kgrid = makeGrid(Nx,dx);

% index positions of interfaces
ind = round(cumsum([padding,Lx(1:end-1)])/dx);

medium = struct();
% sound velocity
medium.sound_speed = c(1) + zeros(Nx,1);
for jj = 2:length(ind),
    medium.sound_speed(ind(jj):end) = c(jj);
end

% density
medium.density = rho(1) + zeros(Nx,1);
for jj = 2:length(ind),
    medium.density(ind(jj):end) = rho(2);
end

% attenuation
if useattn,
    medium.alpha_coeff = attn(1) + zeros(Nx,1);
    for jj = 2:length(ind),
        medium.alpha_coeff(ind(jj):end) = attn(jj);
    end

    medium.alpha_power = attn_power;
    medium.alpha_mode = &#38;#39;no_dispersion&#38;#39;;
end

[kgrid.t_array,dt] = makeTime(kgrid,medium.sound_speed,cfl);

%% Transducer
Amp = 1e-6;
source = struct();
source.u_mask = zeros(Nx,1);
source.u_mask(ind(1)) = 1;
source.ux = -Amp*toneBurst(1/kgrid.dt,fc,Npulse,&#38;#39;Envelope&#38;#39;,&#38;#39;Gaussian&#38;#39;);

sensor = struct();
sensorind = ind(1):10:Nx;
sensor.mask = zeros(Nx,1);
sensor.mask(sensorind) = 1;
sensor.record = {&#38;#39;p&#38;#39;};

% display
display_mask = zeros(Nx,1);
display_mask(ind) = 1;

%% 1D sim
args = {&#38;#39;DataCast&#38;#39;,&#38;#39;double&#38;#39;, ...
    &#38;#39;LogScale&#38;#39;,true, ...
    &#38;#39;DisplayMask&#38;#39;,display_mask, ...
    &#38;#39;PMLSize&#38;#39;,ppw*2, ... % 2 wavelengths
    &#38;#39;PMLInside&#38;#39;,false, ...
    &#38;#39;PlotPML&#38;#39;,false, ...
    &#38;#39;PlotSim&#38;#39;,true};
data = kspaceFirstOrder1D(kgrid,medium,source,sensor,args{:});&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
