iMac Noisy Fan

The HDD of my iMac (24-inch, Mid 2007) crashed and I had to get a new one. After I changed the HDD, the fan started to run at full speed. The noisy fan was very irritating. I am running Mac OS X Yosemite 10.10.5 (14F27).

Figuring Out The Fan Speed

I tried the in-built spin dump to check at what speed the fan was running.

$ sudo  spindump
Sampling all processes for 10 seconds with 10 milliseconds of run time between samples
Sampling completed, processing symbols...
Spindump analysis written to file /tmp/spindump.txt

$ cat /tmp/spindump.txt | grep "Fan speed"
Fan speed:       698 rpm

This seemed too low to cause a noisy flag. Maybe it was some other fan. I googled around for more tools and came across smcFanControl.

Compiling Needed Tools

However, I could not compile smcFanControl. I had to install Make. Once installed, I got following error:

$ pwd

$ make
 gcc -mmacosx-version-min=10.4 -Wall -g -framework IOKit -o smc smc.o
 ld: warning: object file (smc.o) was built for newer OSX version (10.10) than being linked (10.4)
 Undefined symbols for architecture x86_64:
 "_main", referenced from:
 __start in crt1.o
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to see invocation)
 make: *** [smc] Error 1

Can’t XCode

Since I am running Mac OS X Yosemite instead of Mac OS X El Capitan, I could not get the latest Xcode. I thought of upgrading to El Capitan, but reviews on App Store pointed out that Xcode + El Capitan on 4 GB RAM is a disaster.

More Search

Finally after googling on Yahoo (I know!) using keywords ‘imac noisy fan’, I came across Macs Fan Control. They had a free and usable version of the software.

It showed me that there we 3 fans on my system:

3 Fans on iMac

This was first useful information. I tried setting limits on fan speed of each and soon realised it was the CPU fan that was the noisy one. The default sensor was pointing to the HDD. My guess is there is no heat sensor in the HDD I installed. So I chose another sensor.

Sensors on iMac


And finally … fan was silent!

Thanks to folks at Crystal Idea (@crystalidea).

On General Relativity

General Relativity

Before we understand the Theory of General Relativity, let us understand some underlying concepts.


We all know this equation for energy mass conversion. That energy can be converted to mass and vice versa. But there is another great concept in this. The one that fascinated me the most. We always just notice the e and m. Let us look closely at c.

The equation said that the term c (speed of light) was a constant. In spite of all experimental data, Einstein was the first physicists to boldly state so. Let us understand the implications of this.

Say I am running at you with some speed. Now the ground I am running at you also starts moving towards you at some speed. So, my net speed has increased. Right? Right.

But if I were light, I would still be approaching you at same constant speed.

The idea that anything can have constant speed is contrary to our common-sense. We know speed and motion are relative.

But, even if the source of light was a star moving at amazing speed away from us, and another at amazing speed moving towards us or just another candle in the wind, the speed of light would always remain the same.

Another aspect. Say I am throw a stone at you faster than speed of light (well, can it travel so fast is another interesting topic), the speed of light remaining same, we will see the stone arrive after the stone actually has.

Analogous like we see the thunder first and hear it later. Only in this case, when the stone hits you, it would literally hit you before you ever saw it coming.

Establishing Relation Between Gravity and Acceleration

Let us consider two elevators: one at rest on the ground on the Earth and another, far out in space away from any gravitational pull accelerating upward with an acceleration equal to that of one Earth gravity (9.8 meters/second2).

If a ball is dropped in the elevator at rest on the Earth, it will accelerate toward the floor with an acceleration of 9.8 meters/second2. A ball released in the upward accelerating elevator far out in space will also accelerate toward the floor at 9.8 meters/second2.

Einstein used this to formulate the equivalence principle. “There is no experiment a person could conduct in a small volume of space that would distinguish between a gravitational field and an equivalent uniform acceleration.”

