Machine “Learning”—An Entertainment [Industry] Edition

Yes, “Machine ‘Learning’,” too, has been one of my “research” interests for some time by now. … Machine learning, esp. ANN (Artificial Neural Networks), esp. Deep Learning. …

Yesterday, I wrote a comment about it at iMechanica. Though it was made in a certain technical context, today I thought that the comment could, perhaps, make sense to many of my general readers, too, if I supply a bit of context to it. So, let me report it here (after a bit of editing). But before coming to my comment, let me first give you the context in which it was made:


Context for my iMechanica comment:

It all began with a fellow iMechanician, one Mingchuan Wang, writing a post of the title “Is machine learning a research priority now in mechanics?” at iMechanica [^]. Biswajit Banerjee responded by pointing out that

“Machine learning includes a large set of techniques that can be summarized as curve fitting in high dimensional spaces. [snip] The usefulness of the new techniques [in machine learning] should not be underestimated.” [Emphasis mine.]

Then Biswajit had pointed out an arXiv paper [^] in which machine learning was reported as having produced some good DFT-like simulations for quantum mechanical simulations, too.

A word about DFT for those who (still) don’t know about it:

DFT, i.e. Density Functional Theory, is “formally exact description of a many-body quantum system through the density alone. In practice, approximations are necessary” [^]. DFT thus is a computational technique; it is used for simulating the electronic structure in quantum mechanical systems involving several hundreds of electrons (i.e. hundreds of atoms). Here is the obligatory link to the Wiki [^], though a better introduction perhaps appears here [(.PDF) ^]. Here is a StackExchange on its limitations [^].

Trivia: Kohn and Sham received a Physics Nobel for inventing DFT. It was a very, very rare instance of a Physics Nobel being awarded for an invention—not a discovery. But the Nobel committee, once again, turned out to have put old Nobel’s money in the right place. Even if the work itself was only an invention, it did directly led to a lot of discoveries in condensed matter physics! That was because DFT was fast—it was fast enough that it could bring the physics of the larger quantum systems within the scope of (any) study at all!

And now, it seems, Machine Learning has advanced enough to be able to produce results that are similar to DFT, but without using any QM theory at all! The computer does have to “learn” its “art” (i.e. “skill”), but it does so from the results of previous DFT-based simulations, not from the theory at the base of DFT. But once the computer does that—“learning”—and the paper shows that it is possible for computer to do that—it is able to compute very similar-looking simulations much, much faster than even the rather fast technique of DFT itself.

OK. Context over. Now here in the next section is my yesterday’s comment at iMechanica. (Also note that the previous exchange on this thread at iMechanica had occurred almost a year ago.) Since it has been edited quite a bit, I will not format it using a quotation block.


[An edited version of my comment begins]

A very late comment, but still, just because something struck me only this late… May as well share it….

I think that, as Biswajit points out, it’s a question of matching a technique to an application area where it is likely to be of “good enough” a fit.

I mean to say, consider fluid dynamics, and contrast it to QM.

In (C)FD, the nonlinearity present in the advective term is a major headache. As far as I can gather, this nonlinearity has all but been “proved” as the basic cause behind the phenomenon of turbulence. If so, using machine learning in CFD would be, by the simple-minded “analysis”, a basically hopeless endeavour. The very idea of using a potential presupposes differential linearity. Therefore, machine learning may be thought as viable in computational Quantum Mechanics (viz. DFT), but not in the more mundane, classical mechanical, CFD.

But then, consider the role of the BCs and the ICs in any simulation. It is true that if you don’t handle nonlinearities right, then as the simulation time progresses, errors are soon enough going to multiply (sort of), and lead to a blowup—or at least a dramatic departure from a realistic simulation.

But then, also notice that there still is some small but nonzero interval of time which has to pass before a really bad amplification of the errors actually begins to occur. Now what if a new “BC-IC” gets imposed right within that time-interval—the one which does show “good enough” an accuracy? In this case, you can expect the simulation to remain “sufficiently” realistic-looking for a long, very long time!

