Natural/Volumn coordinates in element matrix

When evaluating element matrix, one needs perform integration over local element domain, during which coordinate transform usually happens. For example, for shape function $N_i$ where subscript is for local node index in a heat equation with constant conductivity, one does the integral during applying variational principle:

$\int_{\Omega^e}{\nabla N_i\cdot\nabla N_j}dxdydz$

In a tetrahedron the natural/volumn coordinate can be described as:

$L_1=\zeta(x,y,z)$

$L_2=\eta(x,y,z)$

$L_3=\xi(x,y,z)$

$L_4=1-\zeta-\eta-\xi$

where $(\zeta,\eta,\xi)$ is the “standard” tetrahedron coordinate between which and the element a transform is constructed:

$(\zeta,\eta,\xi)\Longleftrightarrow (x,y,z)$

By this partial derivatives can be performed like:

$\nabla_{x,y,z} N_i=J^{-1} \nabla_{\zeta,\eta,\xi} N_i$

where $J$ is the Jacobian matrix of the transformation $J=\frac{\partial(x,y,z)}{\partial(\zeta,\eta,\xi)}$, etc. In turn we have

$\frac{\partial N_i}{\partial \zeta}=\frac{\partial N_i}{\partial L_1}\frac{\partial L_1}{\partial \zeta}+\frac{\partial N_i}{\partial L_2}\frac{\partial L_2}{\partial \zeta}+\frac{\partial N_i}{\partial L_3}\frac{\partial L_3}{\partial \zeta}+\frac{\partial N_i}{\partial L_4}\frac{\partial L_4}{\partial \zeta}$

and similar expressions for $\zeta,\eta$. This is equal to:

$\frac{\partial N_i}{\partial \zeta}=\frac{\partial N_i}{\partial L_1}-\frac{\partial N_i}{\partial L_4}$

In summary, the integral in calculating element matrix can be performed always in the standard element $\Omega_0^e$:

$\int_{\Omega^e}{\nabla_{x,y,z} N_i\cdot\nabla_{x,y,z} N_j}dxdydz=\int_{\Omega_0^e}{(J^{-1}\nabla_{\zeta,\eta,\xi} N_i)\cdot(J^{-1}\nabla_{\zeta,\eta,\xi} N_j) \det J}d\zeta d\eta d\xi$

For example, in linear element, the shape functions are exactly the same as natural coordinates: $N_i=L_i, i=1,2,3,4$. Then we have:

$\frac{\partial (N_1,N_2,N_3,N_4)}{\partial \zeta}=(1,0,0,-1)$

$\frac{\partial (N_1,N_2,N_3,N_4)}{\partial \eta}=(0,1,0,-1)$

$\frac{\partial (N_1,N_2,N_3,N_4)}{\partial \xi}=(0,0,1,-1)$

while in quadratic element, as the shape function $N_1\sim N_{10}$ shown in last post, the gradient of $\mathbf{N}=(N_1,N_2,N_3,N_4,N_5,N_6,N_7,N_8,N_9,N_{10})$ against natural coordinates would be:

$\frac{\partial \mathbf{N}}{\partial \zeta}=(4L_1-1,0,0,-4L_4+1,4L_2,4L_3,4L_4-4L_1,0,-4L_3,-4L_2)$

$\frac{\partial \mathbf{N}}{\partial \eta}=(0,4L_2-1,0,-4L_4+1,4L_1,0,-4L_1,4L_3,-4L_3,4L_4-4L_2)$

$\frac{\partial \mathbf{N}}{\partial \xi}=(0,0,4L_3-1,-4L_4+1,0,4L_1,-4L_1,4L_2,4L_4-4L_3,-4L_2)$