General update: Will be away from blogging for a while

I won’t come back for some 2–3 weeks or more. The reason is this.


As you know, I had started writing some notes on FVM. I would then convert my earlier, simple, CFD code snippets, from FDM to FVM. Then, I would pursue modeling Schrodinger’s equation using FVM. That was the plan.

But before getting to the nitty-gritties of FVM itself, I thought of jotting down a note, once and for all, putting in writing my thoughts thus far on the concept of flux.


If you remember, it was several years ago that I had mentioned on this blog that I had sort of succeeded in deriving the Navier-Stokes equation in the Eulerian but differential form (d + E for short).

… Not an achievement by any stretch of imagination—there are tomes written on say, differentiable manifolds and whatnot. I feel sure that deriving the NS equations in the (d + E) form would be less than peanuts for them.

Yet, the fact of the matter is: They actually don’t do that!

Show me a single textbook or a paper that does that. If not at the UG level, then at least at the PG level, but one that is written using the language of only plain calculus, as used by engineers—not that of advanced analysis.

And as to the UG/PG books from engineering:

What people normally do is to derive these equations in its integral form, whether using the Lagrangian or the Eulerian approach. That is, they adopt either the (i + L) approach or the (i + D) approach.

At some rare times, if they at all begin fluid dynamics with a differential form of the NS equations, then they invariably follow the Lagrangian approach, never the Eulerian. That is, they invariably begin with only (d + L)—even in those cases when their objective is to obtain (d + E). Then, after having derived (d +L) , they simply invoke some arbitrary-looking vector calculus identities to “transform” those equations from (d + L) to (d +E).

And, worse:

They never discuss the context, meaning, or proofs of those identities. None from fluid dynamics or CFD side does that. And neither do the books on maths written for scientists and engineers.

The physical bases of the “transformation” process must remain a mystery.


When I started working through it a few years ago, I realized that the one probable reason why they don’t use the (d +E) form right from the beginning is because: forget the NS equations, no one understands even the much simpler idea of the flux—if it is to be couched entirely in the settings of (d+E). You see, the idea of the flux too always remains couched in the integral form, never the differential. For example, see Narasimhan [^]. Or, any other continuum mechanics books that impresses you.

It’s no accident that the Wiki article on Flux [^] says that it

needs attention from an expert in Physics.

And then, more important for us, the text of the article itself admits that the formula it notes, for a definition of flux in differential terms, is

an abuse of notation

See the section here [^].

Also, ask yourself, why is a formula that is free of the abuse of notation not being made available? In spite of all those tomes having been written on higher mathematics?


Further, there were also other related things I wanted to write about, like an easy pathway to the idea of tensors in general, and to that of the stress tensor in particular.

So, I thought of writing it down it for once and for all, in one note. I possibly could convert some parts of it into a paper later on, perhaps. For the time being though, the note would be more in the nature of a tutorial.


I started writing down the note, I guess, from 17 August 2018. However, it kept on growing, and with growth came reorganization of material for a better hierarchy or presentation. It has already gone through some 4–5 thorough re-orgs (meaning: discarding the earlier LaTeX file entirely and starting completely afresh), and it has already become more than 10 LaTeX pages. Even then, I am nowhere near finishing it. I may be just about half-way through—even though I have been working on it for some 7–8 hours every day for the past fortnight.

Yes, writing something in original is a lot of hard work. I mean “original” not in the sense of discovery, but in the sense of a lack of any directly citable material whatsoever, on the topic. Forget copy-pasting. You can’t even just gather a gist of the issue so that you could cite it.

And, the trouble here is, this topic is otherwise so very mature. (It is some 150+ years old.) So, you know that if you go even partly wrong, the whole world is going to pile on you.

And that way, in my experience, when you write originally, there is at least 5–10 pages of material you typically end up throwing away for every page that makes it to the final, published, version. Yes, the garbage thrown out is some 5–10 times the material retained in—no matter how “simple” and “straightforward” the published material might look.