Something like that seems to have been the line of thought implicit in the results reported by this paper: [(.PDF) ^].

Machine learning seems to work even in CFD, because in an interactive session, a new “modified BC-IC” is every now and then is manually being introduced by none other than the end-user himself! And, the location of the modification is precisely the region from where the flow in the rest of the domain would get most dominantly affected during the subsequent, small, time evolution.

It’s somewhat like an electron rushing through a cloud chamber. By the uncertainty principle, the electron “path” sure begins to get hazy immediately after it is “measured” (i.e. absorbed and re-emitted) by a vapor molecule at a definite point in space. The uncertainty in the position grows quite rapidly. However, what actually happens in a cloud chamber is that, before this cone of haziness becomes too big, comes along another vapor molecule, and “zaps” i.e. “measures” the electron back on to a classical position. … After a rapid succession of such going-hazy-getting-zapped process, the end result turns out to be a very, very classical-looking (line-like) path—as if the electron always were only a particle, never a wave.

Conclusion? Be realistic about how smart the “dumb” “curve-fitting” involved in machine learning can at all get. Yet, at the same time, also remain open to all the application areas where it can be made it work—even including those areas where, “intuitively”, you wouldn’t expect it to have any chance to work!

[An edited version of my comment is over. Original here at iMechanica [^]]


 

“Boy, we seem to have covered a lot of STEM territory here… Mechanics, DFT, QM, CFD, nonlinearity. … But where is either the entertainment or the industry you had promised us in the title?”

You might be saying that….

Well, the CFD paper I cited above was about the entertainment industry. It was, in particular, about the computer games industry. Go check out SoHyeon Jeong’s Web site for more cool videos and graphics [^], all using machine learning.


And, here is another instance connected with entertainment, even though now I am going to make it (mostly) explanation-free.

Check out the following piece of art—a watercolor landscape of a monsoon-time but placid sea-side, in fact. Let me just say that a certain famous artist produced it; in any case, the style is plain unmistakable. … Can you name the artist simply by looking at it? See the picture below:

A sea beach in the monsoons. Watercolor.

If you are unable to name the artist, then check out this story here [^], and a previous story here [^].


A Song I Like:

And finally, to those who have always loved Beatles’ songs…

Here is one song which, I am sure, most of you had never heard before. In any case, it came to be distributed only recently. When and where was it recorded? For both the song and its recording details, check out this site: [^]. Here is another story about it: [^]. And, if you liked what you read (and heard), here is some more stuff of the same kind [^].


Endgame:

I am of the Opinion that 99% of the “modern” “artists” and “music composers” ought to be replaced by computers/robots/machines. Whaddya think?

[Credits: “Endgame” used to be the way Mukul Sharma would end his weekly Mindsport column in the yesteryears’ Sunday Times of India. (The column perhaps also used to appear in The Illustrated Weekly of India before ToI began running it; at least I have a vague recollection of something of that sort, though can’t be quite sure. … I would be a school-boy back then, when the Weekly perhaps ran it.)]

 

Papers must fall out…

Over the past couple of weeks or so, I’ve been going over SPH (smoothed particle hydrodynamics).

I once again went through the beginning references noted in my earlier post, here [^]. However, instead of rewriting my notes (which I lost in the last HDD crash), this time round, I went straight to programming. … In this post, let me recap recall what all I did.


First, I went through the great post “Why my fluids don’t flow” [^] by Tom Madams. … His blog has the title: “I am doing it wrong,” with the sub-text: “most of the time.” [Me too, Tom, me too!] This post gave a listing of what looked like a fully working C++ code. Seeing this code listing (even if the videos are no longer accessible), I had to try it.

So, I installed the Eclipse CDT. [Remember my HDD crash?—the OS on the new HDD had no IDEs/C++ compilers installed till now; I had thus far installed only Python and PyCharm]. I also installed MinGW, freeglut, Java JRE, but not all of them in the correct order. [Remember, I too do it wrong, most of the time.] I then created a “Hello World” project, and copy-pasted Tom’s code.

