Change

`s=Math.abs(Math.sin(linear(time,0,1,0,1)*Math.PI)*300);`

to

`q1=thisComp.layer("Ellipse "+thisProperty.propertyGroup(1).name.split("-")[0]).transform.position[0];`

q2=thisComp.layer("Ellipse "+thisProperty.propertyGroup(1).name.split("-")[1]).transform.position[0];

s=Math.abs(Math.sin(Math.acos(linear(time,0,1,1,-1)))*(q1-q2)/2);

BTW, you'll get these artifacts:

cause that's Particle World interpolates between frames. A workaround for this is to increase frame rate to something like 240 or stretch the whole animation in time.