# Python scripts for simulating QM, part 0: A general update

My proposed paper on my new approach to QM was not accepted at the international conference where I had sent my abstract. (For context, see the post before the last, here [^] ).

“Thank God,” that’s what I actually felt when I received this piece of news, “I can now immediately proceed to procrastinate on writing the full-length paper, and also, simultaneously, un-procrastinate on writing some programs in Python.”

So far, I have written several small and simple code-snippets. All of these were for the usual (text-book) cases; all in only $1D$. Here in this post, I will mention specifically which ones…

Time-independent Schrodinger equation (TISE):

Here, I’ve implemented a couple of scripts, one for finding the eigen-vectors and -values for a particle in a box (with both zero and arbitrarily specified potentials) and another one for the quantum simple harmonic oscillator.

These were written not with the shooting method (which is the method used in the article by Rhett Allain for the Wired magazine [^]) but with the matrix method. … Yes, I have gone past the stage of writing all the numerical analysis algorithm in original, all by myself. These days, I directly use Python libraries wherever available, e.g., NumPy’s LinAlg methods. That’s why, I preferred the matrix method. … My code was not written from scratch; it was based on Cooper’s code “qp_se_matrix”, here [PDF ^]).

Time-dependent Schrodinger equation (TDSE):

Here, I tried out a couple of scripts.

The first one was more or less a straightforward porting of Ian Cooper’s program “se_fdtd” [PDF ^] from the original MatLab to Python. The second one was James Nagel’s Python program (written in 2007 (!) and hosted as a SciPy CookBook tutorial, here [^]). Both follow essentially the same scheme.

Initially, I found this scheme to be a bit odd to follow. Here is what it does.

It starts out by replacing the complex-valued Schrodinger equation with a pair of real-valued (time-dependent) equations. That was perfectly OK by me. It was their discretization which I found to be a bit peculiar. The discretization scheme here is second-order in both space and time, and yet it involves explicit time-stepping. That’s peculiar, so let me write a detailed note below (in part, for my own reference later on).

Also note: Though both Cooper and Nagel implement essentially the same method, Nagel’s program is written in Python, and so, it is easier to discuss (because the array-indexing is 0-based). For this reason, I might make a direct reference only to Nagel’s program even though it is to be understood that the same scheme is found implemented also by Cooper.

A note on the method implemented by Nagel (and also by Cooper):

What happens here is that like the usual Crank-Nicolson (CN) algorithm for the diffusion equation, this scheme too puts the half-integer time-steps to use (so as to have a second-order approximation for the first-order derivative, that of time). However, in the present scheme, the half-integer time-steps turn out to be not entirely fictitious (the way they are, in the usual CN method for the single real-valued diffusion equation). Instead, all of the half-integer instants are fully real here in the sense that they do enter the final discretized equations for the time-stepping.

The way that comes to happen is this: There are two real-valued equations to solve here, coupled to each other—one each for the real and imaginary parts. Since both the equations have to be solved at each time-step, what this method does is to take advantage of that already existing splitting of the time-step, and implements a scheme that is staggered in time. (Note, this scheme is not staggered in space, as in the usual CFD codes; it is staggered only in time.) Thus, since it is staggered and explicit, even the finite-difference quantities that are defined only at the half-integer time-steps, also get directly involved in the calculations. How precisely does that happen?

The scheme defines, allocates memory storage for, and computationally evaluates the equation for the real part, but this computation occurs only at the full-integer instants ($n = 0, 1, 2, \dots$). Similarly, this scheme also defines, allocates memory for, and computationally evaluates the equation for the imaginary part; however, this computation occurs only at the half-integer instants ($n = 1/2, 1+1/2, 2+1/2, \dots$). The particulars are as follows:

The initial condition (IC) being specified is, in general, complex-valued. The real part of this IC is set into a space-wide array defined for the instant $n$; here, $n = 0$. Then, the imaginary part of the same IC is set into a separate array which is defined nominally for a different instant: $n+1/2$. Thus, even if both parts of the IC are specified at $t = 0$, the numerical procedure treats the imaginary part as if it was set into the system only at the instant $n = 1/2$.

Given this initial set-up, the actual time-evolution proceeds as follows:

• The real-part already available at $n$ is used in evaluating the “future” imaginary part—the one at $n+1/2$
• The imaginary part thus found at $n+1/2$ is used, in turn, for evaluating the “future” real part—the one at $n+1$.

At this point that you are allowed to say: lather, wash, repeat… Figure out exactly how. In particular, notice how the simulation must proceed in integer number of pairs of computational steps; how the imaginary part is only nominally (i.e. only computationally) distant in time from its corresponding real part.

Thus, overall, the discretization of the space part is pretty straight-forward here: the second-order derivative (the Laplacian) is replaced by the usual second-order finite difference approximation. However, for the time-part, what this scheme does is both similar to, and different from, the usual Crank-Nicolson scheme.

Like the CN scheme, the present scheme also uses the half-integer time-levels, and thus manages to become a second-order scheme for the time-axis too (not just space), even if the actual time interval for each time-step remains, exactly as in the CN, only $\Delta t$, not $2\Delta t$.

However, unlike the CN scheme, this scheme still remains explicit. That’s right. No matrix equation is being solved at any time-step. You just zip through the update equations.

Naturally, the zipping through comes with a “cost”: The very scheme itself comes equipped with a stability criterion; it is not unconditionally stable (the way CN is). In fact, the stability criterion now refers to half of the time-interval, not full, and thus, it is a bit even more restrictive as to how big the time-step ($\Delta t$) can be given a certain granularity of the space-discretization ($\Delta x$). … I don’t know, but guess that this is how they handle the first-order time derivatives in the FDTD method (finite difference time domain). May be the physics of their problems itself is such that they can get away with coarser grids without being physically too inaccurate, who knows…

Other aspects of the codes by Nagel and Cooper:

For the initial condition, both Cooper and Nagel begin with a “pulse” of a cosine function that is modulated to have the envelop of the Gaussian. In both their codes, the pulse is placed in the middle, and they both terminate the simulation when it reaches an end of the finite domain. I didn’t like this aspect of an arbitrary termination of the simulation.

