getResult function

Fetch output from a simulation