After reading your post I assume you are having hardware issues, that maybe something is overheating and forcing a shutdown. download and run open hardware monitor - if your CPU or any other component is above 90º, there might be an overheating issue.
The Open Hardware Monitor is a free open source software that monitors temperature sensors, fan speeds, voltages, load and clock speeds of a computer.

You can download the software from here Download Open Hardware Monitor 0.8.0 Beta