numerical simulation with python