Ken Deeter

Solid rendering | Wireframe rendering |

A recent paper by Foster and Fedikw [FOSTER], describe a system which can handle moving solid objects, but does not model the forces that a fluid exerts on that object.

As for the physics of floating objects, various levels of understanding have been around since the time of Archimedes. The ideas referenced in this project (in the domain of physics and mechanics) can be found in any standard physics textbook or related web reference.

To model the motion of solid objects in water, three main forces must be computed.

*Buoyancy Force*: According to Archimedes' principle, the net vertical force on a submerged object is equal to the weight of the water displaced.*Drag Force*: As an object moves through a liquid, a force proportional to the velocity of the object, viscosity of the fluid, and cross-sectional area of the object, exists that resists the motion.*Gravity*: As in most real-world simulations, the gravity exerts a constant downward force proportional to an object's mass

For completely submerged objects, this net force is roughly equal to the weight of the fluid displaced by the object, or in other words, the volume of the object times the fluid's density.

For partially submerged objects, a slight approximation is necessary to avoid calculating the surface integral. In my implementation, I treat the partial submersion case in exactly the same manner as the fully submerged case, except that the "weight of the fluid displaced" is only calculated for the partial volume of the object that is actually below the water's surface.

To account for the fact that the partially submerged portion of the object may not necessariy correspond to the "lower" portion of the object (which would imply that the resulting buoyancy force would always be pointing "up"), the force is applied in a direction obtained from the water surface's normal vector. This simple approximation allows for somewhat realistic lateral movement of an object at the water's surface, as if it is being pushed around by a wave.

In my implementation, I use a simpler method to approximate the submerged volume of the cube. Because the cube is always upright, the amount of submersion can be approximated by evaluating the height of the water surface at each of vertically oriented edges of the cube. Specifically, the approximation is computed as follows:

- Compute the depth of each of the four lower corners of the cube
- If a corner is found to be above the water of the surface, then assign its corresponding vertical edge a submerged height value of 0. If it's depth is greater than the length of one of the edges of the cube, then assign it a height value equal to the single edge length. Otherwise, assign the edge a height value equal to the depth of the corner.
- Average the four height values, and multiply the average by the area of the cube's base.

In this implementation, the three values mentioned above are incorporated into the calculation of the drag force. The density of water is fixed at 1000 kilograms per cubic meter and the cube's cross-sectional area is approximated by the area of one of the cube's faces.

In calculating buoyancy forces, it is necessary to often query the height field for a water surface height value at an arbitrary position (x,y) in the plane. Because of this requirement, I chose instead, to use simple sinusoidal functions to model each wave, as they only modify the height of each position on the surface, and not the lateral position.

The tradeoff in realism is not show-stopping, especially for small waves, and the added simplicity makes the computation much more efficient. One idea that was retained from the implementation, is that the water surface's normal vectors are always computed analytically, providing for better results in both rendering and dynamics computation.

The cube object modeled in this video has a mass of 200 kg, has 1 meter length on each edge. As the equivalent weight of water for such a volume is 1000kg, the object is fairly buoyant, and can be seen being tossed into the air by passing waves.

In a second file (1.0MB), the same object is shown being affected by a very large slow moving wave. (The slight change in framerate is due to a rendering glitch)

*Support for a variety of shapes*. One need only solve the submerged partial volume computation problem for each new shape.*Support for multiple solid objects and interactions among them*.*Support for modeling rotation, torque, and angular velocity*. A method similar to the previously described integration method can be used to compute a net torque on the floating object.*Model effects of object on water*. As of now, the system only models the forces and effects of the water on the solid object. To be complete, the system also needs to acount for perturbations to the water's surface caused by the object's presence, including ripples and splashes.*Better simulation of water*. Although a more realistic simulation of water waves was originally intended, a simpler method was chosen for computational simplicity. In theory, however, any model of a body of water's surface can be used for this type of simulation.

- [FOSTER] "Practical Animation of Liquids" Foster, Fedkiw,
*SIGGRAPH 2001* - [FOURNIER] "A Simple Model for Ocean Waves" Fournier, Reeves,
*ACM SIGGRAPH 1986* - [HINSINGER] "Interactive
Animation of Ocean Waves" Hinsinger, Neyret, Cani,
*Symposium on Computer Animation July,2002* - [PEACHY] "Modeling Waves and Surf" Peachy,
*ACM SIGGRAPH 1986*

kdeeter cs ubc ca Last modified: Fri Apr 25 03:03:59 PDT 2003