Just fyi, a library openstack (and myself and others) has created (in python) basically lets u program your workflow (really dataflow) as a DAG, and then the library will run it reliably (and in parallel and so-on). I'm more than willing to answer questions about how it does that if people are interested...
http://docs.openstack.org/developer/taskflow/
https://pypi.python.org/pypi/taskflow
And yes u can do things like built equation solvers to:
http://docs.openstack.org/developer/taskflow/examples.html#l...
And other neat things:
http://docs.openstack.org/developer/taskflow/#examples