Dynamics of Fluid Forces
This page writes out the forces that fluids put on a body and the motion they produce. How to add water, air and waves to a world is described in Fluids.
The page follows the notation of Conventions and Notations. In addition:
and are the velocity of a body's center of mass and its angular velocity; together they form its twist . is the velocity of the fluid: the current of a volume or the wind, plus the motion of its waves. is the twist of the body relative to the fluid. and are the density and the dynamic viscosity of a fluid. Where a liquid and the ambient fluid both touch a body, and tell them apart. is the gravity of the world and .
Equation of motion
Fluids act on every dynamic body through its collision shapes. Each shape adds its share, and the shares of all shapes of a body add up. With
is the rigid body's spatial inertia, in the world frame about its center of mass, and its gyroscopic term. is the added mass: the fluid that moves with the body. is the force that this fluid puts on the body as the body turns (Kirchhoff's equations; see Added mass). - On the right are gravity
, buoyancy , the push of an accelerating liquid , pressure drag and lift with skin friction , viscous drag , Magnus lift , water entry and wave radiation . are contacts, joints and every other force.
Every wrench here is a force and a moment about the center of mass. A force
Which fluid touches a shape
A collision shape belongs to the first volume of liquid in which:
- its centroid lies within the volume's horizontal bounds and above its bottom;
- the shape reaches below the volume's surface.
The surface cuts the shape into two parts:
- the part below it lies in the liquid, with volume
and centroid ; - the rest lies in the ambient fluid, with volume
, where is the volume of the shape.
A shape that belongs to no volume lies wholly in the ambient fluid. Each part feels the fluid it lies in, with that fluid's density, viscosity and velocity.
The surface
A shape sees the surface as one plane, through a point at height
- A volume without waves or a sampler has a still, horizontal surface at its
surfaceHeight. - A sampler gives the plane through its sample at the shape's centroid, tilted by its normal.
- Waves give the plane of the waves averaged over the shape's extent (below).
The cut of the shape by this plane is exact for every shape:
- a sphere's cap and its waterplane, a disc, in closed form;
- a box or a mesh by cutting its faces;
- a cylinder or a capsule by integrating the circular segments under the plane, and the chords of its waterplane, along its axis.
Waves
Each wave
Under the surface, at the height
The motion decays with the depth below the mean level
The acceleration of the liquid is that of a parcel as it moves, not of the flow at a fixed point:
with
The plane over a body on waves
A body on waves sees them averaged over its extent. Let
Here
The weights are those of a least-squares fit of the surface over the body. The height comes from a Gaussian of covariance
- Wall-sided bodies. A box or an upright cylinder displaces the liquid over its bottom, and its buoyancy and its pitch and roll moments follow the true surface closely. In RaiSim's tests, a 2 m box on a 4 m wave of amplitude 0.06 m is within 0.14 % of the buoyancy of the water over its bottom and 0.13 % of its moment, where the tangent plane misses by 3 % and 18 %. With the crest over its middle and the wave along its length, a box of the same length misses by 0.7 %.
- Small bodies. A body small against the waves sees the plane tangent to them,
. - Smooth and symmetric. The plane changes smoothly as a body turns. It is the same for a sphere in any orientation, and for a cylinder or a capsule spun about its axis.

A raft half a wave long on an 8 m wave, at the moment its middle sits on a node: one end lies in the trough and the other on the crest, and the raft tilts along the wave. The crates in front, small against the wave, ride the surface at its own height and slope.
The velocity
Buoyancy
Each fluid pushes the part of the shape in it up with the weight of the fluid that part displaces. The force acts at the centroid of that part:
Since it acts at the centroid of the displaced volume, the restoring moment of a floating body is that of hydrostatics. A body floats upright where its metacenter lies above its center of mass. A body whose density lies between the ambient fluid's and the liquid's floats at the depth where