Indeed, I could even make a case that the simpler and the more straight-forward the published material looks, if it also happens to be original, then the more strenuous it has been, on the part of the author.

Few come to grasp this simple an observation, ever, in their entire life.


As a case in point, I wish to recall here my conference paper on diffusion. [To be added here soon enough.]

I have many times silently watched people as they were going through this paper for the first time.

Typically, when engineers read it, they invariably come out with a mild expression which suggests that they probably were thinking of something like: “isn’t it all so simple and straight-forward?” Sometimes they even explicitly ask: “And, what do you say was the new contribution here?” [Even after having gone through both the abstract and the conclusion part of it, that is.]

On the other hand, on the four-five rare occasions when I have had the opportunity to watch professional mathematicians go through this paper of mine, in each case, the expression they invariably gave at the end of finishing it was as if they still were very intently absorbed in it. In particular, they never do ask me what was new about it—they just remain deeply engaged in what looks like an exercise in “fault-finding”, i.e., in checking if any proof, theorem or lemma they had ever had come across could be used in order to demolish the new idea that has been presented. Invariably, they give the same argument by way of an objection. Invariably, I explain why their argument does not address the issue I have raised in the paper. Invariably they chuckle and then go back to the paper and to their intent thinking mode, to see if there is any other weakness to my basic argument…

Till date (even after more than a decade), they haven’t come back.

But in all cases, they were very ready to admit that they were coming across this argument for the first time. I didn’t have to explain it to them that though the language and the tone of the paper looked simple enough, the argument itself was not easy to derive originally.


No, the notes which I am currently working on are nowhere near as original as that. [But yes, original, these are.]

Yet, let me confess, even as I keep prodding through it for the better part of the day the way I have done over the past fortnight or so, I find myself dealing with a certain doubt: wouldn’t they just dismiss it all as being too obvious? as if all the time and effort I spent on it was, more or less, ill spent? that it was all meaningless to begin with?


Anyway, I want to finish this task before resuming blogging—simply because I’ve got a groove about it by now… I am in a complete and pure state of anti-procrastination.

… Well, as they say: Make the hay while the Sun shines…


A Song I Like:
(Marathi) “dnyaandev baaL maajhaa…”
Singer: Asha Bhosale
Lyrics: P. Savalaram
Music: Vasant Prabhu

 

Advertisements

Where are those other equations?

Multiple header images, and the problem with them:

As noted in my last post, I have made quite a few changes to the layout of this blog, including adding a “Less transient” page [^].

Another important change was that now, there were header images too, at the top.

Actually, initially, there was only one image. For the record, it was this: [^] However, there weren’t enough equations in it. So, I made another image. It was this [^]. But as I had already noted in the last post, this image was already crowded, and even then, it left out some other equations that I wanted to include.

Then, knowing that WordPress allows multiple images that can be shown at random, I created three images, and uploaded them. These are what is being displayed currently.

However, randomizing means that even after re-loading a page a couple of times, there still is a good chance that you will miss some or the other image, out of those three.

Ummm… OK.


A quick question:

Here is the problem statement:

There are three different header images for this blog. The server shows you only one of them during a single visit. Refreshing the page in the browser also counts as a separate visit. In each visit, the server will once again select an image completely at random.

Assume also that the PDF for the random sequence is uniform. That is to say, there is no greater probability for any of the three images during any visit. Cookies, e.g., play no role.

Now, suppose you make only three visits to this blog. For instance, suppose you visit some page on this blog, and then refresh the same page twice in the browser. The problem is to estimate the chances that you will get to see:

  • all of the three different images, but in only three visits
  • one and the same image, each time, during exactly three visits
  • exactly two different images, during exactly three visits

Don’t read further until you solve this problem, right now: right on-the-fly and right in your head (i.e. without using paper and pencil).

(Hint [LOL!]: There are three balls of different colors (say Red, Green, and Blue) in a box, and \dots.)


 

…No, really!

 


Ummm… Still with me?

OK. That tells me that you are now qualified to read further.

Just in case you were wondering what was there in the “other” header images, here is a little document I am uploading for you. Go, see it (.PDF [^]), but also note the caveat below.

