What is the best approach to go about solving a PDE problem of the type

\begin{equation} k^3\Delta u - k(\mathbf{1}\cdot\nabla u) = 0\, ,\\ u=g\; \text{on}\; \Gamma_D\, ,\\ mean(u) = u_\text{mean} \end{equation}

where one wants to find for which positive constant scalar coefficient $k>0$ the mean of the solution $u$ fulfills a prescribed value $u_\text{mean}$?

  • 1
    $\begingroup$ I assume $k$ is a vector to be dimensionally correct for $k \nabla u$ and $k^3=|k|^3$, is the direction of $k$ known? Otherwise you have to few conditions. If so, you can add your condition $mean(u)-u_\text{mean}=0$ with a lagrange multiplier to your equation and solve the system for $|k|$ as free parameter. $\endgroup$
    – Bort
    Commented Nov 13, 2018 at 17:27
  • $\begingroup$ Ah no, k is just a constant scalar in this case. $\endgroup$
    – JacobP
    Commented Nov 14, 2018 at 3:00
  • $\begingroup$ if $k$ is a constant scalar, then the dimensions don't match up and writing $k^3\Delta u + k\nabla u$ doesn't make much mathematical sense... is there a unit vector field hiding somewhere in there i.e. do you mean to write $\mathbf{1} \cdot \nabla u$? $\endgroup$
    – GoHokies
    Commented Nov 14, 2018 at 14:45
  • $\begingroup$ Yes, that's right a unit vector for the second term, thanks. $\endgroup$
    – JacobP
    Commented Nov 16, 2018 at 11:07

2 Answers 2


I would recommend an adjoint method also but slightly different. Following is the general idea. Whether this approach is well posed for this problem is left as an excercise :-)

Solve this $$ \min_k J(k) = (1/2)[u_{mean} - mean(u)]^2 $$ subject to the pde as constraint. If you change $k$ to $k+k'$, $u$ changes to $u+u'$ and $J$ to $J+J'$. Find a linear PDE for $u'$ assuming changes are small, which should have following structure $$ L(u',k)=F(u,k) k' $$ and it will have $u'=0$ on boundary since you have a Dirichlet bc on $u$. Then you get $$ J' = -[u_{mean} - mean(u)] mean(u') + \int_\Omega v \cdot L(u',k) dx - \int_\Omega F(u,k) k' v dx $$ and we just added a zero term. Integrate by parts so all derivatives are on the adjoint variable $v$. Then you get an equation of the form $$ J' = - k' \int_\Omega F(u,k) v dx + \int_\Omega L^*(v,k)\cdot u' dx + \textrm{boundary terms} $$ Form adjoint pde $$ L^*(v,k)=0 $$ and choose bc for $v$ so that boundary terms in $J'$ vanish. Once you solve adjoint, you can update $k$ as $$ k' = \int_\Omega F(u,k) v dx $$ which ensures that $J$ will decrease.


With $$k^3\Delta u-k(1\cdot\nabla u)=0,$$ you can already remove 1 solution for $k$, $k=0$ which is not of interest for you. You are really looking at $$k^2\Delta u-(1\cdot\nabla u)=0.$$

Edit: The previous equations enforced for a given $k$ and $u_\text{mean}$ a solution on the field $u$ and its constraint force $\lambda$.

If you want to find $k$ for a given $u_\text{mean}$, it should be rephrased to an optimization under constraints: $$\min_{k>0} \frac{1}{2}||PDE(k,u)||^2+\frac{\lambda}{2}^2||u_\text{mean}-\text{mean}(u)||^2$$

Here $\lambda$ is a regularization parameter, basically how much weight you put on the constraint. In this case you end up with a similar equation:

$$k^2\Delta u-(1\cdot\nabla u)+\lambda(u_\text{mean}-\text{mean}(u))=0.$$ In this optimization problem you are no longer solving for $\lambda$ (this is input) but for $k$.

In case of optimization I suggest to look for the adjoint formulation of PDEs with constraints, e.g. the mathematical description on the dolfin adjoint page and its references.

  • $\begingroup$ Using this technique, how do you find the $k$ which naturally satisfies the condition $\text{mean}(u) = u_\text{mean}$? To me it is quite obvious that such $k$ exists. This technique basically adds an artificial force field $\lambda$ which causes the constraint $\text{mean}(u) = u_\text{mean}$ to hold but then the resulting $u$ does not satisfy the original equation anymore. $\endgroup$
    – knl
    Commented Nov 20, 2018 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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