<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Modelling Acoustics</title>
	<atom:link href="http://room-acoustics.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://room-acoustics.com/blog</link>
	<description>On computational acoustics modelling</description>
	<lastBuildDate>Fri, 13 Jan 2012 23:11:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Waves Scattering off a Human Head</title>
		<link>http://room-acoustics.com/blog/?p=262</link>
		<comments>http://room-acoustics.com/blog/?p=262#comments</comments>
		<pubDate>Tue, 16 Aug 2011 10:00:10 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=262</guid>
		<description><![CDATA[A quick demontration of how waves scatter off a human head; simulated using WaveCloud. White is zero pressure, toward red is positive, towards blue is negative. (click title to see video) &#160;]]></description>
			<content:encoded><![CDATA[<p>A quick demontration of how waves scatter off a human head; simulated using <a title="Software" href="http://room-acoustics.com/blog/?page_id=197">WaveCloud</a>.</p>
<p>White is zero pressure, toward red is positive, towards blue is negative.</p>
<p>(click title to see video)</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=262</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Complex Geometry made Simple</title>
		<link>http://room-acoustics.com/blog/?p=247</link>
		<comments>http://room-acoustics.com/blog/?p=247#comments</comments>
		<pubDate>Mon, 04 Jul 2011 19:53:47 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=247</guid>
		<description><![CDATA[Last week at Forum Acusticum I bumped into Gry Baelum Nielsen from Odeon. We started discussing how different room acoustic simulation software handle complex geometries. After she&#8217;d claim that such process in Odeon is as simple as clicking a button, I had to try it for myself. In case you have never sput blood and [...]]]></description>
			<content:encoded><![CDATA[<p>Last week at Forum Acusticum I bumped into <a href="http://www.odeon.dk/gry-baelum-nielsen" target="_blank">Gry Baelum Nielsen</a> from Odeon. We started discussing how different room acoustic simulation software handle complex geometries. After she&#8217;d claim that such process in Odeon is as simple as clicking a button, I had to try it for myself. In case you have never sput blood and shed tears over this yourself, it is worth noting that in many commercial software handling complex geometries is every modeller&#8217;s nightmare. You either have to enter vertices, edges and faces manually (which is literally &#8211; torture) or deal with issues such as holes and overlapping faces.</p>
<p>So I made a deal with Gry; I will challenge Odeon with any complex geometry I wish, and if it instantly works as promised I will write her a testimonial. After lunch I felt creative, and so I designed some strange looking building, which can be at best characterised as some twisted hybrid between a museum, concert hall and the fuselage of a 747. The world should be thankful that I am not an architect.</p>
<p>Back to our experiment, I&#8217;ve really invested a lot of energy (not easy after a conference lunch) in making the geometry complex and confusing to human beings and machines alike. The model was finished, and guess what, at a click of a button Odeon imported it. A cup of tea and a few clicks later, the model was up and running with wall materials and multiple sources. So, as I am a man of my word, here is my testimonial: Odeon handles complex geometries like no other acoustic modelling software I have encountered; it is quick, simple to use and most importantly troublefree. Very well done.</p>
<p>Jon.</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=247</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forum Acusticum Presentation</title>
		<link>http://room-acoustics.com/blog/?p=165</link>
		<comments>http://room-acoustics.com/blog/?p=165#comments</comments>
		<pubDate>Fri, 17 Jun 2011 12:59:25 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=165</guid>
		<description><![CDATA[I have not been around for a while. I know. Naughty me. But I do have a good excuse this time, as I&#8217;ve been preparing for the EAA&#8217;s conference &#8220;Forum Acusticum 2011&#8243; that will take place next week in Aalborg, Denmark. I&#8217;ll be delivering a paper on a simple method to solve frequency dependent problems [...]]]></description>
			<content:encoded><![CDATA[<p>I have not been around for a while. I know. Naughty me.</p>
<p>But I do have a good excuse this time, as I&#8217;ve been preparing for the EAA&#8217;s conference &#8220;Forum Acusticum 2011&#8243; that will take place next week in Aalborg, Denmark.</p>
<p>I&#8217;ll be delivering a paper on a simple method to solve frequency dependent problems in numerical time domain methods within one of the sessions on computational acoustics.</p>
<p>My presentation is scheduled to be on Friday 1-Jul at 8:20.</p>
<p>If you&#8217;re around &#8211; come say hi!</p>
<p>The rest of the conference programme is available <a href="http://www.fa2011.org/downloads/FA2011_program_v1.pdf" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=165</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diffraction in 3D</title>
		<link>http://room-acoustics.com/blog/?p=153</link>
		<comments>http://room-acoustics.com/blog/?p=153#comments</comments>
		<pubDate>Fri, 13 May 2011 15:42:13 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Popular Science]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=153</guid>
		<description><![CDATA[With a little help from my home-brewed FDTD model and the (very good and very free) visualisation platform ParaView, I have created some 3D animations of sound wave propagation. In this demonstration you can see a wideband acoustic monopole (Gaussian pulse) propagating in a small (6x6x6 meters) room. In the middle(ish) of the room I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/9utRDPS9g2o?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9utRDPS9g2o?version=3" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>With a little help from my <a title="WaveCloud: Acoustics FDTD on GP-GPU" href="http://room-acoustics.com/blog/?p=68">home-brewed FDTD model</a> and the (very good and very free) visualisation platform <a href="http://www.paraview.org/" target="_blank">ParaView</a>, I have created some 3D animations of sound wave propagation. In this demonstration you can see a wideband acoustic monopole (Gaussian pulse) propagating in a small (6x6x6 meters) room. In the middle(ish) of the room I&#8217;ve put a small panel-shaped fully-reflecting phase-reversing (R=-1) obstacle  so it is evident how diffraction occurs. The boundaries of the room are somewhat reflective (Normalised impedance = 9).</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=153</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some exciting sessions at FA2011</title>
		<link>http://room-acoustics.com/blog/?p=146</link>
		<comments>http://room-acoustics.com/blog/?p=146#comments</comments>
		<pubDate>Wed, 11 May 2011 21:05:03 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=146</guid>
		<description><![CDATA[I have just received the preliminary prorgamme of Forum Acusticum 2011, to be held at Aalborg Denmark between Jun-26 and Jul-1. Look out for sessions on computational acoustics &#8211; quite a few papers and talks this conference. If you are presenting or attending the event, give me a shout! A more thorough review to follow [...]]]></description>
			<content:encoded><![CDATA[<p>I have just received the <a href="http://www.fa2011.org/downloads/FA2011_preliminary_program_2.pdf" target="_blank">preliminary prorgamme</a> of Forum Acusticum 2011, to be held at Aalborg Denmark between Jun-26 and Jul-1. Look out for sessions on computational acoustics &#8211; quite a few papers and talks this conference. If you are presenting or attending the event, give me a shout!</p>
<p>A more thorough review to follow right after the conference.</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=146</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FDTD for Beginners, Part 1: Background</title>
		<link>http://room-acoustics.com/blog/?p=84</link>
		<comments>http://room-acoustics.com/blog/?p=84#comments</comments>
		<pubDate>Tue, 10 May 2011 06:14:08 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Resources and Datasets]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=84</guid>
		<description><![CDATA[This tutorial is intended to give you a good idea of how the Finite Difference Time Domain (FDTD) method works. It is divided into two parts: background and implementation. The former deals with the basic mathematics of the method and will walk you through the derivation of the update equation used in the numerical algorithm. [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial is intended to give you a good idea of how the Finite Difference Time Domain (FDTD) method works. It is divided into two parts: background and implementation. The former deals with the basic mathematics of the method and will walk you through the derivation of the update equation used in the numerical algorithm. The latter deals with how to implement the method in Matlab, so you can actually have proof that it works&#8230;</p>
<p>The tutorial is very basic and intended for students, scientists and engineers with background in acoustics and mathematics but without any experience in numerical time domain methods. The text is written in an informal language, so please excuse me. As such, I won&#8217;t reference anything directly in the text; however, more formal and elaborate discussions on the topic can be found in <a href="http://scholar.google.co.il/scholar?as_q=acoustic&amp;num=10&amp;as_epq=&amp;as_oq=fdtd+k-dwm+&amp;as_eq=electromagnetic+ultrasound+crystal&amp;as_occt=any&amp;as_sauthors=&amp;as_publication=&amp;as_ylo=&amp;as_yhi=&amp;as_sdt=1&amp;as_sdtf=&amp;as_sdts=5&amp;btnG=Search+Scholar&amp;hl=en">many scientific papers</a> and some books (see <a href="http://www.amazon.com/Wave-Scattering-Methods-Numerical-Simulation/dp/0470870176">Bilbao</a> and some chapters in <a href="https://ccrma.stanford.edu/~jos/pasp/">Smith III</a>).</p>
<p>The FDTD method can be applied to many partial differential equations. For room acoustics it  is usually used to solve either Euler&#8217;s equations of continuity (mass and momentum), or the second order wave equation. The main idea is to sample our problem in space and time and solve it iteratively. Spatial samples are called <em>nodes</em> or <em>junctions </em>(depending on who you ask&#8230;) and are interconnected in different <em>schemes</em> or <em>topologies</em> (depending on who you ask&#8230;) to form a <em>grid</em> or <em>mesh</em> (depending on who you ask&#8230;). These schemes refer to the way nodes are interconnected on the grid, forming differently shaped cells, such as cubic, interpolated-cubic or octahedral, amongst others. If you want an overview read <a title="Compact Explicit Schemes for the Wave Equation" href="http://room-acoustics.com/blog/?p=37">this post</a> and its corresponding paper.</p>
<p>In this post we shall derive the Standard Leapfrog Scheme (hereinafter SLF) for the 2nd order acoustic wave equation. This scheme is often referred to as the Kirchhoff Digital Waveguide Mesh (or K-DWM). The reasons for this choice are as follows:</p>
<ol>
<li>The 2nd order wave equation results in a non-staggered solution, which is very easy to understand.</li>
<li>The SLF is probably the most common scheme in room acoustics (although far from being the most computationally accurate).</li>
<li>The SLF scheme is very computationally efficient, so we can easily implement it in Matlab.</li>
<li>The SLF scheme is very easy to derive.</li>
</ol>
<p>Don&#8217;t get me wrong. The SLF scheme is far from perfect, and nowadays I hardly use it. Nevertheless, it is an ideal starting point for understanding FDTD.</p>
<p><strong>The 2nd Order Wave Equation</strong></p>
<p>(The following derivation is mainly based on <a href="http://www.amazon.com/Wave-Scattering-Methods-Numerical-Simulation/dp/0470870176">Bilbao</a>).</p>
<p>Let&#8217;s have a quick look at our governing PDE:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B%7B%7B%5Cpartial+%5E2%7Dp%7D%7D%7B%7B%5Cpartial+%7Bt%5E2%7D%7D%7D+%3D+%7Bc%5E2%7D%5Cleft%28+%7B%5Cfrac%7B%7B%7B%5Cpartial+%5E2%7Dp%7D%7D%7B%7B%5Cpartial+%7Bx%5E2%7D%7D%7D+%2B+%5Cfrac%7B%7B%7B%5Cpartial+%5E2%7Dp%7D%7D%7B%7B%5Cpartial+%7By%5E2%7D%7D%7D+%2B+%5Cfrac%7B%7B%7B%5Cpartial+%5E2%7Dp%7D%7D%7B%7B%5Cpartial+%7Bz%5E2%7D%7D%7D%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=000&#038;s=3' alt='&#92;frac{{{&#92;partial ^2}p}}{{&#92;partial {t^2}}} = {c^2}&#92;left( {&#92;frac{{{&#92;partial ^2}p}}{{&#92;partial {x^2}}} + &#92;frac{{{&#92;partial ^2}p}}{{&#92;partial {y^2}}} + &#92;frac{{{&#92;partial ^2}p}}{{&#92;partial {z^2}}}} &#92;right) ' title='&#92;frac{{{&#92;partial ^2}p}}{{&#92;partial {t^2}}} = {c^2}&#92;left( {&#92;frac{{{&#92;partial ^2}p}}{{&#92;partial {x^2}}} + &#92;frac{{{&#92;partial ^2}p}}{{&#92;partial {y^2}}} + &#92;frac{{{&#92;partial ^2}p}}{{&#92;partial {z^2}}}} &#92;right) ' class='latex' /></p>
<p>Also bear in mind that <img src='http://s0.wp.com/latex.php?latex=p+%3D+p%28x%2Cy%2Cz%2Ct%29+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p = p(x,y,z,t) ' title='p = p(x,y,z,t) ' class='latex' />, which is our sought quantity &#8211; the pressure at a specific point in space at a specific time.</p>
<p>If we can numerically approximate the partial derivatives in the wave equation, and discretise space and time, we can come up with an algorithm that will allow an iterative solution of our governing PDE. Let&#8217;s do just that.</p>
<p><strong>Finite Difference Approximation</strong></p>
<p>Recall that by the <a href="http://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus" target="_blank">fundamental theorem of calculus</a>, we can approximate the derivative of a function at a point by means of <a href="http://en.wikipedia.org/wiki/Finite_difference" target="_blank">finite differences</a>. A 2nd order finite difference is defined as:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B%7Bf%5Cleft%28+%7Bx+%2B+h%7D+%5Cright%29+-+2f%5Cleft%28+x+%5Cright%29+%2B+f%28x+-+h%29%7D%7D%7B%7B%7Bh%5E2%7D%7D%7D+-+%5Cfrac%7B%7B%7Bd%5E2%7Df%5Cleft%28+x+%5Cright%29%7D%7D%7B%7Bd%7Bx%5E2%7D%7D%7D+%3D+%7B%5Crm%7B%7B%5Crm+O%7D%7D%7D%5Cleft%28+%7B%7Bh%5E2%7D%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=000&#038;s=3' alt='&#92;frac{{f&#92;left( {x + h} &#92;right) - 2f&#92;left( x &#92;right) + f(x - h)}}{{{h^2}}} - &#92;frac{{{d^2}f&#92;left( x &#92;right)}}{{d{x^2}}} = {&#92;rm{{&#92;rm O}}}&#92;left( {{h^2}} &#92;right) ' title='&#92;frac{{f&#92;left( {x + h} &#92;right) - 2f&#92;left( x &#92;right) + f(x - h)}}{{{h^2}}} - &#92;frac{{{d^2}f&#92;left( x &#92;right)}}{{d{x^2}}} = {&#92;rm{{&#92;rm O}}}&#92;left( {{h^2}} &#92;right) ' class='latex' /></p>
<p>h-squared is the distance between the two points on our function, so for the time derivative it corresponds to the temporal period (delta-t), and for the space derivatives it corresponds to the spatial period (delta-x, delta-y and delta-z respectively).</p>
<p>Applying that to the four partial derivatives in the wave equation (one for time, three for space) we can show that:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%7B%7B%7B%5Cpartial+%5E2%7Dp%7D+%5Cover+%7B%5Cpartial+%7Bt%5E2%7D%7D%7D+%5Capprox+%7B%7B%5Cleft.+p+%5Cright%7C_%7Bx%2Cy%2Cz%7D%5E%7Bt+%2B+%5Cdelta+t%7D+-+2%5Cleft.+p+%5Cright%7C_%7Bx%2Cy%2Cz%7D%5Et+%2B+%5Cleft.+p+%5Cright%7C_%7Bx%2Cy%2Cz%7D%5E%7Bn+-+%5Cdelta+t%7D%7D+%5Cover+%7B%5Cdelta+%7Bt%5E2%7D%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=3' alt='{{{&#92;partial ^2}p} &#92;over {&#92;partial {t^2}}} &#92;approx {{&#92;left. p &#92;right|_{x,y,z}^{t + &#92;delta t} - 2&#92;left. p &#92;right|_{x,y,z}^t + &#92;left. p &#92;right|_{x,y,z}^{n - &#92;delta t}} &#92;over {&#92;delta {t^2}}} ' title='{{{&#92;partial ^2}p} &#92;over {&#92;partial {t^2}}} &#92;approx {{&#92;left. p &#92;right|_{x,y,z}^{t + &#92;delta t} - 2&#92;left. p &#92;right|_{x,y,z}^t + &#92;left. p &#92;right|_{x,y,z}^{n - &#92;delta t}} &#92;over {&#92;delta {t^2}}} ' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%7B%7B%7B%5Cpartial+%5E2%7Dp%7D+%5Cover+%7B%5Cpartial+%7Bx%5E2%7D%7D%7D+%5Capprox+%7B%7B%5Cleft.+p+%5Cright%7C_%7Bx+%2B+%5Cdelta+x%2Cy%2Cz%7D%5Et+-+2%5Cleft.+p+%5Cright%7C_%7Bx%2Cy%2Cz%7D%5Et+%2B+%5Cleft.+p+%5Cright%7C_%7Bx+-+%5Cdelta+x%2Cy%2Cz%7D%5Et%7D+%5Cover+%7B%5Cdelta+%7Bx%5E2%7D%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=3' alt='{{{&#92;partial ^2}p} &#92;over {&#92;partial {x^2}}} &#92;approx {{&#92;left. p &#92;right|_{x + &#92;delta x,y,z}^t - 2&#92;left. p &#92;right|_{x,y,z}^t + &#92;left. p &#92;right|_{x - &#92;delta x,y,z}^t} &#92;over {&#92;delta {x^2}}} ' title='{{{&#92;partial ^2}p} &#92;over {&#92;partial {x^2}}} &#92;approx {{&#92;left. p &#92;right|_{x + &#92;delta x,y,z}^t - 2&#92;left. p &#92;right|_{x,y,z}^t + &#92;left. p &#92;right|_{x - &#92;delta x,y,z}^t} &#92;over {&#92;delta {x^2}}} ' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%7B%7B%7B%5Cpartial+%5E2%7Dp%7D+%5Cover+%7B%5Cpartial+%7By%5E2%7D%7D%7D+%5Capprox+%7B%7B%5Cleft.+p+%5Cright%7C_%7Bx%2Cy+%2B+%5Cdelta+y%2Cz%7D%5Et+-+2%5Cleft.+p+%5Cright%7C_%7Bx%2Cy%2Cz%7D%5Et+%2B+%5Cleft.+p+%5Cright%7C_%7Bx%2Cy+-+%5Cdelta+y%2Cz%7D%5Et%7D+%5Cover+%7B%5Cdelta+%7By%5E2%7D%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=3' alt='{{{&#92;partial ^2}p} &#92;over {&#92;partial {y^2}}} &#92;approx {{&#92;left. p &#92;right|_{x,y + &#92;delta y,z}^t - 2&#92;left. p &#92;right|_{x,y,z}^t + &#92;left. p &#92;right|_{x,y - &#92;delta y,z}^t} &#92;over {&#92;delta {y^2}}} ' title='{{{&#92;partial ^2}p} &#92;over {&#92;partial {y^2}}} &#92;approx {{&#92;left. p &#92;right|_{x,y + &#92;delta y,z}^t - 2&#92;left. p &#92;right|_{x,y,z}^t + &#92;left. p &#92;right|_{x,y - &#92;delta y,z}^t} &#92;over {&#92;delta {y^2}}} ' class='latex' /></p>
<p><img src='http://s0.wp.com/latex.php?latex=%7B%7B%7B%5Cpartial+%5E2%7Dp%7D+%5Cover+%7B%5Cpartial+%7Bz%5E2%7D%7D%7D+%5Capprox+%7B%7B%5Cleft.+p+%5Cright%7C_%7Bx%2Cy%2Cz+%2B+%5Cdelta+z%7D%5Et+-+2%5Cleft.+p+%5Cright%7C_%7Bx%2Cy%2Cz%7D%5Et+%2B+%5Cleft.+p+%5Cright%7C_%7Bx%2Cy%2Cz+-+%5Cdelta+z%7D%5Et%7D+%5Cover+%7B%5Cdelta+%7Bz%5E2%7D%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=3' alt='{{{&#92;partial ^2}p} &#92;over {&#92;partial {z^2}}} &#92;approx {{&#92;left. p &#92;right|_{x,y,z + &#92;delta z}^t - 2&#92;left. p &#92;right|_{x,y,z}^t + &#92;left. p &#92;right|_{x,y,z - &#92;delta z}^t} &#92;over {&#92;delta {z^2}}} ' title='{{{&#92;partial ^2}p} &#92;over {&#92;partial {z^2}}} &#92;approx {{&#92;left. p &#92;right|_{x,y,z + &#92;delta z}^t - 2&#92;left. p &#92;right|_{x,y,z}^t + &#92;left. p &#92;right|_{x,y,z - &#92;delta z}^t} &#92;over {&#92;delta {z^2}}} ' class='latex' /></p>
<p>These will soon become very useful&#8230;</p>
<p><strong>Derivation of a Discrete Update Equation</strong></p>
<p>Now, before we proceed there is one more &#8216;preparation&#8217; to make. We need to normalise the temporal and spatial discretisation steps to integer quantities. We do that by introducing four discrete indices corresponding to their continuous counterparts: n for discrete time, and i,j and k for discrete space, such that:</p>
<p><img src='http://s0.wp.com/latex.php?latex=x+%3D+i%5Cdelta+x%2Cy+%3D+j%5Cdelta+y%2Cz+%3D+k%5Cdelta+z%2Ct+%3D+n%5Cdelta+t+&#038;bg=ffffff&#038;fg=000&#038;s=2' alt='x = i&#92;delta x,y = j&#92;delta y,z = k&#92;delta z,t = n&#92;delta t ' title='x = i&#92;delta x,y = j&#92;delta y,z = k&#92;delta z,t = n&#92;delta t ' class='latex' /></p>
<p>Now, we can rewrite the approximations to the derivatives using the above discrete notation and substitute back into the original wave equation,. yielding:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%7B%7B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn+%2B+1%7D+-+2%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5En+%2B+%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn+-+1%7D%7D+%5Cover+%7B%5Cdelta+%7Bt%5E2%7D%7D%7D+%3D+%7Bc%5E2%7D%5Cleft%28+%7B%7B%7B%5Cleft.+p+%5Cright%7C_%7Bi+%2B+1%2Cj%2Ck%7D%5En+-+2%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5En+%2B+%5Cleft.+p+%5Cright%7C_%7Bi+-+1%2Cj%2Ck%7D%5En%7D+%5Cover+%7B%5Cdelta+%7Bx%5E2%7D%7D%7D+%2B+%7B%7B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj+%2B+1%2Ck%7D%5En+-+2%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5En+%2B+%5Cleft.+p+%5Cright%7C_%7Bi%2Cj+-+1%2Ck%7D%5En%7D+%5Cover+%7B%5Cdelta+%7By%5E2%7D%7D%7D+%2B+%7B%7B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck+%2B+1%7D%5En+-+2%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5En+%2B+%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck+-+1%7D%5En%7D+%5Cover+%7B%5Cdelta+%7Bz%5E2%7D%7D%7D%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=000&#038;s=3' alt='{{&#92;left. p &#92;right|_{i,j,k}^{n + 1} - 2&#92;left. p &#92;right|_{i,j,k}^n + &#92;left. p &#92;right|_{i,j,k}^{n - 1}} &#92;over {&#92;delta {t^2}}} = {c^2}&#92;left( {{{&#92;left. p &#92;right|_{i + 1,j,k}^n - 2&#92;left. p &#92;right|_{i,j,k}^n + &#92;left. p &#92;right|_{i - 1,j,k}^n} &#92;over {&#92;delta {x^2}}} + {{&#92;left. p &#92;right|_{i,j + 1,k}^n - 2&#92;left. p &#92;right|_{i,j,k}^n + &#92;left. p &#92;right|_{i,j - 1,k}^n} &#92;over {&#92;delta {y^2}}} + {{&#92;left. p &#92;right|_{i,j,k + 1}^n - 2&#92;left. p &#92;right|_{i,j,k}^n + &#92;left. p &#92;right|_{i,j,k - 1}^n} &#92;over {&#92;delta {z^2}}}} &#92;right) ' title='{{&#92;left. p &#92;right|_{i,j,k}^{n + 1} - 2&#92;left. p &#92;right|_{i,j,k}^n + &#92;left. p &#92;right|_{i,j,k}^{n - 1}} &#92;over {&#92;delta {t^2}}} = {c^2}&#92;left( {{{&#92;left. p &#92;right|_{i + 1,j,k}^n - 2&#92;left. p &#92;right|_{i,j,k}^n + &#92;left. p &#92;right|_{i - 1,j,k}^n} &#92;over {&#92;delta {x^2}}} + {{&#92;left. p &#92;right|_{i,j + 1,k}^n - 2&#92;left. p &#92;right|_{i,j,k}^n + &#92;left. p &#92;right|_{i,j - 1,k}^n} &#92;over {&#92;delta {y^2}}} + {{&#92;left. p &#92;right|_{i,j,k + 1}^n - 2&#92;left. p &#92;right|_{i,j,k}^n + &#92;left. p &#92;right|_{i,j,k - 1}^n} &#92;over {&#92;delta {z^2}}}} &#92;right) ' class='latex' /></p>
<p>Next, we have to consider two more things. First, if we assume uniform discretisation in all spatial directions (i.e. delta x = delta y = delta z) we can simplify things a whole lot, so let&#8217;s do that:<br />
<img src='http://s0.wp.com/latex.php?latex=%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%2B1%7D-2%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn-1%7D%3D%5Cfrac%7B%7B%7Bc%7D%5E%7B2%7D%7D%5Cdelta+%7B%7Bt%7D%5E%7B2%7D%7D%7D%7B%5Cdelta+%7B%7Bx%7D%5E%7B2%7D%7D%7D%5Cleft%28+%5Cleft.+p+%5Cright%7C_%7Bi%2B1%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi-1%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2B1%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj-1%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%2B1%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck-1%7D%5E%7Bn%7D-6%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=000&#038;s=2' alt='&#92;left. p &#92;right|_{i,j,k}^{n+1}-2&#92;left. p &#92;right|_{i,j,k}^{n}+&#92;left. p &#92;right|_{i,j,k}^{n-1}=&#92;frac{{{c}^{2}}&#92;delta {{t}^{2}}}{&#92;delta {{x}^{2}}}&#92;left( &#92;left. p &#92;right|_{i+1,j,k}^{n}+&#92;left. p &#92;right|_{i-1,j,k}^{n}+&#92;left. p &#92;right|_{i,j+1,k}^{n}+&#92;left. p &#92;right|_{i,j-1,k}^{n}+&#92;left. p &#92;right|_{i,j,k+1}^{n}+&#92;left. p &#92;right|_{i,j,k-1}^{n}-6&#92;left. p &#92;right|_{i,j,k}^{n} &#92;right) ' title='&#92;left. p &#92;right|_{i,j,k}^{n+1}-2&#92;left. p &#92;right|_{i,j,k}^{n}+&#92;left. p &#92;right|_{i,j,k}^{n-1}=&#92;frac{{{c}^{2}}&#92;delta {{t}^{2}}}{&#92;delta {{x}^{2}}}&#92;left( &#92;left. p &#92;right|_{i+1,j,k}^{n}+&#92;left. p &#92;right|_{i-1,j,k}^{n}+&#92;left. p &#92;right|_{i,j+1,k}^{n}+&#92;left. p &#92;right|_{i,j-1,k}^{n}+&#92;left. p &#92;right|_{i,j,k+1}^{n}+&#92;left. p &#92;right|_{i,j,k-1}^{n}-6&#92;left. p &#92;right|_{i,j,k}^{n} &#92;right) ' class='latex' /></p>
<p>Also, we want to consider the relationship between change in time, change in space and velocity of propagation. In a normal physical situation, the change in space would equal the change in time, times the velocity of propagation; however if we try to do that here some nasty things would happen. This is because our algorithm is recursive, and a growing solution will render it unstable. As such, we adhere to the <a href="http://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition" target="_blank">Courant-Friedrichs-Lewy</a> criterion, which for our scheme states that:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Clambda+%3Dc%5Cfrac%7B%5Cdelta+t%7D%7B%5Cdelta+x%7D%5Cle+%5Cfrac%7B1%7D%7B%5Csqrt%7BD%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=3' alt='&#92;lambda =c&#92;frac{&#92;delta t}{&#92;delta x}&#92;le &#92;frac{1}{&#92;sqrt{D}} ' title='&#92;lambda =c&#92;frac{&#92;delta t}{&#92;delta x}&#92;le &#92;frac{1}{&#92;sqrt{D}} ' class='latex' /></p>
<p>Where D is the dimensionality of the problem.</p>
<p>So by plugging that into our difference equation we get:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%2B1%7D-2%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn-1%7D%3D%7B%7B%5Clambda+%7D%5E%7B2%7D%7D%5Cleft%28+%5Cleft.+p+%5Cright%7C_%7Bi%2B1%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi-1%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2B1%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj-1%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%2B1%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck-1%7D%5E%7Bn%7D+%5Cright%29-%7B%7B%5Clambda+%7D%5E%7B2%7D%7D6%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%7D+&#038;bg=ffffff&#038;fg=000&#038;s=2' alt='&#92;left. p &#92;right|_{i,j,k}^{n+1}-2&#92;left. p &#92;right|_{i,j,k}^{n}+&#92;left. p &#92;right|_{i,j,k}^{n-1}={{&#92;lambda }^{2}}&#92;left( &#92;left. p &#92;right|_{i+1,j,k}^{n}+&#92;left. p &#92;right|_{i-1,j,k}^{n}+&#92;left. p &#92;right|_{i,j+1,k}^{n}+&#92;left. p &#92;right|_{i,j-1,k}^{n}+&#92;left. p &#92;right|_{i,j,k+1}^{n}+&#92;left. p &#92;right|_{i,j,k-1}^{n} &#92;right)-{{&#92;lambda }^{2}}6&#92;left. p &#92;right|_{i,j,k}^{n} ' title='&#92;left. p &#92;right|_{i,j,k}^{n+1}-2&#92;left. p &#92;right|_{i,j,k}^{n}+&#92;left. p &#92;right|_{i,j,k}^{n-1}={{&#92;lambda }^{2}}&#92;left( &#92;left. p &#92;right|_{i+1,j,k}^{n}+&#92;left. p &#92;right|_{i-1,j,k}^{n}+&#92;left. p &#92;right|_{i,j+1,k}^{n}+&#92;left. p &#92;right|_{i,j-1,k}^{n}+&#92;left. p &#92;right|_{i,j,k+1}^{n}+&#92;left. p &#92;right|_{i,j,k-1}^{n} &#92;right)-{{&#92;lambda }^{2}}6&#92;left. p &#92;right|_{i,j,k}^{n} ' class='latex' /></p>
<p>Solving for <img src='http://s0.wp.com/latex.php?latex=%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%2B1%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;left. p &#92;right|_{i,j,k}^{n+1} ' title='&#92;left. p &#92;right|_{i,j,k}^{n+1} ' class='latex' />, the equation can be rearranged to show that:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%2B1%7D%3D%7B%7B%5Clambda+%7D%5E%7B2%7D%7D%5Cleft%28+%5Cleft.+p+%5Cright%7C_%7Bi-1%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2B1%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj-1%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2B1%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck-1%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%2B1%7D%5E%7Bn%7D+%5Cright%29%2B2%5Cleft%28+1-3%7B%7B%5Clambda+%7D%5E%7B2%7D%7D+%5Cright%29%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%7D-%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn-1%7D+&#038;bg=ffffff&#038;fg=000&#038;s=2' alt='&#92;left. p &#92;right|_{i,j,k}^{n+1}={{&#92;lambda }^{2}}&#92;left( &#92;left. p &#92;right|_{i-1,j,k}^{n}+&#92;left. p &#92;right|_{i+1,j,k}^{n}+&#92;left. p &#92;right|_{i,j-1,k}^{n}+&#92;left. p &#92;right|_{i,j+1,k}^{n}+&#92;left. p &#92;right|_{i,j,k-1}^{n}+&#92;left. p &#92;right|_{i,j,k+1}^{n} &#92;right)+2&#92;left( 1-3{{&#92;lambda }^{2}} &#92;right)&#92;left. p &#92;right|_{i,j,k}^{n}-&#92;left. p &#92;right|_{i,j,k}^{n-1} ' title='&#92;left. p &#92;right|_{i,j,k}^{n+1}={{&#92;lambda }^{2}}&#92;left( &#92;left. p &#92;right|_{i-1,j,k}^{n}+&#92;left. p &#92;right|_{i+1,j,k}^{n}+&#92;left. p &#92;right|_{i,j-1,k}^{n}+&#92;left. p &#92;right|_{i,j+1,k}^{n}+&#92;left. p &#92;right|_{i,j,k-1}^{n}+&#92;left. p &#92;right|_{i,j,k+1}^{n} &#92;right)+2&#92;left( 1-3{{&#92;lambda }^{2}} &#92;right)&#92;left. p &#92;right|_{i,j,k}^{n}-&#92;left. p &#92;right|_{i,j,k}^{n-1} ' class='latex' /></p>
<p>Which is the update equation for the SLF scheme, typically shown in scientific publications on this topic.</p>
<p>The equation can be further simplified, if we set the Courant variable to the scheme&#8217;s upper stability limit, which for a 3D SLF is <img src='http://s0.wp.com/latex.php?latex=1%2F%5Csqrt%7B3%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='1/&#92;sqrt{3}' title='1/&#92;sqrt{3}' class='latex' />. Then we get:</p>
<p><img src='http://s0.wp.com/latex.php?latex=%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn%2B1%7D%3D%5Cfrac%7B1%7D%7B3%7D%5Cleft%28+%5Cleft.+p+%5Cright%7C_%7Bi-1%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2B1%2Cj%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj-1%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2B1%2Ck%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck-1%7D%5E%7Bn%7D%2B%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%2B1%7D%5E%7Bn%7D+%5Cright%29-%5Cleft.+p+%5Cright%7C_%7Bi%2Cj%2Ck%7D%5E%7Bn-1%7D+&#038;bg=ffffff&#038;fg=000&#038;s=2' alt='&#92;left. p &#92;right|_{i,j,k}^{n+1}=&#92;frac{1}{3}&#92;left( &#92;left. p &#92;right|_{i-1,j,k}^{n}+&#92;left. p &#92;right|_{i+1,j,k}^{n}+&#92;left. p &#92;right|_{i,j-1,k}^{n}+&#92;left. p &#92;right|_{i,j+1,k}^{n}+&#92;left. p &#92;right|_{i,j,k-1}^{n}+&#92;left. p &#92;right|_{i,j,k+1}^{n} &#92;right)-&#92;left. p &#92;right|_{i,j,k}^{n-1} ' title='&#92;left. p &#92;right|_{i,j,k}^{n+1}=&#92;frac{1}{3}&#92;left( &#92;left. p &#92;right|_{i-1,j,k}^{n}+&#92;left. p &#92;right|_{i+1,j,k}^{n}+&#92;left. p &#92;right|_{i,j-1,k}^{n}+&#92;left. p &#92;right|_{i,j+1,k}^{n}+&#92;left. p &#92;right|_{i,j,k-1}^{n}+&#92;left. p &#92;right|_{i,j,k+1}^{n} &#92;right)-&#92;left. p &#92;right|_{i,j,k}^{n-1} ' class='latex' /></p>
<p>Which in words mean that the pressure on any node on the grid one sample ahead in time, equals a weighted sum of its surrounding pressures minus its own pressure one sample back in time&#8230; Simple, right?</p>
<p>This equation can help us to solve for sound propagation in the medium, which is assumed to be air. At the limits of the domain the update equation becomes slightly different, as it should account for the applied boundary conditions. But let&#8217;s not be bothered about that for now.</p>
<p>In &#8216;part 2&#8242; of the tutorial, we&#8217;ll walk through the implementation of this in Matlab. Stay tuned!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=84</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Virtual Dummy-Head</title>
		<link>http://room-acoustics.com/blog/?p=78</link>
		<comments>http://room-acoustics.com/blog/?p=78#comments</comments>
		<pubDate>Thu, 28 Apr 2011 10:48:43 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Resources and Datasets]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=78</guid>
		<description><![CDATA[Virtual reconstruction of human HRTFs go back to the later 90&#8242;s where scientists at ISVR (Southampton) used laser-scanned surfaces of real human faces in BEM simulations (see Kahana et al.). Nowadays using &#8216;real&#8217; head and torso geometries in models is becoming increasingly popular, as high resolution modelling is more accessible due to the advances in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://room-acoustics.com/blog/wp-content/uploads/2011/04/scan_polymesh2.jpg"><img class="alignleft size-medium wp-image-80" title="scan_polymesh2" src="http://room-acoustics.com/blog/wp-content/uploads/2011/04/scan_polymesh2-261x300.jpg" alt="" width="261" height="300" /></a>Virtual reconstruction of human HRTFs go back to the later 90&#8242;s where scientists at ISVR (Southampton) used laser-scanned surfaces of real human faces in <a title="Boundary Element Method for Everyone" href="http://room-acoustics.com/blog/?p=19">BEM</a> simulations (see Kahana et al.). Nowadays using &#8216;real&#8217; head and torso geometries in models is becoming increasingly popular, as high resolution modelling is more accessible due to the advances in computing technology.  Browsing through the web for a good quality 3D head scans, I came across this interesting project from DTU. It features some high resolution surface scans of human heads and ears, which can be downloaded freely <a href="http://www2.imm.dtu.dk/projects/OpenHear/">from their website</a>.</p>
<p>Another very detailed model (shown in the image above), is kindly provided by &#8220;<a href="http://www.ten24.info/index.php/shop/character-models/free-3d-head-scan-model-52/">Ten24</a>&#8220;. It is a full head and semi-torso laser-scanned to a high resolution poly mesh &#8211; very rare quality for a freebie.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=78</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WaveCloud: Acoustics FDTD on GP-GPU</title>
		<link>http://room-acoustics.com/blog/?p=68</link>
		<comments>http://room-acoustics.com/blog/?p=68#comments</comments>
		<pubDate>Mon, 25 Apr 2011 16:26:23 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=68</guid>
		<description><![CDATA[As part of my ongoing doctoral research, I created an FDTD model that exploits the power and parralelism of general purpose graphics processing units (GP-GPU). FDTD is computationally expensive and memory hungry; especially if one is looking for a fine spatial resolution, a significant bandwidth (the same criterion, sort of), or considerably large spaces. GP-GPUs [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://room-acoustics.com/blog/wp-content/uploads/2011/04/WaveCloud_300dpi_pb.png"><img class="size-medium wp-image-74 alignright" title="WaveCloud_300dpi_pb" src="http://room-acoustics.com/blog/wp-content/uploads/2011/04/WaveCloud_300dpi_pb-300x199.png" alt="" width="300" height="199" /></a>As part of my ongoing doctoral research, I created an FDTD model that exploits the power and parralelism of general purpose graphics processing units (GP-GPU). FDTD is computationally expensive and memory hungry; especially if one is looking for a fine spatial resolution, a significant bandwidth (the same criterion, sort of), or considerably large spaces.</p>
<p>GP-GPUs have been around for quite some time, and are a very cost effective solution for executing parralel algorithms. For example, a high end consumer graphics card (around 400£) has about 240 cores and 1.5GB of memory. There are also specialised products dedicated to scientific computing, such as nVidia&#8217;s <a href="http://www.nvidia.com/object/tesla_computing_solutions.html">Tesla</a> systems. The nice thing about nVidia&#8217;s architecture, termed <a href="http://www.nvidia.com/object/tesla_computing_solutions.html">CUDA</a>, is that you don&#8217;t need to be a graphics programmer in order to handle it.</p>
<p>Truly, CUDA is simple to learn but difficult to push to the limit, however even simple algorithms run very well and getting to know the platform is definitely worth your time (given that your algorithms are suitable for parralel computation). I guess that the most difficult thing is getting used to the GPU programming paradigm; the rest is just small technical details.</p>
<p>I am not a computer scientist, so if any of you readers are, please forgive my choice of words. In traditional CPU programming we tend to think of processor activity as a &#8216;costly&#8217; operation wheras memory traffic is treated as &#8216;cheap&#8217;, so programmers tend to store a lot of information in short term memory rather. In GPU programming, the opposite happens. Memory access is slow but computation is fast, so we prefer to <em>re</em>-compute rather than <em>pre</em>-compute. That&#8217;s the main idea, and if you can put your head around it, you&#8217;ve already made a big step towards a good GPGPU algorithm.</p>
<p>This raises some new issues, and calls for rexamination of methods that were &#8216;abandoned&#8217; due to their high computational expense. One of these is the pseudo-spectral time-domain (PSTD) method (see Liu or Spa et al.) which strongly rely on calculating the partial derivatives in the wave equation by means of Fourier transforms &#8211; an ideal operation for GPGPU parralelisation. My co-supervisor, Professor Jamie Angus has written about this in a recent <a href="http://www.aes.org/e-lib/browse.cfm?elib=15260" target="_blank">AES paper</a>.</p>
<p>Back to the original scope of this post,  &#8216;traditional&#8217; FDTD methods also benefit from GPGPU technology. In <a href="http://usir.salford.ac.uk/11568/" target="_blank">a recent study</a> I conducted with my supervisor Dr. Bruno Fazenda, we have shown that up to x30 improvement in calculation speed can be achieved. Other studies (for example see Savioja, or Southern et al. ) have shown similar improvements. As I mentioned earlier, this is definitely &#8216;worth your while&#8217;.</p>
<p>WaveCloud is the title of my &#8216;home-brewed&#8217; GPU-enabled FDTD model, that makes use of the recently published <a title="Compact Explicit Schemes for the Wave Equation" href="http://room-acoustics.com/blog/?p=37" target="_blank">compact explicit schemes</a>. It consists of a core engine written in plain C with CUDA extensions, and a wrapper/GUI written in C#. Here&#8217;s a screenshot of &#8216;WaveCloud Desktop&#8217;:</p>
<p><a href="http://room-acoustics.com/blog/wp-content/uploads/2011/04/wavecloud.jpg"><img class="alignnone size-medium wp-image-71" title="wavecloud" src="http://room-acoustics.com/blog/wp-content/uploads/2011/04/wavecloud-300x213.jpg" alt="" width="300" height="213" /></a></p>
<p>In case you were wondering, there are no commercial plans for this software and it is meant to remain within the University of Salford. However, I am now working on a MATLAB toolbox utilising the same engines, that will most likely be released for research purposes in the future (another reason to follow this blog&#8230;).</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=68</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Auditory Modelling in Matlab</title>
		<link>http://room-acoustics.com/blog/?p=61</link>
		<comments>http://room-acoustics.com/blog/?p=61#comments</comments>
		<pubDate>Mon, 25 Apr 2011 13:38:22 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=61</guid>
		<description><![CDATA[There&#8217;s a wealth of auditory modelling tools freely available on the web, however in this post I would like to focus on the &#8220;auditory modeling toolbox&#8220;, a source-forge based project lead by Peter Soendergaard. The package contains Matlab functions for modelling the middle ear (Goode et al.), basilar membrane selectivity (Glasberg and Moore), inner hair [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a wealth of auditory modelling tools freely available on the web, however in this post I would like to focus on the &#8220;<a href="http://amtoolbox.sourceforge.net/" target="_blank">auditory modeling toolbox</a>&#8220;, a source-forge based project lead by Peter Soendergaard. The package contains Matlab functions for modelling the middle ear (Goode et al.), basilar membrane selectivity (Glasberg and Moore), inner hair cells (Dau, Meddis) and much more.</p>
<p>A unique feature of this toolbox is the binaural processors, currently supporting Lindemann&#8217;s model; and hopefully also Gaik and Breebaart soon (from what I hear).</p>
<p>Note that you also need the <a href="http://ltfat.sourceforge.net/" target="_blank">LTFAT</a> toolbox to run these functions.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=61</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Acoustics Tube</title>
		<link>http://room-acoustics.com/blog/?p=49</link>
		<comments>http://room-acoustics.com/blog/?p=49#comments</comments>
		<pubDate>Mon, 25 Apr 2011 12:25:26 +0000</pubDate>
		<dc:creator>jonessy</dc:creator>
				<category><![CDATA[Popular Science]]></category>

		<guid isPermaLink="false">http://room-acoustics.com/blog/?p=49</guid>
		<description><![CDATA[A while back, I&#8217;ve put together some visual demonstrations of common acoustical phenomena. It all begun when playing around with one of my home-brewed FDTD models and figured out it can do a bunch of cool stuff, other than calculating impulse responses. Right away, I opened Morse &#38; Ingard and started to challenge the program&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I&#8217;ve put together some visual demonstrations of common acoustical phenomena. It all begun when playing around with one of my <a href="http://www.acoustics.salford.ac.uk/profiles/sheaffer/?content=project2">home-brewed FDTD models</a> and figured out it can do a bunch of cool stuff, other than calculating impulse responses. Right away, I opened Morse &amp; Ingard and started to challenge the program&#8230;</p>
<p>Here&#8217;s an example a Gaussian pulse being scattered from a round object:</p>
<p><object width="500" height="306"><param name="movie" value="http://www.youtube.com/v/iYjzsTwk8MM?version=3"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/iYjzsTwk8MM?version=3" type="application/x-shockwave-flash" width="500" height="306" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>(yes. I know. The object is phase reversing&#8230;)</p>
<p>The rest of the simulations can be seen at <a href="http://www.youtube.com/jonsheaffer">Jon&#8217;s Acoustics Tube</a>.</p>
<p>Enjoy,</p>
<p>Jon.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://room-acoustics.com/blog/?feed=rss2&#038;p=49</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

