Game Development Reference

In-Depth Information

10.3.5 Boundary Conditions

As we explained in Section 10.3.2, we need to fix some nodes to find a unique so-

lution for a static finite element formulation. Additionally, in the dynamic system,

we may also need to constrain the movement of one or several points. In order

to interact and explicitly control the object, we might need to force the object to

reach some given displacement.

Fixing or moving a soft body means to fix or move a set of its nodes; this is

usually known as the process of applying boundary conditions.

Fixing nodes.
Freezing a node implies that the node is conditioned to a zero dis-

placement. In order to do this, we apply the following simple algorithm:

•

From our system matrix, temporarily remove all the rows and columns of

the node or nodes that we wish to fix, including those of the force vector.

Fill the values of the known forces among the remaining rows in
F
and set

the rest of its terms to zero.

•

•

Solve the system for the unknown displacements.

Moving the nodes.
In order to explicitly move some mesh nodes to any desired

position, we need to compute the forces that will appear due to the known dis-

placements of these nodes. In this case, the desired displacement (i.e., the dis-

placement boundary condition) is
u
i

=0, while the other displacements are un-

known. There are two major approaches to carrying this out : the
elimination
and

the
penalty
approaches. Although the elimination approach is more accurate and

efficient, we will describe only the penalty approach, which is a good approxima-

tion to an accurate solution and, most importantly, is less cumbersome to handle

in computer programs. The general idea is to solve and compute the displace-

ments of a modified version of the system. This modification consists of adding a

very stiff element to the entries associated to the specified nodes that we wish to

move. Here is the penalty approach:

•

Find the largest element of the
K
matrix, and multiply it by a large number,

say 10,000. Let this number be
n
.

•

Add this new value to the diagonal elements corresponding to the nodes we

wish to move.

Modify
f
: for each specified node, add the product
nu
desired
to the corre-

sponding row of
f
.

•

•

Solve the modified system to find the unknown
u
. At this stage, we know

all the displacements.