Caveats: It is a work in progress. If you spot a mistake or even just a typo, then please do let me know. Also, don’t rely on this work.

For example, the definition of stress given in the document is what I have not so far read in any book. So, take it with a pinch of the salt—even if I feel confident that it is correct. Similarly, there might be some other changes, especially those related to the definition of the flux and its usage in the generic equation. Also, I am not sure if the product ansatz for the separation of variables technique began with d’Alembert or not. I vaguely remember its invention being attributed to him, but it was a long time ago, and I am no longer sure. May be it was before him. May be it was much later, at the hands of Fourier, or, even still later, by Lame. … Anyway let it be…

…BTW, the equations in the images currently being shown are slightly different—the PDF document is the latest thing there is.

Also, let me have your suggestions for any further inclusions, too, if any. (As to me: Yes, I would like to add a bit on the finite volume method, too.)

As usual, I may change the PDF document at any time in future. However, the document will always carry the date of compilation as the “version number”.


General update:

These days, I am also busy converting my already posted CFD snippets [^] into an FVM-based code.

The earlier posted code was done using FDM, not FVM, but it was not my choice—SPPU (Pune University) had thrust it upon me.

Writing an illustrative code for teaching purposes is fairly simple and straight-forward, esp. in Python—and especially if you treat the numpy arrays exactly as if they were Python arrays!! (That is, very inefficiently.) But I also thought of writing some notes on at least some initial parts of FVM (in a PDF document) to go with the code. That’s why, it is going to take a bit of time.

Once all this work is over, I will also try to model the Schrodinger equation using FVM. … Let’s see how it all goes…

…Alright, time to sign off, already! So, OK, take care and bye for now. …

 


A Song I Like:
(Hindi) “baharon, mera jeevan bhee savaron…”
Music: Khayyam
Singer: Lata Mangeshkar
Lyrics: Kaifi Aazmi


[The obligatory PS: In all probability, I won’t make any changes to the text of this post. However, the linked PDF document is bound to undergo changes, including addition of new material, reorganization, etc. When I do revise that document, I will note the updates in the post, too.]

 

“Math rules”?

My work (and working) specialization today is computational science and engineering. I have taught FEM, and am currently teaching both FEM and CFD.

However, as it so happens, all my learning of FEM and CFD has been derived only through self-studies. I have never sat in a class-room and learnt these topics in the usual learning settings. Naturally, there were, and are, gaps in my knowledge.


The most efficient way of learning any subject matter is through traditional and formal learning—I mean to say, our usual university system. The reason is not just that a teacher is available to teach you the material; even books can do that (and often times, books are actually better than teachers). The real advantage of the usual university education is the existence of those class-mates of yours.

Your class-mates indirectly help you in many ways.

Come the week of those in-semester unit tests, at least in the hostels of Indian engineering schools, every one suddenly goes in the studies mode. In the hostel hallways, you casually pass someone by, and he puts a simple question to you. It is, perhaps, his genuine difficulty. You try to explain it to him, find that there are some gaps in your own knowledge too. After a bit of a discussion, some one else joins the discussion, and then you all have to sheepishly go back to the notes or books, or solve a problem together. It helps all of you.

Sometimes, the friend could be even just showing off to you—he wouldn’t ask you a question if he knew you could answer it. You begin answering in your usual magnificently nonchalant manner, and soon reach the end of your wits. (A XI standard example: If the gravitational potential inside the earth is constant, how come a ball dropped in a well falls down? [That is your friend’s question, just to tempt you in the wrong direction all the way through.]… And what would happen if there is a bore all through the earth’s volume, assuming that the earth’s core is solid all the way through?) His showing off helps you.

No, not every one works in this friendly a mode. But enough of them do that one gets used to this way of studying/learning—a bit too much, perhaps.

And, it is this way of studying which is absent not only in the learning by pure self-studies alone, but also in those online/MOOC courses. That is the reason why NPTEL videos, even if downloaded and available on the local college LAN, never get referred to by individual students working in complete isolation. Students more or less always browse them in groups even if sitting on different terminals (and they watch those videos only during the examination weeks!)

Personally, I had got [perhaps excessively] used to this mode of learning. [Since my Objectivist learning has begun interfering here, let me spell the matter out completely: It’s a mix of two modes: your own studies done in isolation, and also, as an essential second ingredient, your interaction with your class-mates (which, once again, does require the exercise of your individual mind, sure, but the point is: there are others, and the interaction is exposing the holes in your individual understanding).]

It is to this mix that I have got too used to. That’s why, I have acutely felt the absence of the second ingredient, during my studies of FEM and CFD. Of course, blogging fora like iMechanica did help me a lot when it came to FEM, but for CFD, I was more or less purely on my own.

That’s the reason why, even if I am a professor today and even if I am teaching CFD not just to UG but also to PG students, I still don’t expect my knowledge to be as seamlessly integrated as for the other things that I know.

In particular, one such a gap got to the light recently, and I am going to share my fall—and rise—with you. In all its gloriously stupid details. (Feel absolutely free to leave reading this post—and indeed this blog—any time.)


In CFD, the way I happened to learn it, I first went through the initial parts (the derivations part) in John Anderson, Jr.’s text. Then, skipping the application of FDM in Anderson’s text more or less in its entirety, I went straight to Versteeg and Malasekara. Also Jayathi Murthy’s notes at Purdue. As is my habit, I was also flipping through Ferziger+Peric, and also some other books in the process, but it was to a minor extent. The reason for skipping the rest of the portion in Anderson was, I had gathered that FVM is the in-thing these days. OpenFOAM was already available, and its literature was all couched in terms of FVM, and so it was important to know FVM. Further, I could also see the limitations of FDM (like requirement of a structured Cartesian mesh, or special mesh mappings, etc.)

Overall, then, I had never read through the FDM modeling of Navier-Stokes until very recent times. The Pune University syllabus still requires you to do FDM, and I thus began reading through the FDM parts of Anderson’s text only a couple of months ago.

It is when I ran into having to run the FDM Python code for the convection-diffusion equation that a certain lacuna in my understanding became clear to me.


Consider the convection-diffusion equation, as given in Prof. Lorena Barba’s Step No.8, here [^]:

\dfrac{\partial u}{\partial t} + u \dfrac{\partial u}{\partial x} + v \dfrac{\partial u}{\partial y} = \nu \; \left(\dfrac{\partial ^2 u}{\partial x^2} + \dfrac{\partial ^2 u}{\partial y^2}\right)  \\  \dfrac{\partial v}{\partial t} + u \dfrac{\partial v}{\partial x} + v \dfrac{\partial v}{\partial y} = \nu \; \left(\dfrac{\partial ^2 v}{\partial x^2} + \dfrac{\partial ^2 v}{\partial y^2}\right)

I had never before actually gone through these equations until last week. Really.

That’s because I had always approached the convection-diffusion system via FVM, where the equation would be put using the Eulerian frame, and it therefore would read something like the following (using the compact vector/tensor notation):

\dfrac{\partial}{\partial t}(\rho \phi) +  \nabla \cdot (\rho \vec{u} \phi)  = \nabla \cdot (\Gamma \nabla \phi) + S
for the generic quantity \phi.

For the momentum equations, we substitute \vec{u} in place of \phi, \mu in place of \Gamma, and S_u - \nabla P in place of S, and the equation begins to read:
\dfrac{\partial}{\partial t}(\rho \vec{u}) +  \nabla \cdot (\rho \vec{u} \otimes \vec{u})  = \nabla \cdot (\mu \nabla \vec{u}) - \nabla P + S_u

For an incompressible flow of a Newtonian fluid, the equation reduces to:

\dfrac{\partial}{\partial t}(\vec{u}) +  \nabla \cdot (\vec{u} \otimes \vec{u})  = \nu \nabla^2 \vec{u} - \dfrac{1}{\rho} \nabla P + \dfrac{1}{\rho} S_u

