System dynamics for environmental applications