I'm trying to solve $ \begin{cases} -u''=f \\ u(0)=0 \\ u(1)= \alpha \end{cases} $ with FEM using reference elements and local coordinates.

So we have the global matrix $K_{ij}=\int_\Omega N_i'(x) N_j'(x)$.

Computing each local matrix for a 2noded element, I have $K^e(\xi)=\begin{pmatrix} 1/2 & -1/2 \\ -1/2 & 1/2 \end{pmatrix}$

To compute its global equivalent, I use the substitution rule $ \int_{\phi(a)=-1}^{\phi(b)=1} f(\xi)d\xi = \int_a^b f(\phi(x)) \phi'(x) dx $ with $\xi=\phi(x)=\frac{2}{h}(x-x_c)$ and $\phi'(x)=\frac{2}{h}$.

So basically I have $K^e=K^g\frac{2}{h}$ so $K^g=K^e\frac{h}{2}$. Here this result is wrong, and I don't know where I missed up. I'm supposed to have $K^g=K^e\frac{2}{h}$

Thanks :)


1 Answer 1


On $[x_i, x_{i+1}]$, you can write \begin{equation} N_i(x) = \frac{x_{i+1}-x}{h} = 1 - \xi = \phi_i(\xi) \quad \mbox{where } \; \xi = \frac{x-x_i}{h} \end{equation} So the derivatives satisfy \begin{equation} \frac{dN_i}{dx}(x) = - \frac{1}{h} = \frac{d\phi_i}{d\xi}\left(\xi (x) \right) \frac{d\xi}{dx}(x) = (-1) \left( \frac{1}{h} \right) \end{equation} So the integral becomes \begin{equation} \int_{x_i}^{x_i+h} N_i'(x) N_i'(x) dx = \int_{x_i}^{x_i+h} \left( - \frac{1}{h} \right) \left( - \frac{1}{h} \right) dx = \frac{1}{h} \end{equation} If we use the change of variables, we have \begin{multline} \int_{x_i}^{x_i+h} N_i'(x) N_i'(x) dx = \int_{x_i}^{x_i+h} \left( \frac{d\phi_i}{d\xi}\left(\xi (x) \right) \frac{d\xi}{dx}(x) \right)^2 dx = \int_{0}^{h} \left( \frac{d\phi_i}{d\xi}\left( \xi \right) \frac{d\xi}{dx}( \xi ) \right)^2 \left( h d\xi \right) \\ = \int_{0}^{1} \left[ \left( -1 \right) \left( \frac{1}{h} \right) \right]^2 \left( h d\xi \right) = \frac{1}{h} \end{multline}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.