<?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: Estimating memory required for elastic simulations</title>
		<link>http://www.k-wave.org/forum/topic/estimating-memory-required-for-elastic-simulations</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:06: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/estimating-memory-required-for-elastic-simulations" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Estimating memory required for elastic simulations"</title>
			<link>http://www.k-wave.org/forum/topic/estimating-memory-required-for-elastic-simulations#post-5016</link>
			<pubDate>Mon, 23 Mar 2015 17:25:12 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5016@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi James, &#60;/p&#62;
&#60;p&#62;The matrices are re-written each time step, meaning there is no storage in time other than what is specified by the &#60;code&#62;sensor&#60;/code&#62; variable. So in the worst case, not including the input or output data, the memory consumption in GB in single precision would be:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;69 * (Nx * Ny * Nz) * 4 / 1024^3&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Incidentally, I'd always advise doing the simulations in single precision. The accuracy of the simulation results will be dominated by the PML and numerical dispersion, so the difference in single and double precision is completely negligible. Using single precision will save compute time.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>james411j on "Estimating memory required for elastic simulations"</title>
			<link>http://www.k-wave.org/forum/topic/estimating-memory-required-for-elastic-simulations#post-5008</link>
			<pubDate>Tue, 17 Mar 2015 08:48:24 +0000</pubDate>
			<dc:creator>james411j</dc:creator>
			<guid isPermaLink="false">5008@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;Thank you for your response.&#60;/p&#62;
&#60;p&#62;Just to clairfy. In the worst case scenario 69 matrices would be used. Presumably each of these 69 matrices would be required for each time step and held in RAM until the final step? So for a simulation of Nt time steps one would anticipate memory usage of: &#60;/p&#62;
&#60;p&#62;&#60;code&#62;69 * (Nx * Ny * Nz) * 64 bits * Nt?&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;- 64 bits as I'm assuming double type&#60;/p&#62;
&#60;p&#62;And this number would give a lower limit on the RAM required (as there are obviously the input and output variables to consider)?&#60;/p&#62;
&#60;p&#62;Many thanks,&#60;br /&#62;
James.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Estimating memory required for elastic simulations"</title>
			<link>http://www.k-wave.org/forum/topic/estimating-memory-required-for-elastic-simulations#post-5003</link>
			<pubDate>Wed, 11 Mar 2015 10:12:15 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5003@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi James, &#60;/p&#62;
&#60;p&#62;Interesting question - yes you are correct that this equation doesn't apply to the elastic case. The current implementation in MATLAB is not very memory efficient, and uses a large number of temporary matrices that could easily be re-used (these are being refactored as the C++ version is being developed). &#60;/p&#62;
&#60;p&#62;For the acoustic variables, 46 matrices of size Nx * Ny * Nz are used if the medium is lossless, or 55 matrices if the medium is absorbing. This accounts for:&#60;/p&#62;
&#60;p&#62;- 12 matrices to store the split field velocity&#60;br /&#62;
- 15 matrices to store the split stress field&#60;br /&#62;
- 9 matrices to store the velocity gradients&#60;br /&#62;
- 9 matrices to store the stress gradients&#60;br /&#62;
- 1 matrix to store the acoustic pressure (normal stress)&#60;br /&#62;
- PLUS 9 additional matrices if using absorption&#60;/p&#62;
&#60;p&#62;Regarding material properties, if the medium is heterogeneous, 9 matrices of size Nx * Ny * Nz are used if the medium is lossless, or 14 if the medium is absorbing. This accounts for:&#60;/p&#62;
&#60;p&#62;- 4 matrices to store the density on the regular and staggered grid&#60;br /&#62;
- 1 matrix to store the first Lame parameter&#60;br /&#62;
- 4 matrices to store the second Lame parameter on the regular and staggered grid&#60;br /&#62;
- PLUS 5 additional matrices to store the viscosity parameters on the regular and staggered grid if the medium is absorbing&#60;/p&#62;
&#60;p&#62;So in the worst case (absorbing, fully heterogeneous medium), 69 matrices of size Nx * Ny * Nz are used during the simulation.&#60;/p&#62;
&#60;p&#62;In the future, we intend to re-use the matrices used to store the gradients, potentially saving 18 matrices. In addition, the staggered grid values of the medium parameters could also be calculated on the fly, potentially saving 9 matrices. Some additional values could also be only calculated as needed, perhaps saving another 4 matrices. This would reduce 69 to 38 matrices. However, it's still very memory intensive.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>james411j on "Estimating memory required for elastic simulations"</title>
			<link>http://www.k-wave.org/forum/topic/estimating-memory-required-for-elastic-simulations#post-4998</link>
			<pubDate>Sun, 01 Mar 2015 22:54:10 +0000</pubDate>
			<dc:creator>james411j</dc:creator>
			<guid isPermaLink="false">4998@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Good evening,&#60;/p&#62;
&#60;p&#62;I have had a read of the k-wave manual and the examples on the website and am slowly understanding how to produce k-wave elastic wave simulations. &#60;/p&#62;
&#60;p&#62;On page 60 of the manual (&#60;a href=&#34;http://www.k-wave.org/manual/k-wave_user_manual_1.0.1.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.k-wave.org/manual/k-wave_user_manual_1.0.1.pdf&#60;/a&#62;) you show a method by which one can estimate the memory requirements of a simulation. This doesn't seem to apply to the elastic wave code though - the memory requirements are a lot lower than I am experiencing. I suspect it is the constants (13, 7) that need modifying. Could you please let me know how I can make this calculation.&#60;/p&#62;
&#60;p&#62;Many thanks for your efforts!&#60;br /&#62;
James.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