This was the framework—the Eulerian framework—which I had worked with.

Whenever I went through the literature mentioning FDM for NS equations (e.g. the computer graphics papers on fluids), I more or less used to skip looking at the maths sections, simply because there is such a variety of reporting the NS equations, and those initial sections of the papers all go over the same background material. The meat of the paper comes only later. (Ferziger and Peric, I recall off-hand, mention that there are some 72 different ways of writing down the NS equations.)


The trouble occurred when, last week, I began really reading through (as in contrast to rapidly glancing over) Barba’s Step No. 8 as mentioned above. Let me copy-paste the convection-diffusion equations once again here, for ease of reference.

\dfrac{\partial u}{\partial t} + u \dfrac{\partial u}{\partial x} + v \dfrac{\partial u}{\partial y} = \nu \; \left(\dfrac{\partial ^2 u}{\partial x^2} + \dfrac{\partial ^2 u}{\partial y^2}\right)  \\  \dfrac{\partial v}{\partial t} + u \dfrac{\partial v}{\partial x} + v \dfrac{\partial v}{\partial y} = \nu \; \left(\dfrac{\partial ^2 v}{\partial x^2} + \dfrac{\partial ^2 v}{\partial y^2}\right)

Look at the left hand-side (LHS for short). What do you see?

What I saw was an application of the following operator—an operator that appears only in the Lagrangian framework:

\dfrac{\partial}{\partial t} + (\vec{u} \cdot \nabla)

Clearly, according to what I saw, the left hand-side of the convection-diffusion equation, as written above, is nothing but this operator, as applied to \vec{u}.

And with that “vision,” began my fall.

“How can she use the Lagrangian expression if she is going to use a fixed Cartesian—i.e. Eulerian—grid? After all, she is doing FDM here, isn’t she?” I wondered.

If it were to be a computer graphics paper using FDM, I would have skipped over it, presuming that they would sure transform this equation to the Eulerian form some time later on. But, here, I was dealing with a resource for the core engineering branches (like mech/aero/met./chem./etc.), and I also had a lab right this week to cover this topic. I couldn’t skip over it; I had to read it in detail. I knew that Prof. Barba couldn’t possibly make a mistake like that. But, in this lesson, even right up to the Python code (which I read for the first time only last week), there wasn’t even a hint of a transformation to the Eulerian frame. (Initially, I even did a search on the string: “Euler” on that page; no beans.)

There must be some reason to it, I thought. Still stuck with reading a Lagrangian frame for the equation, I then tried to imagine a reasonable interpretation:

Suppose there is one material particle at each of the FDM grid nodes? What would happen with time? Simplify the problem all the way down. Suppose the velocity field is already specified at each node as the initial condition, and we are concerned only with its time-evolution. What would happen with time? The particles would leave their initial nodal positions, and get advected or diffused away. In a single time-step, they would reach their new spatial positions. If the problem data are arbitrary, their positions at the end of the first time-step wouldn’t necessarily coincide with grid points. If so, how can she begin her next time iteration starting from the same grid points?

I had got stuck.

I thought through it twice, but with the same result. I searched through her other steps. (Idly browsing, I even looked up her CV: PhD from CalTech. “No, she couldn’t possibly be skipping over the transformation,” I distinctly remember telling myself for the nth time.)

Faced with a seemingly unyielding obstacle, I had to fall back on to my default mode of learning—viz., the “mix.” In other words, I had to talk about it with someone—any one—any one, who would have enough context. But no one was available. The past couple of days being holidays at our college, I was at home, and thus couldn’t even catch hold of my poor UG students either.

But talking, I had to do. Finally, I decided to ask someone about it by email, and so, looked up the email ID of a CFD expert, and asked him if he could help me with something that is [and I quote] “seemingly very, very simple (conceptual) matter” which “stumps me. It is concerned with the application of Lagrangian vs. Eulerian frameworks. It seems that the answer must be very simple, but somehow the issue is not clicking-in together or falling together in place in the right way, for me.” That was yesterday morning.

