sim function

Environment for simulation global variables.