Estimation of parameters in a PDE using Dolphin-Adjoint

Hi, I am trying to estimate some constant parameters of a parabolic PDE but I did not find any related work. I follow the examples available in the Dolfin-adjoint web site but I only can estimate parameters that are linear in the equation. For example, if the parameter divides a term in the PDE then the algorithm does not converge. I appreciate your help and I can post more information about the code or the problem if needed.

Carlos.

Hi,
You would need to post a minimal working example, following the guidelines of: Read before posting: How do I get my question answered?.
If you cannot make a working code, then formulate your problem mathematically using latex syntax
\min_m J(u(m),m) such that
F(u(m),m)=0

Thanks for your answer!

The problem is the following:

\begin{aligned} \min_{\lambda} \quad & \sum_{i=1}^{N}{(u(x) -\hat{u}(x))^2}\\ \textrm{s.t.} \quad &\mathcal{F}(x_1, ..., x_j, u, \frac{\partial u}{\partial x_1},...,\frac{\partial u}{\partial x_j},...,\frac{\partial^2 u}{\partial x_1 \partial x_j} , \lambda ) = 0. \end{aligned}

\hat{u}(x) is pseudo experimental data and I want to estimate a set of parameters \lambda that define the PDE.

The parabolic PDE of my problem is

\frac{\partial \varphi }{\partial t }=\Biggl( \frac{\lambda_1 \lambda_3}{\lambda_2}\Biggr)\frac{\partial }{\partial x }\Biggl( \frac{\partial\varphi }{\partial x } \Biggr)+\Biggl( \frac{E^{*}}{\lambda_2}\Biggr) (1-\varphi)-\Biggl( \frac{\lambda_1}{\lambda_2 \lambda_3 }\Biggr)\varphi

I want to estimate \lambda_1 , \lambda_2, \lambda_3

In dolfin adjoint, you can have any nonlinear parameter in your variational formulation (just try it with a simple source control). Then you can test this by replacing f*v*dx with
inner(f,f)*v*dx, where f is your control variable in http://www.dolfin-adjoint.org/en/latest/documentation/poisson-mother/poisson-mother.html

I followed this example : http://www.dolfin-adjoint.org/en/latest/documentation/time-dependent-wave/time-dependent-wave.html and I was able to implement the identification but not directly as the equations is defined. I had to used the following equation instead:

\frac{\partial \varphi }{\partial t }=\lambda_1^*\frac{\partial }{\partial x }\Bigl( \frac{\partial\varphi }{\partial x } \Bigr)+\lambda_2^* (1-\varphi)-\lambda_3^*\varphi
where, \lambda_1^* = \frac{\lambda_1\lambda_3}{\lambda_2 } , \lambda_2^* = \frac{E^*}{\lambda_2 }, \lambda_3^* = \frac{\lambda_1}{\lambda_3\lambda_2}.

This is my code: https://drive.google.com/file/d/13RQwfdlJpsPCP3ISr_Q80zzUvYqAjHix/view?usp=sharing

I do not have access to the code. But have you Gotten i to any particular issues? Are there any error messages?

I did not have problems with the code. My question was more related with why the algorithm estimates the parameters so well when I define the PDE in this way:

\frac{\partial \varphi }{\partial t }=\lambda_1^*\frac{\partial }{\partial x }\Bigl( \frac{\partial\varphi }{\partial x } \Bigr)+\lambda_2^* (1-\varphi)-\lambda_3^*\varphi
where, \lambda_1^* = \frac{\lambda_1\lambda_3}{\lambda_2 } , \lambda_2^* = \frac{E^*}{\lambda_2 }, \lambda_3^* = \frac{\lambda_1}{\lambda_3\lambda_2}.

But it does not converge when I use this:

\frac{\partial \varphi }{\partial t }=\Biggl( \frac{\lambda_1 \lambda_3}{\lambda_2}\Biggr)\frac{\partial }{\partial x }\Biggl( \frac{\partial\varphi }{\partial x } \Biggr)+\Biggl( \frac{E^{*}}{\lambda_2}\Biggr) (1-\varphi)-\Biggl( \frac{\lambda_1}{\lambda_2 \lambda_3 }\Biggr)\varphi

I know that technically seems the same, but I want to compare the algorithm in FEniCS with another method and it would be interesting to know if this is because of my code (I should do something in the middle) or is that FEniCS-Adjoint has this limitation. I also know from the examples of the web page that the solutions for problems with non-linear sources has been successful, but in my case the terms that I want to estimate are not sources and affect directly the derivatives so I wonder if that is relevant.

Thanks for your help!

Are you using the same i itial guess in both situations?