Defined function readGrain
Defining functions to handle the simulation of a single grain.