It being a week-end, his reply came fairly rapidly, by yesterday afternoon (I re-checked emails at around 1:30 PM); he had graciously agreed to help me. And so, I rapidly wrote up a LaTeX document (for equations) and sent it to him as soon as I could. That was yesterday, around 3:00 PM. Satisfied that finally I am talking to someone, I had a late lunch, and then crashed for a nice ciesta. … Holidays are niiiiiiiceeeee….

Waking up at around 5:00 PM, the first thing I did, while sipping a cup of tea, was to check up on the emails: no reply from him. Not expected this soon anyway.

Still lingering in the daze of that late lunch and the ciesta, idly, I had a second look at the document which I had sent. In that problem-document, I had tried to make the comparison as easy to see as possible, and so, I had taken care to write down the particular form of the equation that I was looking for:

\dfrac{\partial u}{\partial t} + \dfrac{\partial u^2}{\partial x} + \dfrac{\partial uv}{\partial y} = \nu \; \left(\dfrac{\partial ^2 u}{\partial x^2} + \dfrac{\partial ^2 u}{\partial y^2}\right)  \\  \dfrac{\partial v}{\partial t} + \dfrac{\partial uv}{\partial x} + \dfrac{\partial v^2}{\partial y} = \nu \; \left(\dfrac{\partial ^2 v}{\partial x^2} + \dfrac{\partial ^2 v}{\partial y^2}\right)

“Uh… But why would I keep the product terms like u^2 inside the finite difference operator?” I now asked myself, still in the lingering haze of the ciesta. “Wouldn’t it complicate, say, specifying boundary conditions and all?” I was trying to pick up my thinking speed. Still yawning, I idly took a piece of paper, and began jotting down the equations.

And suddenly, before even completing writing down the very brief working-out by hand, the issue had already become clear to me.

Immediately, I made me another cup of tea, and while still sipping it, launched TexMaker, wrote another document explaining the nature of my mistake, and attached it to a new email to the expert. “I got it” was the subject line of this new email I wrote. Hitting the “Send” button, I noticed what time it was: around 7 PM.

Here is the “development” I had noted in that document:

Start with the equation for momentum along the x-axis, expressed in the Eulerian (conservation) form:

\dfrac{\partial u}{\partial t} + \dfrac{\partial u^2}{\partial x} + \dfrac{\partial uv}{\partial y} = \nu \; \left(\dfrac{\partial ^2 u}{\partial x^2} + \dfrac{\partial ^2 u}{\partial y^2}\right)

Consider only the left hand-side (LHS for short). Instead of treating the product terms u^2 and uv as final variables to be discretized immediately, use the product rule of calculus in the same Eulerian frame, rearrange, and apply the zero-divergence property for the incompressible flow:

\text{LHS} = \dfrac{\partial u}{\partial t} + \dfrac{\partial u^2}{\partial x} + \dfrac{\partial uv}{\partial y}  \\  = \dfrac{\partial u}{\partial t} + u \dfrac{\partial u}{\partial x} + u\dfrac{\partial u}{\partial x} + u \dfrac{\partial v}{\partial y} + v \dfrac{\partial u}{\partial y}  \\  = \dfrac{\partial u}{\partial t} + u \dfrac{\partial u}{\partial x} + u \left[\dfrac{\partial u}{\partial x} + \dfrac{\partial v}{\partial y} \right] + v \dfrac{\partial u}{\partial y}  \\  = \dfrac{\partial u}{\partial t} + u \dfrac{\partial u}{\partial x} + u \left[ 0 \right] + v \dfrac{\partial u}{\partial y}; \qquad\qquad \because \nabla \cdot \vec{u} = 0 \text{~if~} \rho = \text{~constant}  \\  = \dfrac{\partial u}{\partial t} + u \dfrac{\partial u}{\partial x} + v \dfrac{\partial u}{\partial y}

We have remained in the Eulerian frame throughout these steps, but the final equation which we got in the end, happens to be identical as that for the Lagrangian frame! Magic!!

