<?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: model shear wave scattering from hole</title>
		<link>http://www.k-wave.org/forum/topic/model-shear-wave-scattering-from-hole</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:29:15 +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/model-shear-wave-scattering-from-hole" rel="self" type="application/rss+xml" />

		<item>
			<title>ad000000 on "model shear wave scattering from hole"</title>
			<link>http://www.k-wave.org/forum/topic/model-shear-wave-scattering-from-hole#post-6401</link>
			<pubDate>Mon, 09 Apr 2018 19:34:55 +0000</pubDate>
			<dc:creator>ad000000</dc:creator>
			<guid isPermaLink="false">6401@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks Brad!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "model shear wave scattering from hole"</title>
			<link>http://www.k-wave.org/forum/topic/model-shear-wave-scattering-from-hole#post-6393</link>
			<pubDate>Sun, 08 Apr 2018 18:27:36 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6393@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi ad000000,&#60;/p&#62;
&#60;p&#62;The dispersion is due to the low-order numerical schemes typically used in FEM. Switching to COMSOL is not likely to solve this issue. For a scatterer in an otherwise homogeneous domain, a combined FEM-BEM approach could work well. There are lots of open source FEM projects (e.g., &#60;a href=&#34;https://fenicsproject.org&#34;&#62;FEniCS&#60;/a&#62;), but I haven't really used them enough to make a recommendation.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ad000000 on "model shear wave scattering from hole"</title>
			<link>http://www.k-wave.org/forum/topic/model-shear-wave-scattering-from-hole#post-6373</link>
			<pubDate>Mon, 26 Mar 2018 18:14:23 +0000</pubDate>
			<dc:creator>ad000000</dc:creator>
			<guid isPermaLink="false">6373@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks Brad.&#60;br /&#62;
I really like K-wave, for the versatility.  I'll try the convergence test.  However I take your point about FEM being a better choice for elastic circles, large discontinuities in material properties etc.  Can you recommend a FEM program for this?  I know that PZflex has a core solver that is susceptible to considerable numerical dispersion over distances on the order of hundreds of wavelengths.  I don't know if Comsol has same problem, but it's a bit pricey...
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "model shear wave scattering from hole"</title>
			<link>http://www.k-wave.org/forum/topic/model-shear-wave-scattering-from-hole#post-6363</link>
			<pubDate>Wed, 21 Mar 2018 21:43:21 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">6363@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi ad000000, &#60;/p&#62;
&#60;p&#62;Glad you managed to solve most of the issues. In general, modelling a circle in an elastic medium with a very large impedance mismatch is a challenging problem for the type of numerical model used in k-Wave (FEM would handle this much better). There are two issues. The first is staircasing, which effects elastic simulations more than fluid simulations (see &#60;a href=&#34;http://bug.medphys.ucl.ac.uk/papers/2017-Robertson-JASA.pdf&#34;&#62;this paper&#60;/a&#62; for some details). The second is the large discontinuity in medium properties. Both of these can be solved by increasing the sampling. If you want to gain some confidence in your numerical results, I would suggest a convergence test, i.e., reduce dx and dt, and check you get the same answer.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ad000000 on "model shear wave scattering from hole"</title>
			<link>http://www.k-wave.org/forum/topic/model-shear-wave-scattering-from-hole#post-6359</link>
			<pubDate>Wed, 21 Mar 2018 02:18:32 +0000</pubDate>
			<dc:creator>ad000000</dc:creator>
			<guid isPermaLink="false">6359@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;...continued:  1.  Assigning uy=signal, ux=0 is NOT the way to make a shear wave.  Need to use sxy.  2. I was able to set the hole material to very low density and pretty low velocity.  Max attenuation I could set was pretty low, at about 20 dB/cm.  This still gave substantial oscillations withing the hole, but I don't *think* they altered the scattering of the main wave much.  Thus I think I got a reasonable approximation for scattering from a hole.   I also tried using Dirichlet BCs and setting the hole as a source with u=0, but this only worked for a longitudinal incident wave, since I could not use the &#34;u&#34; source to make a shear wave, and could not use Dirichlet BC for &#34;s&#34; sources.  Setting u=0 actually models an infinitely hard &#34;hole&#34;, rather than air.  Even so, the program still crashed.  Apparently using the Dirichlet approach to make hard boundaries requires much care.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ad000000 on "model shear wave scattering from hole"</title>
			<link>http://www.k-wave.org/forum/topic/model-shear-wave-scattering-from-hole#post-6358</link>
			<pubDate>Wed, 21 Mar 2018 02:04:15 +0000</pubDate>
			<dc:creator>ad000000</dc:creator>
			<guid isPermaLink="false">6358@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Follow-up:  I solved these issues, mostly.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ad000000 on "model shear wave scattering from hole"</title>
			<link>http://www.k-wave.org/forum/topic/model-shear-wave-scattering-from-hole#post-6354</link>
			<pubDate>Tue, 20 Mar 2018 05:23:45 +0000</pubDate>
			<dc:creator>ad000000</dc:creator>
			<guid isPermaLink="false">6354@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello,&#60;br /&#62;
I'm trying to model scattering from a plane shear wave (signal=wavelet) from a hole.  My material is steel, and I set the hole material velocity and density to be less than steel.  I get several problems:&#60;br /&#62;
1. I can make a compression plane wave emanating from the left edge of the grid, by setting source.ux=0 and source.uy=signal.  But if I reverse them, to make a shear wave, it gives nonsense results.&#60;br /&#62;
2. To simulate a hole (air inside), I set the density very low.  However the &#34;hole&#34; seems to generate its own energy.  I tried to kill that by setting attenuation high, but the program ground to a halt.&#60;br /&#62;
Thanks for any thoughts!&#60;br /&#62;
Code:&#60;/p&#62;
&#60;p&#62;clear source sensor medium kgrid&#60;br /&#62;
% define variables&#60;/p&#62;
&#60;p&#62;freq=5e6;&#60;br /&#62;
epw=12;&#60;br /&#62;
cp=5850;&#60;br /&#62;
cs=3230;&#60;br /&#62;
rho=8030;&#60;br /&#62;
SDHdia=1.5e-3;&#60;/p&#62;
&#60;p&#62;%==define simulation area (remember, horizontal is Y direction)==================&#60;/p&#62;
&#60;p&#62;xlen=20e-3;&#60;br /&#62;
ylen=16e-3;&#60;br /&#62;
% ====================  setup grid =========================================&#60;br /&#62;
lambda=cp/freq;&#60;br /&#62;
dx=lambda/epw;&#60;br /&#62;
dy=lambda/epw;&#60;/p&#62;
&#60;p&#62;Nx= ceil(xlen/dx);&#60;br /&#62;
Ny= ceil(ylen/dy);&#60;br /&#62;
kgrid = makeGrid(Nx, dx, Ny, dy);&#60;/p&#62;
&#60;p&#62;%====set up material regions=========================================&#60;/p&#62;
&#60;p&#62;medium.sound_speed_compression =ones(kgrid.Nx, kgrid.Ny)*cp;&#60;br /&#62;
medium.sound_speed_shear =ones(kgrid.Nx, kgrid.Ny)*cs;&#60;br /&#62;
medium.alpha_coeff_compression = ones(kgrid.Nx, kgrid.Ny)*.03/(freq/1e6);   %to give dB/(MHz^2 cm)&#60;br /&#62;
medium.alpha_coeff_shear       = ones(kgrid.Nx, kgrid.Ny)*.03/(freq/1e6)*4;&#60;br /&#62;
medium.density=ones(kgrid.Nx, kgrid.Ny)*rho;&#60;/p&#62;
&#60;p&#62;SDHloc(1)=0;&#60;br /&#62;
SDHloc(2)=2e-3;&#60;br /&#62;
SDHdia=SDHdia/dx;&#60;br /&#62;
[SDHcenterGridx,SDHcenterGridy]=cartPt2Grid(kgrid,[SDHloc(1) SDHloc(2)]);&#60;br /&#62;
disc = makeDisc(Nx, Ny, SDHcenterGridx, SDHcenterGridy, SDHdia/2);&#60;br /&#62;
medium.sound_speed_compression(disc == 1) = cp*.9;&#60;br /&#62;
medium.sound_speed_shear(disc == 1) = cs*.9;&#60;br /&#62;
medium.density(disc==1)=60;&#60;br /&#62;
medium.alpha_coeff_compression(disc==1) = 1/(freq/1e6);   %to give dB/(MHz^2 cm)&#60;br /&#62;
medium.alpha_coeff_shear(disc==1)       = 4/(freq/1e6)*4; &#60;/p&#62;
&#60;p&#62;t_end=.3*2*ylen/cs;&#60;br /&#62;
%if ReverseFire==1; t_end=t_end/2;end&#60;/p&#62;
&#60;p&#62;dt=.3*dx/(cp);     %set time steps (C should be Cmax)&#60;br /&#62;
kgrid.t_array = 0:dt:t_end;&#60;br /&#62;
Nt=length(kgrid.t_array);&#60;/p&#62;
&#60;p&#62;PML=20*dx;&#60;/p&#62;
&#60;p&#62;%======================= setup source ===================================================&#60;br /&#62;
signal = wavelet(freq,4,0,2/freq,kgrid.t_array);&#60;/p&#62;
&#60;p&#62;source.u_mask = zeros(kgrid.Nx,kgrid.Ny);   % or source.p_mask&#60;br /&#62;
source.u_mask(:,1)=1;&#60;/p&#62;
&#60;p&#62;source.ux=signal/(rho*cp);&#60;br /&#62;
source.uy=0;&#60;/p&#62;
&#60;p&#62;%====setup sensor  =====================================================&#60;br /&#62;
sensor.mask=zeros(kgrid.Nx, kgrid.Ny);&#60;br /&#62;
%sensor.mask(1:5:kgrid.Nx,1:5:kgrid.Ny)=1;&#60;br /&#62;
sensor.mask(1:2:kgrid.Nx,1:2:kgrid.Ny)=1;&#60;/p&#62;
&#60;p&#62;sensor.record = {'u_max_all','u'};  %{'p','p_max'};&#60;/p&#62;
&#60;p&#62;%===== display_mask =========================================&#60;br /&#62;
display_mask=disc;&#60;/p&#62;
&#60;p&#62;%==================== RUN =================================================&#60;br /&#62;
figpos=get(0,'DefaultFigurePosition');&#60;br /&#62;
set(0,'DefaultFigurePosition',[340,275,980,735]);&#60;/p&#62;
&#60;p&#62;input_args = {'DisplayMask', display_mask, 'PMLInside', true, 'PlotPML', false,'PlotScale','auto','DataCast', 'single'};%,'RecordMovie',true};&#60;/p&#62;
&#60;p&#62;sensor_data = pstdElastic2D(kgrid, medium, source, sensor, input_args{:});&#60;br /&#62;
%sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;set(0,'DefaultFigurePosition',figpos);&#60;/p&#62;
&#60;p&#62;kmodel=sensor_data;&#60;br /&#62;
clear sensor_data;&#60;br /&#62;
kmodel.freq=freq;&#60;br /&#62;
kmodel.Nx=Nx;kmodel.Ny=Ny;&#60;br /&#62;
kmodel.x_vec=kgrid.x_vec;kmodel.y_vec=kgrid.y_vec;&#60;br /&#62;
kmodel.Nt=length(kgrid.t_array);&#60;br /&#62;
kmodel.epw=epw;&#60;br /&#62;
save kmodel.mat kmodel -v7.3&#60;/p&#62;
&#60;p&#62;uall=sqrt(kmodel.ux_max_all.^2+kmodel.uy_max_all.^2);&#60;br /&#62;
u=sign(kmodel.ux.*kmodel.uy).*sign(kmodel.ux).*sqrt(kmodel.ux.^2+kmodel.uy.^2);&#60;br /&#62;
%uh=abs(hilbert(u'));uh=uh';&#60;/p&#62;
&#60;p&#62;%nox=ceil(kmodel.Nx/5);noy=ceil(kmodel.Ny/5);&#60;br /&#62;
nox=ceil(kmodel.Nx/2);noy=ceil(kmodel.Ny/2);&#60;br /&#62;
dat=zeros(nox,noy);%may need to reverse this is Nx, Ny are in wrong order&#60;br /&#62;
for t=1:size(u,2);&#60;br /&#62;
    for j=1:nox&#60;br /&#62;
        for k=1:noy;&#60;br /&#62;
            %dat(j,k,t)=uh((k-1)*nox+j,t);&#60;br /&#62;
            dat(j,k,t)=u((k-1)*nox+j,t);&#60;br /&#62;
            %daty(j,k,t)=kmodel.uy((k-1)*nox+j,t);&#60;br /&#62;
        end&#60;br /&#62;
    end&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;% Record the movie&#60;br /&#62;
%maxdat=max(max(max(dat)));&#60;br /&#62;
%ax=[0 maxdat/500];&#60;br /&#62;
nframes=50;&#60;br /&#62;
step=floor((kmodel.Nt-1)/nframes);&#60;br /&#62;
figure;imagesc(kmodel.y_vec,kmodel.x_vec,(dat(:,:,200)));axis equal;%caxis(ax)&#60;br /&#62;
set(gca,'nextplot','replacechildren');&#60;br /&#62;
ax=caxis;&#60;br /&#62;
for j= 1:nframes;&#60;br /&#62;
    t=1+(j-1)*step;&#60;br /&#62;
	imagesc(kmodel.y_vec,kmodel.x_vec,(dat(:,:,t)));caxis(ax)&#60;br /&#62;
	F(j) = getframe;&#60;br /&#62;
end&#60;br /&#62;
% Play the movie&#60;br /&#62;
movie(F,1,1)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
