# Water Bouyancy

#### DivisionByZero

I was searching for equations on water bouyancy, and was very interested to find this forum for physics, etc. I'm currently writing the physics for a game engine, partially because I want to learn more physics and I would also like to see the game engine have some nice physics.

Todays personal computers are fast, but not quite fast enough to do 3d renderings along with a bunch of other stuff, with perfect physics. I would however like to make the physics as realistic as possible while still maintaining decent frames per second.

I'm using particle based system, where each particle moves based upon the verlet integrator, uses projection to handle collisions, and uses distance constraints to keep the particles in their correct positions.

Anyway, the main reason for saying all this is that I don't want utter perfection, but stuff that looks good, and is reasonably accurate.

Now, to my actual question.

I'm intending to implement reactions to water in my physics engine. The game engine already has a water object- using sine waves to generate the waves with a little randomness thrown in. Anyway, I was thinking on implementing the water physics, when I realized there would be a problem with simply making particles raise/lower proportianetly to the water height above. the problem with this is that even when the object is very, very deep, it is affected by the water motion above. I decided it would probably be best to basically have two equations. one that bases it's calculations on local water height, and one that works of average water height. then put the result in a weighted average, where the weights are based off the distance from the minimum water level. When above this level, the local water height equation is used, but when below, the average favors the average water level more as depth increases. eventually it is the only equation used.

I believe my method so far should pretty much work, but the question is how to store particle bouyancy. simply a constant that when multiplied by the adjusted water preasure(result of weighted average) to get acceleration? Where negative values will mean that the particle drops, and positive mean it rises.

Is there a better system than this that is not too calculation intensive?

Thanks for any suggestions!

--DivisionByZero
You know it makes sense

Last edited:
Related Other Physics Topics News on Phys.org

#### DivisionByZero

No One???

Well, I guess I don't know what to expect, being my first question/post to this forum. I guess this forum focuses on molecular physics rather than General sorts of equations for large phenomenon.

Oh well. I don't know about bouyancy much anyway. How does it work? How might you find the force imparted on an object?

#### chroot

Staff Emeritus
Gold Member
Re: No One???

Originally posted by DivisionByZero
Oh well. I don't know about bouyancy much anyway. How does it work? How might you find the force imparted on an object?
What you're describing seems to not really be physics, but some sort of strange simulation mechanism that you hope will make realistic-looking waves.

The buoyancy force is simple: an object experiences an upward force equal to the weight of the water it displaces. For a drop of water in water, of course, the drop's weight is equal to the weight of water it displaces, so the net force on it is zero.

- Warren

#### russ_watters

Mentor
Re: Re: No One???

Originally posted by chroot
What you're describing seems to not really be physics, but some sort of strange simulation mechanism that you hope will make realistic-looking waves.
Perhaps fluid dynamics on a particle level? Its extrordinarily difficult. It isn't buoyancy though.
Anyway, I was thinking on implementing the water physics, when I realized there would be a problem with simply making particles raise/lower proportianetly to the water height above. the problem with this is that even when the object is very, very deep, it is affected by the water motion above. I decided it would probably be best to basically have two equations. one that bases it's calculations on local water height, and one that works of average water height.
Sounds like you are saying water is compressible. It isn't (at least not on the scale of the motions you are describing). I guess you could model it that way for simplicity, but it wouldn't accurately reflect the way water works. It might look good though, which is probably all you need.

The motion of water molecules due to waves in the ocean is governed primarily by viscosity. Like I said though, its very complicated. Master's thesis type stuff. And I haven't gotten that far yet.

Have you tried finding some software tools? I haven't played with 3d graphics much, but I know programs like 3d Studio Maxx do particle level fluid simulation.

#### DivisionByZero

Yay finally responses!

Kind of a misunderstanding(sorry, my fault). What I mean is that the water is already semi simulated in the engine. It is WAY to hard to do liquid dynamics real time. It's just cheap sine wave water where each point of the water moves up and down in a sine wave motion.

My problem is that I have objects, lets say people, barrels, tables, crates, etc. Being simulated using a method known as verlet physics, which is popular for games. In most applications it is only important to simulate the exterior of the objects. It is basically just a network of interconnected points. Each of these points is assigned a mass. Although real points (if there are any) would not have mass, this is simply acting like that point represents a substantial part of the object.

Anyway, what I'm doing is checking if these points are submerged. if this is the case, then I need to be able to calculate the buoyant force applied to the object. I can get the point's depth based on the average water level, the point's depth based on the water level directly above (including waves).

According to chroot's definition, I *SHOULD* be able to simply store the volume each point is supposed to represent, and then multiply by a constant that converts from my volume unit to the force imparted by gravity. So basically, If I have a table made with 8 points(one for each corner of the top, and one for each leg), the points representing the table corners imart much more buoyant force than the legs. plus the friction would be much greater for the top of the table.

I'm sure the viscosity stuff is very complex, but surely objects far under the water do not fell the waves far above.

Oh yes, and what's with the charachter limit? is it per post? per week? per month? sorry if I'm wasting anyones charachter allotment....

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving