About the Analytical Physics constraint writing...
I have added a photo about my problem. My problem is why did we write while calculating constraint values as d/2. you will see on the picture what I am saying, I cannot see the reason of writing d/2
I guess from what I see, that d is the diameter of the disc and \phi is the angle the disc rotated. Then the radius of the disc would be d/2. So the length of the string unwound will be radius times the angle rotated, or \frac{d}{2} \phi.