The program compiled well. [If you are going to try Tom’s code in Eclipse CDT + MinGW on Windows, the only issue you would now (in 2016) run into would be in the Project Settings, both in the compiler and linker settings parts, and both for OpenGL and freeglut. The latest versions of Eclipse & MinGW have undergone changes and don’t work precisely as explained even in the most helpful Web resources about this combination. … It’s not a big deal, but it’s not exactly what the slightly out-of-date online resources on this topic continue telling you either. … The options for the linker are a bit trickier to get than those for the compiler; the options for freeglut certainly are trickier to get than those for OpenGL. … If you have problems with this combination (Eclipse + MinGW on Windows 7 64-bit, with OpenGL and freeglut), then drop me a line and I will help you out.]

Tom’s program not only compiled well, but it also worked beautifully. Quite naturally, I had to change something about it.

So I removed his call to glDrawArrays(), and replaced the related code with the even older glBegin(GL_POINTS), glVertex2d(), glEnd() sort of a code. As I had anticipated,  there indeed was no noticeable performance difference. If the fluid in the original code required something like a minute (of computer’s physical time) to settle down to a certain quiescent state, then so did the one with the oldest-style usage of OpenGL. The FPS in the two cases were identical in almost all of the release runs, and they differed by less than 5–7% for the debug runs as well, when the trials were conducted on absolutely fresh cold-starts (i.e. with no ready-to-access memory pages in either physical or virtual memory).

Happy with my change, I then came to study Tom’s SPH code proper. I didn’t like the emitters. True to my core engineering background, what I wanted to simulate was the dam break. That means, all the 3000 particles would be present in the system right from the word go, thereby also having a slower performance throughout, including in the beginning. But Tom’s code was too tied up with the emitters. True to my software engineering background, rather than search and remove the emitters-related portion and thus waste my time fixing the resulting compiler errors, I felt like writing my own code. [Which true programmer doesn’t?]

So I did that, writing only stubs for the functions involving the calculations of the kernels and the accelerations. … I, however, did implement the grid-based nearest-neighbor search. Due to laziness, I simply reused the STL lists, rather than implementing the more basic (and perhaps slightly more efficient) “p->next” idiom.

Then I once again came back to Tom’s code, and began looking more carefully at his SPH-specific computations.

What I now didn’t like was the variables defined for the near-density and the near-pressure. These quantities didn’t fit very well into my preconceived notions of how a decent SPH code ought to look like.

So, I decided to deprove [which word is defined as an antonym of “improve”] this part, by taking this 2010 code from its 2007 (Becker et al.) theoretical basis, to a 2003 basis (Muller et al., Eurographics).

Further following my preconceived notions, I also decided to keep the values of the physical constants (density, gas stiffness, viscosity, surface tension) the same as those for the actual water.

The code, of course, wouldn’t work. The fluid would explode as if it were a gas, not water.

I then turned my learner’s attention to David Bindel’s code (see the “Resources” section at the bottom of his page here [^]).

Visiting Bindel’s pages once again, this time round, I noticed that he had apparently written this code only as a background material for a (mere) course-assignment! It was not even an MS thesis! And here I was, still struggling with SPH, even after having spent something like two weeks of full-time effort on it! [The difference was caused by the use of the realistic physical constants, of course. But I didn’t want to simply copy-paste Tom’s or Bindel’s parameter values; I wanted to understand where they came from—what kind of physical and computational contexts made those specific values give reasonable results.]

I of course liked some of the aspects of Bindel’s code better—e.g. kernels—and so, I happily changed my code here and there to incorporate them.

