Most simple way to be simple

August 22, 2009

I woke up in the morning and went for a jog. My tryst with the nature is very minimal, only time I enjoy the lush green surrounding (NITT is pretty much barren!!!!!!!!!!) is when I go home from trichy. So seeing how a cow goes about doing its chores can teach us a lot. Its hardly bothered about what the surrounding thinks of it. It goes about doing it work!! But I believe most of us dont loose our peace of mind thinking about how the people would react to our behaviour and actions.

What compelled me to write this is an interview in sify with the Roman Magsaysay award winner Deep Joshi. When he had completed his graduation, though being the toper of his batch, studying in best of the institutions, (Masters in MIT!!!!!!) he settled for a non-glamorous teaching job in a research institution. His greatest achievement was to start a NGO (PRADAN) and devote his entire life to the upliftment of the poor and the needy.

So getting back to the basic question of  what helps a living thing so trivial and paradoxically powerful like a human being become successful in his own right? Can someone crib that deep was not succesful as he could not afford palatial extravagance? SO one’s own perspective determines what success or failure is! But unlike our good friend cow, we tend to forget what our perspective and need is, anxious to sate the hackneyed perception of people around us.

To do what you love to is a virtue. A life insurance ad puts it very nicely. You think about your parents in the ur first 20 years, then about ur spouse and  children and its around 60+ when a person is actually  free to do what he wants, but by then his body fails to respond to him.  But then we cant take them outta our life also. So getting a fine balance between satisfaction and responsibility is very important. Our education system should aim at achieving this.

Doing simple things the right way gives you immense satisfaction, not vicarious. Again the simple things’ definition varies from person to person. For me learning to tie a Tie gave great satisfaction. This passage could be haphazard in construction but has the heart at the right place. It is a belief that as a person you mature a lot as time goes by. But according to me with age you lose the instinct to experiment and try to put in obsolete logic to petty situations. Youth is not in your physic but in your mind. I have seen very young people at 60 and old retards at 20.

Also simple belief that you can do things irrespective of circumstances and not worrying about failure can make a big difference. Its my personal experience. In the past 2 weeks I have learnt a lot. I went thru two ordeals one very well prepared, but had a lingering doubt in my mind about myself and was planning for failure. Second with minimal preparation, but confident, wanting savour the moment and jus enjoy. The difference in approach made an immense difference. I could hardly believe that I had talents in me that I never knew.  Many say best in you comes out when you have nothing to lose. Odds could be stacked against you, you could be clouded with fear. If you are self confident, and be true to your heart, you can achieve anything and everything. I need not quote many examples for this.

Then, coming to things like competition and peer pressure, the only person you need to compete with is you. A classroom/society is a cocktail of versatile people each one with a unique skill that he/she could or couldn have realised. Competing with others would give you false apprehension or satisfaction. Competing with yourself gives you a benchmark that you are sure to meet and with a bit more effort  emulate.

And finally dont pollute your mind reading too much and pondering about what i have written… I am a jobless idiot writing to kill time. Life s ter to live and just enjoy it… 🙂


Making movies in MATLAB ( for simultion purposes)

June 22, 2009

A. Making a Movie in MATLAB
To make a movie of MATLAB figures first have MATLAB generate the frames of the
movie. An example file is the following…
% initialize vectors (x and y) and the axes used for plotting
% nframes = number of frames in movie
% Note: memory can be reduced by making the plot window smaller
% and commands to get and set the current plot size are…
%set(gca,’Position’,[0.13    0.11     0.5   0.6]);
% loop to produce frames of the movie (frames stored in matrix M)
for it=1:nframes
% various commands to show movie

B. Turning a MATLAB Movie into an MPEG File
You can turn the movie into a MPEG file by using the mpgwrite command
mpgwrite(M, map,’filename’)
where ‘filename’ is the string containing the name of the MPEG file. Note this
is not a regular MATLAB command and the source file for it can be found at Alternatively, you can copy the
files in the directory ~holmes/public/mpgwrite into the directory where you
keep m-files on RCS (note this will only work on UNIX machines). To play these
movies on RCS you can use a command like the following…
mpeg_play filename.mpg
mpeg_play -loop filename.mpg


