FIXME: "Figure 3: A 3-particle cloth."
f 01 s = E ℓ 01 − L 01 ℓ 01 Δ x 01 , Δ x 01 = x 1 − x 0 f 12 s = E ℓ 12 − L 12 ℓ 12 Δ x 12 , Δ x 12 = x 2 − x 1 \begin{align*}
\htmlStyle{color: var(\-\-bs\-red);}{f_{01}^{s}} &= E \frac{\ell_{01} - L_{01}}{\ell_{01}} \Delta x_{01}, \Delta x_{01} = x_1 - x_0\\
\htmlStyle{color: var(\-\-bs\-green);}{f_{12}^{s}} &= E \frac{\ell_{12} - L_{12}}{\ell_{12}} \Delta x_{12}, \Delta x_{12} = x_2 - x_1
\end{align*}
f 01 s f 12 s = E ℓ 01 ℓ 01 − L 01 Δ x 01 , Δ x 01 = x 1 − x 0 = E ℓ 12 ℓ 12 − L 12 Δ x 12 , Δ x 12 = x 2 − x 1
Remember that we have equal and opposite forces: f 01 s = − f 10 s . \htmlStyle{color: var(\-\-bs\-red);}{f_{01}^{s}} = -\htmlStyle{color: var(\-\-bs\-red);}{f_{10}^{s}}. f 01 s = − f 10 s .
Next we compute the total force acting upon each particle and combine it into the block vector f , f, f ,
f 0 ( x 0 , x 1 , x 2 ) + = f 01 s f 1 ( x 0 , x 1 , x 2 ) + = f 10 s f 1 ( x 0 , x 1 , x 2 ) + = f 12 s f 2 ( x 0 , x 1 , x 2 ) + = f 21 s } R 9 × 1 = f = ( m 1 g ⃗ + f 01 s − f 00 s m 2 g ⃗ − f 01 s + f 12 s m 3 g ⃗ − f 12 s − f 00 s ) = ( f 0 f 1 f 2 ) \left.
\begin{align*}
f_0(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-red)}{f_{01}^s}\\
f_1(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-red)}{f_{10}^s}\\
f_1(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-green)}{f_{12}^s}\\
f_2(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-green)}{f_{21}^s}
\end{align*}
\right\}_{\mathbb{R}^{9 \times 1}}\mkern-24mu = f = \begin{pmatrix}
m_1\,\vec{g} + \htmlStyle{color: var(\-\-bs\-red)}{f_{01}^s}\phantom{-f_{00}^s}\\
m_2\,\vec{g} - \htmlStyle{color: var(\-\-bs\-red)}{f_{01}^s} + \htmlStyle{color: var(\-\-bs\-green)}{f_{12}^s}\\
m_3\,\vec{g} - \htmlStyle{color: var(\-\-bs\-green)}{f_{12}^s}\phantom{-f_{00}^s}
\end{pmatrix} =
\begin{pmatrix}
f_0 \\ f_1 \\ f_2
\end{pmatrix}
f 0 ( x 0 , x 1 , x 2 ) f 1 ( x 0 , x 1 , x 2 ) f 1 ( x 0 , x 1 , x 2 ) f 2 ( x 0 , x 1 , x 2 ) + = f 01 s + = f 10 s + = f 12 s + = f 21 s ⎭ ⎬ ⎫ R 9 × 1 = f = m 1 g + f 01 s − f 00 s m 2 g − f 01 s + f 12 s m 3 g − f 12 s − f 00 s = f 0 f 1 f 2
We compute K \mathfrak{K} K as a block matrix by first defining
K i j s ⏞ R 3 × 3 = E ℓ i j 2 ( ℓ i j − L i j ℓ i j Δ x i j T Δ x i j I 3 + ( 1 − ℓ i j − L i j ℓ i j ) Δ x i j Δ x i j T ) , \overbrace{K_{ij}^{s}}^{\mathbb{R}^{3 \times 3}} = \frac{E}{\ell^{2}_{ij}}\left(\frac{\ell_{ij} - L_{ij}}{\ell_{ij}} \Delta x_{ij}^T\Delta x_{ij}\mathbf{I}_3 + \left(1 - \frac{\ell_{ij} - L_{ij}}{\ell_{ij}}\right)\Delta x_{ij} \Delta x_{ij}^{T}\right),
K ij s R 3 × 3 = ℓ ij 2 E ( ℓ ij ℓ ij − L ij Δ x ij T Δ x ij I 3 + ( 1 − ℓ ij ℓ ij − L ij ) Δ x ij Δ x ij T ) ,
then computing the total contributions by each spring
K 00 ( x 0 , x 1 , x 2 ) + = K 10 s K 01 ( x 0 , x 1 , x 2 ) + = K 01 s K 10 ( x 0 , x 1 , x 2 ) + = K 01 s K 11 ( x 0 , x 1 , x 2 ) + = K 10 s K 11 ( x 0 , x 1 , x 2 ) + = K 21 s K 12 ( x 0 , x 1 , x 2 ) + = K 12 s K 21 ( x 0 , x 1 , x 2 ) + = K 12 s K 22 ( x 0 , x 1 , x 2 ) + = K 21 s \begin{align*}
K_{00}(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-red);}{K_{10}^{s}}\\
K_{01}(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-red);}{K_{01}^{s}}\\
K_{10}(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-red);}{K_{01}^{s}}\\
K_{11}(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-red);}{K_{10}^{s}}\\
K_{11}(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-green);}{K_{21}^{s}}\\
K_{12}(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-green);}{K_{12}^{s}}\\
K_{21}(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-green);}{K_{12}^{s}}\\
K_{22}(x_0, x_1, x_2) &\mathrel{+}= \htmlStyle{color: var(\-\-bs\-green);}{K_{21}^{s}}\\
\end{align*}
K 00 ( x 0 , x 1 , x 2 ) K 01 ( x 0 , x 1 , x 2 ) K 10 ( x 0 , x 1 , x 2 ) K 11 ( x 0 , x 1 , x 2 ) K 11 ( x 0 , x 1 , x 2 ) K 12 ( x 0 , x 1 , x 2 ) K 21 ( x 0 , x 1 , x 2 ) K 22 ( x 0 , x 1 , x 2 ) + = K 10 s + = K 01 s + = K 01 s + = K 10 s + = K 21 s + = K 12 s + = K 12 s + = K 21 s
and writing the stiffness matrix as follows
K = ( K 00 K 01 K 02 K 10 K 11 K 12 K 20 K 21 K 22 ) R 9 × 9 = ( − K 01 s K 01 s 0 K 01 s − K 01 s − K 12 s − K 12 s 0 − K 12 s K 12 s ) \begin{align*}
\mathfrak{K} &=
\begin{pmatrix}
\htmlStyle{color: var(\-\-bs\-red)}{K_{00}} & \htmlStyle{color: var(\-\-bs\-red)}{K_{01}} & K_{02}\\
\htmlStyle{color: var(\-\-bs\-red)}{K_{10}} & \htmlStyle{color: var(\-\-bs\-orange)}{K_{11}} & \htmlStyle{color: var(\-\-bs\-green)}{K_{12}}\\
K_{20} & \htmlStyle{color: var(\-\-bs\-green)}{K_{21}} & \htmlStyle{color: var(\-\-bs\-green)}{K_{22}}
\end{pmatrix}_{\mathbb{R}^{9 \times 9}}\\
&= \begin{pmatrix}
\htmlStyle{color: var(\-\-bs\-red)}{-K_{01}^{s}} & \htmlStyle{color: var(\-\-bs\-red)}{K_{01}^{s}} & \mathbf{0}\\
\htmlStyle{color: var(\-\-bs\-red)}{K_{01}^{s}} & \htmlStyle{color: var(\-\-bs\-red)}{-K_{01}^{s}} \htmlStyle{color: var(\-\-bs\-green)}{-K_{12}^{s}} & \htmlStyle{color: var(\-\-bs\-green)}{-K_{12}^{s}}\\
\mathbf{0} & \htmlStyle{color: var(\-\-bs\-green)}{-K_{12}^{s}} & \htmlStyle{color: var(\-\-bs\-green)}{K_{12}^{s}}
\end{pmatrix}
\end{align*}
K = K 00 K 10 K 20 K 01 K 11 K 21 K 02 K 12 K 22 R 9 × 9 = − K 01 s K 01 s 0 K 01 s − K 01 s − K 12 s − K 12 s 0 − K 12 s K 12 s
Note that K 02 = K 20 = 0 K_{02} = K_{20} = \mathbf{0} K 02 = K 20 = 0 because there are no springs directly connecting particles x 0 x_0 x 0 and x 2 x_2 x 2 .
We define the mass and velocity block matrices as
M = ( M 0 0 0 0 M 1 0 0 0 M 2 ) R 9 × 9 v ( k + 1 ) = ( v 0 ( k + 1 ) v 2 ( k + 1 ) v 3 ( k + 1 ) ) R 9 × 1 \begin{align*}
\mathfrak{M} &= \begin{pmatrix}
M_0 & 0 & 0\\
0 & M_1 & 0\\
0 & 0 & M_2\\
\end{pmatrix}_{\mathbb{R}^{9 \times 9}}\\
v^{(k + 1)} &= \begin{pmatrix}
v_0^{(k + 1)}\\v_2^{(k + 1)}\\v_3^{(k + 1)}
\end{pmatrix}_{\mathbb{R}^{9 \times 1}}
\end{align*}
M v ( k + 1 ) = M 0 0 0 0 M 1 0 0 0 M 2 R 9 × 9 = v 0 ( k + 1 ) v 2 ( k + 1 ) v 3 ( k + 1 ) R 9 × 1
Finally, solve A x = b Ax = b A x = b where A = M − h 2 K , A = \mathfrak{M} - h^2 \mathfrak{K}, A = M − h 2 K , and b = M v ( k ) + h f b = \mathfrak{M}v^{(k)} + hf b = M v ( k ) + h f .