- #1
JrK
- 139
- 1
Like AT asked I post a new thread because it is a different example, here there is no friction and I use a needle and an elastic to have the forces.
The circle moves in horizontal translation, the circle doesn't rotate around itself, the red wall rotates around A0, and A0 is fixed to the ground. The circle is always at the contact with the red wall. The mass is very low and there is no friction. There is no acceleration/deceleration. The bodies are rigid except the elastic. The force of the elastic is constant : F. I drew the start and the final position, the circle and the red wall are controlled in position with a cylinder and a motor for example, I count the energy I need to give to push the circle and to rotate the red wall and I count the energy stored inside the elastic, I also compute the energy from the force F3 and F4 on the lateral walls (I think my mistake comes from these forces). There are 4 objects: the circle and the wall, the elastic and the needle. The needle has a diameter very small: some atoms, to be near the dot of contact, I cannot be exactly at the dot of contact but from start to end with a very small diameter for the needle, the distance from the dot of contact will not change to reach the distance d1 in the calculation of the energy stored inside the elastic. The sum of forces on the needle is 0: the elastic pulls it but the lateral walls prevent it to move closer to the dot B. Please, look the enlargements to watch the needle more farther.
The example:
The example from start to end:
Enlargement of the previous image:
Enlargement of the area where there is the elastic, I drew the start and final position, the elastic is taken by the dots A and B, the dot B is fixed on the red wall, the dot A is fixed on the needle, the needle is near the dot of contact between the circle and the red wall:
To watch the forces of the elastic F1 and F2, I drew the start and final position, at start the elastic has a length at 0, and at final its length is d2:
To watch the needle (the needle is perpendicularly to the screen and its diameter is very small, one atom if I can), I drew only the final position, the needle is pulled by the elastic but the lateral walls prevent it to move closer the dot B:
Enlargement, I drew the final position, to watch the forces from the needle to the lateral walls (circle and red wall):
The program :
The results:
The energy to move the circle: lg*cos(44.5°)*F = d1*F (in the computation I calculate the integral)
The difference of energy stored inside the elastic: d2*F
The energy needed from F3 is equal to the energy recovered from F4
d1 is greater than d2.
The circle moves in horizontal translation, the circle doesn't rotate around itself, the red wall rotates around A0, and A0 is fixed to the ground. The circle is always at the contact with the red wall. The mass is very low and there is no friction. There is no acceleration/deceleration. The bodies are rigid except the elastic. The force of the elastic is constant : F. I drew the start and the final position, the circle and the red wall are controlled in position with a cylinder and a motor for example, I count the energy I need to give to push the circle and to rotate the red wall and I count the energy stored inside the elastic, I also compute the energy from the force F3 and F4 on the lateral walls (I think my mistake comes from these forces). There are 4 objects: the circle and the wall, the elastic and the needle. The needle has a diameter very small: some atoms, to be near the dot of contact, I cannot be exactly at the dot of contact but from start to end with a very small diameter for the needle, the distance from the dot of contact will not change to reach the distance d1 in the calculation of the energy stored inside the elastic. The sum of forces on the needle is 0: the elastic pulls it but the lateral walls prevent it to move closer to the dot B. Please, look the enlargements to watch the needle more farther.
The example:
Enlargement of the previous image:
Enlargement of the area where there is the elastic, I drew the start and final position, the elastic is taken by the dots A and B, the dot B is fixed on the red wall, the dot A is fixed on the needle, the needle is near the dot of contact between the circle and the red wall:
To watch the needle (the needle is perpendicularly to the screen and its diameter is very small, one atom if I can), I drew only the final position, the needle is pulled by the elastic but the lateral walls prevent it to move closer the dot B:
Enlargement, I drew the final position, to watch the forces from the needle to the lateral walls (circle and red wall):
The program :
Code:
#include <stdio.h>
#include <math.h>
int main()
{
long double pi=M_PI;
long int N=100000000L;
long double R=.1;
long double D=1.;
long double xinf=1.;
long double xsup=xinf/tanl(44.99/180.0*pi);
long double px1=0,py1=0,a1=0,px2=0,py2=0,a2=0,dl=0,wd=0,wf=0,ix1=0;
long double iy1=0,ix2=0,yi2=0,qx1=0,qy1=0,s=0,xl1=0,yl1=0,xl2=0,yl2=0;
long double sx=0,sy=0,qx2=0,qy2=0,xi1sav=0,yi1sav=0,xsav=0,suma=0,l=0,asav=0;
long double xf=0,yf=0,wp=0,af=0,sumdx=0,dlrc=0,dlpc=0;
long int i;
qy1=D;
for(i=0;i<N;i++)
{
//a1=(long double)(asup/180.0*pi-ainf/180.0*pi)/N*i;
qx1=xinf+(xsup-xinf)/N*i;
a1=atanl(qy1/qx1); if(i==0) a2=a1;
s=R/tanl(a1/2.);
px1=qx1-s;
py1=qy1-R;
if(i==0 || i==N-1) printf("\npx1=%Lf",px1);
ix1=px1+R*sinl(a1);
iy1=py1-R*cosl(a1);
if(i<1) {xi1sav=ix1;yi1sav=iy1;xsav=px1;asav=a1;}
//printf("\npx1=%Lf , py1=%Lf , a=%Lf , ix1=%Lf , iy1=%Lf , a1=%Lf",px1,py1,180/pi*atanl((fabsl(iy1-yi2)-fabsl(py1-py2))/(fabsl(ix1-ix2)-fabsl(px1-px2))),ix1,iy1,180/pi*a1);
suma+=a1;
if(i>0)
{
sumdx+=(fabsl(px1-px2)-fabsl(ix1-ix2))*cosl(a1);
l=(sqrtl(ix1*ix1+iy1*iy1)+sqrtl(ix2*ix2+yi2*yi2))/2.;
xf=ix2+l*sinl(a1)*fabsl(a2-a1);
yf=yi2-l*cosl(a1)*fabsl(a2-a1);
af=fabsl(atanl((iy1-yf)/(ix1-xf)));
wf+=fabsl(px2-px1)*cosl(af);
wd+=sqrtl((ix1-xf)*(ix1-xf)+(iy1-yf)*(iy1-yf))*cosl(a1-af);
//printf("\nl=%Lf , xf=%Lf , yf=%Lf , af=%Lf , diffa=%Lf",l,xf,yf,180/pi*af,180/pi*(a1-af));
wp+=fabsl(sinl(a1-af))*l*fabsl(a2-a1);
dlpc+=(px2-px1)*sinl(a1);
dlrc+=l*fabsl(a2-a1);
}
px2=px1; py2=py1; qx2=qx1; qy2=qy1; ix2=ix1; yi2=iy1; xl2=xl1; yl2=yl1; a2=a1;
}
printf("\nN=%ld , R=%Lf , D=%Lf , xinf=%Lf , xsup=%Lf",N,R,D,xinf,xsup);
printf("\ndlp=%Lf , dli=%Lf, dlpc=%.18Lf , dlrc=%.18Lf, diff=%.18Lf",px1-xsav,ix1-xi1sav,dlpc,dlrc,(dlpc-dlrc));
printf("\nsuma=%Lf , cos=%Lf , wf=%Lf , wd=%Lf , wp=%Lf , diff=%Lf , eff=%Lf , ddx=%Lf , sumdx=%Lf\n",(asav-a1)*180/pi,cosl(suma/N),wf,wd,wp,wf-wd-wp,(wd+wp)/wf, fabsl(px1-xsav)-fabsl(ix1-xi1sav),sumdx);
return 0;
}
The results:
The energy to move the circle: lg*cos(44.5°)*F = d1*F (in the computation I calculate the integral)
The difference of energy stored inside the elastic: d2*F
The energy needed from F3 is equal to the energy recovered from F4
d1 is greater than d2.