In the picture above you see that the discharge of buffer capacitor C1 starts at t=T1. Now assume that T1=0. The rectified sine wave will now be a rectified cosine. At t=T2 VC1=-Vtopcos(2∙π∙f∙T2). (Note the minus sign. At t=T2, the original transformer output is negative.)
So cos(2∙π∙f∙T2)=-VC1/Vtop. This means
When you discharge a capacitor with current I, VC(t) = VC(0)-I∙t/C. In our case:
VC1(t) = VC1(0)-I∙t/C1, so at t=T2: VC1 = Vtop-I∙T2/C1. Since VC1=Vtop-Vr, we can also say Vtop-Vr = Vtop-I∙T2/C1. So Vr = I∙T2/C1. This means
If f=50Hz and Vtop=20V and we want a 2V ripple voltage, we need a 4.3mF capacitor per ampere load current.
Note: Make sure your calculator uses radians!