Hence, you can not distinguish between being weightless far out in space and being in free-fall in a gravitational field.

The Elevator Experiment

Suppose I am going up in an elevator somewhere in space in a space-ship at little less than speed of light. There is a hole on right side of the elevator from which a ray of light enters. As it crosses the elevator and falls on the other side, the elevator had moved up. So, I will see the ray of light bend downwards and hit the spot little lower on the other side. It may seem to be that the light is bending.

If it is going up at constant velocity, the ray of light will fall at an angle in straight line to a point lower than where it fell when the elevator was at rest.

If it is accelerating upwards, the light will appear to bend down in a curve.

Applying Equivalence Principle to the Elevator Experiment

Applying  Equivalence Principle we had deduced that what seems to be effect of gravity can be seen as effect of acceleration too.

Applying it here, what seems to be effect of acceleration can be seen as effect of gravity too.

Gravity And Space-Time

Suppose I am going up in an elevator somewhere in space in a space-ship at little less than speed of light. There is a hole on right side of the elevator from which a ray of light enters. As it crosses the elevator and falls on the other side, the elevator had moved up. So, I will see the ray of light bend downwards and hit the spot little lower on the other side. It may seem to be that the light is bending.

Now we know that earth’s gravity is acceleration. By same analogy, when I am going up on elevator, the acceleration is analogous to the gravity. So the gravity of elevator’s base is bending the light.

So by same reasoning Einstein said, a beam of light moving close to a large object like planet, will be bent by it’s gravity.

With this he changed the way we define and understand gravity. And he went ahead than that. He explained why we felt the “force” of gravity.

Imagine a large trampoline. Stretch it properly at a height. Put in a large ball in it and it will bend in the middle. This is how Einstein explained large bodies curve space and time. So they bend the space around them altering the geometry of the space around them. This curved space-time is what he referred to as a space-time continuum.

Now if we put a small ball on the trampoline. It will roll towards the bigger ball. That is how Einstein said, large bodies exert the “force” of gravity. Expanding on this line of thought, if you roll the small ball at an angle, it will spiral down towards the big ball. That is why bodies have orbits.

Understanding Time Dilation

Time dilates when a body approaches the speed of light.

Say I am traveling in car that can travel nearly as the speed of light. And I have an atomic clock that is as accurate as they can be. You are standing outside the car with a clock which is in sync with my clock.

Now I travel at near speed of light for one sec by my watch. You will see me travel for more than one sec by your watch. And when we compared the clock, mine will be behind your.

It is not just time that slows down. All physical phenomenon do. Supposed we both light a cigar them burn 1 mm per second just as I start. When I stop after one second, it would have burned 1 mm. But when I stop, and we compare our cigars, yours’ would have burnt more than 1 mm.

So how much does time slow down? This is governed by the equation

T = T’ x Sqrt( 1 – (v/c)^2 )

i.e.: My time will be Time observed by you times square root of my velocity squared by speed of light squared.

Suppose, v = 0 (i.e.: my velocity is 0; I am at rest)
v/c = 0/c = 0
0^2 = 0
sqrt(0) = 0
T = T’

So as seconds are counted by our clock, they will remain in sync.

Suppose, now I travel at 1/3th the speed of light; i.e.: v = c/3;
v/c = 1/3
(1/3)^2 = 1/9
1 – 1/9 = 8/9
sqrt(8/9) = 0.942809041582063365867792482806465
Say you measured that I traveled for 1 sec (T’);
T = .9428

Thus, my atomic clock will tell me I have spent only .9428 seconds while you thought I had traveled 1 sec. The tile has slowed down for me, it has dilated!

Suppose, now I travel at the speed of light; i.e.: v = c;

v/c = 1
(1)^2 = 1
1 – 1 = 0
sqrt(0) = 0

Say you measured that I traveled for 1 sec (T’);

T = 0!!!!

Testing Time Dilation

