0
$\begingroup$

I have two dimensional equation and I want to solve it using Finite Element Methods. $$ \nabla . (\alpha(x,y)\nabla u(x,y)) + \dfrac{\partial u(x,y)}{\partial x}+\dfrac{\partial u(x,y)}{\partial y}+u(x,y)=f(x,y)$$ $$\alpha(x,y)\dfrac{\partial u(x,y)}{\partial n}=g(x,y), for (x,y)\in \partial\Omega$$ To obtain its weak form, I multiplied the equation with a residual function $w$. And applied the vector identity shown below. $$\nabla.(b\vec{A})=\nabla b.\vec{A}+b\nabla . \vec{A}$$ One of the terms is come out as shown below. $$\int_{\partial\Omega} w\nabla g(x,y).\vec{n} dl $$ This term corresponds to a boundary condition. How should I derive the rest of the equation?

$\endgroup$
3
$\begingroup$

Dont expand the divergence term, apply integration by parts without doing this $$ \int_\Omega w \nabla\cdot(\alpha\nabla u) dx = - \int_\Omega \alpha \nabla u \cdot \nabla w dx + \int_{\partial\Omega} w \alpha \frac{\partial u}{\partial n}ds $$ In your notation, define a vector field $$ \vec{A} = \alpha \nabla u $$ and then do the integration by parts on $$ \int_\Omega w \nabla\cdot\vec{A} dx $$ Since $$ w \nabla\cdot\vec{A} = \nabla\cdot(w\vec{A}) - \vec{A} \cdot \nabla w $$ You get $$ \int_\Omega w \nabla\cdot\vec{A} dx = \int_{\partial\Omega} w \vec{A}\cdot\vec{n} ds - \int_\Omega \vec{A} \cdot \nabla w dx $$ which is the first equation above. Using your boundary condition, it becomes $$ \int_\Omega w \nabla\cdot(\alpha\nabla u) dx = - \int_\Omega \alpha \nabla u \cdot \nabla w dx + \int_{\partial\Omega} w g ds $$

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Shouldn't the first equation be $ \int_\Omega w \nabla\cdot(\alpha\nabla u) ds = - \int_\Omega \alpha \nabla u \cdot \nabla w ds + \int_{\partial\Omega} w \alpha \frac{\partial u}{\partial n}dl $ ? @cfdlab $\endgroup$ – Aldrich Taylor Apr 30 at 19:16
  • $\begingroup$ On the other hand, how did you find the $\int_{\partial\Omega} w \vec{A}\cdot\vec{n} ds$ term? @cfdlab $\endgroup$ – Aldrich Taylor Apr 30 at 22:36
  • $\begingroup$ It is divergence theorem en.wikipedia.org/wiki/Divergence_theorem. Replace $ds=dl$ to get your notation. I used $dx$ for domain integration and $ds$ for surface integration. $\endgroup$ – cfdlab May 1 at 3:21

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.