Contents:
This function is the preparation function that is called before every integration step.
sim (Frame) – Parent simulation frame