Load vector 2D

Now we compute the load vector for the two-dimensional case. The load vector is related to the integral of the product of the source function and the trial function. Consider the integral for a single triangle with vertices (xi,yi),(xi+1,yi+1),(xi+2,yi+2)(x_i, y_i), (x_{i+1}, y_{i+1}), (x_{i+2}, y_{i+2})

f(x,y)υdS.\int_{\triangle} f(x, y) \cdot \upsilon \,dS.
(6.40)

The trial function on the triangle has the form υ(i)(i+2)(x,y)\upsilon_{(i)(i+2)}(x, y) =qiϕi(x,y)= q_i \cdot \phi_i(x, y) +qi+1ϕi+1(x,y)+ q_{i+1} \cdot \phi_{i+1}(x, y) +qi+2ϕi+2(x,y)+ q_{i+2} \cdot \phi_{i+2}(x, y). To evaluate the integral, the source function f(x,y)f(x, y) must be interpolated on the triangle \triangle by a linear function. We represent f(x,y)f(x, y) in the form f~(x,y)\widetilde{f}(x, y) =e1= e_1 +e2x+ e_2 \cdot x +e3y+ e_3 \cdot y. The coefficients e1,e2,e3e_1, e_2, e_3 are determined from the interpolation conditions at the nodes

e1\displaystyle e_1 +e2xi\displaystyle + e_2 \cdot x_i +e3yi\displaystyle + e_3 \cdot y_i =fi\displaystyle = f_ie1\displaystyle e_1 +e2xi+1\displaystyle + e_2 \cdot x_{i+1} +e3yi+1\displaystyle + e_3 \cdot y_{i+1} =fi+1\displaystyle = f_{i+1}e1\displaystyle e_1 +e2xi+2\displaystyle + e_2 \cdot x_{i+2} +e3yi+2\displaystyle + e_3 \cdot y_{i+2} =fi+2\displaystyle = f_{i+2}
(6.41)

Since the hat functions ϕn\phi_n equal one at their own node and zero at the others, the linear interpolant of the source function, expressed through them, takes the form

f~(x,y)\displaystyle \widetilde{f}(x, y) =fiϕi(x,y)\displaystyle = f_i \cdot \phi_i(x, y) +fi+1ϕi+1(x,y)\displaystyle + f_{i+1} \cdot \phi_{i+1}(x, y) +fi+2ϕi+2(x,y),\displaystyle + f_{i+2} \cdot \phi_{i+2}(x, y),
(6.42)

where fi,fi+1,fi+2f_i, f_{i+1}, f_{i+2} are the values of the source function at the vertices of the triangle.

Substitute the interpolated source function and the trial function into (6.40). We take into account (6.25) from the section on hat functions

f(x,y)υdS\displaystyle \int_{\triangle} f(x, y) \cdot \upsilon \,dS =(nfnϕn)(mqmϕm)dS\displaystyle = \int_{\triangle} \left( \sum_{n} f_n \cdot \phi_n \right) \cdot \left( \sum_{m} q_m \cdot \phi_m \right) \,dS =mnqmfnϕmϕndS,\displaystyle = \sum_{m} \sum_{n} q_m \cdot f_n \cdot \int_{\triangle} \phi_m \cdot \phi_n \,dS,

where the indices mm and nn run over the vertices of the triangle {i,i\{i, i +1,i+1, i +2}+2\}.

We use the relations (6.26) for the integrals of products of hat functions, derived when computing the damping matrix, where SS_{\triangle} is the area of the triangle, which is computed by formula (6.9). After collecting like terms we obtain

f(x,y)υdS\displaystyle \int_{\triangle} f(x, y) \cdot \upsilon \,dS =S12[qi(2fi+fi+1+fi+2)+qi+1(fi+2fi+1+fi+2)+qi+2(fi+fi+1+2fi+2)]\displaystyle = \frac{\displaystyle S_{\triangle}}{\displaystyle 12} \cdot \Big[ q_i \cdot (2 \cdot f_i + f_{i+1} + f_{i+2}) + q_{i+1} \cdot (f_i + 2 \cdot f_{i+1} + f_{i+2}) + q_{i+2} \cdot (f_i + f_{i+1} + 2 \cdot f_{i+2}) \Big]

We introduce the notation for the elements of the local load vector of the triangle

ri=S12(2fi+fi+1+fi+2)ri+1=S12(fi+2fi+1+fi+2)ri+2=S12(fi+fi+1+2fi+2)\begin{split} &r_i = \frac{\displaystyle S_{\triangle}}{\displaystyle 12} \cdot (2 \cdot f_i + f_{i+1} + f_{i+2})\\ &r_{i+1} = \frac{\displaystyle S_{\triangle}}{\displaystyle 12} \cdot (f_i + 2 \cdot f_{i+1} + f_{i+2})\\ &r_{i+2} = \frac{\displaystyle S_{\triangle}}{\displaystyle 12} \cdot (f_i + f_{i+1} + 2 \cdot f_{i+2}) \end{split}
(6.43)

Thus, the local load vector for a two-dimensional triangular element has the form

R=[riri+1ri+2]=S12[211121112][fifi+1fi+2].\begin{aligned}\mathbf{R}_{\triangle} = \begin{bmatrix} r_i\\ r_{i+1}\\ r_{i+2} \end{bmatrix} = \frac{\displaystyle S_{\triangle}}{\displaystyle 12} \begin{bmatrix} 2 & 1 & 1\\ 1 & 2 & 1\\ 1 & 1 & 2 \end{bmatrix} \begin{bmatrix} f_i\\ f_{i+1}\\ f_{i+2} \end{bmatrix}.\end{aligned}
(6.44)

Note that the resulting load vector coincides with the product of the local damping matrix (6.28) and the vector of nodal source values, that is R\mathbf{R}_{\triangle} =Cf= \mathbf{C}_{\triangle} \cdot \mathbf{f}.

The global load vector R\mathbf{R} is obtained by summing the contributions from all triangular elements of the mesh using the assembly method: the elements of the local vectors are added to the corresponding elements of the global vector according to the global node numbering. The dimension of the global load vector equals NN, where NN is the total number of nodes in the mesh. It is important to note that for interior nodes the contributions from all adjacent triangular elements containing the given node are summed. For boundary nodes the element contributions are assembled in the same way, but the corresponding components of the system may be modified when boundary conditions are imposed.