Boyancy

Started by
92 comments, last by Daerax 19 years, 1 month ago
Quote:Original post by Daerax
Quote:Original post by Dmytry
2Daerax : it's not about role of dP/dh, but about role of fact that P is not const as related(or unrelated) to buoyancy.

Reread first page (esp. before AP came) and note that I was first there to suggest to use archimedes principe to find torque


Hello Dmytry, could you explain what you mean by that? Also, I see now that you sugggested Archemedie's principle but am confused when things got so complicated and arguments on pressure cropped up.

i added some more explanation to my post right before that one.

Arguments on pressure cropped up merely regarding precision of integration proposed by Motorherp. Actually, rahter more regarding replying to arithma's "The forces are not evenly distributed over the surface since pressure increases as depth increases, so upthrust at the buttom is greater than closer into the surface... Did I get something mixed up here?" with "But unless your dealing with objects which are extremely volumous its safe to disregard the pressure difference." That was not quite good reply, considering that arithma was correct regarding it.

I have said that that fact that pressure is different on different parts of object causes buoyancy force, that buoyancy force is direct result of that. (word "difference" in context of discussion meant that, (not necessarily dP/dh (dP/dh=density*g))). Then, it gets rather confusing, but basically AP have said several times that pressure is absolutely unrelated, and also repeated some of my earlier statements regarding Archimedes. I only disagreed with "pressure is absolutely unrelated" things.

I (and some other posters) have said/repeated that buoyancy force is equal to integral of pressure over area, and pointed out several times that it is equal to computed using Archimedes principe. Since my first post, i many times said that Archimedes a: produces same result, and why, b:Archimedes should be used in this case.