Space shuttles and atomic clock have been used to test this theory and with a given range of error, the theory stands the experimental test.

Understanding Length Contraction

Similarly, the length of a body at rest (rest length) is always more than it’s length when in motion. It is governed by equation

L = L’ x sqrt( 1 – (v/c)^2 )

Where, L’ is the rest length

What Happens To Mass?

M = M’ / sqrt ( 1 – (v/c)^2 )

Hence, with increase in v, the mass of a body increases. A 100 kg body will have mass of 115.47 when traveling at half the speed of light.

Who is Lorentz?

Hendrik Antoon Lorentz was born at Arnhem, The Netherlands, on July 18, 1853. In 1878, he published an essay on the relation between the velocity of light in a medium and the density and composition thereof. The resulting formula, proposed almost simultaneously by the Danish physicist Lorenz, has become known as the Lorenz-Lorentz formula. These are the formulas I have used above to explain length contraction. His work was extended by Einstein with his paper on Theory of General and Special relativity.

Search for Extra-Solar Planets



We know due to Doppler’s effect we see a red-shift in color of a star moving away from us.

To Catch a Wobbling Star

Now consider a star that has only one planet revolving around it. As the planet revolves, it also moves the sun under influence of it gravity. Though very small effect, it does cause the star to wobble a bit in its position.

Modern day astronomy has become so accurate, that we can measure the minute difference in red-shift that can be caused by this wobbling. To the extent that we can measure the red-shift effect even in a walking star (walking speed is 4-5 km/hr).

And this is what astronomers are using to find stars that have planets.

Binary Stars

Binary stars are a pair of stars revolving around each other. Now, a star that has a binary star will also wobble.

Twinkling Stars

So, how do we know that a wobble is due to a plant and not a star? Simple, use method called trans. Watch the light carefully. If a binary star is so aligned that when revolving, it will pass between the star and us, the intensity of light of the star increases. But if a planet passes in front of it, the intensity drops. However small the drop is, the accurate observation detects that drop and identifies that as a planet.

Flaring Sun

We know that sun has solar flares. So might an others star? So, how do we know that the drop in intensity is not due to a flare at lower temperature (and hence less bright than the star surface). Simple, solar flares will not be as periodic as the planet’s revolution. Also, the “exact” intensity shift due to a flare is known.

Testing the Theory

In few years, Venus will pass between earth and sun and observational astronomers will use the observed drop in intensity to confirm the value the use in these experiments.

Search for Earth-like planets

With this great tool in hand, they are now searching for earth like planet having a sun like stars. Once the find interesting planets, they will request time on Hubble to observe these planets.

Also check


On Dark Matter


Stuff We are Made Of

We are made of stars. Stars and we are made of same basic matter. But stars and we are all only ~20% of matter that is in universe. What about the rest 80%?

The rest 80% is what we refer to as the dark matter (Note: Dark matter has _nothing_ to do with black holes).

If we could see dark matter, it should seems to us that universe is made of huge skein/mess of dark matter with stars shining brightly at various spots where the mesh strands cross each other.

Believing Your Eyes Only

Now if you can’t see the dark matter, how do we know that it exists? Simple, by the phenomenon of gravitations lens. I have mentioned gravitational lens before. But I will re-visit.

Gravitational Lens

Huge massed body’s gravity bend light. That is the basis of the gravitational lens we observe in space. A picture from Hubble was a good example. In the picture observers saw small-lighted spots along the edges of a cluster of galaxies. Soon they realized that these spots were galaxies behind the cluster of galaxies. The cluster of galaxies was acting like a gravitational lens and squashing the light from behind into a smaller area.

So Where is the Dark Matter?

They tried to calculate the mass of matter needed to make such a powerful gravitational lens and then calculated the mass of the galaxies in that cluster and there was a HUGE difference. When they accounted to the dark matter ratio, the scores settled perfectly.