While running the code make sure the plot is visible (as getframe captures the plot) and dont run other applications keepping matlab minimized. Then u will get only a blank movie.

While converting it to mpeg file make sure that the structures in M have the same frame values (exactly not sure of the tech term…. jus open each struct available in the array M nd see if the value it stores are same in case u are not able to convert it)

Link for downloading mpgwrite

Any querries pls comment…

Adding UDF to fluent.

June 18, 2009

Fluent have lot of inbuilt functionalities that makes it user friendly and also make it dynamic for usage. Many of us are provided with situations wer we tend to write our own stuffs for computations, data interpretation, plotting and many other operations that control the problem. For such situation we can implement our own UDF (User defined functions) Here is a short gist of how to do it.

User-Defined Function (UDF) Related

How do I learn UDF programming?

There are not to many tutorials out there on this, probably due to the wide variety of things you can do with the UDF interface. The documentation the Fluent provides is pretty good once you know what you are trying to do (chapter 8 of the UDF manual has examples). UDF programming is easier if you have C programming experience, so it is advisable to learn a little C programming, then do some of the simple cases that Fluent provides, then tackle the problem you really want to solve.

How do I create/build/load a UDF?

The simplest way to add a UDF into Fluent is to write your UDF in the C programming language and then use Define -> User-Defined -> Functions to either interpret or compile your UDF. It can then be loaded. Fluent provides good documentation of the UDF interface with numerous examples, so read that before trying too much.

Do I have to use C?

Yes and no. To hook your UDF into Fluent, you’ll probably have to use one of the DEFINE_* macros that Fluent provides, and this is most easily done using C. However, you can write routines that are used in the routines that are defined with the DEFINE_* macros in other languages and then link them together. This requires some knowledge of mixed language programming, Makefiles, the text user interface (TUI), and is not necessarily very portable. An example using Fortran is given in Section 5.4.1 of the Fluent UDF Manual (version 6.3).

Which compilers work?

On Unix-like machines, GCC is the compiler of choice. On Windows machines, Microsoft Visual C++ is the compiler of choice (GCC may also work on Windows- if anyone has firsthand knowledge of this, please share). The free Express Edition of the Microsoft compiler also works.

My UDF won’t interpret or compile – what is wrong?

The answer depends upon what exactly has happened.

  • If Fluent complains about not being able to find a compiler, then check to make sure that the compiler is properly installed. On Windows machines, it is possible to install the Visual C++ compiler without fully setting up the command line compiler (which Fluent needs to be able to find). During the installation process, you need to select the “register environment variables” option. Failure to do so will likely lead to complaints about things being “not recognized as an internal or external command, operable program or batch file” or missing DLL’s. It is theoretically possible to fix this issue by setting the appropriate environment variables, but keep in mind that even when nmake can be found there still may be DLL issues. The easy path is probably reinstallation of Visual Studio (taking special care to make sure that the command line interface is set up properly), but the reinstallation path is always perilous. If you have long-term experience using Windows you should probably know the risks, and if you don’t you should consult an expert.
  • If you are interpreting, keep in mind that not everything that is supported for compiled UDF’s is supported for interpreted UDF’s. This is true both for the UDF interface and the C language. If you are doing something pretty involved and it fails inexplicably, try compiling to see if that makes a difference.
  • There is also the possibility of coding errors. Keep in mind that your source code gets run through the C preprocessor (to change the Fluent macros into C code), so unintended interactions are very possible.

Why do I get the message “‘nmake’ is not recognized as an internal or external command, operable program or batch file”?

This is a Windows/Visual Studio issue. In order to compile your UDF, Fluent needs to know where the nmake program is located, and it currently can’t find it. If you open up a command window and enter “nmake”, you should probably get the same message. See the previous question/answer.

