[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Chipmunk Physics • View topic - Energy Dissipation in Pendulum

Energy Dissipation in Pendulum

Official forum for the .

Energy Dissipation in Pendulum

Postby drm » Sun Nov 17, 2013 11:11 am

I'm trying to use Chipmunk2D for a simple physics simulation involving pendula. I've set up a simple preliminary scenario with a mass hanging straight below a fixed point, attached by a pin joint. The mass is hit with an impulse to the left as soon as the simulation starts, and nothing else is actively done to the mass.

However, it appears that energy dissipation is occuring somewhere in Chipmunk's calculuations, as the pendulum will eventually lose velocity and the maximum angle it achieves will decrease. While this is realistic, it's not the behaviour that I want. Is there a way that I can get Chimpunk to simulate objects whithout any energy dissipation due to friction, air resistance, etc?
drm
 
Posts: 3
Joined: Sun Nov 17, 2013 11:04 am

Re: Energy Dissipation in Pendulum

Postby LegoCylon » Sun Nov 17, 2013 8:26 pm

It sounds like you may have a custom damping or gravity value set on the space. Neither are set by default. Try checking for calls to cpSpaceSetDamping and cpSpaceSetGravity.
LegoCylon
 
Posts: 29
Joined: Wed May 09, 2012 12:06 am

Re: Energy Dissipation in Pendulum

Postby drm » Sun Nov 17, 2013 9:32 pm

I have set a custom gravity value, but that's intended. I'm modelling a pendulum, and need gravity to act as a conservative force on the system. However, even removing the gravity from the system, things slow down. Any ideas? Can I provide more information that would help?
drm
 
Posts: 3
Joined: Sun Nov 17, 2013 11:04 am

Re: Energy Dissipation in Pendulum

Postby slembcke » Mon Nov 18, 2013 10:18 am

While it's not specifically desired behavior, it is expected behavior even given perfect initial conditions.

Chipmunk like pretty much all other physics engines intended for games are tuned for performance and not exactness. They tend to use Euler integration because it has some very desirable behaviors for simulations. They tend to use inaccurate iterative based solvers since they allow you to pick a compromise between accuracy and performance. They use discrete time steps since analytic solutions to even simple problems with few objects tend to quickly turn into a mess.

So. If you are really looking for a super accurate simulation you probably need to integrate and simulate it yourself.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Energy Dissipation in Pendulum

Postby drm » Mon Nov 18, 2013 11:14 am

Fair enough, that makes quite a bit of sense. I'll see what I can do simulating myself, or maybe I can arrange my constraints so that Chipmunk will satisfy. Either way, Chipmunk is certainly a useful library!
drm
 
Posts: 3
Joined: Sun Nov 17, 2013 11:04 am


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest

cron