However, I am still learning the ropes for numerically handling the complex-valued Schrodinger equation. In any case, I am not sure if I’ve got good enough a handle on the FDTD-like aspects of it. In particular, as of now, I am left wondering:

What if I have a second-order scheme for the first-order derivative of time, but if it comes with only fictitious half-integer time-steps (the way it does, in the usual Crank-Nicolson method for the real-valued diffusion equation)? In other words: What if I continue to have a second-order scheme for time, and yet, my scheme does not use leap-frogging? In still other words: What if I define both the real and imaginary parts at the same integer time-steps $n = 0, 1, 2, 3, \dots$ so that, in both cases, their values at the instant $n$ are directly fed into both their values at $n+1$?

In a way, this scheme seems simpler, in that no leap-frogging is involved. However, notice that it would also be an implicit scheme. I would have to solve two matrix-equations at each time-step. But then, I could perhaps get away with a larger time-step than what Nagel or Cooper use. What do you think? Is checker-board patterning (the main reason why we at all use staggered grids in CFD) an issue here—in time evolution? But isn’t the unconditional stability too good to leave aside without even trying? And isn’t the time-axis just one-way (unlike the space-axis that has BCs at both ends)? … I don’t know…

PBCs and ABCs:

Even as I was (and am) still grappling with the above-mentioned issue, I also wanted to make some immediate progress on the front of not having to terminate the simulation (once the pulse reached one of the ends of the domain).

So, instead of working right from the beginning with a (literally) complex Schrodinger equation, I decided to first model the simple (real-valued) diffusion equation, and to implement the PBCs (periodic boundary conditions) for it. I did.

My code seems to work, because the integral of the dependent variable (i.e., the total quantity of the diffusing quantity present in the entire domain—one with the topology of a ring) does seem to stay constant—as is promised by the Crank-Nicolson scheme. The integral stays “numerically the same” (within a small tolerance) even if obviously, there are now fluxes at both the ends. (An initial condition of a symmetrical saw-tooth profile defined between $y = 0.0$ and $y = 1.0$, does come to asymptotically approach the horizontal straight-line at $y = 0.5$. That is what happens at run-time, so obviously, the scheme seems to handle the fluxes right.)

Anyway, I don’t always write everything from the scratch; I am a great believer in lifting codes already written by others (with attribution, of course :)). Thus, while thus searching on the ‘net for some already existing resources on numerically modeling the Schrodinger equation (preferably with code!), I also ran into some papers on the simulation of SE using ABCs (i.e., the absorbing boundary conditions). I was not sure, however, if I should implement the ABCs immediately…

As of today, I think that I am going to try and graduate from the transient diffusion equation (with the CN scheme and PBCs), to a trial of the implicit TDSE without leap-frogging, as outlined above. The only question is whether I should throw in the PBCs to go with that or the ABCs. Or, may be, neither, and just keep pinning the  $\Psi$ values for the end- and ghost-nodes down to $0$, thereby effectively putting the entire simulation inside an infinite box?

At this point of time, I am tempted to try out the last. Thus, I think that I would rather first explore the staggering vs. non-staggering issue for a pulse in an infinite box, and understand it better, before proceeding to implement either the PBCs or the ABCs. Of course, I still have to think more about it… But hey, as I said, I am now in a mood of implementing, not of contemplating.

Why not upload the programs right away?

BTW, all these programs (TISE with matrix method, TDSE on the lines of Nagel/Cooper’s codes, transient DE with PBCs, etc.) are still in a fluid state, and so, I am not going to post them immediately here (though over a period of time, I sure would).

The reason for not posting the code runs something like this: Sometimes, I use the Python range objects for indexing. (I saw this goodie in Nagel’s code.) At other times, I don’t. But even when I don’t use the range objects, I anyway am tempted to revise the code so as to have them (for a better run-time efficiency).

Similarly, for the CN method, when it comes to solving the matrix equation at each time-step, I am still not using the TDMA (the Thomas algorithm) or even just sparse matrices. Instead, right now, I am allocating the entire $N \times N$ sized matrices, and am directly using NumPy’s LinAlg’s solve() function on these biggies. No, the computational load doesn’t show up; after all, I anyway have to use a 0.1 second pause in between the rendering passes, and the biggest matrices I tried were only $1001 \times 1001$ in size. (Remember, this is just a $1D$ simulation.) Even then, I am tempted a bit to improve the efficiency. For these and similar reasons, some or the other tweaking is still going on in all the programs. That’s why, I won’t be uploading them right away.

Anything else about my new approach, like delivering a seminar or so? Any news from the Indian physicists?

I had already contacted a couple of physics professors from India, both from Pune: one, about 1.5 years ago, and another, within the last 6 months. Both these times, I offered to become a co-guide for some computational physics projects to be done by their PG/UG students or so. Both times (what else?) there was absolutely no reply to my emails. … If they were to respond, we could have together progressed further on simulating my approach. … I have always been “open” about it.

The above-mentioned experience is precisely similar to how there have been no replies when I wrote to some other professors of physics, i.e., when I offered to conduct a seminar (covering my new approach) in their departments. Particularly, from the young IISER Pune professor whom I had written. … Oh yes, BTW, there has been one more physicist who I contacted recently for a seminar (within the last month). Once again, there has been no reply. (This professor is known to enjoy hospitality abroad as an Indian, and also use my taxpayer’s money for research while in India.)

No, the issue is not whether the emails I write using my Yahoo! account go into their span folder—or something like that. That would be too innocuous a cause, and too easy to deal with—every one has a mobile-phone these days. But I know these (Indian) physicists. Their behaviour remains exactly the same even if I write my emails using a respectable academic email ID (my employers’, complete with a .edu domain). This was my experience in 2016, and it repeated again in 2017.

The bottom-line is this: If you are an engineer and if you write to these Indian physicists, there is almost a guarantee that your emails will go into a black-hole. They will not reply to you even if you yourself have a PhD, and are a Full Professor of engineering (even if only on an ad-hoc basis), and have studied and worked abroad, and even if your blog is followed internationally. So long as you are engineer, and mention QM, the Indian physicists simply shut themselves off.