My UDF interprets/compiles but fails to execute – what is wrong?

This commonly occurs due to a faulty operation of some kind. For example, user-defined memory (UDM) is not allocated until initialization, so attempting to access a UDM variable before initialization can lead to a segmentation fault. Try to isolate the cause, and then look for places where your expectation of what is available may not match reality. Finally, keep in mind that if you do something really bad, you may need to restart Fluent before even a fixed UDF will work.

For more querries visit


June 14, 2009

The more I read “ Atlas Shrugged” the more I tend to connect my more with objectivism and am very skeptic wat about a person would and could achieve with such an approach. Because its something that helps become successful at the cost of being a success. I went to the temple the temple the other day and was involuntarily attracted by the cultural program there and I ended up spending around 2-3 hours there. I could have worked on project, or by hearted a few more words for my GRE exam, obviously I would achieved something by such an action. But after those 2 hrs I had a satisfaction which I cant describe with words.

So here comes the greatest predicament, IS OBJECTIVISM THE SOLUTION TO ALL PROBLEMS FACED BY HUMANS OR IS IT THE ROOT CAUSE? So I sit down and wanna deceide what my objective is? What do I want? John’s abs? Or SRK’s charm? Or Obama’s power? Or branson’s gals? Or Kidambi’s GPA? Or Chef Gaustau’s apitite? Or illayraja sir’s voice? Or a 1500+ score in GRE or 100 percentile in CAT? Or Gate’s money? Or a wife as beautiful as ash? Or an admit in MIT?Or ……………………………….. ??????? What do I need? Man I need all of those!!!!!!!!!!

So if a succesful power person turns out to be a selfis brat or a the world’s richest person is a doyen of self centeredness will every one hate one?

What the hell!!!!!!!

TOI- Take on Recession

May 4, 2009

The worst is over and the economy looks set for a rebound. This may sound contra-intuitive after dire predictions of a long and deep slowdown, but economists and investment bankers interviewed by TOI see a revival as early as September, or latest by December. All of them see growth riding on the back of domestic demand rather than overseas business but caution that some sectors such as IT may take a little longer. The pace of rebound being projected ranges from an optimistic 8% of GDP to a cautious 6-7% in the last quarter. For the full fiscal, there’s consensus on 6.5-7% except a CII forecast that pegged it at 6-6.5%. But a word of caution here will not be out of place. These figures could still go off the mark as the signs may be deceptive. This is just like when the specialists failed to see through the boom to see the bust coming. “Green shoots of growth are showing in some sectors and we can certainly see a sustainable upward movement by the September-October busy season. Summer is lean period as activities usually slow down before picking up in September… or more in October,” Ficci secretary-general Amit Mitra said. Suresh Tendulkar, chairman of PM’s Economic Advisory Council, was more optimistic and said recovery had started. “There have been some pressure on the bottomline and profit growth may not be as high as expected. But the way revenues have grown, it shows revival has started,” he said. Investment bankers agree that a recovery is in the offing but give it a couple of more months. “A turnaround will start showing signs from the third quarter and pick up in the December quarter,” said a Mumbai-based economist with a major investment bank, requesting neither he nor his oganisation be identified. This is the time-frame Arvind Mahajan of global consultancy firm KPMG is also looking at. “A turnaround will start happening in the last quarter of the financial year, or conversely, the end of the calendar year… from December.” But he also feels there could be issues. “My guess is growth will be at 6-7% if you are lucky. There may be some issues on the supply side of infrastructure projects. Liquidity issues. If you look back at when we were having 8-9% growth rates, you see a lot of liquidity flowing in that had a bearing on the valuations etc.” Before the good times roll though, some sectors could slip a little more. “The turnaround will not happen as a whole of the economy. Some sectors are bottoming out in the next two quarters,” said Mahajan. The investment banker sees oil and gas as flatish, Mitra adds exports by small and medium enterprises in textiles and jewellery. For Tendulkar, the worst performance is behind us — in the third quarter of 2008-09. Mahajan’s reason for the slow recovery in these sectors: “Japan and Europe will not rebound at the same time as the US. Because they suffered less (than the US) they will take time to bounce back.” All of them identified infrastructure as the engine, driving demand in steel, cement and other manufactured items. “Infrastructure will spur the drawdown on inventories. That’s happened in cement and is starting to happen in steel,” said the investment banker. Mahajan sees agriculture in a support role. “It will prompt rural demand but since there’s a rigidity in the sector, it is not like the farm sector will carry the economy as a whole. A good monsoon and a good crop will certainly help the economic revival but that will not be the sole driver. After all, you already have good rural demand.” Mitra said steel and cement signified some turnaround in producer side. “FMCG never suffered. Activities in small housing are coming back. All these can be sustained if interest rates come down… projects become viable, start getting off the ground and (with low interest) propel consumer side interest.

