-
Notifications
You must be signed in to change notification settings - Fork 19
/
basis_Q1_2D.tex
160 lines (151 loc) · 5.73 KB
/
basis_Q1_2D.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
\begin{flushright} {\tiny {\color{gray} basis\_Q1\_2D.tex}} \end{flushright}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In this section, we consider for simplicity an element which is a square defined
by $-1<r<1$, $-1<s<1$ in the Cartesian coordinates system $(r,s)$\footnote{There is a
reason to choose $r$ and $s$ as coordinates and not $x$ and $y$ as we will see later.}:
\input{tikz/tikz_q12d}
Note the counter-clockwise numbering\footnote{Note that in many of the python codes which
are part of this project the numbering starts at 0.}.
This element is commonly called the reference element. How we go from the $(x,y)$ coordinate system
to the $(r,s)$ once and vice versa will be dealt with later on.
The basis functions in the above reference element in the reduced
coordinates system $(r,s)$ are given by:
\begin{mdframed}[backgroundcolor=blue!5]
\begin{eqnarray}
\bN_1(r,s)&=&0.25(1-r)(1-s) \nonumber\\
\bN_2(r,s)&=&0.25(1+r)(1-s) \nonumber\\
\bN_3(r,s)&=&0.25(1+r)(1+s) \nonumber\\
\bN_4(r,s)&=&0.25(1-r)(1+s)
\end{eqnarray}
\end{mdframed}
These basis functions are the product of the linear basis functions of Section~\ref{sec:bf1}
in the $r$ direction and the $s$ direction.
\begin{center}
\includegraphics[width=4cm]{images/basis_Q1_2D/N1}
\includegraphics[width=4cm]{images/basis_Q1_2D/N2}
\includegraphics[width=4cm]{images/basis_Q1_2D/N3}
\includegraphics[width=4cm]{images/basis_Q1_2D/N4}\\
{\captionfont Surface representation of the basis functions on the reference element.
{\color{gray} in images/basis\_Q1\_2D/ }}
\end{center}
The partial derivatives of these functions with respect to $r$ ans $s$ automatically follow:
\begin{mdframed}[backgroundcolor=blue!5]
\begin{align}
\frac{\partial \bN_1}{\partial r}(r,s)&= - 0.25(1-s) &
\frac{\partial \bN_1}{\partial s}(r,s)&= - 0.25(1-r) \nonumber\\
\frac{\partial \bN_2}{\partial r}(r,s)&= + 0.25(1-s) &
\frac{\partial \bN_2}{\partial s}(r,s)&= - 0.25(1+r) \nonumber\\
\frac{\partial \bN_3}{\partial r}(r,s)&= + 0.25(1+s) &
\frac{\partial \bN_3}{\partial s}(r,s)&= + 0.25(1+r) \nonumber\\
\frac{\partial \bN_4}{\partial r}(r,s)&= - 0.25(1+s) &
\frac{\partial \bN_4}{\partial s}(r,s)&= + 0.25(1-r) \nonumber
\end{align}
\end{mdframed}
Let us go back to Eq.~\eqref{bf01} and let us assume that the
function $v(r,s)=C$ so that $v_i=C$ for $i=1,2,3,4$.
It then follows that
\[
v^h(r,s) = \sum_{i=1}^4 \bN_i(r,s)\; v_i
=C \sum_{i=1}^4 \bN_i(r,s)
=C [
\bN_1(r,s)
+\bN_2(r,s)
+\bN_3(r,s)
+\bN_4(r,s)]=C
\]
This is a very important property: if the $v$ function used to
assign values at the vertices is constant, then
the value of $v^h$ {\it anywhere} in the element is exactly $C$.
If we now turn to the derivatives of $v$ with respect to $r$ and $s$:
\[
\frac{\partial {v}^h}{\partial r}(r,s)
= \sum_{i=1}^4 \frac{\partial \bN_i}{\partial r}(r,s)\; v_i
= C \sum_{i=1}^4 \frac{\partial \bN_i}{\partial r}(r,s)
= C \left[ - 0.25(1-s) + 0.25(1-s) + 0.25(1+s) - 0.25(1+s) \right] = 0
\]
\[
\frac{\partial v^h}{\partial s}(r,s)
= \sum_{i=1}^4 \frac{\partial \bN_i}{\partial s}(r,s)\; v_i
= C \sum_{i=1}^4 \frac{\partial \bN_i}{\partial s}(r,s)
= C \left[ - 0.25(1-r) - 0.25(1+r) + 0.25(1+r) + 0.25(1-r) \right] = 0
\]
We reassuringly find that the derivative of a constant field anywhere in the element is exactly zero.
If we now choose $v(r,s)=ar+bs$ with $a$ and $b$ two constant scalars, we find:
\begin{eqnarray}
v^h(r,s)
&=& \sum_{i=1}^4 \bN_i(r,s)\; v_i \nn\\
&=& \sum_{i=1}^4 \bN_i(r,s) (ar_i+bs_i) \nn\\
&=& a \sum_{i=1}^4 \bN_i(r,s) r_i + b \sum_{i=1}^4 \bN_i(r,s) s_i \nn\\
&=& a \left[
\frac14(1-r)(1-s)(-1)
+\frac14(1+r)(1-s)(+1)
+\frac14(1+r)(1+s)(+1)
+\frac14(1-r)(1+s)(-1) \right] \nonumber\\
&+& b
\left[
\frac14(1-r)(1-s)(-1)
+\frac14(1+r)(1-s)(-1)
+\frac14(1+r)(1+s)(+1)
+\frac14(1-r)(1+s)(+1) \right] \nonumber\\
&=& \frac{a}{4} \left[
-(1-r)(1-s)
+(1+r)(1-s)
+(1+r)(1+s)
-(1-r)(1+s) \right] \nonumber\\
&+& \frac{b}{4}
\left[
-(1-r)(1-s)
-(1+r)(1-s)
+(1+r)(1+s)
+(1-r)(1+s)
\right] \nonumber\\
&=& ar+bs
\end{eqnarray}
This set of bilinear basis functions is therefore capable of exactly representing a bilinear field.
The derivatives are:
\begin{eqnarray}
\frac{\partial v^h}{\partial r}(r,s)
&=& \sum_{i=1}^4 \frac{\partial \bN_i}{\partial r}(r,s)\; v_i \nn\\
&=& a \sum_{i=1}^4 \frac{\partial \bN_i}{\partial r}(r,s) r_i
+ b \sum_{i=1}^4 \frac{\partial \bN_i}{\partial r}(r,s) s_i \nn\\
&=& a \left[
- \frac14(1-s)(-1)
+ \frac14(1-s)(+1)
+ \frac14(1+s)(+1)
- \frac14(1+s)(-1)
\right] \nonumber\\
&+&b \left[
- \frac14(1-s)(-1)
+ \frac14(1-s)(-1)
+ \frac14(1+s)(+1)
- \frac14(1+s)(+1)
\right] \nonumber\\
&=& \frac{a}{4} \left[
(1-s)
+ (1-s)
+ (1+s)
+ (1+s)
\right] \nonumber\\
&+&\frac{b}{4} \left[
(1-s)
- (1-s)
+ (1+s)
- (1+s)
\right] \nonumber\\
&=& a
\end{eqnarray}
Here again, we find that the derivative of the bilinear field inside the element is exact:
$\frac{\partial v^h}{\partial r} = \frac{\partial v}{\partial r}$.
However, following the same methodology as above, one can easily prove
that this is no more true for polynomials of degree strictly higher than 1.
This fact has serious consequences: if the solution to the problem at hand is
for instance a parabola, the $Q_1$ basis functions cannot represent the solution properly,
but only by approximating the parabola in each element by a line. As we will see
later, $Q_2$ basis functions can remedy this problem by containing quadratic terms.
\begin{remark}
The $Q_1$ basis functions are first-order polynomials. We have seen that they can be used to compute
gradients. However they cannot be used to compute 2nd-order derivatives since their 2nd-order
derivative is identically zero.
\end{remark}
An identical approach to arrive at the basis functions is presented in
\textcite{eriz68} (1968).