The “magic” occurs only because the flow is incompressible. For a compressible flow, the equations should continue looking different, because \rho would be a variable, and so it would have to be accounted for with a further application of the product rule while evaluating \frac{\partial}{\partial t}(\rho u), \frac{\partial}{\partial x}(\rho u^2) and \frac{\partial}{\partial x}(\rho uv) etc.

But as it so happens, for the current case, even if the final equations look exactly the same, we should not supply the same physical imagination.

We don’t imagine the Lagrangian particles at nodes. Our imagination continues remaining Eulerian throughout the development, with our focus not on the advected particles’ positions but on the flow variables u and v at the definite (fixed) points in space.


Sometimes, just expressing your problem to someone else itself pulls you out of your previous mental frame, and that by itself makes the problem disappear—in other words, the problem gets solved without your “solving” it. But to do that, you need someone else to talk to!


But how could I make such stupid and simple a mistake, you ask? This is something even a UG student at an IIT would be expected to know! [Whether they always do, or not, is a separate issue.]

Two reasons:

First: As I said, there are gaps in my knowledge of computational mechanics. More gaps than you would otherwise expect, simply because I had never had class-mates with whom to discuss my learning of computational  mechanics, esp., CFD.

Second: I was getting deeper into the SPH in the recent weeks, and thus was biased to read only the Lagrangian framework if I saw that expression.

And a third, more minor reason: One tends to be casual with the online resources. “Hey it is available online already. I could reuse it in a jiffy, if I want.” Saying that every time you visit the resource, but indefinitely postponing actually reading through it. That’s the third reason.


And if I could make so stupid a mistake, and hold it for such a long time (a day or so), then how could I then see through it, even if only eventually?

One reason: Crucial to that development is the observation that the divergence of velocity is zero for an incompressible flow. My mind was trained to look for it.

Even if the Pune University syllabus explicitly states that derivations will not be asked on the examinations, just for the sake of solidity in students’ understanding, I had worked through all the details of all the derivations in my class. During those routine derivations, you do use this crucial property in simplifying the NS equations, but on the right hand-side, i.e., for the surface forces term (while simplifying for the Newtonian fluid). Anderson does not work it out fully [see his p. 66] nor do Versteeg and Malasekara. But I anyway had worked it out fully, in my class… So, my mind was already trained and primed for this observation.

So, it was easy enough to spot the same pattern—even before jotting it down on paper—once it began appearing on the left hand-side of the same equation.

Hard-work pays off—if not today, tomorrow.


CFD books always emphasize the idea that the 4 combinations produced by (i) differential-vs-integral forms and (ii) Lagrangian-vs-Eulerian forms all look different, and yet, they still are the same. Books like Anderson’s take special pains to emphasize this point.

Yes, in a way, all equations are the same: all the four mathematical forms express the same physical principle.

However, when seen from another perspective, what we saw above was an example of two equations which look exactly the same in every respect, but in fact are not to be viewed as such.

One way of reading this equation is to imagine inter-connected material particles getting advected according to that equation in their local framework. Another way of reading exactly the same equation is to imagine a fluid flowing past those fixed FDM nodes, with only the nodal flow properties changing according to that equation.

Exactly the same maths (i.e. the same equation), and of course, also the same physical principle, but a different physical imagination.

And you want to tell me “math [sic] rules?”


I Song I Like:

(Hindi) “jaag dil-e-deewaanaa, rut jaagee…”
Singer: Mohamad Rafi
Music: Chitragupt
Lyrics: Majrooh Sultanpuri

[As usual, may be another editing pass…]

[E&OE]

Yo—8: This tomboy is lovable. Also, a bit about the NS equations

“This tomboy is lovable.”

That was the note on which I wanted to begin my new year’s writing.

But I liked the way this tomboy handle maths so much, I had to begin messing around way before the new year’s eve would even arrive. …

OK. My puny ability to make puns is more or less fully exhausted by now. So, let’s go on to the thing straight. … More details, here [^]. And, for the maths part, here[^].