Is There Dark Matter in Earth’s Vicinity?

No and a yes. Depending on what we refer to as vicinity. Close to our solar system we do not have any. But given the huge size of universe, there is dark matter all around us and close to us in that proportion.

Image: and

Black Holes – Applying Theory of General Relativity


The Color of Black Holes

Wait. I just mentioned previously that black holes have so much of gravity that light can not escape it. How come then a black hole have color? A hint. Event horizon. Black holes have no hair nor color. But event-horizon, the only observable part of black hole is a very colorful and alive.

Step in theories of Stephen Hawkins of evaporating black holes.

Evaporating Black-Holes

The black holes can evaporate. A black hole emits particles at the event horizon. This is based on the uncertainty principle which says that at any given point, we can never be sure of both energy or location of an atomic/sub-atomic particle. This defines there is always a “zone” where the probability of find that particle. Thus, a space is never stark empty. Any given piece of space is part of this “zone” for a close by particle.

The vacuum in quantum field theory is not really empty; it’s filled with virtual pairs of particles and antiparticles that pop in and out of existence, with lifetimes determined by the Heisenberg uncertainty principle. (less than h/E, where h is Planck’s constant and E the energy).

Sometimes one member of a pair crosses the horizon, and can no longer recombine with its partner. The partner can then escape to infinity, and since it carries off positive energy. The negative energy falls into black hole and the energy (and thus the mass) of the black hole decrease. To an observer the decrease will be exactly same as the the particle that got freed and will deduce that the particle was emitted by the black hole and it lost the equivalent mass/energy.

In quantum field theory, modes with positive frequencies correspond to particles, and those with negative frequencies correspond to antiparticles.

Note that this doesn’t work in the other direction – you can’t have the positive-energy particle cross the horizon and leaves the negative-energy particle stranded outside, since a negative-energy particle can’t continue to exist outside the horizon for a time longer than h/E. So what ever falls into black hole will only be negative energy part of the pair. So an observer will only see a steady stream of particles only.

So the black hole can lose energy to vacuum fluctuations, but it can’t gain energy. That means, there is continuous drain in black holes energy. This is the gradual erosion of a black hole. And one day, when it’s gravity is so low that it can not hold itself, it will explode in form of a burst of gamma ray showers.

The average life expectancy of a black hole is 10 billion years.

To understand the colors, let us plunge into the black hole.

Falling into Black Hole

Say there is a scout mission to go inside a black hole and report back as much as possible before crushing under it’s gravity.

The Mothership’s view: They will see the scout ship plunge into the black hole and it would seem to them to take forever.

As the ships reaches the event horizon, the reflected light (which helps us see) finds it harder and harder to get out. So objects that fall into a black hole appear from the outside to freeze in time at the moment they cross the event horizon.

As the light struggles to get out we will observe a red-shift. The scout will not vanish. But will fade from white to red till invisible light only makes it out and soon, when no light is able to come out as he falls at huge speed which is approaching c. If we could see a clock in the scout probe, the clock would appear to us to slow to a halt.

As the probe and other bodies are absorbed into black hole and they go red-shifting, we can see a the whole range of colors just above the even horizon. Black hole, will appear to very colorful indeed.

The Scout’s view: Remember, Einstein said, all laws of physics are same when the speed of light is approached. For the scout, every thing will appear normal. The light is crossing the event horizon so he will be able to see the mother ship till the gravity stretches it and flattens on the black hole.

Image: NASA Images

“Does not Rust” Doesn’t Mean “Can be Neglected”


“If you are able to wrap your arms around the pillar completely, you will be showered with good luck.” That is the most common story told about the Delhi Iron Pillar.

The story of this pillar is more interesting and deeper than one of having long arms and being lucky. The Iron Pillar stands next to the famous Qutab Minar and is often called the Delhi Iron Pillar (DIP) but is also sometimes referred to as the Mehrauli Iron Pillar (Mehrauli is the town in Delhi where it is located). It stands about 6.7 meter high with just 0.5 meter below the ground. Its diameter varies from just 4 cm at the top to 42 cm at the bottom. It weighs around 6.5 tons.