The award

May 4, 2009

hey guys this is the first of hopefully my short stories that i plan to publish in this blog. read them and enjoy.

A car strolled majestically and stopped near the corner. A handsome young man got down and approached me. He politely asked me,”Good Morning Sir! Do you remember me?” I was taken aback. When most of my former students come to visit me, they would either be in high school or college, but never a young man at his prime. I couldn’t recognize him as I have taught umpteen number of students over the past 30 years.  “Sorry son, pardon me. I don’t remember you.”  “Sir, I am Maasilamani. You were my class teacher in class 8.. You were my social science teacher then. I am the fellow who hoisted the flag from the garbage. “ And like a flash I could remember that incident which highlighted the how slack we have been in performing our duties.

It was in the spring of 93. A boy was going to school. I could recognize him as one of my students who was not that bright and was an introvert. Out of nowhere he went to the garbage heap that was lying along the road side and it seemed to me that he was trying to find something. He took out a dirty bit of cloth form there and was dusting it. It took me more than an instant to understand that he had taken a disposed national flag from the rags.  He took it to the flag post round the corner which hosted a political party flag. He removed the flag and hoisted the national flag with a pride that only a true patriot can feel.

“Oh yes, I do remember you. How are you ad what are you doing now? “  He responded “ I own a small IT outsourcing company.” I was bit surprised as I did not except a leader out of him. He continued,  ” If you could remember I was not a charismatic student. I was very low on self confidence and it was only because of you that I have become a success in my life. “ I was elated, but had no clue how I had changed exponentially improved the esteem of a person without my knowledge.

Seeing my confusion, the boy continued.” When I had hoisted the flag, that very day in the class you had in front of all the students said about what I had done and add to that asked the entire class to give a standing ovation.  For the first time in my life a teacher had addressed me in the class and I was the center of things happening in the class. That incident had a life changing effect in me. My self belief grew and I began to feel confident about myself. And that was the focal point of success in my life. As a token of gratitude I had bought this Parker pen for you. “

Saying so he extended the pen for me to accept. I had got an award from the president for best teacher couple of years ago. But this was more special. I had accomplished what every teacher dreams to achieve. There can be no greater award for me. I wished him good luck and continued on. I felt as if I was floating through my path. With the pen in my pocket glowing with pride I entered the class full of buds awaiting fresh sun rays.


The new look global warming

July 27, 2008

Switch off the Sun and Earth would become a very chilly place. No one denies our star’s central role in determining how warm our planet is. The issue today is how much solar changes have contributed to the recent warming, and what that tells us about future climate.

The total amount of solar energy reaching Earth can vary due to changes in the Sun’s output, such as those associated with sunspots, or in Earth’s orbit. Orbital oscillations can also result in different parts of Earth getting more or less sunlight even when the total amount reaching the planet remains constant – similar to the way the tilt in Earth’s axis produces the hemispheric seasons. There may also be more subtle effects (see Climate myths: Cosmic rays are causing climate change), but these remain unproven.

On timescales that vary from millions of years through to the more familiar 11-year sunspot cycles, variations in the amount of solar energy reaching Earth have a huge influence on our atmosphere and climate. But the Sun is far from being the only player.

