Let x be the height of water inside the torus. We want to find the volume V(x) of water inside the torus.

We know that 0< x < 2r.

Now consider the cylinder of volume (pi*R^2)*x. The volume V(x) = (pi*R^2)*x - [(x/(2r))*(1/2)(pi*r^2)].

I'm pretty sure that's right; let me know if you need more detail.