But I didn’t want to follow Bindel’s normalize_mass routine. Two reasons: (i) Once again according to my preconceived notions, I wanted to first set aside a sub-region of the overall domain for the fluid; then decide with how many particles to populate it, and what lattice arrangement to follow (square? body centered-cubic? hexagonal close-packed?); based on that, calculate each particle’s radius; then compute the volume of each particle; and only then set its mass using the gross physical density of the material from which it is composed (using the volume the particle would occupy if it were to be isolated from all others, as an intermediate step). The mass of a particle, thus computed (and not assumed) would remain fixed for all the time-steps in the program. (ii) I eventually wanted a multi-phase dam-break, and so wasn’t going to assume a global constant for the mass. Naturally, my code wouldn’t be able to blindly follow Bindel on all counts.

I also didn’t like the version of the leapfrog he has implemented. His version requires you to maintain additional quantities of the velocities at the half time-steps (I didn’t mind that), and also to implement a separate leapfrog_start() function (which I did mind—an additional sequence of very similar-looking function calls becomes tricky to modify and maintain). So, I implemented the other version of the leapfrog, viz., the “velocity Verlet.” It has exactly the same computational properties (of being symplectic and time-reversible), the same error/convergence properties (it too is second-order accurate), but it comes with the advantage that the quantities are defined only at the integer time-steps—no half-time business, and no tricky initialization sequence to be maintained.

My code, of course, still  didn’t work. The fluid would still explode. The reason, still, was: the parameter values. But the rest of the code now was satisfactory. How do I know this last part? Simple. Because, I commented out the calls to all the functions involving all other accelerations, and retained only the acceleration due to gravity. I could then see the balls experiencing the correct free-fall under gravity, with the correct bouncing-back from the floor of the domain. Both the time for the ball to hit the floor as well as the height reached after bouncing were in line with what physics predicts. Thus I knew that my time integration routines would be bug-free. Using some debug tracings, I also checked that the nearest-neighbour routines were working correctly.

I then wrote a couple of Python scripts to understand the different kernels better; I even plotted them using MatPlotLib. I felt better. A program I wrote was finally producing some output that I could in principle show someone else (rather than having just randomly exploding fluid particles). Even if it was doing only kernel calculations and not the actual SPH simulation. I had to feel [slightly] better, and I did.

At this stage, I stopped writing programs. I began thinking. [Yes, I do that, too.]


To cut a long story short, I ended up formulating two main research ideas concerning SPH. Both these ideas are unlike my usual ones.

Usually, when I formulate some new research idea, it is way too conceptual—at least as compared to the typical research reported in the engineering journals. Typically, at that stage (of my formulation of a new research idea), I am totally unable to see even an outline of what kind of a sequence of journal papers could possibly follow from it.

For instance, in the case of my diffusion equation-related result, it took me years before an outline for a good conference paper—almost like really speaking, at par with a journal paper—could at all evolve. I did have the essential argument ready. But I didn’t know what all context—the specifically mathematical context—would be expected in a paper based on that idea. I (and all the mathematicians I contacted) also had no idea as to how (or where) to go hunting for that context. And I certainly didn’t have any concrete idea as to how I would pull it all together to build a concrete and sufficiently rigorous argument. I knew nothing of that; I only knew that the instantaneous action-at-a-distance (IAD) was now dead; summarily dead. Similarly, in case of QM, I do have some new ideas, but I am still light-years away from deciding on a specific sequence of what kind of papers could be written about it, let alone have a good, detailed idea for the outline of the next journal paper to write on the topic.

However, in this case—this research on SPH—my ideas happen to be more like what [other] people typically use when they write papers for [even very high impact] journals those which lie behind the routine journal papers. So, papers should follow easily, once I work on these ideas.


Indeed, papers must follow those ideas. …There is another reason to it, too.

… Recently, I’ve come to develop an appreciation, a very deep kind of an appreciation, of the idea of having one’s own Google Scholar page, complete with a [fairly] recent photo, a verified email account at an educational institution (preferably with a .edu, or a .ac.in (.in for India) domain, rather than a .org or a .com domain), and a listing of one’s own h-index. [Yes, my own Google Scholar page, even if the h-Index be zero, initially. [Time heals all wounds.] I have come to develop that—an appreciation of this idea of having a Google Scholar page. … One could provide a link to it from one’s personal Web site, one could even cite the page in one’s CV, it could impress UGC/NBA/funding folks…. There are many uses to having a Google Scholar page.

…That is another reason why [journal] papers must come out, at least now.

And I expect that the couple of ideas regarding SPH should lead to at least a couple of journal papers.

Since these ideas are more like the usual/routine research, it would be possible to even plan for their development execution. Accordingly, let me say (as of today) that I should be able to finish both these papers within the next 4–5 months. [That would be the time-frame even if I have no student assistant. [Having a student assistant—even a very brilliant student studying at an IIT, say at IIT Bombay—would still not shorten the time to submission, neither would it reduce my own work-load any more than by about 10–20% or so. That’s the reason I am not planning on a student assistant on these ideas.]

But, yes, with all this activity in the recent past, and with all the planned activity, it is inevitable that papers would fall out. Papers must, in fact, fall out. …. Journal papers! [Remember Google Scholar?]


Of course, when it comes to execution, it’s a different story that even before I begin any serious work on them, I still have to first complete writing my CFD notes, and also have to write a few FDM, FVM and VoF/LevelSet programs scripts or OpenFOAM cases. Whatever I had written in the past, most of it was lost in my last HDD crash. I thus have a lot of territory to recover first.

Of course, rewriting notes/codes is fast. I could so rapidly progress on SPH this year—a full working C++ code in barely 2–3 weeks flat—only because I had implemented some MD (molecular dynamics) code in 2014, no matter how simple MD it was. The algorithms for collision detection and reflections at boundaries remain the same for all particles approaches: MD with hard disks, MD with LJ potential, and SPH. Even if I don’t have the previously written code, the algorithms are no longer completely new to me. As I begin to write code, the detailed considerations and all come back very easily, making the progress very swift, as far as programming is concerned.

When it comes to notes, I somehow find that writing them down once again takes almost the same length of time—just because you had taken out your notes earlier, it doesn’t make writing them down afresh takes any less time.

Thus, overall, recovering the lost territory would still take quite some effort and time.

My blogging would therefore continue to remain sparse even in the near future; expect at the most one more post this month (May 2016).

The work on the journal papers itself should begin in the late-June/early-July, and it should end by mid-December. It could. Nay, it must. … Yes, it must!

Papers must come out of all these activities, else it’s no research at all—it’s nothing. It’s a zero, a naught, a nothing, if there are no papers to show that you did research.

Papers must fall out! … Journal papers!!


A Song I Like:

(Western, Instrumental) “The rain must fall”
Composer: Yanni


[May be one quick editing pass later today, and I will be done with this post. Done on 12th May 2016.]

[E&OE]

Haptic, tactile, virtual, surgery, etc.

Three updates made on 24th March 2016 appear near the end of this post.


Once in a while I check out the map of the visitors’ locations (see the right bar).

Since hardly any one ever leaves any comment at my blog, I can only guess who these visitors possibly could be. Over a period of time, guessing the particular visitors in this way has become an idle sort of a past-time for me. (No, I don’t obsess over it, and I don’t in fact spend much time on it—at the most half-a-minute or so, once in a while. But, yes, check, I certainly do!)

Among the recent visitors, there was one hit on 6th March 2016 coming from Troy, NY, USA (at 11:48:02 AM IST, to be precise). … Must be someone from RPI, I thought. (My blog is such that mostly only academics could possibly be interested in it; never the people with lucrative industrial jobs such as those in the SF Bay Area. Most of the hits from the Bay Area are from Mountain View, and that’s the place where the bots of Google’s search engines live.)

But I couldn’t remember engaging in any discussion with any one from RPI on any blog.

Who could this visitor possibly be? I could not figure it out immediately, so I let the matter go.


Yesterday, I noticed for the first time an ad for “several” post-doc positions at RPI, posted on iMechanica by Prof. Suvranu De [^]. It had been posted right on the same day: 6th March 2016. However, since recently I was checking out only my thread on the compactness of support [^], I had missed out on the main front page. Thus, I noticed the ad only today.

Curious, I dropped an informal email to Prof. De immediately, almost more or less by cognitive habits.


I am not too keen on going to the USA, and in fact, I am not even inclined to leave India. Reasons are manifold.

You, as every one else on the planet, of course comes to know all that ever happens to or in the USA. Americans make sure that you do—whether you like it or not. (Remember 9/11? They have of course forgotten it by now, but don’t you remember the early naughties when, imagining you to be just as dumb and thick-skinned as they are,  the kind of decibels they had pierced into your metaphorical ears (and in fact also in your soul)? Justifiable, you say? How about other big “controversies” which actually were nothing but scandals? Can’t you pick up one or two?)

Naturally, who would want to go to that uncivilized a place?

And even if you want to argue otherwise, let me suggest you to see if you can or cannot easily gather (or recollect) what all that has happened to me when I was in the USA?

So, the idea of trying to impress Dr. De for this post-doc position was, any which way, completely out of the question. Even if he is HoD at RPI.

And then, frankly, at my age, I don’t even feel like impressing any one for a mere post-doc; not these days anyway (I mean, some 6 years after the PhD defense, and after having to experience so many years of joblessness (including those reported via this blog)). … As far as I am concerned, either they know what and who I am, and act accordingly (including acting swiftly enough), or they don’t. (In the last case, mostly, they end up blaming me, as usual, in some or the other way.)

OK, so, coming back to what I wrote Dr. De. It was more in the nature of a loud thinking about the question of whether I should at all apply to them in the first place or not. … Given my experience of the other American post-docs advertised at iMechanica, e.g. those by Prof. Sukumar (UC Davis), and certain others in the USA, and also my experience of the Americans of the Indian origin (and even among them, those who are JPBTIs and those who are younger to me by age), I can’t keep any realistic expectation that I would ever receive any reply to that email of mine from Prof. De. The odds are far too against; check out the “follow-up” tag. (I could, of course, be psychically attacked, the way I was, right this week, a few days ago.)

Anyway, once thus grown curious about the subject matter, I then did a bit of a Web search, and found the following videos:

The very first listing after a Google search (using the search string: “Suvranu De”; then clicking on the tab: “videos”) was the one on “virtual lap band – surgical simulation”: [^].

Watching that video somehow made me sort of uneasy immediately. Uneasy, in a minor but a definitely irritating way. In a distinctly palpable way, almost as if it was a physical discomfort. No, not because the video carries the scene of tissue-cutting and all. … I have never been one of those who feel nervous or squeamish at the sight of blood, cuts, etc. (Most men, in fact, don’t!) So, my uneasiness was not on that count. …

Soon enough (i.e., much before the time I was in the middle of that video), I figured out the reason why.

I then checked out a few more videos, e.g., those here [^] and here [^]. … Exactly the same sense of discomfort or uneasiness, arising out of the same basic reason.

What kind of an uneasiness could there possibly be? Can you guess?

I don’t want to tell you, right away. I want you to guess. (Assume that an evil smile had transitorily appeared on my face.)

To close this post: If you so want, go ahead, check out those videos, see if it makes you uncomfortable watching some part of an implementation of this new idea. Then, the sin of the sins (“paapam, paapam, mahaapaapam” in Sanskrit): drop me a line (via a comment or an email) stating what that reason possibly could be. (Hint: It has nothing to do with the feely-feely-actually-silly/wily sort of psychological reasons. )

After a while, I will come back, and via an update to this post let you know the reason.


Update 1:

Yahoo! wants you to make a note of the “12 common mistakes to avoid in job interview”: [^]. They published this article today.


Update 2 (on 24th March 2016):

Surprise! Prof.  De soon enough (on 18th March IST) dropped me an email which was brief, professional, but direct to the point. A consequence, and therefore not much of a surprise: I am more or less inclined to at least apply for the position. I have not done so as of today; see the Update 3 below.


Update 3 (on 24th March 2016):

Right the same day (on 18th March 2016 about 10:00 PM IST), my laptop developed serious hardware issues including (but not limited to) yet another HDD crash! The previous crash was less than a year ago, in last June  [^].

Once again, there was  loss of (some) data: the initial and less-than-25%-completed drafts of 4+ research papers, some parts (from sometime in February onwards) of my notes on the current course on CFD, SPH, etc., as well as some preliminary Python code on SPH). The Update 2 in fact got delayed because of this development. I just got the machine back from the Dell Service last evening, and last night got it going on a rapid test installation of Windows 7. I plan to do a more serious re-installation over the next few days.


Update 4 (on 24th March 2016):

The thing in the three videos (about haptics, virtual surgery) that made me uncomfortable or uneasy was the fact that in each case, the surgeon was standing in a way that would have been just a shade uncomfortable to me. The surgeon’s hands were too “free” i.e. unsupported (say near elbow), his torso was stooping down in a wrong way (you couldn’t maintain that posture with accuracy in hands manipulation for long, I thought), and at the same time, he had to keep his eyes fixed on a monitor that was a bit too high-up for the eyes-to-hands coordination to work right. In short, there was this seeming absence of a consideration of ergonomics or the human factors engineering here. Of course, it’s only a prototype, and it’s only a casual onlooker’s take of the “geometry,” but that’s what made me distinctly uncomfortable.

(People often have rationalistic ideas about the proper (i.e. the least stress inducing and most efficient) posture.  In a later post, I will point out a few of these.)

 


 

A Song I Like:
(filled-in on 24th March 2016)

(Marathi) “thembaanche painjaN waaje…” [“rutu premaachaa aalaa”]
Singers: Avadhoot Gupte, Vaishali Samant
Music: Shashank Powar
Lyrics: Ravi Wadkar (?)

[An incidental note: The crash occurred—the computer suddenly froze—while I was listening to—actually, watching the YouTube video of—this song. … Somehow, even today, I still continue liking the song! … But yes, as is usual for this section, only the audio track is being referred to. (I had run into this song while searching for some other song, which I will use in a later post.)]


[Some editorial touches, other than the planned update, are possible, as always.]

[E&OE]

 

A bit about the Dirac delta (and the SPH)

I have been thinking about (and also reading on!) SPH recently.

“SPH” here means: Smoothed Particle Hydrodynamics. Here is the Wiki article on SPH [^] if all you want is to gain some preliminary idea (or better still, if that’s your purpose, just check out some nice YouTube videos after googling on the full form of the term).


If you wish to know the internals of SPH in a better way: The SPH literature is fairly large, but a lot of it also happens to be in the public domain. Here are a few references:

  • A neat presentation by Maneti [^]
  • Micky Kelager’s project report listed here [^]. The PDF file is here [(5.4 MB) ^]
  • Also check out Cossins for a more in-depth working out of the maths [^].
  • The 1992 review by Monaghan himself also is easily traceable on the ‘net
  • The draft of a published book [(large .PDF file, 107 MB) ^] by William Hoover; this link is listed right on his home page [^]. Also check out another book on molecular dynamics which he has written and also put in the public domain.

For gentler introductions to SPH that come with pseudo-code, check out:

  • Browne and Lewinder [(.PDF, 5.2 MB) ^], and
  • David Bindel’s notes [(.PDF, ) ^].

I have left out several excellent introductory articles/slides by others, e.g. by Mathias Muller (and may expand on this list a day or two later).


The SPH theory begins with the identity:

f(x) = \int\limits_{\Omega} \text{d}\Omega_{x'}\,f(x')\,\delta(x- x')

where \delta(x- x') is Dirac’s delta, and x' is not a derivative of x but a dummy variable mimicking x; for a diagrammatic illustration, see Maneti’s slides mentioned above.

It is thus, in connection with SPH (but not of QM) that I thought of going a little deeper with Dirac’s delta.

After some searches, I found an article by Balki on this topic [^], and knowing the author, immediately sat reading it. [Explanations and clarifications: 1. “Balki” means: Professor Balakrishnan of the Physics department of IIT Madras. 2. I know the author; the author does not know me. 3. Everyone on the campus calls him Balki (though I don’t know if they do that in his presence, too).] The link given here is to a draft version; the final print version is available for free from the Web site of the journal: [^].

A couple of days later, I was trying to arrange in my mind the material for an introductory presentation on SPH. (I was doing that even if no one has invited me yet to deliver it.) It was in this connection that I did some more searches on Dirac’s delta. (I began by going one step“up” the directory tree of the first result and thus landed at this directory [^] maintained by Dr. Pande of IIT Hyderabad [^]. … There is something to be said about keeping your directories brows-able if you are going share the entire content one way or the other; it just makes searching related contents easier!)

Anyway, thus, starting there, my further Google searches yielded the following articles/essays/notes: [^], [^], [^], [^], [^], [^], [^], and [^] . And, of course, the Wiki [^].

As any one would expect, some common points were of course repeated in each of these references. However, going through the articles/notes, though quite repetitive, didn’t get all that boring to me: each individual brings his own unique way of explaining a certain material, and Dirac’s delta being a concept that is both so subtle and so abstract, any person who [dare] attempts explaining it cannot help but bring his own individuality to that explanation. (Yes, the concept is subtle. The gifted American mathematician John von Neumann had spent some time showing how Dirac’s notions were mathematically faulty/untenable/not rigorous/something similar. … Happens.)

Anyway, as I expected, Balki’s article turned out to be the easiest and the most understanding-inducing a read among them all! [No, my attending IIT M had nothing to do with this expectation.]

Yet, there remained one minor point which was not addressed very directly in the above-mentioned references—not even by Balki. (Though his treatment is quite clear about the point, he seems to have skipped one small step I think is necessary.) The point I was looking for, is concerned with a more complete answer to this question:

Why is it that the \delta is condemned to live only under an integral sign? Why can’t it have any life of its own, i.e., outside the integral sign?

The question, of course is intimately related to the other peculiar aspects of Dirac’s delta as well. For instance, as the tutorial at Pande’s site points out [^]:

The delta functions should not be considered to be an infinitely high spike of zero width since it scales as: \int_{-\infty}^{\infty} a\,\delta(x)\,\text{d}x = a .

Coming back to the caged life of the poor \delta, all authors give hints, but none jots down all the details of the physical (“intuitive”) reasoning lying behind this peculiar nature of the delta.

Then, imagining as if I am lecturing to an audience of engineering UG students led me to a clue which answers that question—to the detail I wanted to see. I of course don’t know if this clue of mine is mathematically valid or not. … It’s just that I “day-dreamt” one form of a presentation, found that it wouldn’t be hitting the chord with the audience and so altered it a bit, tried “day-dreaming” again, and repeated the process some 3–4 times over the past week. Finally, this morning, I got to the point where I thought I now have got the right clue which can make the idea clearer to the undergraduates of engineering.

I am going to cover that point (the clue which I have) in my next post, which I expect to write, may be, next week-end or so. (If I thought I could write that post without drawing figures, I would have written the answer right away.) Anyway, in the meanwhile, I would like to share all these references on SPH and on Dirac’s delta, and bring the issue (i.e., the question) to your attention.

… No, the point I have in mind isn’t at all a major one. It’s just that it leads to a presentation of the concept that is more direct than what the above references cover. (I can’t better Balki, but I can fill in the gaps in his explanations—at least once in a while.)

Anyway, if you know of any other direct and mathematically valid answers to that question, please point them out to me. Thanks in advance.

 


A Song I Like:

(Marathi) “mana chimba paavasaaLi, jhaaDaat rang ole…”
Music: Kaushal Inamdar
Lyrics: N. D. Mahanor
Singer: Hamsika Iyer

 

[E&OE]