Vectorial Finite Elements
Many initial boundary value problems require solving for unknown vector fields, such as solving for displacements in a mechanical problem. Discretization of weak forms of such problems leads to higher-order linear systems which need to be reshaped to be solved by regular linear solvers. There are also more indices involved than a scalar problem, which can be confusing. In this post, I’ll try to elucidate the procedure by deriving for a basic higher-order system and giving an example.
The weak formulation of a linear vectorial problem reads
Find u∈V such that
a(u,v)=b(v)for all v∈V.
Discretizations of vectorial problems requires the expansion of vectorial quantities as linear combinations of the basis vectors ei:
u=nd∑i=1uieiwhere {ui}ndi=1 are the components corresponding to the basis vectors and nd=dimV. Here, we chose Cartesian basis vectors for simplicity.
We can therefore express its discretization as
uh=nn∑I=1uINI=nn∑I=1nd∑i=1uIieiNI.Substituting discretized functions in the weak formulation, we obtain
a(uh,vh)=nd∑i=1nd∑j=1a(uh,jej,vh,iei)=nn∑I=1nn∑J=1nd∑i=1nd∑j=1uJjvIia(ejNJ,eiNI)and
b(vh)=nd∑i=1b(vh,iei)=nn∑I=1nd∑i=1vIib(eiNI).We define the following arrays
AIJij=a(ejNJ,eiNI)bIi=b(eiNI).Hence we can express the linear system
a(uh,vh)=b(vh)as
nn∑I=1nn∑J=1nd∑i=1nd∑j=1uJjvIiAIJij=nn∑I=1nd∑i=1vIibIi.For arbitrary vh, this yields the following system of equations
nn∑J=1nd∑j=1AIJijuJj=bIifor i=1,…,nd and I=1,…,nn.
We reshape this higher-order system as shown in the previous post Reshaping Higher Order Linear Systems:
ˆAˆu=ˆbby defining a map id that maps original indices to the reshaped indices
id:={[1,nn]×[1,nd]→[1,nnnd](I,i)↦nd(I−1)+iwhere we used 1-based indexing of the arrays. We set
α:=id(I,i)=nd(I−1)+iβ:=id(J,j)=nd(J−1)+jand write
ˆAαβ=AIJij,ˆuβ=uJjandˆbα=bIiThe inverse index mapping can be obtained as shown in the previous post.
Example: Linear Elasticity
Our initial-boundary value problem is
−divσ=ργinΩu=ˉuon∂Ωut=ˉton∂ΩtThe weak formulation reads
Find u∈V such that
−∫Ωdivσ⋅vdv=∫Ωργ⋅vdvfor all v∈V where V=H1(Ω).
We apply integration by parts on the left-hand side
∫Ωdivσ⋅vdv=∫Ωdiv(σv)dv−∫Ωσ:∇vdvand apply the divergence theorem to the first resulting term:
∫Ωdiv(σv)dv=∫∂Ωtˉt⋅vdaSubstituting the linear stress σ=C:ε=C:∇u, we obtain the following variational forms:
a(u,v)=∫Ω∇v:C:∇udvb(v)=∫Ωργ⋅vdv+∫∂Ωtˉt⋅vdaWe have the following discretizations of the unknown function and test function
uh=nn∑J=1uJNJandvh=nn∑I=1vINI.With the given discretizations, the matrix corresponding to (18) can be calculated as
AIJij=a(ejNJ,eiNI)=∫Ω∇(eiNI):C:∇(ejNJ)dv=∫Ω(ei⊗∇NI):C:(ej⊗∇NJ)dv=∫Ω∂NI∂xkCikjl∂NJ∂xldv,and finally obtain
AIJij=∫ΩBIkCikjlBJldv.The vector corresponding to (19) is calculated as
bIi=b(eiNI)=∫∂Ωtˉt⋅(eiNI)da+∫Ωργ⋅(eiNI)dvwhich yields
bIi=∫∂ΩtˉtiNIda+∫ΩργiNIdv