Initial attempt at dye release calculation function

Will now test further on orchestra.