Entries for November 21, 2017
-
Vectorial Finite Elements
$ \newcommand{\BAhat}{\hat{\boldsymbol{A}}} \newcommand{\Buhat}{\hat{\boldsymbol{u}}} \newcommand{\Bbhat}{\hat{\boldsymbol{b}}} $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)(1)for all v∈V.
Discretizations of vectorial problems requires the expansion of vectorial quantities as linear combinations of the basis vectors ei:
u=i=1∑nduiei(2)where {ui}i=1nd 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=I=1∑nnuINI=I=1∑nni=1∑nduiIeiNI.(3)Substituting discretized functions in the weak formulation, we obtain
a(uh,vh)=i=1∑ndj=1∑nda(uh,jej,vh,iei)=I=1∑nnJ=1∑nni=1∑ndj=1∑ndujJviIa(ejNJ,eiNI)(4)and
b(vh)=i=1∑ndb(vh,iei)=I=1∑nni=1∑ndviIb(eiNI).(5)We define the following arrays
AijIJbiI=a(ejNJ,eiNI)=b(eiNI).(6)Hence we can express the linear system
a(uh,vh)=b(vh)(7)as
I=1∑nnJ=1∑nni=1∑ndj=1∑ndujJviIAijIJ=I=1∑nni=1∑ndviIbiI.(8)For arbitrary vh, this yields the following system of equations
J=1∑nnj=1∑ndAijIJujJ=biI(9)for 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^=b^(10)by defining a map id that maps original indices to the reshaped indices
id:={[1,nn]×[1,nd](I,i)→[1,nnnd]↦nd(I−1)+i(11)where we used 1-based indexing of the arrays. We set
αβ:=id(I,i):=id(J,j)=nd(I−1)+i=nd(J−1)+j(12)and write
A^αβ=AijIJ,u^β=ujJandb^α=biI(13)The inverse index mapping can be obtained as shown in the previous post.
Example: Linear Elasticity
Our initial-boundary value problem is
−divσut=ργ=uˉ=tˉinononΩ∂Ωu∂Ωt(14)The weak formulation reads
Find u∈V such that
−∫Ωdivσ⋅vdv=∫Ωργ⋅vdv(15)for all v∈V where V=H1(Ω).
We apply integration by parts on the left-hand side
∫Ωdivσ⋅vdv=∫Ωdiv(σv)dv−∫Ωσ:∇vdv(16)and apply the divergence theorem to the first resulting term:
∫Ωdiv(σv)dv=∫∂Ωttˉ⋅vda(17)Substituting the linear stress σ=C:ε=C:∇u, we obtain the following variational forms:
a(u,v)b(v)=∫Ω∇v:C:∇udv=∫Ωργ⋅vdv+∫∂Ωttˉ⋅vda(18)(19)We have the following discretizations of the unknown function and test function
uh=J=1∑nnuJNJandvh=I=1∑nnvINI.(20)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=∫Ω∂xk∂NICikjl∂xl∂NJdv,(21)and finally obtain
AijIJ=∫ΩBkICikjlBlJdv.(22)The vector corresponding to (19) is calculated as
biI=b(eiNI)=∫∂Ωttˉ⋅(eiNI)da+∫Ωργ⋅(eiNI)dv(23)which yields
biI=∫∂ΩttˉiNIda+∫ΩργiNIdv(24)