The bodies of the fluid pool example at rest. Each floats at the depth where it displaces its own weight: the light ball rides high, and the ice block, at 92 % of the water's density, floats almost wholly under. The half-dense cube turns an edge up: on a face, its metacenter lies below its center of mass.
Accelerating liquid
Liquid that accelerates pushes a body as it would push the liquid the body displaces. It also carries the body's added mass along. This is the inertia force of Morison's equation, and the dynamic part of the Froude–Krylov force of the waves:
where
Drag and lift
The surface of each shape is made of faces. A face
A face that meets the flow,
is the shape's drag coefficient ( FluidCoefficients::drag, or its own; see Fluids) andthe skin friction coefficient. - The factor
makes the pressure over the whole shape add up to the textbook drag on the area the shape shows to the flow. It is on a sphere and on the ends of a capsule, on the side of a cylinder or capsule, and 1 on flat faces.
A face of a shape cut by the surface is cut too:
- the part below the surface feels the liquid;
- the part above feels the ambient fluid.
Summing over faces gives the moments as well, so:
- a plate at an angle of attack
feels lift and drag ; - a link that swings is braked more at its tip;
- a body that turns meets the flow faster on its outer faces.
A sphere feels the face pressure integrated exactly over the part of it in each fluid, with
Viscous drag
The viscosity drags each part of a shape like the sphere of the same volume, of diameter
with
A sphere's drag coefficient follows its Reynolds number drag coefficient of 0 or more replaces it):
The face pressure carries all of it but the Stokes part
Magnus lift
A sphere that spins, and a cylinder or capsule that spins about its axis, is lifted across the flow:
at magnusLift coefficient.
Added mass
A body that accelerates also accelerates the fluid around it. The fluid that moves with it is the added mass, a symmetric
is the shape's added mass per unit density about its centroid, in its principal axes. It comes from Lamb's coefficients for ellipsoids and DNV-RP-C205 for boxes, plates and cylinders (see Fluids). moves it to the body's center of mass and frame. is the addedMasscoefficient.
Inertia.
Turning. The fluid carried along has the momentum
The second term is Kirchhoff's, the one the body frame would show. The first appears because
The term

A floating log shoved at 2.5 m/s at 34° to its axis, shown every 0.16 s. The water it carries yaws it, and the drag slows it and bends its path, so it swings round as it glides.
Water entry
As a body sinks into the liquid, its added mass in the liquid grows, and the body hands its momentum to the liquid it sets moving (von Kármán). While its waterplane of area
with
It is quadratic in the sinking speed. A flat plate that falls flat onto the water slows at once to

A plate and a ball, both of 0.3 times the water's density, let go 1 m over a pool and shown every 50 ms. The plate meets the water with its whole face. The water it sets moving as it sinks in is many times its own mass (26 times once wholly under), so it stops on the surface at once, from 4.2 m/s to 0.3 m/s within 50 ms. The ball's added mass is under twice its own and grows gradually as it sinks in: it plunges and bobs back up.
Wave radiation
A body that heaves through the surface makes waves, which carry its energy away. At the waterplane centroid, along
with
estimates the body's natural heave frequency from the liquid it displaces and its added mass in heave . is Haskind's damping of a body small against the waves it makes, and caps it for a wide body. - The volume's
waveRadiationscales.
A time step
During a step from
- The added mass is part of the body's inertia for the whole step, so contacts, joints and tendons see it.
- Drag acts at the end of the step. Drag, skin friction, viscous drag, wave radiation and water entry act as
. is a symmetric, positive approximation of the forces' derivative: each face's pressure along its normal, a bound on skin friction, and the sphere's drag coefficient held for the step. Along the flow, a sphere's is the derivative of its drag, twice the drag per unit speed as for any force quadratic in the speed, also where the surface cuts it. With the inertia and the motion of the sphere's center held over the step, this drag cannot add kinetic energy in still fluid, whatever the inertia. A body that turns within the step is not covered: with its added mass switched off, a 1 g body spinning at about 150 rad/s, whose sphere, 1 m across, displaces half a tonne of water, gains about of its energy in a 1 ms step with the sphere cut by the surface, and with it wholly under water. Water entry, quadratic in the sinking speed, adds its derivative along the waterplane's normal, at half weight for a body that moves by the mean of its old and new velocities. The step moves the body as if its inertia were . A grain whose drag would stop it within a fraction of a step settles at its terminal speed without overshoot. A rod sliding along its length slows down without turning around. - Other fluid forces are taken at the state the step starts from.
- Waves sampled at the step's center. Waves and their liquid are sampled where the step centers its forces. A body that moves by the mean of its old and new velocities (a free single body, or an articulated system integrating with
TRAPEZOID) samples them half a step ahead in time, at its position half a step ahead, and lays that surface on the body where it is. A body that moves by its new velocity (SEMI_IMPLICIT, or a single body in contact or held by a tendon) samples them at the start. Particles carried by the waves therefore keep their orbits over many periods. - Turning and added mass in a free single body. It integrates its turning and the turning of its added mass by the midpoint rule, so wholly in one still, inviscid fluid and with no other force on it, it keeps its energy.
Object::getFluidForce() and Object::getFluidTorque() report, for the last step,
Articulated systems
Each link of an articulated system is a rigid body with its own fluid wrench
besides its joint damping (see Dynamics and Control).
includes water entry as for a single body, by the integration scheme. - A floating base feels its fluid wrench like a single body.
- A fixed base feels none.
- A leg swinging through water is braked and loaded at every link. The joints and the contacts see the water the legs carry along.
A body at rest in a fluid
A body that floats or hovers comes to rest where the forces balance:
with the centroid of the displaced fluid on the vertical through the center of mass.
A body without contacts whose fluids leave it out of balance by more than a thousandth of gravity never falls asleep. Neither does a body within the horizontal bounds of a volume with waves or a sampler, since the surface may move while it rests.