How do we know? According to solar physicists, the sun emitted a third less energy about 4 billion years ago and has been steadily brightening ever since. Yet for most of this time, Earth has been even warmer than today, a phenomenon sometimes called the faint sun paradox. The reason: higher levels of greenhouse gases trapping more of the sun’s heat.

Amplified effect

Nearer our own time, the coming and going of the ice ages that have gripped the planet in the past two million years were probably triggered by fractional changes in solar heating (caused by wobbles in the planet’s orbit, known as milankovitch cycles.

The cooling and warming during the ice ages and interglacial periods, however, was far greater than would be expected from the tiny changes in solar energy reaching the Earth. The temperature changes must have been somehow amplified. This most probably happened through the growth of ice sheets, which reflect more solar radiation back into space than darker land or ocean, and transfers of carbon dioxide between the atmosphere and the ocean.

Analysis of ice cores from Greenland and Antarctica shows a very strong correlation between CO2 levels in the atmosphere and temperatures. But what causes what? Proponents of solar influence point out that that temperatures sometimes change first. This, they say, suggest that warming causes rising CO2 levels in the atmosphere, not vice versa. What is actually happening is a far more complicated interaction .

Sunspot trouble

So what role, if any, have solar fluctuations had in recent temperature changes? While we can work out how Earth’s orbit has changed going back many millions of years, we have no first-hand record of the changes in solar output associated with sunspots before the 20th century.

It is true that sunspot records go back to the 17th century, but sunspots actually block the Sun’s radiation. It is the smaller bright spots (faculae) that increase the Sun’s output and these were not recorded until more recently. The correlation between sunspots and bright faculae is not perfect, so estimates of solar activity based on sunspot records may be out by as much as 30%.

The other method of working out past solar activity is to measure levels of carbon-14 and beryllium-10 in tree rings and ice cores. These isotopes are formed when cosmic rays hit the atmosphere, and higher sunspot activity is associated with increases in the solar wind that deflect more galactic cosmic rays away from Earth. Yet again, though, the correlation is not perfect. What is more, recent evidence suggests that the deposition of beryllium-10 can be affected by climate changes, making it even less reliable as a measure of past solar activity.

Recent rises

Despite these problems, most studies suggest that before the industrial age, there was a good correlation between natural “forcings” – solar fluctuations and other factors such as the dust ejected by volcanoes – and average global temperatures. Solar forcing may have been largely responsible for warming in the late 19th and early 20th century, levelling off during the mid-century cooling (see Global temperatures fell between 1940 and 1980).

The 2007 IPCC report halved the maximum likely influence of solar forcing on warming over the past 250 years from 40% to 20%. This was based on a reanalysis of the likely changes in solar forcing since the 17th century.

But even if solar forcing in the past was more important than this estimate suggests, as some scientists think, there is no correlation between solar activity and the strong warming during the past 40 years.

Direct measurements of solar output since 1978 show a steady rise and fall over the 11-year sunspot cycle, but no upwards or downwards trend.

Similarly, there is no trend in direct measurements of the Sun’s ultraviolet output and in cosmic rays. So for the period for which we have direct, reliable records, the Earth has warmed dramatically even though there has been no corresponding rise in any kind of solar activity

My days in Pune

July 11, 2008

I spent the last couple of months in pune. I am happy to have fond memories about this place. The glowing tribute should go to pune’s greenary which they are trying to maintain inspite of concrete afforestation at astronomical speeds. And the most i loath about the place is the municipal buses. Its like the drivers and conductors in the buses( that comes far and few in between) have pledged their hearts to some money lender.

One particular bad memory about pune was when a bus speed away not giving enough time for an old couple to board the bus in balewadi. I was unfortunate enough to travel in that bus and i can asure u the bus was only half full. Still that bloody driver only slowed the bus giving enough time for a young man to jump off the bus. And the worst part was none of the passengers (including me) tried to stop the bus as the couple were trying to board the bus. Prob next time i will try to act with bit more maturity.

Other than that the experiences i had in pune and bombay could cherished for a life time. And highlights of my visit was my first multiplex experience, comleting a novel in croswword with out paying for it, seeing the best of bombay, living in a co-ed hostel, getting new friends, seeing how iit gratutes work in aa efficient way in a cool atmosphere not caring about how much they are paid.. and the list is endless.

Some of my regets are not visiting Sir Aga khan palace, not travelling in a mumbai local, watching thoda pyar thoda magic in e-square (the worst of all- apt title would be thoda pyar no logic) and last but not least not talking to a single girl over the my two month stay in a co-ed hostel.

And today i am leaving pune oops rather tomorrow (as my train is at 0005 hrs 12th july) hoping to come back agin here some day in the future.

jai maharastra 😛

Compressible flow

May 28, 2008

The main difference between compressible flow and almost incompressible flow is
not the fact that compressibility has to be considered. Rather, the difference is in
two phenomena that do not exist in incompressible flow. The first phenomenon
is the very sharp discontinuity (jump) in the flow in properties. The second phenomenon
is the choking of the flow. Choking is when downstream variations don’t
effect the flow. Though choking occurs in certain pipe flows in astronomy, there
also are situations of choking in general (external) flow. Choking is referred to as
the situation where downstream conditions, which are beyond a critical value(s),
doesn’t affect the flow.
The shock wave and choking are not intuitive for most people. However,
one has to realize that intuition is really a condition where one uses his past experiences
to predict other situations. Here one has to learn to use his intuition as a
tool for future use. Thus, not only aeronautic engineers, but other engineers, and
even manufacturing engineers will be able use this “intuition” in design and even


May 26, 2008

‘The focus is to bridge gap between industry & academia’

Jaideep Prabhu, professor at Imperial College, London, was recently appointed as chair of the Jawaharlal Nehru professorship of Indian Business and Enterprise at Cambridge University. The chair was set up by the Indian government with funds of £3.2 million. Prabhu, an IIT-Delhi graduate, spoke to Surbhi Bhatia about his research plans:

What will be the focus of your research?
The Indian economy is recording a consistent 8-9 per cent growth, FDI inflows are expanding rapidly and now it is the second fastest growing economy in the world. Indian businesses have a major role to play in this growth. The team of experts, scholars and industry people would be evaluating how Indian businesses have benefited from globalisation and how in turn globalisation has affected Indian businesses.

The research will be done on three levels. At the first level, we would investigate how foreign companies have established themselves in India carrying out innovations. IBM is an example of a big firm, but there are many small foreign companies involved in R&D work. At another level, we would see how Indian companies are innovating and making an impact in the world economy. Invention of Nano by
Tatas is an example. Many small and medium enterprises in India are also innovating. And at the third level, we would look at the bottom of the pyramid to investigate how innovation is influencing rural India. For instance, mobile phones. find out ways to bridge the gap between industry and academicians. Universities are the biggest source for providing innovative ideas. A lot of companies have realised the importance of tapping this talent pool but do not know the ways.
Is the research work going to be any different from that carried out in Indian B-schools?
Several Indian B-schools are involved in systematic research on Indian businesses. IIMs have provided cutting-edge research on how Indian businesses operate in the Indian context. But the objective of this professorship is to help forge India’s place in the global economy. It will be done by reflecting important roles that Indian businesses have played in contributing to global economic growth. Indian pharma sector, for example, has moved up the value chain and contributed to the world.
Another focus area would be to

How do you plan to take your findings to the world?
The Cambridge Centre for Indian Business (that was also established with the professorship at Cambridge University’s Judge Business School) will be used to disseminate research findings, organising workshops and increasing engagement between academics, businesses, policymakers and communities in India, the UK and other places. Professors and PhD scholars already doing research in these areas at Cambridge and at the Indian B-schools will be involved in the process. We will also get support from IIM-Bangalore,IIM-Ahmedabad and the Indian Institute of Science.