However, there is a trick to get them to reply you. Their behavior does temporarily change when you put some impressive guy in your cc-field (e.g., some professor friend of yours from some IIT). In this case, they sometimes do reply your first email. However, soon after that initial shaking of hands, they somehow go back to their true core; they shut themselves off.

And this is what invariably happens with all of them—no matter what other Indian bloggers might have led you to believe.

There must be some systemic reasons for such behavior, you say? Here, I will offer a couple of relevant observations.

Systemically speaking, Indian physicists, taken as a group (and leaving any possible rarest of the rare exceptions aside), all fall into one band: (i) The first commonality is that they all are government employees. (ii) The second commonality they all tend to be leftists (or, heavily leftists). (iii) The third commonality is they (by and large) share is that they had lower (or far lower) competitive scores in the entrance examinations at the gateway points like XII, GATE/JAM, etc.

The first factor typically means that they know that no one is going to ask them why they didn’t reply (even to people like with my background). The second factor typically means that they don’t want to give you any mileage, not even just a plain academic respect, if you are not already one of “them”. The third factor typically means that they simply don’t have the very intellectual means to understand or judge anything you say if it is original—i.e., if it is not based on some work of someone from abroad. In plain words: they are incompetent. (That in part is the reason whenever I run into a competent Indian physicist, it is both a surprise and a pleasure. To drop a couple of names: Prof. Kanhere (now retired) from UoP (now SPPU), and Prof. Waghmare of JNCASR. … But leaving aside this minuscule minority, and coming to the rest of the herd: the less said, the better.)

In short, Indian physicists all fall into a band. And they all are very classical—no tunneling is possible. Not with these Indian physicists. (The trends, I guess, are similar all over the world. Yet, I definitely can say that Indians are worse, far worse, than people from the advanced, Western, countries.)

Anyway, as far as the path through the simulations goes, since no help is going to come from these government servants (regarded as physicists by foreigners), I now realized that I have to get going about it—simulations for my new approach—entirely on my own. If necessary, from the basic of the basics. … And that’s how I got going with these programs.

Are these programs going to provide a peek into my new approach?

No, none of these programs I talked about in this post is going to be very directly helpful for simulations related to my new approach. The programs I wrote thus far are all very, very standard (simplest UG text-book level) stuff. If resolving QM riddles were that easy, any number of people would have done it already.

… So, the programs I wrote over the last couple of weeks are nothing but just a beginning. I have to cover a lot of distance. It may take months, perhaps even a year or so. But I intend to keep working at it. At least in an off and on manner. I have no choice.

And, at least currently, I am going about it at a fairly good speed.

For the same reason, expect no further blogging for another 2–3 weeks or so.

But one thing is for certain. As soon as my paper on my new approach (to be written after running the simulations) gets written, I am going to quit QM. The field does not hold any further interest to me.

Coming to you: If you still wish to know more about my new approach before the paper gets written, then you convince these Indian professors of physics to arrange for my seminar. Or, else…

… What else? Simple! You. Just. Wait.

[Or see me in person if you would be visiting India. As I said, I have always been “open” from my side, and I continue to remain so.]

A song I like:
(Hindi) “bheegee bheegee fizaa…”
Music: Hemant Kumar
Singer: Asha Bhosale
Lyrics: Kaifi Aazmi

History:
Originally published: 2018.11.26 18:12 IST
Extension and revision: 2018.11.27 19.29 IST

# Micro-level water-resources engineering—6: Evaporation

As compared to the last year, public awareness about water resources has certainly increased this year. It has been a second drought-year straight in a row. None can miss it—the water issue—now. [Not even the breweries.]

There are several NGO initiatives involved in the awareness campaigns, as always. Even celebrities, now. Also politicians.

The heartening part this year is that there also is now a much greater participation of the common people.

Indeed, water conservation schemes are these days receiving quite a broad-based support, cutting across all political party-lines. People are actively getting into the building nallah-bunds, farm-ponds, and all. Good.

Good? … This is India, so how can anything be so straight-forwardly good?

With that question mark, I began taking a second look at this entire scene. It all occurred to me during a show that I saw on TV last week or so.

Well, that way, I don’t watch TV much. At least in India, TV has gone beyond being a stupor- or passivity-inducing device; it has become an active noise generator. So, the most I can put up with is only some channel-flipping, once in a while. [In my case it is typically limited to less than 15 minutes at a time, less than 7 times a week]. In one such episode [of flipping through the channels], I happened to catch a few minutes of a chat that some Marathi journos were having with Aamir Khan and Satyajit Bhatkal. [They should have been in awe of Bhatkal, but instead were, of Aamir Khan. [Journos.]]

Both Khan and Bhatkal were being all earnest and also trying to be all reasonable on that show, and in that vein, at one point, Bhatkal mentioned that there have been hundreds (or thousands) of KT-weirs, nallah-bunds and all, which have been implemented by the successive Maharashtra State governments. These are the structures or works which now have become defunct because of a lack of maintenance. Mentioning this point, he then added something like the following: [not his precise words, but as my casual impression of what he effectively was saying]:

For the best or the most optimum utilization of the available money, it would be better to begin with a revival or maintenance (like silt-removal/wall-repairs) of these thousands of the already existing structures, rather than building everything anew, because the latter would cost even more money.

Looks like quite sensible an approach to take, doesn’t it?

Well, yes, on the face of it. But not so, once you begin to think like an engineer about it. In fact, I do want to raise one flag here—one very big, red flag. [No, I am not a communist, just in case you have begun reading this blog only now.]

Let’s look at some hard facts—and also some simplest physical principles—first.

The only primary source of water is: the rainfall.

The two means of conserving water are: (i) surface storage, and (ii) ground-water recharge.

The two big [physical] enemies of water conservation are: (i) run-off and (ii) evaporation.

Run-off means: Rain-water running off the earth’s surface as floods (may be as flash-floods), without getting intercepted or stored anywhere. Evaporation means: the loss of the stored water due to ambient heat.

It’s good that people have gotten aware about the first part—the runoff factor. The by-now popular Marathi slogan: “paaNee aDavaa, paaNee jirawaa” [English: “block water, percolate water”] refers to this first factor. Unfortunately, it has come to refer to only the first factor.

People must also become fully aware about the second factor—namely, evaporation. It too is just as important in India, particularly in places like Maharashtra.

Evaporation is not always an acute concern in the cooler climates (think USA, Canada, Europe, Japan, Australia, New Zealand). But it is, in the hotter climates (think most of the third world). My focus is exclusively on India, mostly on Maharashtra. Since most of the advanced countries happen to lie in the cooler regions, and since in India we habitually borrow our engineering common-sense from the advanced countries rather than developing it individually here, I want to once again stress this point in this series.

As I mentioned in my last post in this series [^]:

“Evaporation is a really bad factor in hot climates like India. At the level of large-scale dams and even for check dams, there is precious little that can be done about it.”

There is a technological reason behind it: You can’t sprinkle some powder or so to cover the surface of a water body, and thereby arrest or slow down the evaporation losses, without also polluting water body in the process.

These days, you often see a layer of water hyacinth in dams/rivers. Thought the plant contiguously covers the water body, contrary to the naive expectation, it in fact accelerates evaporation. The plant sucks water from below and perspires it out via leaves. This rate of perspiration happens to be higher than that of the plain evaporation. Further, water hyacinth has big leaves. The total surface area of the leaves is many times greater than the area of the water body that the plant covers.

But, yes, the simple-minded idea is right, in a way. If instead of the water-sucking water-hyacinth, something else—something chemically inert and opaque—were to cover the water body, then it would cut down on the evaporation losses. People have tried finding such a material, but without success. Any suggested solutions are either not scalable, not economical, or both. That’s why, evaporation is a fact that we must simply learn to live with.

Let me continue quoting from my aforementioned post:

“Evaporation maps for Maharashtra show losses as high as 1.5 m to even 2.5 m per year. Thus, if you build a check-dam with a 3 m high wall, expect to lose more than half of the [stored] water to evaporation alone.

For the same reason of evaporation, most nallah-bunding and contour-trenching works [such as] those typically undertaken under the socialist programs like MNREGA don’t translate to anything at all for storage, or for that matter, even for seepage. Typically, the bunds are less than 1 m tall, and theoretically, water in them is expected to plain evaporate out right before December. Practically, that anyway is the observation! […] It is a waste of money and effort.”

That’s what I had said, about a year ago. It needs to be repeated.

Most people currently enthusiastic about water conservation simply don’t seem to have any appreciation as to how huge (and how hugely relevant) this factor of evaporation is. Hence this post.

To repeat: In Maharashtra, the range of evaporation losses is as high as 1.5–2.5 m. That is, about 5–8 feet, in terms of the height of water lost.

Thus, if you build or repair a nullah-bund that is about 10 feet tall (which is the typical height of a house), then you should expect to lose about 75% of the stored water to evaporation alone. Perhaps even 90% or more. After all, nullahs and rivers typically have a progressively smaller width as we go deeper, and so, the volume of the water body remaining at the bottom after evaporation is even smaller than what a simple height-based calculation tells you.

Coming back to the Khans and Bhatkals, and Patekars and Anaspures: If the small check-dam or Kolhapur-type of bund/weir you are repairing this summer is, say, 7–8 feet high, then what you should expect to see in the next March or April is: a dry river-bed with a few puddles of water perhaps still lingering here and there. Picture a stray dog trying to satisfy his thirst from a puddle that is relatively cleaner from among them, but with a vast patch of a darkish brown, rocky or parched land filling the rest of your visual field. In no case should you picture a large body of clean water extending a couple of kilometers or more upstream of the bund. The fallen rain-water would have got blocked by that bund, sure, but if your bund is only 7–8 feet tall, then all of it would have disappeared [literally] in the thin air through evaporation alone, by the time the summer arrives. [We are not even counting seepage here. And realize, not all seepage goes towards meaningful groundwater recharge. More on it, may be, later.]

Now, the fact of the matter is, many, many KT weirs and bunds, as built in Maharashtra, are hardly even 5–6 feet tall. (Some are as low as just 3–4 feet tall.) They are, thus, not even one (Marathi/Sanskrit word) “puruSh” deep. …

The next time you go for an outing, keep an eye for the bunds. For instance, if you are in Pune, take an excursion in the nearby Purandar taluka, and check out the series of the bunds built by the PWD/Irrigation department on the Neera river. Most of them are just 3–5 feet tall. None is as big as a “puruSh” tall. None ever shows any water left after December. [But don’t therefore go and talk to the PWD/Irrigation engineers about it. These engineers are smart. They will tell you that those are flood-control structures, not water-storage structures. You will thus come back non-plussed. You are warned.]

… In case you didn’t know what “puruSh” means: Well, it’s a traditionally used unit of depth/height in India. It is defined as the uppermost reach of a man when he stands upright and stretches his arms up. Thus, one “puruSh” is about 7–8 feet. Typically, in earlier times, the unit would be used for measuring the depth of a well. [During my childhood, I would often hear people using it. People in the rural areas still continue using it.]

So keep the following capsule in mind.

In most parts of Maharashtra, expect the evaporation losses to be about one “puruSh” deep.

If the water-body at a nallah-bund/check-dam/farm-pond is one “puruSh” deep during the monsoon, then expect its water body to completely dry up by the time the summer arrives the next year.

Therefore, an urgent word of advice:

If you are building farm-ponds or undertaking repairs of any bunds or KT weirs structures this year, then drop from your planning all those sites whose walls are not at least 2.0 “puruSh” tall. [If a wall is 2.0 purush tall, the water body will be about 1.5 purush deep.] Evaporation losses will make sure that your social-work/activity would be a complete waste of money. The successive governments—not just politicians but also social workers, planners, bureaucrats and engineers—have already wasted money on them. Let the wastage stop at least now. Focus from now on only on the viable sites—the sites where the depth of the water-body would be at least 12–15 feet or so.

If the nullah is not naturally deep, and if the local soil type is right, then you may think of deepening it (to a sufficient minimum depth), perhaps with machinery and all.