BTW, I don’t know about the other platforms, but at least on Ubuntu 14.04 LTS, after installation of the tomboy-latex plugin, you have to “enable” it from the “Preferences” dialog, and then close the software and restart it, before you can use it.

If you have a scatter-brain sort of a mind the way I do [heck, did I say something materialistic here?], you will find this tiny little piece of software a great help. … No need to compile the LaTeX document; the equations become directly visible as soon as you finish typing them in. Very handy.

… I am not sure if I am going to use the linking feature a lot. … But let’s see what the feel of the software becomes like, once there are, say, over 100 or so notes.

Anyway, that’s what my New Year’s Resolution for 2015 has been. To use Tomboy. … Low maintenance. Easy to keep. [If any pun has slipped in once again, then that is totally unintentional.]

* * * * *   * * * * *   * * * * *

Still twiddling thumbs on the job front… Hope something works out soon. … If you (once again) go  jobless, you think of some terrific ideas like trying your hand at some funny writing, and out comes some pathetic, or (Hindi) “bakwaas” or even (Marathi) “bhakaas” sort of puns . … Only to be expected… OK, more, some time later. … But, yes, Tomboy is handy for jotting down research ideas.

* * * * *   * * * * *   * * * * *

[As usual, a short and sweet Yo post has become lengthy… Might as well continue writing a bit….]

In the meanwhile, am continuing reading up here and there on CFD and all.

… Got confused about one seemingly small part of the derivation of the Navier-Stokes equations, in the conservative differential form, i.e., with a differential element fixed in space, i.e., an Eulerian infinitesimal element. Which means, none of the following three: (i) Eulerian integral, (ii) Lagrangian integral, or (iii) Lagrangian differential.

Instead, as I said, we are talking about the fourth possibility: Eulerian infinitesimal.

When it comes to equations put forth in the so-called conservative form, no text-book ever gives you a direct derivation in a differential form—I mean, with sufficient generality.

The modern texts almost always begin with the integral form of the equations, i.e., the Reynolds Transport Theorem (or RTT) for a finite (or integral) element, and only then, on the basis of the RTT, derive the conservative differential form. The derivation, thus, is indirect. As far as a derivation directly in the differential form (with an infinitesimal element) goes, text-books invariably choose a moving (i.e. Lagrangian) element, not a fixed (Eulerian) one.

But I wanted the odd combination: Eulerian, differential, and direct derivation.

True to my style, I thought that it would be very easy to do a derivation directly in this last form. So, instead of first working it out with paper and pencil, I directly started writing a small note in LaTeX, until I began stumbling around, whenever I tried to supply a “brief” conceptual explanation of what was going on in the derivation. Something wrong would sneak in into my derivation, and I could spot it only when I tried to explain the kind of assumptions I was implicitly making in conceptual terms. I tried may be some 2–3 times afresh, every time, directly in LaTeX, each time only to stumble on to some or the other error. (Of course, I was trying to build the derivation in general terms.)

Then, to get the matter straightened out, I consulted may be some 8–10 books/online notes, even one pedagogical paper on how the NS equations should be presented to students. This paper was written by a professor who had taught introductory FM course some 33 times! [(pdf) ^]. But still, a derivation of a sufficient generality but directly in the conservative differential form is not there even in this paper.

Finally, I found something mentioned in White’s introductory text on fluid mechanics. It was the only FM text to mention this point, even though, it does so only passingly. White, too, doesn’t give you a derivation directly in the required form, but it does only passingly mention a remark—which led to the lighting of the bulb for me!

Well, in a way, this is quite minor a matter—nothing even remotely like a new or a research idea. But still, I found myself getting confused about “such minor” an issue for an unexpectedly long time—for a few days or so (with some 2–3 hours per day, writing typing directly in LaTeX).

… May be, I will post something about it, some time later. (And, yes, I have made a Tomboy note about this confusion, too.) Bye for now.

* * * * *   * * * * *   * * * * *

[This post was originally posted on January 7, 2015, but then, I decided to hold it back for a while. Reposting the same today, with a bit of a revision (2015.01.15)]

[E&OE]