Calculation of velocity and acceleration

If you have problems installing or running Algodoo, have found a bug or need in-game help - this is it!

Calculation of velocity and acceleration

Postby chedas » Sat Jun 15, 2013 11:57 am

Hello
Can anyone help me?
When I create a box over 2 springs, without being pre-stressed, and without gravity or air, I get 0 y position movement, wich is correct. But I get periodic y velocity and y acceleration, wich is not correct. These periodicities have varying frequencies depending of springs stiffness. Strange, isn't it?
Regards
Attachments
1gdl.phz
A simple model of one degree of freedom.
(5.36 KiB) Downloaded 105 times
chedas
 
Posts: 7
Joined: Sat Jun 15, 2013 11:16 am

Re: Calculation of velocity and acceleration

Postby Xray » Sat Jun 15, 2013 7:51 pm

You do not have one box, but three stuck together with same collision layers (C). In that condition, they are colliding with each other at a very high rate, which is probably causing the anomalous Y acceleration. I suggest that you change those three boxes to just one, and then see if that issue gets corrected.
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA

Re: Calculation of velocity and acceleration

Postby Ivan » Sat Jun 15, 2013 10:46 pm

The spring is oscillating at a high frequency because of an enormous spring constant and a small positioning inaccuracy (you have probably moved the box a little bit (0000001m)). If you look into the script menu, you will see small position changes which are small because of the high oscillation frequency.
Image
User avatar
Ivan
 
Posts: 202
Joined: Tue Oct 06, 2009 2:01 pm
Location: Croatia

Re: Calculation of velocity and acceleration

Postby chedas » Sun Jun 16, 2013 3:35 am

I tried the solution of Xray but it didn't work. The problem remains.
Probably Ivan was right... however I already noticed that and changed the spring length at script window but the problem remained.
I already solved the problem ... I deleted the springs and created new ones with exactly the same stiffness, damping factor and length. Now velocity and acceleration are zero... as expected.
Thanks to Ivan and Xray
chedas
 
Posts: 7
Joined: Sat Jun 15, 2013 11:16 am

Re: Calculation of velocity and acceleration

Postby Xray » Sun Jun 16, 2013 6:00 pm

chedas wrote:I tried the solution of Xray but it didn't work. The problem remains.
Probably Ivan was right... however I already noticed that and changed the spring length at script window but the problem remained.
I already solved the problem ... I deleted the springs and created new ones with exactly the same stiffness, damping factor and length. Now velocity and acceleration are zero... as expected.
Thanks to Ivan and Xray


That is truly strange. I can't explain why simply replacing the springs fixed your problem, but hey, whatever works!

Anyhow, FYI, I played around with your original scene again and I found that by increasing the damping factor on both springs (from 0.01 to 0.20) the oscillations were completely suppressed.

Thanks for the feedback.
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA


Return to Help / Bug reports

Who is online

Users browsing this forum: No registered users and 3 guests