But in any case, keep the factor of evaporation in mind.

As pointed out in my earlier posts in this series, given the geological type of the top layers in most parts of Maharashtra, seepage is not a favorable option for water conservation planning.

The only exception is the patch that runs across Dhule, Jalgaon through Wardha, Nagpur. There, the top-layer is sufficiently sandy (as in Rajasthan.) Mr. Suresh Khanapurkar has done a lot of seepage-related work in this patch, and groundwater recharge indeed is a viable option there.

But remember: seepage is not viable for most of the remaining parts of Maharashtra (and in fact, it also is not, over very large patches of India). So, if your idea is to build shallower bunds with the expectation that it would help improve groundwater levels via seepage during and soon after monsoon (i.e., before evaporation kicks in the months following the monsoon), then that idea is not so much on the target, as far as Maharashtra is concerned. Engineering for seepage can be viable only if the local geology favors it.

For the general-purpose water conservation, in most parts of Maharashtra, we have to look for storage, not seepage. Therefore, evaporation becomes a more important factor. So, avoid all shallower sites.

In particular, when it comes to farm-ponds, don’t build the shallower ones even if government gives you subsidy for building them (including for the blue plastic sheet which they use in the farm-ponds to prevent the wasteful seepage). If your pond is shallow, it would once again be a waste of money, pure and simple. Evaporation would make sure of that.

That’s all for now, folks.

Yes, I have been repetitive. I don’t mind. I want to be repetitive, until the time that social workers and engineers begin to show a better understanding of the engineering issues involved in water conservation, esp. the factor of evaporation. Currently, an appreciation of this factor seems to be non-existent.

My blogging in the upcoming weeks will be sparser, because I have to re-write my CFD course notes and research related notes, simulation programs, etc. I lost them all during my last HDD crash. I want to complete that part first. So excuse me even if I don’t come back for some 3–4 weeks or more for now. I will try to post a brief note or two even if not a blog post, but no promises. [And, yes, I have now begun my weekly backups, and am strictly following the policy—the notifications from the operating system.]

Bye for now.

[May be one more editing pass, later today or tomorrow… Done.]

[E&OE]

# Micro-level water-resources engineering—5

See near the end of this post.

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

Today is (Sanskrit) “akshay tritiya.” In the Khandesh area of North Maharashtra (in which the Shirpur town of the famous Shirpur pattern falls), in the local lingo, the day is known as “aakhaaji.” In Khandesh, it is a festival of women visiting their (Marathi) “maaher” (i.e. their parents’ home, or the home before marriage). There are traditional songs in the local “AhiraNi” dialect, and dance of the Gujarathi garbaa style, but played only by women. When I was a school-boy in that region, the dance would be done with “Tipri”s, but as far as I remember, without any dhols (i.e. drums), loud-speakers, or any large-scale organization, even if all the streets of the town would overflow with women playing “Tipri”s. I don’t know what the situation is like today.

Festivals mark days of relief. But otherwise, summer is a time of gruelling hard work for rural women. Maharashtra’s population is already 11.4 crores. Even if you take only 20% population as drought-affected, that makes it about 2 crores. (In the 2013 drought, the estimates were about 3 crores.) That means about 1 crore drought-affected women. So, as a rough estimate, there must be at least about 50–75 lakh women facing water-scarcity in a normal year—e.g., right now! Imagine, some tens of lakhs of women having to daily carry pots on their heads for several kilometers a day, just for fetching water—often only poor quality and soily/brackish water, but something that allows them at least cooking food for their families for their barest sustenance. What can we do to spare them the hardship? Obvious.

Find out cost-effective water resources strategies and solutions that can be within their means, without remaining dependent either on government or even on charity.

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

I have been browsing a lot of material, but have found that in this area, even some of the simplest questions are so hard to answer.

For instance, the data about the local geology. Or, even the data about local morphology—I mean, maps with contour lines having 1, 2, or even 5 m resolution, and not 20 or 30 m resolution. Digital DEMs with say 5 m resolution are impossible to find, and so, some creative solutions have to be found out. Here, I first thought of an idea, and later on found a part of it mentioned in a Marathi official document for irrigation department that my father gave me. I will write about it, and address many such questions some time later in this series.

In this post, instead, let me touch upon another simple question.

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

How much of the fallen rainwater really runs off the ground to the rivers? Why don’t some of the dams fill up every monsoon?

In Maharashtra, Marathwada is the region of the lowest rainfall (about 65 cm/annum). The river Godavari flows through this region. There is a big dam called the Jayakwadi project [^]; the reservoir is called “Naath Saagar;” it is named after the great Marathi poet-saint Eknath Maharaj.

The simple question is this: Why does the Naath Saagar reservoir does not fill up to its full capacity every rainy season?

An easy answer would be to say: “Because the rainfall is deficient.”

Let us see whether, starting from some simple basic assumptions, this answer turns out to make any sense or not. Let’s try to do a quick, back-of-the-envelop estimate for how much water should flow into the Jayakwadi dam every year. (My objective behind working out this simple exercise was to get some kind of a datum for the small check dams.)

The basic source of water is the rainfall. To estimate the total water received via rainfall, we have to know the watershed area of the dam. The Wiki page on the Jayakwadi dam [^] notes the catchment area as 21,750 square km. Referring to the rainfall for the upstream catchment area of this dam [I used the map in the book River Basins of India (p. 66)], I estimate the average rainfall for this region as about 65 cm (which also is the figure quoted by P. R. Pisharoty as noted in an earlier post in this series). So, the total annual water received via rainfall in the Jayakawadi watershed is about 1.41375E10 cubic m. Raghunath’s text on hydrology [^] on page 5 notes that for India’s total annual rainfall water of 370 million ha-m, the total runoff into all the rivers is 167 million ha-m. Thus, the runoff to the biggest river in a basin should be about 45% of the total water received from the skies. Assuming that a similar figure applies here, I get the runoff calculations as the following Python code shows:
 # Assumed data dRainfall = 0.65 # meter, assumed dRunoffCoefficient = 0.45 # for all India dCatchmentArea = 21750.0*1000*1000 # meters # Calculations dRainwaterVolume = dRainfall*dCatchmentArea dEvaporationLoss = dRainwaterVolume/3.0 dRunoff = dRunoffCoefficient*dRainwaterVolume dSeepageIntoSubsoil = dRainwaterVolume - dEvaporationLoss - dRunoff print ("Total Volume: %E, Runoff: %E, Evaporation Loss: %E Seepage: %E" % (dRainwaterVolume, dRunoff, dEvaporationLoss, dSeepageIntoSubsoil)) 

