In response to tomstress' original question:
Firsty, now that NASA has made nasa nastran open source you can take a look at the code and the programmers reference manual to see how stress is calculated in the public domain version of nastran. You can find the the download by searching for...
NASA has made nastran open source on GitHub. Look for nasa/nastran there. The download includes all source files and pdf files of the nastran documentation. The exe file was created on an ULTRIX machine so if you have one of those you should be up and running. The rest of us will have to figure...