(actually, i must say that Archimedes principe by itself doesn't tell anything about torque or point of application of force, BTW, but these things can be trivially found using main idea of Archimedes proof, so we can say that it is using Archimedes principe)

As example of torque, take floating ship(that's what i had in mind) : it is stable because when it is tilted, there is a torque that turn it back. If we don't want simulated ship to behave wildly, and want simulation to be stable, it is necessary to use robust and precise solution(Archimedes). I must emphasize that I have suggested it before AP came, instead of inprecise force integral suggested by MH.

I'm is tired of rectifying that. Imagine initially you say something with some point. Then somebody comes, and _your_ point is continuously repeated with "conclusion" that you is 100% wrong, and all your argumentation and explanations as that you are overcomplicating things (and some as just wrong). So, for any bystander who haven't readed most of rather boring messages, it looks like like your point was entirely opposite. Can somebody look up English word for that kind of behavior?<br><br><!–EDIT–><span class=editedby><!–/EDIT–>[Edited by - Dmytry on April 3, 2005 6:21:55 PM]<!–EDIT–></span><!–/EDIT–>
Advertisement
This post will be a Multi-Part Post because I am tired atm.

Thats cool then Dymtry, I should have read through the thread more thoroughly I guess. But you know what? I still think the original question is quite unclear! I didnt even take into account the fact that at times the center of gravity might be displaced from the center of bouyancy thus yielding a torque even for the hydrostatic case . So the definite answer to the original post is not neccessarily. This time I will not post hastily and will try to be clear.<br><br><b> Buoyancy and Gravity</b><br><br>Objects float because they feel a force from the fluid all over their submerged surface. The force that is felt is due to the density of the water and the pressure differences acting across the surfaces [resulting also in different forces felt across both the top and bottom]. If &#111;ne realizes that since our object is in equillibrium then &Sigma;F = 0. Furthermore, if &#111;ne realizes that the force pushing the object up is the sum of a force due to gravity and the buoyant force then it becomes evident that F<sub>fb</sub> = -(W - F<sub>b</sub>), where F<sub>fb</sub> is the force felt due to the buoyance force, W is the objects weight and F<sub>b</sub> is the buoyant force, which acts in the opposite direction of the Force of gravity or W. It is as if the weight of our object is reduced by the weight of the displaced liquid. This can be put in a more standard form when &#111;ne focuses &#111;n the fact that F<sub>b</sub>, the weight of the displaced fluid is also a force due to gravity and can be written as <i>F<sub>b</sub> = m<sub>b</sub>g. Remembering that the density of some substance is its volume divided by its mass or &rho; = m/V then m<sub>b</sub> = &rho;V therefore F<sub>b</sub> = &rho;Vg and F<sub>fb</sub> = -(W - &rho;Vg). </i>. The buoyancy force often coincides with the center of gravity of an object and thus there is no torque. However, there are times when the center of gravity is diplaced from the Center of buoyancy and there would is an imbalance when the torque applied is of a non-stabilizing nature. <br><br><b> Volume Integrals</b><br><br>While it is possible to use surface integral to solve this problem and it would work quite well when the equations of the surface are known or can be represented quite simply algorithmicly the most versatile method is to actually inergrate volumetrically (using the volume integral). I will prove in my next post why this is so and why it is a trivial matter to then find the center of buoyancy. Especcially since in 3D games enitities are also best approximated using volumes.<br><br><b>More later</b><br><br>My original idea had been to divide the 3d object into a set of smaller volumes, I had in mind cubes, and then summing over these descrete units. Adn applying a torque at the point found using a nested sum. I will expound later..
My suggestion is to compute relatively simple thing per-triangle to find volume and center of that volume. You can have low-poly models for that. Summing per-cubes - well, i'm myself working with volumetrics and "voxels", and do not think it is practical. If you have 10x10x10 grid, it's not really precise, right? It contain 1000 cubes. Even with 200 triangles you can approximate better. I really doubt that volume method is faster if you require at least some accuracy. Triangle *might be* more costly to evaluate, but there's lot less triangles needed. As about unclearness - i initially thought it matters if arithma understands or not, and only that. I undestood what he actually meant, he understood what i meant.

Other than that, "how to compute volume" is not a topic of this thread. It actually looked like he already know how to do that, or even wrote a program that does it (in such case suggestion is to use what you already wrote).

Anyway, I suggested to compute volume and center by doing some computations per-triangle. With some hundreds triangles, it costs literally nothing compared to other things you have to do. Volume-of-poligon computation is precise and robust and not so hard to code (and unlike approximate things, you sure know precision will be enough. Inprecise things can often cause computational instability). Also, for serious physics you will need low-poly models anyway, so it is not slow.

Another thing. Speaking of volume computation - remember that _object can be arbitrarely oriented_. How you will handle that with cubes? I see two ways: 1:Make them be water-aligned and count how many is inside object. That will be slower, as it involves not less costly computations per triangle. 2:Make them be object-aligned. In this case you need to properly clip 'em with water plane (find underwater portion of volume of cube), otherwise it will be plain unstable (ship tilt until some triangle gets completely out of water. You get torque, and ship tilt into opposite side until simmetrical thing happens.). It is not simple to find underwater portion of volume of cube, and center of mass of it.

[Edited by - Dmytry on April 4, 2005 2:11:18 AM]
In no case I will assume anything about the submerged mass (to make it as general as it can be)
As for the bouyancy I now know how to calculate it.
I agree with Dmytry and Motorherp that the bouyant force is a direct consequence of pressure difference. And with the AP that it is equal to the weight of the displaced volume of water.

These are of no concern to me RIGHT NOW since I have understood every point of view regarding them.

As for the torque, I will assume nothing about it's nature. Our only given is that the force is the result of pressure on each partial surface. So the calculation of TORQUE should follow from the last statement.

And actually I have done just that in my last post. The resulting moment on each segment was calculated.

Until now no body is able to prove me that the torque is analagous to the case where the application of the force of bouyancy is at the center of displaced (submerged) volume. And until then, I will be using the above formulas.

I am sorry about the project because I will not be able to comply. I have some technical trouble with directx and until I will solve it, it will take time (especially with the math tests i have).

I am very thankful for every body's interest...
[ my blog ]
maybe i'll write calculus-based proof later, maybe not, (as it is not a simple thing, will have to make drawings, etc), but i found clickster
Quote:
The buoyant force acts on the object at the centre of gravity of the displaced liquid. This point is called the centre of buoyancy.

(i'm assuming arithma talks about hydrostatic case. In general hydrodynamics case, you indeed need to really integrate forces over surface.)

edit:
Okay, "obfuscated proof":

First, drawing:

You can see submerged volume of object.
Let y is pointing to up and plane y=0 is surface of water. (Green arrows is vertical components of surface force, black arrows (labelled A and B) is horisontal components. (Total force acting on piece is equal to sum of horisontal and vertical component, i was bit too lazy to draw it.))

Pressure is denoted by p.
Let we are suming torques caused by pressures applied to all small pieces of surface dS (aka integrating). Some of them is drawn on this picture. dS is defined as vector with length equal to area of piece and directed along normal of surface. Let position of that piece is Q.
So force on piece is -dS*p and torque contributed by piece is -dS*p × Q

Note that if we first find net torque caused by x-component of forces, then same for y and z, and add together, we get same result as if we compute it's for all at same time. That's because B×(C+D+E) = B×C+B×D+B×E

A and B(in drawing) is horisontal components of force (on drawing , x-components, but same applies to z). A=-B, them is colinear and net force and torque of them is zero. For any horisontal force you can find equal opposite horisontal force on opposite side (one of such "pairs" is drawn). So net torque of horisontal components of forces is zero, and only vertical component of force matter. We can safely ignore horisontal components.
From now on, dF is vertical component of force on dS

dF is equal to pressure*projected_area , and pressure=-h*density*g . So,
dF=h*density*g*dSy
and you can see that it is equal to minus weight of [displaced] water in the column above dS.(let's name it dV) Let R is center of mass of that column. (marked with green dot in drawing).

Note that R is on same vertical line with Q. That is, R=Q+some_vertical_vector
dF×R=dF×(Q+some_vertical_vector)=dF×Q+dF×some_vertical_vector
dF is defined as vertical, so dF×some_vertical_vector is zero (them is parallel) and we have
dF×R=dF×Q
So, we can choose R as point of application of all vertical forces acting on the column, and it will not change result.
We have a sum of dF×R where dF is [minus] weight of displaced liquid in column and R is center of mass of column dV . It is exactly same as if we compute center of gravity of all columns, except for sign (as obviously buoyancy is directed up and gravity down)

Note:
1:Proof applies only to hydrostatics case.
2:the point of proof is that it is valid to use center of mass of "displaced volume of water" as point of application of force.
3: i already gave simple Archimedes like proof,
Quote:
It is very easy to prove ala Archimedes theorem. Water in water doesn't spin, and there's no turning force. All forces is compensated. If we have water in the bag, we can assume in computations that weight is applied to center of mass. And bag with water doesn't turn in water, therefore buoyant force neutralizes weight, and to do that it have to in sum be applied to center.


[Edited by - Dmytry on April 4, 2005 6:52:23 AM]
Quote:Original post by Dmytry
Arguments on pressure cropped up merely regarding precision of integration proposed by Motorherp. Actually, rahter more regarding replying to arithma's "The forces are not evenly distributed over the surface since pressure increases as depth increases, so upthrust at the buttom is greater than closer into the surface... Did I get something mixed up here?" with "But unless your dealing with objects which are extremely volumous its safe to disregard the pressure difference." That was not quite good reply, considering that arithma was correct regarding it.

Sorry about this.....it appears I've caused quite a bit of confusion here. Rather what I was trying to say is that the difference in 'pressure difference' between force application points in my method can be taken as negligable and still make a convicing enough simulation (on second thought maybe not but read on). I did try to explain this later but I think it got swamped by the other issues that arose:

Quote:Original post by Motorherp
Yes....between a point on the top of the object and a point on the bottom it is very significant. However in my method where the force is approximated at points across the bottom, the pressure difference between any two points on the bottom when compared to the pressure difference between top and bottom is negligable. Because of this the pressure diff at force application points can be taken as constant, ie: the variation is negligable (at least enough of the time to make a convincing if not completely physicaly accurate simulation).


Anyway....the method I describe is only a very quick hacky way of doing this so if you needed to do it this way you wouldn't really be evaluating pressure differences but rather just using the length of the ray from the application points to the water surface (for partially submerged objects) to scale your upthrust force. Its just that, as far as games are concerned, things like floating objects are usualy just extra graphical features rather than having significant infuence on the gameplay and hence you usualy want to be able to churn it out in a few cycles as possible. If thats the aim then by using a method like I describe a box can be simulated by simply evaluating the upthrust force at the 4 lowest submerged corner points. Very fast but also innacurate......its just a trade off.

Sorry for all the confusion

[Edited by - Motorherp on April 4, 2005 3:21:34 AM]
[size="1"] [size="4"]:: SHMUP-DEV ::
Quote:Original post by Daerax
Volume Integrals

While it is possible to use surface integral to solve this problem and it would work quite well when the equations of the surface are known or can be represented quite simply algorithmicly the most versatile method is to actually inergrate volumetrically (using the volume integral). I will prove in my next post why this is so and why it is a trivial matter to then find the center of buoyancy. Especcially since in 3D games enitities are also best approximated using volumes.

i think this is the most interesting part of this debate.

my belief is (i have never implemented any of this, so i might well be wrong, mind), is that using surfaces is much more convenient. why are entities best represented using volumes? everything that uses a rasterizer already has surface models lying around. all you need to do is open them in an editor, and save them with low polycount, and you have something to work with. generating volumeric models will be a lot more involved, as standard modelling packages dont have such features, certainly not standarized. dmytry is right you could generate volumes using triangles and the centroids, but:

i think the computation itself is easier for the suface integral method. say we have a bool function that tells us if a point lies inside a water volume. if all for all vertices of the triangle this returns false, do nothing. if for all it returns true, the triangle is submerged. otherwise, you could do some recursive subdivision on the triangle untill its safe to approximate as completely under/above water, based on some area criterium or something.

assuming pressure is linear with depth (same assumption archimedes makes, but we could drop it and go for a more expensive method if so desired), you only have to evaluate the pressure at the triangles centroid, add pressure * area (precalced) in the direction of the normal to the forcevector, and add the location of the centroid * area to the point-of-application vector. divide it by the total area when youre done. that should give you all the information you need to work with in you RB simulator.

not expensive, easy to implement, robust... what more could you want?

you should ofcource do an early rejection test to see if an object is completely above / under water. this is most likely often the case, and if you cache the computed bouyancy and its point of application, you could completely reuse it.

i dont see how you could handle partially submerged objects with the same easy when dealing with volumes. how do you calculate if a volume is underwater, and how much of it? what if the fluid is given by a heightfield?
I added proof to my post right above that one....for some reason on this forum, math symbols like "×" is better preserved if you edit post... when it will be fixed...

2Motorherp: i understand, no problem actually. Yes, it could work as cheap method if well-implemented, but i doubt it will be faster than per-triangle thing for low poly model.

2Eelco: Actually, in hydrostatic case computation of submerged volume and center of it is equivalent (both complexity-wise and result-wise) to computation of pressure sum on all triangles. In both cases you need to iterate through each triangle and actually find force acting on it (and center). With one exception, that you actually don't need to compute x and y components of force, and computation of center takes that into account.... My point is actually that it is equivalent, and that "IT IS A SAFE ASSUMPTION TO MAKE THE CENTER OF GRAVITY OF THE "IMMERSED VOLUME" AS THE POINT OF APPLICATION" (from first post) is true.
I guess this ends the discussion as most of the issues are resolved.
For new people who are seeing this thread, it is of great value for them to see how the solution evolved and where main areas of confusion arose.
I guess what the AP was saying about pressure difference (as I guessed initially, implicitly) as it causes torque was after all wrong and hence it resolves all differences between his point of view and Dmytries about the natuer of Bouyant force. (Although at some points I think I was totally alienated as I was not getting what they were arguing about)
Special thanks to Dmytry for finding the time and effort into convincing me with these rather elementary stuff...
[ my blog ]
some note: if you'll do hydrodynamics, you'll need to compute it as surface integral of force(add pressure forces acting on every triangle, or something), because center will not really work. (it's valid only for hydrostatics) In hydrostatic case forces can be computed using either Archimedes theorem and center of buoyancy thingy, or as surface integral of pressure force. But if you want to simulate hydrodynamics, you will have to use surface integral of pressure force, as it is universal, "bare" physics that works pretty much with everything. (e.g. flying plane)

This topic is closed to new replies.

Advertisement