Similar pillars are also present in Dhar, Madhya Pradesh, Kodachadri hills, Karnataka, Mandu, Madhya Pradesh, Mount Abu, Rajasthan and in temples in Orissa.

The DIP is a reminder of a fading heritage of excellence in engineering and metallurgy. There are many theories on the pillar and very few scientific studies have been done. But recently the work of R. Balasubramaniam of IIT, Kanpur helped shed light on the science and engineering behind this pillar. Using varied techniques like X-ray diffraction, Fourier Transform Infra-Red spectroscopy and Mossbauer spectroscopy, and a thorough study of history, he presents a well researched analysis of the DIP.

The story of the DIP starts in 410 CE during the time of Chandragupta II Vikramaditya. The original location of the DIP was actually in Vishnupad Giri (Vishnupadagiri), the area generally accepted to be the Udayagiri hills. As Chandragupta II was a great devotee of Vishnu, the pillar was erected in the honor of Vishnu with the image of Garuda possibly placed on the top.

There is ample evidence of the adeptness of the metallurgists who built this and similar wrought iron pillars. They excelled in iron extraction, shrink fitting methodology, forge welding and other techniques.

The pillar has three sections. The top part that has a bell capital on top, the main body and the part that lies below the ground.

The decorative bell capital was fitted onto the main body using the shrink fitting methodology. Shrink fitting is a procedure in which heat is used to produce a very strong joint between two pieces of metal, one of which is to be inserted into the other. Heating causes the hole to expand into which a properly fitting piece is inserted. When the outer piece cools down, it shrinks back to its original size and frictional forces create a highly effective joint.

The manufacturing technique of the body involved elaborate and ingenious processes for using hand-held hammers, heating iron, using inserts, dices, handling of the body while in constructions and surface finishing.

To understand what exactly was used to make the pillar, one has to ask an obvious question. Does the pillar really never rust? To say so is misleading. The pillar actually does rust. And in that rust lies it’s capability to survive.

There are two kinds of theories about the DIP. One is environmental. According to this, the answer lies in humidity of Delhi region. Relative humidity of Delhi never exceeds 70% for significant period of time which results in very mild corrosion of the DIP. The other theory is about the material used. Among other things, presence of Phosphorus (Atomic Symbol: P).

It is presence of this Phosphorus and Copper (Cu) that turn rust from iron’s enemy to its friend. The formation of this amorphous layer forms a continuous layer above the metallic surface. Ordinarily, the rust forms layers in discontinuous manner and is not protective.

There is no protective coating of any sort that was artificially applied on the pillar. This is confirmed by the fact that recently exposed parts of the pillar attain the same color as the rest of the pillar due to a newly formed layer of protective rust.

In other words, one can say that the pillar produces its own protective layer, a property that allows it to withstand dust and rain. R. Balasubramaniam’s research shows that it is combination of environment that triggers growth of rust layer and the material the pillar is made of that leads it its longevity.

Thomas J. Coyne, Jr., who heads an engineering company and has experience working in India noted that since hand working was involved and the casting was in actuality hammered into shape, that would lead to a dense exterior which too could be a reason for better rust-resistance.

The presence of Phosphorus is not considered accidental. This addition was intentional as iron produced in earlier time in same areas did not have presence of Phosphorus. There was also lack of use of lime (CaO) in the flux, which is used in modern days.

Little less than half the age of the Pyramids in Giza, one wonders how long the DIP will last. Modern encroachment of the pillar is indeed bad news. The worst affected are the part of the pillar that is buried underground. Digging in the 1870s had revealed a bulb-shaped bottom, much like an onion, with eight short thick rods attached to it.

