Buoyancy spin?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Buoyancy spin?

Postby Leadwerks » Sun Apr 26, 2009 1:51 am

Any ideas what is happening here? The water height and normal are calculated at the body AABB center and converted to a plane. The oildrums spin vigorously:
http://www.leadwerks.com/post/buoyancy.wmv

Is this behavior correct and desirable?
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Buoyancy spin?

Postby Julio Jerez » Sun Apr 26, 2009 12:38 pm

so it is no desirable,
The problem is that bouyancy funtion only model that archimedes pronsiple, It does not model the Viscusity of the fluid.
Viscositi is the property of fluids that allows for the creation of surface tention and boundary friction. Modeling viscosity is a more complex problem.
The is a very cheap solution you can try,
in the funtion that apply calculate bouyancy force callback you can damp arbitratilly the angular velociy of the body as follow

BouyancyForceCallback (...)
{
// do teh boyancy stuff here
...

//Dap angular velocity of teh body
vector omega
NewtonBodyGetOmega (body, omega)

// atenuate omega by some small value
omega = omega.Scale (0.97) // you can try some value lik 0.9, 0.91, .... 0.99

NewtonBodySeOmega (body, omega)
}

This is not right phyically but is is a game tryick that lead to good raplacement for complex physics.
Please try that and see how it goes.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Buoyancy spin?

Postby Leadwerks » Sun Apr 26, 2009 2:43 pm

That works.

I also notice the buoyancy seems to be uniform, regardless of depth. An object should have a stronger upward force when it is submerged deeper in a fluid, but my floating objects seem to either sink or float. They should bob around until they come to the depth where their density equals the fluid density at that depth. Is this behavior built in or should I adjust the buoyancy force with depth?
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Buoyancy spin?

Postby Julio Jerez » Sun Apr 26, 2009 5:35 pm

What you said apply to air balloon because the air have a density coefficient that change by a small exponential amount under its own weight and also with temperature. This is why balloon can gain equilibrium as the go up into the air because as they go higher the air density becomes smaller until at some point they are match.
This does not apply to liquids like water, Water does not compress easy even under several million time its own weight, even at depths of several miles deep the water density stay constant.

Once a body is immerse on a fluid the buoyancy force is constant, that is precisely what the Archimedes principle states.
It says "the force is equal to the weight of the volume displaced by the body"
Therefore for incompressible fluids the buoyancy force is the same regardless of how deep they are immersed in the fluid.
For you to make a body to be stable at some depth you need to make the buoyancy force exactly equal to the volume displaced by the body. That will make neat force acting on the body equal zero.

Then to make it move up or down you need to add small amount of forces to add some small velocity, you can do that by having a delta body mass, or small temporary changes of water density.

This is what submarine vessels do, they have ballast that they can fill with water to temporarily change the weight of the vessel while the volume is keep fixed.
more water inside and the vessel sinks, then by pushing the water out of the ballast they gain equilibrium.
The equelbroum is gained because of the water viscosity create a surface friction when in contact with the vessel surface, plus the vessels also have fins to create drag and make the ship gain equilibrium once the buoyancy force e is perfectly balance by the weight of the vessel.

Basically of you want to make a submarine you need to make a controller that can change the waigh of eth body so that the buoyancy force is exactly the same as the wight of eth body,
The to move up and down under the fluid to need to add a controller that add small forces to steer the body.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Buoyancy spin?

Postby Leadwerks » Sun Apr 26, 2009 8:49 pm

Interesting. I looked up some information on this. So while pressure increases, density stays about the same.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 5 guests

cron