[ODE] Demo of buoyancy and ODE

gl gl at ntlworld.com
Mon Feb 10 00:11:02 2003


Very cool.  Be interesting to try this on a complex shape - have you tried
something like a boat mesh?

BTW, my project spilled over into another week, so I haven't had a chance to
look at the heightmap stuff - I will get to it sometime this week.
--
gl

----- Original Message -----
From: "Mattias Fagerlund" <mattias@cambrianlabs.com>
To: "ODE" <ode@q12.org>
Sent: Friday, February 07, 2003 4:10 PM
Subject: [ODE] Demo of buoyancy and ODE


> Hi! I've created a demo of buoyancy code for ODE, the demo can be
> downloaded here;
>
> http://www.cambrianlabs.com/Mattias/DelphiODE/BuoyancyParticles.htm
>
> the delphi source here http://www.cambrianlabs.com/Mattias/DelphiODE/
>
> Buoyancy physics may seem trivial, the body is effected by two forces,
> gravity at the center of gravity and buoyancy at the center of buoyancy.
> The size of the buoyancy force is proportional to the volume of water
> that it displaces (f=V*g*WaterDensity). But calculating how much water
> is displaced by an arbitrary shape is far from trivial. Even worse,
> calculating the center of said displacement volume.
>
> I've taken a particle based approach to the buoyancy calculations, the
> shape is aproximated by buoyancy particles (henceforth called bobbies).
> Bobbies don't have mass or inertia, ODE takes care of that. Bobbies
> create buoyancy forces and drag when they're submerged in water. When
> they're not, they're dormant. A Bobby then applies it's forces to the
> ODE body that the bobby is attached to.
>
> The Bobbies have a radius and a drag constant. The radius is used to
> determine how much of the bobby is submerged, and where the buoyancy
> center is located. The drag effects how much a bobby is hindered by
> water. Only exterior Bobbies should have drag, internal ones would
> typically be shielded by the exterior ones, though this isn't currently
> simulated. Bobbies should also have a normal that determines in what
> movement directions they have drag, this isn't simulated either. Both
> are trivial to code (I need a cool editor first, though).
>
> I have some physics questions surrounding this, I think my simulation is
> a good aproximation (looks good to me anyway), but I fear I've cut some
> corners;
>
> When a sphere is submerged under a flat body of water, the buoyancy
> force is directed straight up. When the body of water is tilted (due to
> wave action), the buoyancy force is effected - sphere heads for the
> surface, but I can't tell by how much :( Right now, I send the bobby
> heading for the surface the shortest possible route, and that's probably
> a fair aproximation at small water tilts, but is it correct?
>
> Any sources of information about boyancy and particles would be highly
> apreciated.
>
> If you have any comments, I'd love to hear them!
>
> cheers,
> m
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>
>