On Ubuntu, open a terminal, type “python” in it, and at the Python prompt (say >>>) copy-paste the above lines, and hit enter. (On Windows, you will have to install a suitable Python environment first.) Or, use the online interactive Python terminal here [^].

Thus, the total quantity of water rushing into the Jayakawadi dam every year should be 6.36E9 m^3 (i.e. cubic meters). The Wiki page on the Jayakwadi dam notes that the total capacity of the dam is just 2.91E9 m^3.

Thus, the total quantity of water flowing into the dam should be about 2.1 times the dam reservoir capacity. The dam should more than overflow every year.

Yet, the dam doesn’t even fully fill up every year—it does so only about 2–3 times in a decade.

Even if we take a lower runoff coefficient, say as low as 0.35 (e.g., to factor in the presence of the relatively smaller dams upstream, and also an increased forest cover—which must be a very unrealistic assumption), and even if we take the annual rainfall in the watershed region to be as drastically low as just 40 cm (i.e. the worst drought situation, because they declare a drought if the rainfall is 20% lower [^], and the average for the catchment area of Jayakawadi is above 65 cm), you should still get some 3.045E9 m^3 of water into the Jayakawadi reservoir—more than enough to fill it up fully.

Indeed, there is a further irony. This dam has already gathered a lot of silt (because it is situated in a relatively flatter region, with more loose soil), and the live storage has gone down by 14% (as per Wiki).

[Incidentally, there has been some criticism that the project was moved 100 km upstream. Chances are, the reservoir then would have covered even a flatter area of loose topsoil.]

All of which means that the Naath Saagar reservoir should fill up and overflow even in the worst drought-hit years.

In practice, it doesn’t.

What gives? Any idea? I have no clue.

There must be something the wrong with the way the run-off calculations are performed—they are going off the mark by some 250%. That is too big an error. Has anyone looked into this aspect more carefully?

Exercise: Undertake the same exercise for the Ujjani dam. It is supposed to supply water to another severely drought-prone region in Maharashtra, viz. that of the Solapur district and the nearby areas. It too doesn’t fill up every year.

Realize that big dams like Jayakwadi and Ujjani have comparatively huge catchment areas. For a check dam, the catchment area (or the watershed area) is very small—and therefore, subject to even wider fluctuations from year to year. This is one sobering point we must keep in mind in our enthusiasm for the micro-level projects.

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

The Evaporation Loss, the High Intensity Rains, and Seepage vs. Storage:

As Raghunath’s book [^] shows on page 5, the water balance equation is:

total rainfall = evaporation loss + runoff + seepage into sub-soil.

The item of seepage into subsoil is further split into two parts: (i) a slightly bigger part (53%) of the contribution to moisture (which is the part that is used by the shrubs and the trees in their life-processes; this is the part that is ultimately released to the atmosphere via transpiration), and (ii) a smaller part (47%) of the recharge into groundwater.

Thus, the biggest items here are (1) runoff and (2) evaporation.

This primary importance of the runoff quantity in the overall quantitative scheme was the reason why I decided to check whether the simple runoff factors or calculations are realistic or not. If they were to be OK, I could use them as they are, in my detailed calculations concerning computational watershed modelling.  But as the above example of the Jayakwadi dam showed, at least at a gross scale, the runoff factors are not reliable. Now, even if there are some more detailed (say GIS based) models and micro-models for computing runoffs, I am not sure how reliable they would be. And, if the runoff factor itself is wrong, we are basically regressing back to the stage of empirical data collecting and validation, and so, coarsening out of the micro-models to macro-models (even if using GIS) would be an even more distant a step … Anyway, to proceed further….

For India, the runoff figure is several times higher than the total groundwater recharge.

Further, in the Deccan trap basalt region of Maharashtra, the seepage mechanism is not as efficient as it is in the alluvial soils (for instance, of Aravali region of Rajasthan, or in the Tapi and Purna basins of Maharashtra (the area of the Shirpur pattern)).

Recall Pisharoty’s paper I quoted in my last post in this series [^]. In Maharashtra, half of the annual rainfall occurs within only 15 to 20 high-intensity hours, which occur sometime over only 35–45 days of any actual rainfall.

Thus, in the Deccan trap region of Maharashtra, first there is an overall inefficiency of seepage. It is further compounded worse due to the infrequent high intensity bursts of rains. If the same amount of rainfall were to occur as a slow drizzle over a long period of time, say a continuous stretch of weeks, then such a rainfall pattern would be better conducive to seepage. On the other hand, a sporadic high intensity pattern implies less seepage and more runoff.

Hence, in the Deccan trap regions of Maharashtra, it is the surface storage strategy which is likely to prove better than the underground seepage strategy.

For the above reasons, our solutions should be able to handle arresting the high intensity runoff, for storage.

Next, in India in general, evaporation also is several times higher than the groundwater recharge.

Evaporation is a really bad factor in hot climates like India. At the level of large-scale dams and even for check dams, there is precious little that can be done about it. (Solutions have been sought, e.g., spreading some chemicals on top of the water, but their side effects is a worry.)

Realize that evaporation is a surface phenomenon. Dams with a shallow and wide-spread reservoir (e.g. Jayakwadi) tend to have a relatively higher percentage of evaporation losses, as compared to the deeper dams. Ditto, also for check dams. (That is the reason why the nallah-deepening aspect of the Shirpur pattern makes good sense—provided the cost of excavation is low enough. For the time being, let’s focus on evaporation.)

Evaporation maps for Maharashtra show losses as high as 1.5 m to even 2.5 m per year. Thus, if you build a check-dam with a 3 m high wall, expect to lose more than half of the water to evaporation alone. (The famous bund of the bund-garden in the Pune city used to be actually shallow; it would hold a nice expanse of water simply because the bigger Khadakvasla dam upstream would periodically release water into the river.)

