<?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>Ganesh Swami &#187; Physics</title>
	<atom:link href="http://ergodicity.iamganesh.com/category/physics/feed/" rel="self" type="application/rss+xml" />
	<link>http://ergodicity.iamganesh.com</link>
	<description>Quick brown foxes and lazy dogs.</description>
	<lastBuildDate>Sat, 31 Jan 2009 21:07:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Gromacs Workshop</title>
		<link>http://ergodicity.iamganesh.com/2008/06/gromacs-workshop/</link>
		<comments>http://ergodicity.iamganesh.com/2008/06/gromacs-workshop/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 13:54:10 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Activity]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[gromacs]]></category>
		<category><![CDATA[molecular dynamics]]></category>
		<category><![CDATA[supercomputing]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/?p=23</guid>
		<description><![CDATA[I know some of my readers are deeply interested in high performance computing and computational physics: this is a post for them. The conference I had mentioned in my previous post was the GROMACS Workshop on Advanced Simulation Methods.

Gromacs is a high performance simulation engine primarily for solving Newtonian dynamics (it also does normal mode [...]]]></description>
			<content:encoded><![CDATA[<p>I know some of my readers are deeply interested in high performance computing and computational physics: this is a post for them. The conference I had mentioned in my <a href="http://ergodicity.iamganesh.com/2008/06/17/silicon-valley/">previous post</a> was the <a href="http://www.gromacs.org/stanford2008/">GROMACS Workshop on Advanced Simulation Methods</a>.</p>

<p>Gromacs is a high performance simulation engine primarily for solving Newtonian dynamics (it also does <a href="http://en.wikipedia.org/wiki/Normal_mode">normal mode analysis</a>, structure minimization and mixed molecular mechanics-quantum mechanics simulations.) It was an industry leader in terms of raw single processor performance for many years, until Desmond from D.E. Shaw Research took over with their super-scalable algorithms (I&#8217;ve written about this <a href="http://ergodicity.iamganesh.com/2006/11/28/fast-molecular-dynamics/">before</a>.) With Gromacs 4.0, they&#8217;ve fixed the scalability problems and with a variety of other algorithmic fixes, they are the top dog once again. <strong>Disclaimer</strong>: these are all claims by relevant parties and I have not verified them myself, though I&#8217;d love to do so unencumbered. Though the Gromacs 4.0 paper is published, I&#8217;ll only be writing about it when the actual product is released.</p>

<p>The focus of the workshop was on algorithms, though there were some applications too. I&#8217;m sure an applications person would have felt out of place, but I felt I had something to contribute in almost every topic that was discussed. I&#8217;m archiving the list of topics here for posterity:</p>

<ul>
<li>The new domain decomposition parallelization in Gromacs 4.0, with some tips &amp; tricks to get the most out of your hardware</li>
<li>Different methods to perform free energy calculations. Slow-growth, perturbations, Bennett Acceptance Ratio. Which protocol is most efficient, and what new things will be in Gromacs 4.0?</li>
<li>QM/MM. How do you mix Quantum Mechanics with Gromacs?</li>
<li>Virtual sites for hydrogen motion removal and long time-steps</li>
<li>Membrane protein simulations</li>
<li>Replica exchange, and extracting kinetic data from it</li>
<li>Local pressure extensions to Gromacs</li>
<li>Gromacs source code walk-through</li>
</ul>

<p>The take home message: strong coupling between various pieces of the algorithm is anti-thesis to parallel scalability. The CPU industry seems to have hit a brick wall in terms of improving raw computational speed: the future is in multi-core. Therefore, remove the coupling with better algorithms and you are on your way to highly scalable and by definition superbly fast algorithms. </p>

<p>The timestep used in an integrator while solving a set of equations inherently determines the speed of the algorithm. Big timesteps will make the algorithm unstable as you your trajectory will not be able to follow the phase space manifold accurately (as a side note Euler-type integrators also become unstable as you make the timestep smaller, but this is the least of your worries with a non-symplectic integrator.) The Nyquist theorem determines the sampling rate, so removing fast (or high frequency) degrees of motion such as hydrogen bond vibrations with constraints on them is required for a big timestep. Usual constraints algorithms are coupled leading to undesirable non-scalable algorithms. The Gromacs developers have solved this with a new constraints algorithm called <a href="http://pubs.acs.org/cgi-bin/abstract.cgi/jctcce/2008/4/i01/abs/ct700200b.html">P-LINCS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2008/06/gromacs-workshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fitting data with Python</title>
		<link>http://ergodicity.iamganesh.com/2008/02/fitting-data-with-python/</link>
		<comments>http://ergodicity.iamganesh.com/2008/02/fitting-data-with-python/#comments</comments>
		<pubDate>Sun, 03 Feb 2008 07:33:15 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[least-squares]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2008/02/03/fitting-data-with-python/</guid>
		<description><![CDATA[I&#8217;ve recently become a heavy user of the numerical capabilities of
Python. I&#8217;ve written about my experiments before, but now I&#8217;m
writing production quality code with numpy and
matplotlib.



The above is an actual plot that I created for some Hall
measurements I was doing. I was supposed for find functional
relationships between temperature and majority charge carriers, which
in my case [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently become a heavy user of the numerical capabilities of
Python. I&#8217;ve written about my experiments <a href="http://ergodicity.iamganesh.com/2007/07/13/numerical-python/">before</a>, but now I&#8217;m
writing production quality code with <a href="http://numpy.scipy.org/">numpy</a> and
<a href="http://matplotlib.sourceforge.net/">matplotlib</a>.</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/uploads/2008/02/temp_dep_mobility.png' alt='Mobility Temperature Plot' /></p>

<p>The above is an actual plot that I created for some <a href="http://en.wikipedia.org/wiki/Hall_effect">Hall
measurements</a> I was doing. I was supposed for find functional
relationships between temperature and majority charge carriers, which
in my case were electrons because of the n-type doping. The simple
case was a least squares fit: <code>scipy.optimize.leastsq</code> to the
rescue. The more complicated part was solving a non-linear equation
for roots and then doing a least squares fit. The root-finding module
in scientific python provides lots of options.
At this point, I can confidently say that this environment has more
features than Octave. </p>

<p>Just today, I wanted to use the Fourier method on a differential
equation (plug: the advantages of which are <a href="http://ergodicity.iamganesh.com/2007/04/22/pseudospectral-methods/">here</a>) and numerical
python with <code>fft</code>, <code>fftshift</code> and <code>fftfreq</code> are exact substitutes for
their Matlab equivalents. You can also put actual LaTeX equations on
plots, which is a major plus.</p>

<p>That is all.</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2008/02/fitting-data-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wisdom from Arnold</title>
		<link>http://ergodicity.iamganesh.com/2007/09/wisdom-from-arnold/</link>
		<comments>http://ergodicity.iamganesh.com/2007/09/wisdom-from-arnold/#comments</comments>
		<pubDate>Sat, 01 Sep 2007 06:42:46 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[arnold]]></category>
		<category><![CDATA[math]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2007/09/01/wisdom-from-arnold/</guid>
		<description><![CDATA[
  All mathematics is divided into three parts: cryptography (paid for by
  CIA, KGB and the like), hydrodynamics (supported by manufacturers of
  atomic submarines) and celestial mechanics (financed by military and
  by other institutions dealing with missiles, such as NASA.).
  
  Cryptography has generated number theory, algebraic geometry over
 [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
  <p>All mathematics is divided into three parts: cryptography (paid for by
  CIA, KGB and the like), hydrodynamics (supported by manufacturers of
  atomic submarines) and celestial mechanics (financed by military and
  by other institutions dealing with missiles, such as NASA.).</p>
  
  <p>Cryptography has generated number theory, algebraic geometry over
  finite fields, algebra (the creator of modern algebra, Viete, was the
  cryptographer of King Henry IV of France), combinatorics and
  computers.</p>
  
  <p>Hydrodynamics procreated complex analysis, partial derivative
  equations, Lie groups and algebra theory, cohomology theory and
  scientific computing.</p>
  
  <p>Celestial mechanics is the origin of dynamical systems, linear
  algebra, topology, variational calculus and symplectic geometry.</p>
</blockquote>

<p>&#8211; Vladimir I. Arnold. Polymathematics: is mathematics a single science or a set of arts? In Mathematics: Frontiers and Perspectives. <em>American Mathematical Society</em>, 2000, pp. 403-416.</p>

<p>Vladimir Arnold is one of my favorite authors. He along-with Professor
<a href="http://www.cds.caltech.edu/~marsden/">Jerrold E. Marsden</a> must have written some of the best books on
mechanics (<a href="http://www.amazon.com/Mathematical-Classical-Mechanics-Graduate-Mathematics/dp/0387968903">this one</a> and <a href="http://www.cds.caltech.edu/~marsden/books/Mechanics_and_Symmetry.html">this one</a>.) I&#8217;m <a href="http://ergodicity.iamganesh.com/2007/08/27/dead-silence/">writing</a> the section
connecting geodesics, metrics and Euler-Lagrange equations and I
wasn&#8217;t sure how to introduce the material and looked to these books
for inspiration.</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2007/09/wisdom-from-arnold/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Random Facts</title>
		<link>http://ergodicity.iamganesh.com/2007/07/random-facts/</link>
		<comments>http://ergodicity.iamganesh.com/2007/07/random-facts/#comments</comments>
		<pubDate>Fri, 27 Jul 2007 08:32:40 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[geodesics]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[jokes]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[relativity]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2007/07/27/random-facts/</guid>
		<description><![CDATA[Some random math facts that I came across last week.

Poincaré group

The Special Euclidean group combines rotations and translations in
Euclidean space. The SE group is an isometry, which means it preserves
angles and distances. 

In special relativity, the 4-vectors are three space variables and one
time variable. Rotations in this space can be generalized to the
Poincaré group. Instead [...]]]></description>
			<content:encoded><![CDATA[<p>Some random math facts that I came across last week.</p>

<h3>Poincaré group</h3>

<p>The Special Euclidean group combines rotations and translations in
Euclidean space. The SE group is an isometry, which means it preserves
angles and distances. </p>

<p>In special relativity, the 4-vectors are three space variables and one
time variable. Rotations in this space can be generalized to the
Poincaré group. Instead of having sines and cosines in the rotation
part as in SE, they have hyperbolic sines and cosines.</p>

<p>The norm of a vector is defined through its inner product:</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/aba8853fa281f2cd502459ccceb1a640.gif' title=' ||x|| = \sqrt {\langle x,x \rangle}' alt=' ||x|| = \sqrt {\langle x,x \rangle}' align='middle' /></p>

<p>which in special relativity is</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/dccd5fd9bee5c77fafef225b6467cd9c.gif' title=' \langle (x,y,z,t), (x,y,z,t) \rangle = x^2 + y^2 + z^2 &amp;#8211; t^2' alt=' \langle (x,y,z,t), (x,y,z,t) \rangle = x^2 + y^2 + z^2 &amp;#8211; t^2' align='middle' /></p>

<p>A friend pointed out that the Lorentz transformation was only recently
proved to be linear. </p>

<h3>Geodesics and Metrics</h3>

<p>One of the most beautiful things I learnt in the last few weeks is the
connection between geodesics (shortest paths) and metrics in that
space. If <img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/096254c7552111f593bb632a91205f32.gif' title='g(t)' alt='g(t)' align='middle' /> is a geodesic path and <img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/273a383345e167ee1791232c40eaf917.gif' title='v(t)' alt='v(t)' align='middle' /> is the
velocity of the path:</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/81107d3f3c0bbc6ffd906a276ceda073.gif' title='v(t) = \frac{d g(t)}{dt}' alt='v(t) = \frac{d g(t)}{dt}' align='middle' /></p>

<p>then the metric is defined by</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/71f7092164044b1a7ac748c345fa0bf6.gif' title='d^2 = \int ||v(t)||^2 dt' alt='d^2 = \int ||v(t)||^2 dt' align='middle' /></p>

<p>Moreover, the path satisfies the Euler-Lagrange equation. This was
first shown by Arnold in a hydrodynamical context, and subsequently
borrowed by control systems and computer vision folks.</p>

<h3>A Poor Joke</h3>

<p>Two functions <img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/ff2d26be6b0b506663911208302f91b3.gif' title='e^x' alt='e^x' align='middle' /> and <img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/32f5240d0dbf2ccbe75ef7f8ef2015e0.gif' title='x^2' alt='x^2' align='middle' /> were going in a
car. <img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/32f5240d0dbf2ccbe75ef7f8ef2015e0.gif' title='x^2' alt='x^2' align='middle' /> looked ahead and said, &#8220;Oh shit! There comes a
differential operator.&#8221; <img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/ff2d26be6b0b506663911208302f91b3.gif' title='e^x' alt='e^x' align='middle' /> says with a smirk, &#8220;It can&#8217;t do
nothing to me!&#8221; On approaching the differential operator, it says
&#8220;Haha! I&#8217;m d/dy.&#8221;</p>

<p>As narrated to me by a random math major last week&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2007/07/random-facts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best of CiSE</title>
		<link>http://ergodicity.iamganesh.com/2007/05/best-of-cise/</link>
		<comments>http://ergodicity.iamganesh.com/2007/05/best-of-cise/#comments</comments>
		<pubDate>Tue, 15 May 2007 02:07:04 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2007/05/14/best-of-cise/</guid>
		<description><![CDATA[Computing in Science &#38; Engineering highlights the top 5 articles in honor of their 75th anniversary:


The Fast Fourier Transform for Experimentalists &#8211; Part I
Physlets for Quantum Mechanics
The Physical Basis of Computability
Ten Good Practices in Scientific Programming
The Metropolis Algorithm

]]></description>
			<content:encoded><![CDATA[<p>Computing in Science &amp; Engineering highlights the <a href="http://www.computer.org/portal/site/cise/menuitem.92a12adebee18778161489108bcd45f3/index.jsp?&amp;pName=cise_level1_article&amp;TheCat=1001&amp;path=cise/AIP75&amp;file=index.xml&amp;">top 5 articles</a> in honor of their 75th anniversary:</p>

<ul>
<li>The Fast Fourier Transform for Experimentalists &#8211; Part I</li>
<li>Physlets for Quantum Mechanics</li>
<li>The Physical Basis of Computability</li>
<li>Ten Good Practices in Scientific Programming</li>
<li>The Metropolis Algorithm</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2007/05/best-of-cise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pseudospectral Methods</title>
		<link>http://ergodicity.iamganesh.com/2007/04/pseudospectral-methods/</link>
		<comments>http://ergodicity.iamganesh.com/2007/04/pseudospectral-methods/#comments</comments>
		<pubDate>Sun, 22 Apr 2007 19:41:03 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[partial differential equations]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2007/04/22/pseudospectral-methods/</guid>
		<description><![CDATA[

One of the many things I learnt from my nonlinear physics project is
the pseudospectral method. I&#8217;m going to try explaining this method the
way I understand it.

Any function can be expressed as an infinite sum of the set of basis functions:



For the purpose of an example, if we take the polynomial basis of
order 2, then the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="gallery" id="image196" src="http://ergodicity.iamganesh.com/wp-content/uploads/2007/04/poster.jpg" alt="poster.jpg" /></p>

<p>One of the many things I learnt from my nonlinear physics project is
the pseudospectral method. I&#8217;m going to try explaining this method the
way I understand it.</p>

<p>Any function can be expressed as an infinite sum of the set of basis functions:</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/fedfd79a058b9c216903a00a9e9dd0bd.gif' title='f(x) = \sum c_n \phi_n(x)' alt='f(x) = \sum c_n \phi_n(x)' align='middle' /></p>

<p>For the purpose of an example, if we take the polynomial basis of
order 2, then the function can be approximated as</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/82bcc1651c45f7f41d67652a3db70b44.gif' title='f(x) \approx p(x) = c_0  + c_1 x + c_2 x^2' alt='f(x) \approx p(x) = c_0  + c_1 x + c_2 x^2' align='middle' /></p>

<p>The coefficients can be solved for by building a system of
equations. The three unknowns require three points on the interval
where we know the exact value of the function. Let these three points
be <code>x0</code>, <code>x1</code> and <code>x2</code> and the value of the function at these points
be <code>b0</code>, <code>b1</code> and <code>b3</code>.</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/a62585658fac03d7138736170b6f8b4b.gif' title='b_i = f(x_i)' alt='b_i = f(x_i)' align='middle' /></p>

<p>The system of equations is now,</p>

<p><img id="image198" src="http://ergodicity.iamganesh.com/wp-content/uploads/2007/04/eqnarray.jpg" alt="eqnarray.jpg" /></p>

<p>written compactly as <img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/0ebe57320def63aabe425cdc25c65a09.gif' title='\small{b = Ax}' alt='\small{b = Ax}' align='middle' /></p>

<p>The system can be solved by inverting the matrix <code>A</code>, which is of
complexity <img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/ad643ac56f28c092b230a33428889182.gif' title='\small{\mathcal{O}(N^3)}' alt='\small{\mathcal{O}(N^3)}' align='middle' />. The function <code>p(x)</code> is
an interpolating polynomial in the interval of interest. As you can
see, using a higher order polynomial quickly becomes prohibitively
expensive.</p>

<p>Instead of picking the polynomial basis, you can pick any other
basis. The <a href="http://en.wikipedia.org/wiki/Chebyshev_polynomials">Chebyshev basis</a> is commonly used. A friend of mine
picked the <a href="http://en.wikipedia.org/wiki/Fourier-Bessel_series">Fourier-Bessel basis</a>. Depends on the application.</p>

<h3>Fourier basis</h3>

<p>The Fourier basis is fundamental to linear systems theory. Linear
operators become <strong>diagonal</strong> in the Fourier basis. This fact comes handy
in numerical schemes such as exponential integrators, where you&#8217;ll
have to take the exponential of a matrix.</p>

<p>The second advantage falls out of the uncertainty
principle. Increasing the number of modes in the Fourier domain is
equivalent to shrinking the spacing between steps in the space
domain. This leads to an <strong>exponential convergence</strong> in the number of
points required as opposed to the usual polynomial convergence with
finite differences.</p>

<p>The third key point in the use of the Fourier basis is that the <strong>FFT</strong>
lets us do the equivalent of a matrix inversion in
<img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/90a34e993bdf3e6aeb0e25bf2ae8396b.gif' title='\small{\mathcal{O}(N \log N)}' alt='\small{\mathcal{O}(N \log N)}' align='middle' />. This is very fast.</p>

<h3>Summary</h3>

<p>In summary, three random facts come together to form a beautiful
theory:</p>

<ul>
<li>The FFT is much faster than a matrix inversion.</li>
<li>Linear operators are diagonal in the Fourier basis.</li>
<li>Exponential convergence of spectral methods.</li>
</ul>

<p>Hope you enjoyed reading this post as much as I enjoyed writing it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2007/04/pseudospectral-methods/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Variational Integrators</title>
		<link>http://ergodicity.iamganesh.com/2007/04/variational-integrators/</link>
		<comments>http://ergodicity.iamganesh.com/2007/04/variational-integrators/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 03:46:05 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[geometry]]></category>
		<category><![CDATA[integrator]]></category>
		<category><![CDATA[variational calculus]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2007/04/04/variational-integrators/</guid>
		<description><![CDATA[Dynamical systems following Hamilton mechanics can be formulated as 



where M is the mass and q is the state vector. These equations
arise in pretty much every single physics engine (astrophysics and
molecular dynamics for example.) Traditionally, solvers such as the
forward/backward Euler have been used, but these solvers do not
respect the manifold of the configuration system. This [...]]]></description>
			<content:encoded><![CDATA[<p>Dynamical systems following Hamilton mechanics can be formulated as </p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/1ad5a2c6534502a2bd9ee8142b958a40.gif' title='M \ddot q = &amp;#8211; \nabla V(q)' alt='M \ddot q = &amp;#8211; \nabla V(q)' align='middle' /></p>

<p>where <code>M</code> is the mass and <code>q</code> is the state vector. These equations
arise in pretty much every single physics engine (astrophysics and
molecular dynamics for example.) Traditionally, solvers such as the
forward/backward Euler have been used, but these solvers do not
respect the manifold of the configuration system. This led to the
development of solvers such as the <a href="http://en.wikipedia.org/wiki/Verlet_integration">Verlet</a> (and Velocity Verlet)
which are symplectic in nature and follow the geometry of the
problem. The Velocity Verlet specifically is the workhorse of
molecular dynamics.</p>

<p><img class="gallery" id="image191" src="http://ergodicity.iamganesh.com/wp-content/uploads/2007/04/pendulumtrajectories.png" alt="Pendulum Trajectories" /></p>

<p>By geometry, I mean the invariants that arise due to symmetry in the
system. For example, rotational and translational symmetry in the
system give rise to conservation of angular and linear momentum.
Above, the equations of motion for a simple pendulum were integrated
with four different solvers. The symplectic nature of the problem does
not fall out naturally from the solvers because these &#8220;local&#8221; methods
still look at differential changes in momenta and position.</p>

<p>Variational methods, on the other hand, directly deal with equations
arising out of Hamilton&#8217;s action principle. The Lagrangian is defined as</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/48ceedc1313aa3e63c55216f6264ccd8.gif' title='L(q, \dot q) = T(\dot q) &amp;#8211; V(q)' alt='L(q, \dot q) = T(\dot q) &amp;#8211; V(q)' align='middle' /></p>

<p>and the action functional is the integral of the Lagrangian along a
path <code>q(t)</code>.</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/38e8300dd355ba9d728e0c5e29359805.gif' title='S(q) = \int_0^T L(q, \dot q) dt' alt='S(q) = \int_0^T L(q, \dot q) dt' align='middle' /></p>

<p>First order variations to compute the stationary action leads to the
Euler-Lagrange differential equation. A similar derivation can be done
for discrete variables yielding the Discrete Euler Lagrange (DEL)
equation.</p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/87ca983a37cc94fb13a6ce636ba5a105.gif' title='D_1 L(q_k,q_{k+1}) + D_2 L(q_{k-1},q_k) = 0' alt='D_1 L(q_k,q_{k+1}) + D_2 L(q_{k-1},q_k) = 0' align='middle' /></p>

<p>This is very attractive because physical invariants that arise from
the variational principle are guaranteed to be maintained in the
discrete situation as well. This is also true for constraints on the
system: constraint versions of Verlet and Velocity Verlet, <code>SHAKE</code>
and <code>RATTLE</code> are natural in the DEL equation setting.</p>

<p>The only roadblock to the rapid adoption of these algorithms is the
computational expense of solving the DEL. Each integration timestep
requires the solution of a set of implicit nonlinear equations
(usually by the use of Newton&#8217;s method.) This is a problem for
molecular dynamics where you are trying to run the simulation for a
few nanoseconds and your timestep is in femtoseconds.</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2007/04/variational-integrators/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Granular media</title>
		<link>http://ergodicity.iamganesh.com/2007/03/granular-media/</link>
		<comments>http://ergodicity.iamganesh.com/2007/03/granular-media/#comments</comments>
		<pubDate>Fri, 30 Mar 2007 21:36:03 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[nonlinear]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2007/03/30/granular-media/</guid>
		<description><![CDATA[I was almost going to choose this topic for my nonlinear physics
course project. Though this is very interesting and exciting, I
couldn&#8217;t find enough content to develop into a project. 



Granular media, like sand, rice or cereal, also happen to form
interesting patterns when vibrated on a membrane. This was first
discovered and published in Nature by Umbanhowar, [...]]]></description>
			<content:encoded><![CDATA[<p>I was almost going to choose this topic for my nonlinear physics
course project. Though this is very interesting and exciting, I
couldn&#8217;t find enough content to develop into a project. </p>

<p><img class="gallery" id="image187" src="http://ergodicity.iamganesh.com/wp-content/uploads/2007/03/granular.jpg" alt="Granular media" /></p>

<p>Granular media, like sand, rice or cereal, also happen to form
interesting patterns when vibrated on a membrane. This was first
discovered and <a href="http://www.nature.com/nature/journal/v382/n6594/abs/382793a0.html">published</a> in Nature by Umbanhowar, Melo &amp; Swinney
from the Center for Nonlinear Dynamics at the University of Texas at
Austin. This was the same team that had created the very popular
Faraday waves video posted on YouTube.</p>

<p>The physical phenomena is similar to <a href="http://ergodicity.iamganesh.com/2007/02/24/faraday-crispations/">Faraday waves</a> seen in liquids
almost a hundred and thirty years ago. The key difference is that
while liquid faraday waves can be derived from a continnum model such
as the Navier-Stokes equations, no such model exists for granular
media as far as my limited knowledge goes. Therefore, the analytical
derivations for the purposes of a project is limited.</p>

<p><img class="gallery" id="image189" src="http://ergodicity.iamganesh.com/wp-content/uploads/2007/03/granular-phase.jpg" alt="Granular phase plane" /></p>

<p>The phase-plot is in terms of a dimensionless amplitude given by </p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/a836837c21afbbddedcfdebd00e24fd9.gif' title='\Gamma = 4 \pi^2 A f^2 g^{-1}' alt='\Gamma = 4 \pi^2 A f^2 g^{-1}' align='middle' /></p>

<p>where A is the driving amplitude, g is the acceleration due to
gravity, and f is the driving frequency. Some of these have been
experimentally verified by means of a molecular dynamics
simulation. Once again, the computational part wasn&#8217;t sufficient to
fulfill the requirements because the equations are &#8220;simple&#8221; non-linear
coupled <em>ordinary</em> differential equations. Whereas systems we have
studied in class were described by <em>partial</em> differential equations.</p>

<p><img class="gallery" id="image190" src="http://ergodicity.iamganesh.com/wp-content/uploads/2007/03/oscillon.jpg" alt="Oscillon" /></p>

<p>The term &#8220;oscillon&#8221; was coined by the paper mentioned above. In recent
years, there has been a lot of research into these structures. The
picture above is oscillons in a nonlinear field model and the author
has some really cool videos on his <a href="http://www.dartmouth.edu/~cosmos/oscillons/">site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2007/03/granular-media/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ginzburg-Landau</title>
		<link>http://ergodicity.iamganesh.com/2007/03/ginzburg-landau/</link>
		<comments>http://ergodicity.iamganesh.com/2007/03/ginzburg-landau/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 00:05:40 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Physics]]></category>
		<category><![CDATA[partial differential equations]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2007/03/22/ginzburg-landau/</guid>
		<description><![CDATA[

I spent most of last week looking for an idea for my nonlinear physics
course project. We were given a few pointers to topics that could
become potential projects: various kinds of pattern formation in Fluid
Mechanics, Complex fluids, Biological systems, Chemical systems,
Optics, Combustion and Hydrodynamics.

I came up with four topics (all four of them weren&#8217;t on the [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin-left: 10px" align="right" class="gallery" id="image183" src="http://ergodicity.iamganesh.com/wp-content/uploads/2007/03/pattern.jpg" alt="pattern.jpg" /></p>

<p>I spent most of last week looking for an idea for my nonlinear physics
course project. We were given a few pointers to topics that could
become potential projects: various kinds of pattern formation in Fluid
Mechanics, Complex fluids, Biological systems, Chemical systems,
Optics, Combustion and Hydrodynamics.</p>

<p>I came up with four topics (all four of them weren&#8217;t on the initial
list of things suggested.) Somebody else in the class had exactly the
same proposal as mine, including references, so that was out of the
picture. One turned out to be computationally infeasible (couple of
hours for a single step of a Finite Element Method), the other turned
out to be extremely hard and outside the scope of the course.</p>

<p>I finally settled on &#8220;Global feedback methods for the subcritical
Complex Ginzburg-Landau Equation.&#8221; If that didn&#8217;t make any sense, I&#8217;ve
tried to explain what each word means in my <a href="http://ergodicity.iamganesh.com/uploads/phy484-gsw-proposal.pdf">proposal</a>.</p>

<p>(picture courtesy of <a href="http://math.arizona.edu/~shankar/research/node10.html">Shankar Venkataramani</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2007/03/ginzburg-landau/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>No ending</title>
		<link>http://ergodicity.iamganesh.com/2007/03/no-ending/</link>
		<comments>http://ergodicity.iamganesh.com/2007/03/no-ending/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 07:58:38 +0000</pubDate>
		<dc:creator>ganesh</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[computational anatomy]]></category>
		<category><![CDATA[diffeomorphism]]></category>
		<category><![CDATA[dtmri]]></category>

		<guid isPermaLink="false">http://ergodicity.iamganesh.com/2007/03/07/no-ending/</guid>
		<description><![CDATA[Real life has been kicking my ass lately. My brain has been working
over-time, so I&#8217;m taking some time off to relax. I&#8217;m fortunate to have
a lot of friends with birthdays this week, so that helps. Anyways,
here&#8217;s an update on what I&#8217;ve been upto&#8230;

Parabolic excitation

Working on a homework problem for my non-linear physics class has
been a [...]]]></description>
			<content:encoded><![CDATA[<p>Real life has been kicking my ass lately. My brain has been working
over-time, so I&#8217;m taking some time off to relax. I&#8217;m fortunate to have
a lot of friends with birthdays this week, so that helps. Anyways,
here&#8217;s an update on what I&#8217;ve been upto&#8230;</p>

<h3>Parabolic excitation</h3>

<p>Working on a homework problem for my non-linear physics class has
been a huge timesink. This week, we were asked to solve the general
low viscosity <a href="http://en.wikipedia.org/wiki/Mathieu_differential_equation">Mathieu equation</a> </p>

<p><img src='http://ergodicity.iamganesh.com/wp-content/latexrenderer/pictures/6b4eac9b1df7ecf29aa3295b1beeabcd.gif' title='\ddot \zeta + 2 (w \nu k^2) \dot \zeta + \omega_0^2(t) \zeta =0 ' alt='\ddot \zeta + 2 (w \nu k^2) \dot \zeta + \omega_0^2(t) \zeta =0 ' align='middle' /></p>

<p>for a parabolic excitation signal. My professor, Dr. Bechhoefer had
<a href="http://arxiv.org/abs/patt-sol/9605002">published</a> a paper to describe parametrically excited surface
waves with delta and triangle excitation signals. We were asked to
extend this. At the end, you get a complicated implicit equation for
the threshold condition. I had to learn how to solve implicit
equations numerically in Matlab (numerically because Maple couldn&#8217;t do
it analytically.)</p>

<h3>Geometry of Diffusion Tensors</h3>

<p>As I&#8217;m working a lot with Diffusion Tensors, I wanted to get a better
feel for the computations on them. I found this
<a href="http://www.springerlink.com/content/g904ebttev8mfpax/">paper</a>(<a href="http://midag.cs.unc.edu/pubs/papers/CVAMIA04_Fletcher_DTStats.pdf">pdf</a>) by Dr. Joshi titled &#8220;Principal Geodesic
Analysis on Symmetric Spaces: Statistics of Diffusion Tensors&#8221; really
helpful. Ofcourse, I couldn&#8217;t understand some of the mathematical
terms, so it&#8217;s more reading for me. I also realized that not all
graduate students are on top of their game &#8212; they sometimes can
mislead you. It&#8217;s better to mislead yourself than to be misled. <img src='http://ergodicity.iamganesh.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>

<h3>Geodesic Shooting</h3>

<p>As part of my weekly reading, a friend and I are trying to understand
this paper <a href="http://www.springerlink.com/content/9r82230441886375/">titled</a> &#8220;Geodesic Shooting for Computational
Anatomy.&#8221; Amidst all the complicated math, the basic idea they are
trying to show is that flows on the deformation diffeomorphism
conserve momentum. And because of this conservation law, you only need
the velocity at t=0 to completely determine the flow. In the grand
scheme of things, you do not and cannot average images just by
averaging pixel/voxel intensities. This is because these images do not
form a vector space and simple linear averaging does not respect the
curved aspect of the space. The space of the velocity vectors form a
vector space, and we can average those instead.</p>

<h3>MRI scan</h3>

<p>I also had my first MRI scan last week. I had to go all the way to the
UBC hospital for that. A graduate friend of mine is doing some
research on parameter optimization on the MR machine, but with about
400 controls you can tune, this is a very difficult problem. It was an
interesting experience for me, though I slept through most of it. To
take your mind off the heavy beating (and for claustrophobic people
I guess,) they give you headphones. I wondered for a long time how
electronic headphones worked in presence of a strong magnetic field
(MR machines have a magnetic field strength of 1.5 to 3.0 tesla, in
contrast to the earth&#8217;s field of 30 to 60 microteslas.) I&#8217;ll leave
that question unanswered because it makes me feel too dumb.</p>

<p>That&#8217;s all for now. I&#8217;ll save the rest for later.</p>
]]></content:encoded>
			<wfw:commentRss>http://ergodicity.iamganesh.com/2007/03/no-ending/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
