rajiv,
i'm glad to inform you that it seems that i have nailed down the problem; spent many hours on the internet, going from forum to forum until i found the place where, in al thread of more than 400 answers, a lot of interesting info showed up; of course i can not be sure that my solution also works for you but you might take a closer look and test it!
in short: i have a mid-2010 27 inch imac with 16 gb of ram (hynix); the imac and this 16 gb ram do not work together nicely, causing the sudden shutdowns; if you lower the ram to 12 of 8 gb the problem is solved; i took out 2 modules of 4 gb and now the imac has no shutdowns anymore while before i experienced shutdowns twice a day; although my imac works fine with 8 gb ram i just ordered 2x2 gb to bring it to 12 gb again; important is that these modules has to be from apple/samsung because they work fine together with the other 2 4 gb modules; so in my case there is no heating problem (i turned off the Mac Fans app without a problem); i was shocked to read in all these posts how many people had their power unit and logic board replaced, after an advice from the aple technician, to find out that these replacements did not solve the problem; if you are interested to read that thread yourself i can look it up for you and post it here; by the way, my ram was from hynix, as mentioned, but this does not mean that the problem only appears with this brand, a lot of 'victims' had crucel installed in their imac;
hope this might be helpful for you!
one other thing i should mention: the shutdown cause i got was -128 (known as 'unknown') while yours is 0 (known as 'Battery Removal/Power Plug')