形函数构造
构造单元1的一般近似函数 \(\overline{V(x)}^{(1)}\),由于该单元只有两个节点\(x_1\)和\(x_2\),我们选择包含两个参数\(\alpha_1\)和\(\alpha_2\)的近似方程
\[\overline{V(x)}^{(1)}=\alpha_1+\alpha_2\times x \]令试函数与\(V(x)\)在节点\(x_1\)和\(x_2\)处相等,可以得
\[\overline{V(x_1)}^{(1)}=\alpha_1+\alpha_2\times x_1=V_1\\\overline{V(x_2)}^{(1)}=\alpha_1+\alpha_2\times x_2=V_2 \]求解$\alpha_1 $ 和 $\alpha_2 $,可得
\[\left\{\begin{array}{l} \alpha_{1} \\ \alpha_{2} \end{array}\right\}=\frac{1}{x_{2}-x_{1}} \times\left[\begin{array}{cc} x_{2} & x_{1} \\ -1 & 1 \end{array}\right] \times\left\{\begin{array}{l} V_{1} \\ V_{2} \end{array}\right\} \]将\({\alpha}\)代入,试函数变成
\[\overline{V(x)}^{(1)}=\frac{1}{x_2-x_1}\times\begin{bmatrix}1&x\end{bmatrix}\times\begin{bmatrix}x_2&x_1\\-1&1\end{bmatrix}\times\begin{Bmatrix}V_1\\V_2\end{Bmatrix} \]整理可得
\[\overline{V(x)}^{(1)}=\left[\frac{x_2-x}{x_2-x_1}\quad\frac{-x_1+x}{x_2-x_1}\right]\times\left\{V_1\atop V_2\right\}=N_1(x)^{(1)}\times V_1+N_2(x)^{(1)}\times V_2 \]其中
\[N_{1}(x)^{(1)}=\frac{x_{2}-x}{x_{2}-x_{1}}\\N_{2}(x)^{(1)}=\frac{-x_{1}+x}{x_{2}-x_{1}} \]构造单元2到n-1
\[\begin{aligned}&\bullet\quad\text{单元 2:}\quad\overline{V(x)}^{(2)}=N_{1}(x)^{(2)}\times V_{2}+N_{2}(x)^{(2)}\times V_{3}\\&\bullet\quad\cdots\\&\bullet\quad\text{单元 }n-1:\quad\overline{V(x)}^{(n-1)}=N_1(x)^{(n-1)}\times V_{n-1}+N_2(x)^{(n-1)}\times V_n\end{aligned} \]对于每个单元,性函数N(x)具有相同的形式,只是坐标不同,对于单元n-1
\[N_1(x)^{(n-1)}=\frac{x_n-x}{x_n-x_{n-1}} \]在整个区域,可以得到近似函数相加
\[\overline{V}(x)=\sum_{e=1}^{n-1}\overline{V}^e(x) \]平面线性三角元
我们选择试函数
\[\overline{U}(x,y)=a+bx+cy \]\[\overline{U}(x,y)=\begin{bmatrix}1&x&y\end{bmatrix}\begin{Bmatrix}a\\b\\c\end{Bmatrix} \]令试函数与待求函数相等
\[\overline{U}(x_1,y_1)=a+bx_1+cy_1=F_1\\\overline{U}(x_2,y_2)=a+bx_2+cy_2=F_2\\\overline{U}(x_3,y_3)=a+bx_3+cy_3=F_3 \]写成矩阵形式
\[\begin{bmatrix}1&x_1&y_1\\1&x_2&y_2\\1&x_3&y_3\end{bmatrix}\begin{Bmatrix}a\\b\\c\end{Bmatrix}=\begin{Bmatrix}F_1\\F_2\\F_3\end{Bmatrix} \]如果上面的矩阵不奇异,也就是说三个节点不重合而且不共线,则方程可以解出a,b和c
\[\begin{Bmatrix}a\\b\\c\end{Bmatrix}=\begin{bmatrix}1&x_1&y_1\\1&x_2&y_2\\1&x_3&y_3\end{bmatrix}^{-1}\begin{Bmatrix}F_1\\F_2\\F_3\end{Bmatrix} \]上式可以写成
\[\overline{U}(x,y)=\begin{bmatrix}N_1(x,y)&N_2(x,y)&N_3(x,y)\end{bmatrix}\begin{Bmatrix}F_1\\F_2\\F_3\end{Bmatrix} \]因此插值函数可表示为
\[\begin{gathered} N_{1}(x,y) =\frac1{2A}((y_3-y_2)(x_2-x)-(x_3-x_2)(y_2-y)) \\ N_{2}(x,y) =\frac1{2A}((y_1-y_3)(x_3-x)-(x_1-x_3)(y_3-y)) \\ N_3(x,y) =\frac1{2A}((y_2-y_1)(x_1-x)-(x_2-x_1)(y_1-y)) \end{gathered} \]其中
\[A=\frac{1}{2}\det\begin{bmatrix}1&x_1&y_1\\1&x_2&y_2\\1&x_3&y_3\end{bmatrix} \]插值函数也可以表示为
\[N_{1}(x,y)=m_{11}+m_{12}x+m_{13}y\\N_{2}(x,y)=m_{21}+m_{22}x+m_{23}y\\N_{3}(x,y)=m_{31}+m_{32}x+m_{33}y \]其中
\[m_{11}=\frac{x_2y_3-x_3y_2}{2A}m_{12}=\frac{y_2-y_3}{2A}m_{13}=\frac{x_3-x_2}{2A}\\m_{21}=\frac{x_3y_1-x_1y_3}{2A}m_{22}=\frac{y_3-y_1}{2A}m_{23}=\frac{x_1-x_3}{2A}\\m_{31}=\frac{x_1y_2-x_2y_1}{2A}m_{32}=\frac{y_1-y_2}{2A}m_{33}=\frac{x_2-x_1}{2A} \]插值函数满足的条件
\[N_{i}(x_{j},y_{j})=\begin{cases}1,\quad i=j\\0,\quad i\neq j\end{cases}\\\text{在节点 1 处,}N_1(x_1,y_1)=1,\quad N_2(x_1,y_1)=0,\quad N_3(x_1,y_1)=0\\\text{在节点 2 处,}N_1(x_2,y_2)=0,\quad N_2(x_2,y_2)=1,\quad N_3(x_2,y_2)=0\\\text{在节点 3 处,}N_1(x_3,y_3)=0,\quad N_2(x_3,y_3)=0,\quad N_3(x_3,y_3)=1 \]在三角形内部
\[\sum_{i=1}^3 N_i(x,y)=1 \]等参元
试函数还可以在母单元上进行构建,然后使用几何变换\(\tau\)将其转换为子单元。几何变换用母单元的坐标来确定子单元的坐标(x,y)
\[\tau:\quad(\xi,\eta)\quad\longmapsto\quad(x,y)=\tau(\xi,\eta) \]为了定义几何变换,假设子单元是母单元在局部坐标系定义内的函数
\[x=\alpha_1+\alpha_2\xi+\alpha_3\eta \]上式可以写成矩阵形式
\[x=\begin{bmatrix}1&\xi,&\eta\end{bmatrix}\begin{bmatrix}\alpha_1\\\alpha_2\\\alpha_3\end{bmatrix} \]利用节点1,2,3处的节点值\(x_1,x_2,x_3\), 表示为节点解
\[\begin{aligned}&x_{1}=\alpha_{1}\\&x_{2}=\alpha_1+\alpha_2\\&x_{3}=\alpha_{1}+\alpha_{3}\end{aligned} \]写成矩阵形式
\[\begin{Bmatrix}x_1\\x_2\\x_3\end{Bmatrix}=\begin{bmatrix}1&0&0\\1&1&0\\1&0&1\end{bmatrix}\begin{Bmatrix}\alpha_1\\\alpha_2\\\alpha_3\end{Bmatrix} \]简写为
\[\{X\}=[A]\{\alpha\} \]通过求解可以得到参数\(\alpha_i\),矩阵的逆为
\[[A]^{-1}=\begin{bmatrix}1&0&0\\-1&1&0\\-1&0&1\end{bmatrix} \]因此参数\(\alpha_i\)为
\[\begin{Bmatrix}\alpha_1\\\alpha_2\\\alpha_3\end{Bmatrix}=\begin{bmatrix}1&0&0\\-1&1&0\\-1&0&1\end{bmatrix}\begin{Bmatrix}x_1\\x_2\\x_3\end{Bmatrix} \]将参数\(\alpha_i\)代入可得
\[x(\xi,\eta)=\begin{bmatrix}1&\xi,&\eta\end{bmatrix}\begin{bmatrix}1&0&0\\-1&1&0\\-1&0&1\end{bmatrix}\begin{Bmatrix}x_1\\x_2\\x_3\end{Bmatrix} \]整理可得
\[x(\xi,\eta)=\tau_1(\xi,\eta)x_1+\tau_2(\xi,\eta)x_2+\tau_3(\xi,\eta)x_3 \]而且
\[\begin{aligned}&\tau_{1}(\xi,\eta)=1-\xi-\eta\\&\tau_{2}(\xi,\eta)=\xi\\&\tau_{3}(\xi,\eta)=\eta\end{aligned} \]同理可以得到y的表达式
\[y(\xi,\eta)=\tau_1(\xi,\eta)y_1+\tau_2(\xi,\eta)y_2+\tau_3(\xi,\eta)y_3 \] 标签:begin,xi,end,函数,构造,Bmatrix,bmatrix,alpha From: https://www.cnblogs.com/redufa/p/18449718