Graphics Reference
In-Depth Information
It is this variational form of the equations that we choose to discretize.
We already have discussed how to approximate the pressure update to
the rigid body (i.e., the net force and torque) in the earlier weak-coupling
section; we need only make this concrete with a sparse matrix J which,
when multiplied with a vector containing the grid pressure values yields
the force and torque. Using Equation (11.2), we get the first three rows of
J that correspond to the net force. For example, the x -component F 1 (the
first row) is determined from
p i +1 ,j,k
p i,j,k
F 1 =
V i +1 / 2 ,j,k
,
Δ x
i,j,k
where V i +1 / 2 ,j,k is the volume of the solid in u -cell ( i +1 / 2 ,j,k )—note that
this is the complement of the cell volumes for the fluid! This gives us
J 1 , ( i,j,k ) = V i +1 / 2 ,j,k
V i− 1 / 2 ,j,k
Δ x
.
Similarly, the next two rows of J , corresponding to the y -and z -components
of net force, are
V i,j +1 / 2 ,k
V i,j− 1 / 2 ,k
Δ x
J 2 , ( i,j,k ) =
,
V i,j,k +1 / 2
V i,j,k− 1 / 2
Δ x
J 3 , ( i,j,k ) =
.
Similarly, from Equation (11.3), we can get the other three rows of J that
correspond to the net torque. The first component T 1 is, in continuous
variables,
T 1 =
∂z ( p ( y − Y )) ,
where the center of mass coordinates are X =( X, Y, Z ). This simplifies to
T 1 = ( z
∂y ( p ( z − Z ))
Z ) ∂p
∂y ( y − Y ) ∂p
∂z ,
which we approximate as
Z ) p i,j +1 ,k
p i,j,k
T 1
V i,j +1 / 2 ,k ( z k
Δ x
i,j,k
Y ) p i,j,k +1
p i,j,k
V i,j,k +1 / 2 ( y j
,
Δ x
i,j,k
Search WWH ::




Custom Search