The re-erection was done by Joseph Beglar. He was an eminent Chinsurah Armenian who worked with the Bengal Government as an Executive Engineer and Archaeological Surveyor in the Bengal Public Works Department. The re-erection was done by constructing a stone platform and a coating of lead was applied on the buried underground surface of the pillar. When Archaeological Survey of India (ASI) re-excavated the site in 1960s, they found the lead coating in an excellent state of preservation, but the buried portion was found covered with rust layers ranging from a few mm up to 15 mm.

Unfortunately, ASI continued with usage of lead (it protected the underground part from direct contact with mortar and the saline soil) even though many experts strongly disagreed with this tactic.

Thus, the present corrosion rate of iron in the buried regions is much more than that of the exposed surface. Apparently, the ASI believes that if it looks fine on outside, everything else is fine. Alternatives suggested (like epoxy-based coating) were, for some reason, ignored. Though a simpler way, as Thomas Coyne pointed out would be to raise the pillar to above ground to reduce the effect of subterranean re-oxidation.

Does the significance of DIP lie in history only? Can modern metallurgist learn anything from it or is its composition and production technology not viable in the industrial times we live in?

It is not very clear how the insight into the engineering practices involved in making of DIP, the metallurgy or the chemistry is useful to current Iron works industry in more practical terms. But this is also the result poor dissemination of information gathered about DIP.

Although the Delhi Iron Pillar attracts the most attention, there are several other large ancient iron objects in India. There is dire need to initiate study of these objects on larger scale. Lesson and knowledge, even if from our past, should not be forgotten.

Careful archaeological excavations are necessary at Udayagiri Hills to firmly confirm that it is the original location of the DIP. Most importantly, the lead sheet that covers the buried underground part of the pillar must be replaced soon.

DIP is an important cultural and scientific object. It is a proof of Indian civilization’s ability to produce very high quality products. A lesson we need to relearn.


Delhi Iron Pillar: New Insights. Balasubramaniam, R. 2002. Delhi: Aryan Books International. Pp.168, figures 33. Price Rs.1800/- ($40/-). ISBN 81-7305-223-9

D.P. Agrawal. Review: Delhi Iron Pillar: New Insights. Balasubramaniam, R. 2002. [Online] Available Accessed May 22, 2004

Dr. R. Balasubramaniam. The Corrosion Resistant Delhi Iron Pillar [Online] Available Accessed May 22, 2004

Unknown. Delhi Iron Pillar [Online] Available Accessed May 22, 2004

Unknown. Shrink Fitting [Online] Available Accessed Jun 12, 2004

Unknown. Prominent Armenians In The History Of India [Online] Available Accessed Jun 12, 2004

Image: tariq353

Work Ethics and Major Shaitan Singh


In late 2009 I had a chat with a friend. This friend on mine told me about a co-worker of his whose name (IIRC or was it middle name) was Shaitan. He said in beginning it was bit awkward for all to call him that because of it meaning. This was till the co-worker said that he was named after his grandfather, Major Shaitan Singh.

Of course, I knew of his brave hero and felt kind-of honored to know someone who knew someone from Major’s family. Let me try to summarize why this is such a big deal by quoting form Wikipedia article:

“Of the 120 defenders, only three survived, seriously wounded. The rest, including Major Shaitan Singh (who was awarded Param Vir Chakra), were discovered after the winter, frozen, mostly holding their weapons but with no ammunition. This was a genuine ‘last man-last round’ defense and many times more Chinese were killed, the evidence again being frozen bodies on the slopes. Of the 120 soldiers, 114 were Haryanavi Ahirs.”

I can’t ever get enough of thinking of personal courage and ethics of these 120 people and not be inspired. For some reason this story keeping coming to me every so often and inspire me to go beyond the ordinary.

No, this is not a blog on nationalism or hero worship. This is a lesson in work ethics on how some can do what has to be done, even when on one side it is duty-death and on other side it is dereliction-life.