0
$\begingroup$

I was reading a PDE tutorial on solving the nonlinear poisson equation. The author of the tutorial defines the problem and asserts the weak form, but does not provide the derivation. I tried my own derivation, but my derivation seems to have an extra term, so I must be missing a step or some insight. I was hoping that someone could tell me where the error is.

The problem is defined as: $$ - \nabla \cdot (q(u)\nabla u) = f , \quad \text{ in } \Omega $$ $$ u = u_D, \quad \text{ on } \partial \Omega $$

In this problem, the existence of the $q(u)$ function makes the problem nonlinear. We can assume that $q(u)$ is non-constant and the $u(x, y)$ is a function of $x,y$.

The weak form that is provided is:

$$ \int_\Omega (q(u) (\nabla u)^T \cdot \nabla v - f^Tv) dV = 0 $$

So the integral is over the volume, hence the $dV$.

I tried to derive this weak from by multiplying by the test function $v$ and integrating.

$$ -\int_\Omega \nabla \cdot (q(u)\nabla u) v dV = \int_\Omega f^T v dV $$

To simplify the divergence term on the left side I tried the product rule:

$$ \nabla \cdot (q(u)\nabla u) v = (\nabla q(u) \nabla u)v + q(u)\nabla^2 u v $$

The second term on right hand side will simplify to the usual $q(u)(\nabla u)^T \nabla v$ term, that we saw in the asserted solution above. However that first term $(\nabla q(u) \nabla u)v$ does not appear in the weak form. So I was wondering why that term seemed to disappear?

$\endgroup$
7
  • $\begingroup$ You need to integrate by parts. If you do this with the $\nabla \cdot ( q(u) \nabla u)$ then you immediately get the solution. Integration by parts with $q(u) v \nabla^2 u$ doesn’t give the answer because you get a derivative term in $q$ $\endgroup$
    – JackT
    Sep 15, 2023 at 5:18
  • $\begingroup$ @krishnab The weak form is meaningless unless you properly define the Sobolev space where you are searching the solution / where you are picking the test functions. $\endgroup$ Sep 15, 2023 at 8:38
  • $\begingroup$ @PierreCarre the notation from tutorial is a little confusing because the details are not fully explained. However, the authors indicate that the test function $v \in \hat{V}$, and the unknown $u \in V$. Further $V = \{v \in H^1(\Omega)| v = u_D \text{ on } \partial \Omega\}$, and $\hat{V} = \{v \in H^1(\Omega)| v = 0 \text{ on } \partial \Omega\}$. $\endgroup$
    – krishnab
    Sep 15, 2023 at 9:06
  • $\begingroup$ @JackT Thanks for the hint. Yeah, I was just trying a few different variations on integration by parts to get it to work. Good to know that my original approach was off, so you set me straight there. I will implement your suggestion and see if I can get it. $\endgroup$
    – krishnab
    Sep 15, 2023 at 9:08
  • $\begingroup$ @krishnab If may be worth testing fixed point methods, at least for getting an accurate initial guess to feed Newton's method. Starting from am initial guess $u^0$, that could be any extention of the boundary condition, solve for $u^{n+1}$ the linear problem $$\int_{\Omega} q(u^n) \nabla u^{n+1} \cdot \nabla v \,\,dV= \int_{\Omega} f v \,\,dV$$ $\endgroup$ Sep 15, 2023 at 9:22

1 Answer 1

0
$\begingroup$

Here is a solution that I came up with, based upon the suggestions in the comments. Please let me know if I made any errors.

The original problem is: $$ -\nabla \cdot (q(u)\nabla u) = f, \text{ in } \Omega \\ u = u_d, \text{ on } \partial \Omega $$

The usual approach is to multiply both sides by a test function $v \in V$ and integrate over the domain $\Omega$.

$$ -\int_\Omega \nabla \cdot (q(u)\nabla u )vdV = \int_\Omega fv dV $$

We can modify the divergence term on the left and apply the product rule.

$$ \nabla \cdot (q(u)\nabla uv) = (\nabla \cdot(q(u)\nabla u))v + q(u)\nabla u \nabla v $$

Next we rearrange the terms to match the left hand term in the original nonlinear poisson equation

$$ (\nabla \cdot(q(u)\nabla u))v = \nabla \cdot (q(u)\nabla uv) - q(u)\nabla u \nabla v $$

Notice that the term on the left is the same as the term on the left when we integrated and multiplied the original nonlinear poisson equation with the test function $v$. When we substitute these terms back into the original equation.

$$ -\int_\Omega \nabla \cdot (q(u)\nabla u )vdV = -\int_\Omega \nabla \cdot (q(u)\nabla uv) + \int_\Omega q(u)\nabla u \nabla v $$

Then we apply the Divergence theorem to the first term on the right hand side. Note that this will produce a boundary integral with a value of 0, because we have a Dirichlet condition over the boundary.

$$ -\int_\Omega \nabla \cdot (q(u)\nabla uv) = -\int_{\partial \Omega} q(u)\nabla uv \cdot \hat{n} ds = 0 $$

Note that $\hat{n}$ is the outward normal vector at the boundary. After removing this term from the equation above we are left with:

$$ -\int_\Omega \nabla \cdot (q(u)\nabla u )vdV = \int_\Omega q(u)\nabla u \nabla v = \int_\Omega fv dV $$

Finally by simplifying to residual form, this derivation produces the desired outcome.

$$ \int_\Omega q(u)\nabla u \nabla v - fv dV = 0 $$

Again, please let me know if I made any errors.

$\endgroup$
4
  • 1
    $\begingroup$ When applying the divergence theorem, you get the outer unit normal on the boundary, which you forgot. Additionally, why exactly does this boundary integral vanish? $u$ isn't supposed to be $0$ on the boundary nor does it normal derivative vanish. $\endgroup$
    – stange
    Sep 15, 2023 at 20:39
  • $\begingroup$ @stange yes, thanks for seeing that omission of the normal vector. I corrected that now. In terms of the boundary integral vanishing, it should be because we have defined the value of the function $u = u_D$ at the boundary, so a Dirichlet boundary condition. I believe for finite elements the value of the boundary integral has to be zero if we specify the value of the function on the boundary. Let me know if you need more explanation. The link here, jsdokken.com/dolfinx-tutorial/chapter3/… specifies that the test function is zero on the dirichlet boundary. $\endgroup$
    – krishnab
    Sep 15, 2023 at 21:10
  • 1
    $\begingroup$ Maybe the link specifies that the test function is supposed to be zero at the boundary, but you certainly didn't, as you wrote that $v\in V$. Unless suddenly $u_D = 0$, which is doubtful. And when looking for a weak formulation of a specific equation, you always want to make sure that the solution you're looking for, i.e. $u$ in this case, is a member of your space of test functions. Otherwise you cannot test your equation with $u$, which is important to obtain apriori energy bounds. $\endgroup$
    – stange
    Sep 15, 2023 at 21:46
  • $\begingroup$ @stange Certainly yes. I should indicate that $v=0$ for points on the boundary $\partial \Omega$. This seems to be a common finite element condition, so I left that out. However, it was certainly my omission. Thanks for the correction. $\endgroup$
    – krishnab
    Sep 15, 2023 at 22:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .