<?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; User Favorites: Huidong Yang</title>
		<link><a href='http://www.k-wave.org/forum/profile/huidong-yang'>huidong-yang</a></link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 00:19:42 +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/profile/" rel="self" type="application/rss+xml" />

		<item>
			<title>HD Y on "Grid size and magnitude of pressure"</title>
			<link>http://www.k-wave.org/forum/topic/grid-size-and-magnitude-of-pressure#post-9187</link>
			<pubDate>Wed, 19 Feb 2025 23:18:09 +0000</pubDate>
			<dc:creator>HD Y</dc:creator>
			<guid isPermaLink="false">9187@http://www.k-wave.org/forum/</guid>
			<description>&#60;br /&#62;</description>
		</item>
		<item>
			<title>HD Y on "Scaling fator when impose dirichlet boundary conditions"</title>
			<link>http://www.k-wave.org/forum/topic/scaling-fator-when-impose-dirichlet-boundary-conditions#post-9186</link>
			<pubDate>Wed, 19 Feb 2025 22:26:34 +0000</pubDate>
			<dc:creator>HD Y</dc:creator>
			<guid isPermaLink="false">9186@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi all, &#60;/p&#62;
&#60;p&#62;when imposing pressure dirichlet boundary conditions, according to Section 2.2 Acoustic Source Terms in k-wave manual, equation (2.19), there is a scaling factor applied to source.p.  &#60;/p&#62;
&#60;p&#62;    1/(c_02N) 2 c_0/\Delta x&#60;/p&#62;
&#60;p&#62;There is a constant 2 in the factor, is there any reason choosing this constant?  &#60;/p&#62;
&#60;p&#62;In the implementation, kspaceFirstOrder3D.m,  from line 930 on:&#60;/p&#62;
&#60;p&#62; switch source.p_mode&#60;br /&#62;
            case 'dirichlet'&#60;/p&#62;
&#60;p&#62;                % enforce source values as a dirichlet boundary condition&#60;br /&#62;
                rhox(p_source_pos_index) = source.p(p_source_sig_index, t_index);&#60;br /&#62;
                rhoy(p_source_pos_index) = source.p(p_source_sig_index, t_index);&#60;br /&#62;
                rhoz(p_source_pos_index) = source.p(p_source_sig_index, t_index);&#60;/p&#62;
&#60;p&#62; .....&#60;/p&#62;
&#60;p&#62;However, here the source.p is directly assigned to the density without any scaling factor!&#60;br /&#62;
Is there any thing missing in this source code?  &#60;/p&#62;
&#60;p&#62;This seems to me a bug in the code.  Can any developer provide some details on this? &#60;/p&#62;
&#60;p&#62;Thank you in advance.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HD Y on "Impose Dirichlet pressure booundary conditions in kspaceFirstOrder3D"</title>
			<link>http://www.k-wave.org/forum/topic/impose-dirichlet-pressure-booundary-conditions-in-kspacefirstorder3d#post-9185</link>
			<pubDate>Mon, 17 Feb 2025 22:31:36 +0000</pubDate>
			<dc:creator>HD Y</dc:creator>
			<guid isPermaLink="false">9185@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I actually saw in the reference, &#60;/p&#62;
&#60;p&#62;&#34;Modelling Nonlinear Ultrasound Propagation in Absorbing Media using the k-Wave Toolbox: Experimental Validation&#34;&#60;/p&#62;
&#60;p&#62;it describes in short as follows:&#60;/p&#62;
&#60;p&#62;&#34;Input pressure signals were assigned to source.p&#60;br /&#62;
and enforced as a time-varying Dirichlet boundary condition&#60;br /&#62;
over a 10 × 15 mm plane within the computational grid by&#60;br /&#62;
setting source.p_mode = ‘dirichlet’. &#34; &#60;/p&#62;
&#60;p&#62;A naive approach is to assign the temporal signal by setting&#60;/p&#62;
&#60;p&#62;source.p = pressure signals;&#60;br /&#62;
source.p_mode = 'dirichlet';&#60;/p&#62;
&#60;p&#62;Is there any relevant examples to explain how to do this?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HD Y on "Impose Dirichlet pressure booundary conditions in kspaceFirstOrder3D"</title>
			<link>http://www.k-wave.org/forum/topic/impose-dirichlet-pressure-booundary-conditions-in-kspacefirstorder3d#post-9182</link>
			<pubDate>Wed, 12 Feb 2025 21:05:37 +0000</pubDate>
			<dc:creator>HD Y</dc:creator>
			<guid isPermaLink="false">9182@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi, is it possible to impose Dirichlet boundary conditions in kspaceFirstOrder3D? Thanks a lot.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HD Y on "Impose Dirichlet Boundary Conditions in K-Wave"</title>
			<link>http://www.k-wave.org/forum/topic/impose-dirichlet-boundary-conditions-in-k-wave#post-9181</link>
			<pubDate>Wed, 12 Feb 2025 21:01:57 +0000</pubDate>
			<dc:creator>HD Y</dc:creator>
			<guid isPermaLink="false">9181@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi, is it possible to impose Dirichlet pressure condition in kspaceFirstOrder3D routine?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rainbowwhale on "Grid size and magnitude of pressure"</title>
			<link>http://www.k-wave.org/forum/topic/grid-size-and-magnitude-of-pressure#post-7389</link>
			<pubDate>Mon, 13 Apr 2020 10:25:44 +0000</pubDate>
			<dc:creator>rainbowwhale</dc:creator>
			<guid isPermaLink="false">7389@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thank you for kind answer.&#60;br /&#62;
I may confused between Pressure and power.&#60;br /&#62;
I'll tried to integrate the power and make comparisons.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bencox on "Grid size and magnitude of pressure"</title>
			<link>http://www.k-wave.org/forum/topic/grid-size-and-magnitude-of-pressure#post-7381</link>
			<pubDate>Fri, 10 Apr 2020 10:52:42 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">7381@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi rainbowwhale,&#60;/p&#62;
&#60;p&#62;Yes, you will see a change in the amplitude for a couple of reasons. The most obvious is that you are inputting the source on more grid points per unit length so the amplitude will be correspondingly higher. (Think of the sources as point sources on a collection of grid points, not sources filling voxels ie. not spread continuously over an area.) The second is that the grid can support higher frequencies as you reduce the grid spacing, and as your &#60;code&#62;source.p&#60;/code&#62; signal contains a broad range of frequencies, more of the higher frequencies will be propagated in the grids with smaller grid spacing&#60;code&#62;dG&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;Final point. You're currently changing the size of the sensor and the source simultaneously. It might be worth investigating the size of the source with the sensor as a single grid point, and then subsequently to investigate the effect of having a larger sensor area.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rainbowwhale on "Grid size and magnitude of pressure"</title>
			<link>http://www.k-wave.org/forum/topic/grid-size-and-magnitude-of-pressure#post-7340</link>
			<pubDate>Wed, 01 Apr 2020 07:30:03 +0000</pubDate>
			<dc:creator>rainbowwhale</dc:creator>
			<guid isPermaLink="false">7340@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi&#60;br /&#62;
I'm new to k-Wave and have a question about grid size&#60;/p&#62;
&#60;p&#62;I made a source shaped in square with same size for different grid size.&#60;br /&#62;
I thought all cases have same area of source and result in same pressure magnitude&#60;br /&#62;
but small grid case which have more grid cells in source showed higher pressure.&#60;br /&#62;
Magnitude of pressure is proportional to the number of grid per length (not area!)&#60;br /&#62;
and thus increased linearly with respect to sqrt(number of grid in source area).&#60;/p&#62;
&#60;p&#62;I have tried to use 'dirichlet' type source but showed same results.&#60;br /&#62;
--&#38;gt; There was an typo and with a correct command, 'dirichlet' type worked.&#60;/p&#62;
&#60;p&#62;I'll appreciate your kind advises.&#60;br /&#62;
Thank you&#60;/p&#62;
&#60;p&#62;%%&#60;br /&#62;
clearvars&#60;br /&#62;
clc&#60;/p&#62;
&#60;p&#62;PML_Size = 20;&#60;br /&#62;
PML_Alpha = 2;&#60;br /&#62;
input_args = {'PMLSize', PML_Size, 'PMLInside', true, 'PMLAlpha', PML_Alpha};&#60;/p&#62;
&#60;p&#62;%%&#60;br /&#62;
CFL = 0.15;&#60;br /&#62;
dG = 0.01*1e-3; % reference grid size&#60;br /&#62;
dt = CFL*dG/1500;&#60;br /&#62;
Nt = 5000;&#60;br /&#62;
Nx = 512;&#60;br /&#62;
Nz = 512;&#60;/p&#62;
&#60;p&#62;pulse_Rect = conv(ones(1, ceil(40e-9/dt)), ones(1,7)/7);&#60;br /&#62;
Tx_Rect = [pulse_Rect, zeros(1, Nt - length(pulse_Rect))];&#60;/p&#62;
&#60;p&#62;medium.sound_speed = 1500;&#60;br /&#62;
medium.density = 1000;&#60;/p&#62;
&#60;p&#62;% number of grid per source (and sensor)&#60;br /&#62;
NG = [2, 4, 8, 16, 32, 64];&#60;/p&#62;
&#60;p&#62;results = zeros(Nt, length(NG));&#60;br /&#62;
for k=1:length(NG)&#60;br /&#62;
    dG = 0.16*1e-3/NG(k);&#60;br /&#62;
    kgrid = kWaveGrid(Nx, dG, Nz, dG);&#60;br /&#62;
    kgrid.dt = dt;&#60;br /&#62;
    kgrid.Nt = Nt;&#60;br /&#62;
    kgrid.t_array = (0:kgrid.Nt-1)*dt;&#60;/p&#62;
&#60;p&#62;    %source.p_mode = 'dirichlet';&#60;br /&#62;
    source.p_mask = zeros(Nx, Nz);&#60;br /&#62;
    source.p_mask((1:NG(k)) - 0.5*NG(k) + Nx/2, (1:NG(k)) - 0.5*NG(k) + Nz/2 - 3*NG(k)) = 1;&#60;br /&#62;
    source.p = Tx_Rect;&#60;/p&#62;
&#60;p&#62;    sensor.mask = zeros(Nx, Nz);&#60;br /&#62;
    sensor.mask((1:NG(k)) - 0.5*NG(k) + Nx/2, (1:NG(k)) - 0.5*NG(k) + Nz/2 + 3*NG(k)) = 1;&#60;/p&#62;
&#60;p&#62;    subplot(2, length(NG)+1, k)&#60;br /&#62;
    imagesc(kgrid.x_vec, kgrid.y_vec, (source.p_mask-sensor.mask))&#60;br /&#62;
    axis image&#60;br /&#62;
    xlim([-1, 1]*0.9*1e-3)&#60;br /&#62;
    ylim([-1, 1]*0.9*1e-3)&#60;br /&#62;
    subplot(2, length(NG)+1, k + length(NG)+1)&#60;br /&#62;
    imagesc(kgrid.x_vec, kgrid.y_vec, (source.p_mask-sensor.mask))&#60;br /&#62;
    axis image&#60;br /&#62;
    drawnow&#60;/p&#62;
&#60;p&#62;    data = kspaceFirstOrder2DG(kgrid, medium, source, sensor, input_args{:});&#60;br /&#62;
    results(:,k) = mean(data, 1)';&#60;br /&#62;
end&#60;/p&#62;
&#60;p&#62;subplot(2, length(NG)+1, length(NG) + 1)&#60;br /&#62;
plot(results)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