For the same reason of evaporation, most nallah-bunding and contour-trenching works, such as those by Anna Hazaare in Ralegan Siddhi, or those typically undertaken under the socialist programs like MNREGA, don’t translate to anything at all for storage, or for that matter even seepage. Typically, the bunds are less than 1 m tall, and theoretically, water in them is expected to plain evaporate out right before December. Practically, that anyway is the observation! No matter what Anna Hazare might tell you, it is a waste of money and effort.

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

Farm Ponds:

Before closing, let me mention farm ponds as an effective storage strategy, apart from check-dams.

One big advantage with check dams as compared to conventional dams is that there is no cost incurred in the acquisition of land, and for rehabilitation of the displaced people. Speaking purely costs-wise, I read somewhere (or heard in Suresh Khanapurkar’s interviews) that about half of the cost of the conventional dams is on just these two counts.

However, in the case of check dams, if the natural depth of the river gorge is not sufficient (try the small software I wrote earlier in this series), then in order to reduce the percentage loss due to evaporation and thus to make the project economical, some extra expenditure may become necessary in deepening the nallahs.

Now, in the Deccan trap region of Maharashtra, since small rivers and nallahs tend to run through regions of hard rocks (the top soil layer can be as thin as just 0.5 to 1 m or even zero, in them), the excavation work to deepen the nallahs can easily prove to be too costly—this is a factor going against the Shirpur pattern. (More on the economics of excavation in check dams, and of farm ponds, in a later post.)

An advantage with the farm ponds, when compared to check dams, is that since they are built in the field, i.e. in a deeper layer of soft soil, deepening the ditch turns out to be much more economical.

On the downside, as compared to check dams, the storage capacity of farm ponds is much smaller. They also eat up what otherwise could have been a productive farm land.

But, as we saw, a deeper water body means lower percentage of evaporation losses.

Thus, overall, costs-wise, there are many oppositely directed factors, and it’s not possible to draw general conclusions. It’s the cost balance that really determines whether a farm pond makes sense in a given location or not, or is it a check dam for storage, or a check dam for seepage. (I will write another post covering the economics of check dams vs. farm ponds vs. conventional dams).

Second, as far as evaporation is concerned, there is an incredibly creative solution which I ran into only today. It suggests that if you cover a farm pond with a floating layer of the used plastic bottles, then the evaporation loss (at least for very small experimental ponds) can be cut by up to 40%! [(1.7 MB .PDF file) ^]. The work has been done at the well-known Vigyaan Aashram at PaabaL near Pune; guess they also have some kind of collaboration with COEP and MIT (USA). Anyway, coming back to evaporation losses, this is a huge, huge advantage at a throw-away price! The suggestion right now is only at a preliminary stage. I think it should be seriously taken up for studies on a larger scale of a realistic pond. But yes, as an engineer, I simply marvel at this idea—it again takes a perceived problem (“Gee, even Indians have started buying bottled water, huh?” and “Now how do we deal with this mess of all this plastic waste!”), turns it around on its head, and provides a cost-effective solution to another pressing problem. Neat!

BTW, the farm ponds need not always get only“naturally” filled, i.e., with the surface-running rain-water falling from the sky on the same field. Sometimes a combination of a lift-irrigation scheme + a farm pond can also be cost-effective.

Further, as has been practically demonstrated at many sites (e.g. in the Ahmednagar district, by actually practising farmers) a farm pond can also be very easily used for farming fish, as a side business (read side income)! Farming for fish requires relatively little labour—mostly, only some aeration (if at all required) and throwing food into the pond regularly (like twice/thrice a week or so), that’s all. Fish is not only very tasty food, it also is a very high quality and easily digested protein.

The side-walls of the farm-ponds can be also be planted with the kind of trees that give lush green shadow while making do with less water demand. A welcome sight, and a welcome spot for rest, on a hot summer afternoon.

Finally, talking of water bodies, trees, and how beautiful and (literally) cool a surroundings they can go on to make, and of side-businesses, and of creativity, here is yet another creative side-business that has come out of a bigger farm pond; check out the Saguna Baug in Neral near Mumbai [^].

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

Python scripts for predicting the extent to which the Jayakwadi and Ujjani dams should fill, at a given rainfall level. Also, analysis of results, and some comments:

Since writing this post yesterday, I studied more closely the topic of the rainfall–runoff relationships in standard textbooks on hydrology.

There are quite a few models that allow you to calculate the expected runoff volume from the rainfall extent. These are specific to soil types, gradients, type of surface, etc. For Maharashtra, there is a well-known model by Inglis and De Souza (1929); e.g. see p. 180 here [^]. This is an empirical (curve-fitted) model that gives you two separate equations.

For the ghat region:
$R = 0.85P - 30.5$

and for the Deccan plateau:
$R = \dfrac{1}{254} P \left( P - 17.8\right)$

where $R$ is the annual runoff and $P$ is the annual rainfall, both in cm.

Since the formulae seemed to give far lower values for the runoff coefficient, and hence the runoff volume even for the average rains, I decided to write a Python script to find out the extent to which the Jayakwadi (and later, also Ujjani) dam would fill up, given different levels of rainfall.

Here is a link to a zip containing the Python script files and their outputs, in the CSV format [^]. In my code, I calculate the $R$ parameter using both the above equations and take their average. Effectively, I assume that half of the watershed region is of the ghat region, and the other half is of the Deccan plateau. Though the zip file doesn’t show it, there aren’t very glaring differences in the values of $R$ as estimated via the two equations.

The files make it clear that at the average rainfall level of 65 cm in the watershed (i.e. the catchment) region, the Jayakwadi dam is expected to fill only to 89.6%. If there is a drought year and so the watershed region receives some 45 cm rains, this dam would fill only to 21%!! For this dam to fill 100%, an above average rainfall of 67–68 cm would be necessary. Little wonder that the dam has filled only rarely.

The figures for the Ujjani dam are not much different, only slightly different. For instance, it would take 77–78 cm rain in its catchment area for it to fill up. The catchment area of the Ujjani dam does receive a somewhat higher rain, and so, let’s say the normal rainfall there is 70 cm. At this level, the Ujjani dam is expected to fill only to 73% of its full capacity!

There are other methods to estimate runoff too. But given the informal general knowledge about these dams, Inglis and De Souza’s correlations would seem to hold well.

I am no expert in dams design. To my lay engineer’s eyes, these are decidedly wasteful designs. After all, bigger-than-necessary designs imply greater-than-necessary expenditures, too. The Wiki page informs us that Jayakwadi project has cost more than Rs. 10,000 crores by now. … What portion of this huge amount are wasteful?

Among the Maharashtrian “intellectual,” “chattering” etc. classes  (and also among the NRI community, esp. that settled in the USA, esp. in California), it has become a fashion to blame politicians for every conceivable ill concerning water scarcity in Maharashtra.

Do you think that these civil engineering designs were done by politicians? Do you think that, for instance, say Vasantrao Naik, would have knowingly ordered a deliberately bigger and costlier dam, just to score some political high point for himself or his party? (I mention him because the Wiki informs us that the Jayakwadi dam design was finalized when he was the CM. Similarly, the Ujjani dam got designed when he was the CM.)

If you think such things are possible—things like increasing a dam size just to score some political high point for oneself or one’s party—then I would say that you just don’t know the way a typical politician thinks and operates. Yes, even in a mixed economy.

Yes, it’s important for a typical politician in a mixed economy (regardless of the party to which he belongs) to show that he is doing something meaningful, whether something actually meaningful gets done or not; yes, it is possible that given a choice, he would always pick up that choice which benefits his own constituency; yes, it is possible that he might even bring a bit of pressure on the officers to tweak solutions so that his constituency benefits. (They even publicly admit if not boast about such things.)

But a deliberate increase of size of a dam for absolutely no conceivable benefit to anyone? No way. No politician even in a mixed economy—and esp. in reference to a country like India—ever operates that way.

Here, if you say that an increased dam size means an increased budget, and therefore greater bribes to him/his party-men, then I would say, you just don’t understand the system. Even if I grant you the premise that every politician is always on principle on the look-out for kickbacks and bribes, granted that, a typical politician still wouldn’t want to increase a dam’s size, because—and get this right—he doesn’t have to. He can easily use the same amount of the additional (wasteful) budget on some other project without ever affecting the total quantum of his bribe, so why should he insist on making just one dam/project bigger than necessary, at the expense of all other possible dams/projects? If he can build two dams in the same budget—note, the amount of bribe has stayed the same—since he stands to get double the publicity with the same budget-money, he would rather go in for that.

Thus, all this “logic” is simply the smart “white-collared” Indian’s way of saving the “behind” of his own—or of groups of people he regards similar to him—nothing else.

Are bureaucrats and even engineers ever going to admit there might have been some mistakes here? More importantly, how many Indians of the “intellectual” kind are going to be willing to even think of such a possibility? (Even Anna Hazaare’s all-water-vaporizing nallah-bunds seem almost innocuous by comparison; they must have involved relatively smaller amounts, say of a mere few hundreds of crores. In contrast, wasteful big projects like these would involve thousands of crores.)

And, even more importantly, is there anyone willing to have an honest second look about the socialistic nature of the system that produces costly errors of this kind? (Not just costs. Since a wrong datum for the capacity of the dam has been established, now there also are fights: Marathwada people think that if the Jayakwadi dam doesn’t fill up fully, the reason must be that the smaller dams upstream have been criminally diverting water that is rightfully theirs… Think of the bigger and bigger mess it all gets into.)

…Anyway, since I can’t do anything about it, let me wind down on that topic, and instead, let me focus on what I can do.

What this exercise means is that I can use some of these even simple text-book methods to build computational models for the check dams/farm ponds with acceptable enough accuracy; they would be accurate at least to a first-order. (After all, Inglis and De Souza’s second equation shows that a quadratic dependence of the runoff on the rainfall. Also, the other rainfall-runoff models show different kinds of nonlinear relations. So, they should be accurate at least to the first order in further usage.)

One more point before we close. Let me note a couple of good links on the topic of farm ponds. Here they are:

“Farm Ponds: A Climate Resilient Technology for Rainfed Agriculture: Planning, Design and Construction” [(13.1 MB PDF) ^]

“Rainwater Harvesting and Reuse through Farm Ponds: Experiences, Issues and Strategies” [(5.4 MB PDF) ^]

Also, a useful reference on the topic of evaporation: “Potential Evapotranspiration Estimation for Indian Conditions: Improving accuracy through calibration coefficients” [(3.8 MB PDF) ^]

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

A Song I Like:

[I recently randomly stumbled on a listing of this song, and then listened to it after a long, long time—long enough that reading only through the words, I was not able to place the song; I had to listen to it to “get” it back…  A relaxed tempo, and a beautiful melody by SD. … I don’t know if RD assisted SD for this song or not (this one is from 1963), but going by the orchestration, there is at least a hint of the young RD here, esp. in those interludes of the sax and guitar. I doubt if Dada Burman, in 1963, could have given that much of a freedom to Manohari Singh (an assistant and the probable sax player) sans RD’s presence. The tune, of course, is unmistakably SD’s own. … It’s the kind of a tune which you inadvertently catch yourself humming aloud sometime later, perhaps even a few days later, and it still surprises you, and it still makes you want to re-listen to the song…  Shailendra is at his lyrical best… And yes, it’s Suman Kalyanpur, not Lata.  Enjoy the brilliant simplicity of SD (possibly with a small assistance coming from RD)…]

(Hindi) “ye kis ne geet chheDaa…”
Music: S. D. Burman
Singers: Mukesh, Suman Kalyanpur
Lyrics: Shailendra

[PS: Though the content will not change much, tomorrow, I might come back and add just a few links to some good documents on design/experience/economics of farm ponds that I have downloaded. Done. Also added Python scripts for computing the percentage of dam capacity to which the Jayakwadi and Ujjani dams would fill up, at various levels of rainfall in their respective catchment areas.]