Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very light (1kg) objects get _way_ too much force added onto them. #27

Open
benbot opened this issue Dec 12, 2024 · 2 comments
Open

Very light (1kg) objects get _way_ too much force added onto them. #27

benbot opened this issue Dec 12, 2024 · 2 comments

Comments

@benbot
Copy link
Contributor

benbot commented Dec 12, 2024

Not sure if this is a limition of the method used to calculate buoyancy, but looking at

Vector3 buoyancy_force = fluid_density * gravity * depth * face_area * normal;

if the fluid density is the default 10000 and i drop a 1kg unit cube into some water, a crazy large force is applied and the cube goes flying.

Maybe there should be some kind of fast falloff of force or some equalizing force applied as less of the object is submerged? Scaling by face_area doesn't seem to be enough

@jonri
Copy link
Collaborator

jonri commented Dec 12, 2024

Yeah, I've noticed the problem but I haven't figured out the best way to deal with it. But first, note that a 1kg, 1m^3 cube is 1/10th the density of an aerogel, it makes for a rather extreme default case.

From a physics perspective, dropping something like this onto a body of water would create some sort of inelastic collision which would bleed off all of the energy. This isn't exclusive to your aerogel cube, a large metal plate dropped on its face would do the same thing. It's this "slap" on the water that isn't modeled here at all, and that needs to be done to reduce the energy upon impact before the buoyancy forces kick in. You'll find that for any object, the buoyancy force itself will work if you put the item at its natural waterline (just touching the surface for the cube).

I haven't figured out yet how to calculate a realistic value for the surface collision force, or when exactly to apply it.

@benbot
Copy link
Contributor Author

benbot commented Dec 13, 2024

But first, note that a 1kg, 1m^3 cube is 1/10th the density of an aerogel, it makes for a rather extreme default case.

Wow, i didn't actually know that. 😅

I'm going to be spending some time reading up on the physics of sailboats and if I come across anything pertaining to that "slap" i'll share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants