Solving a PDE with a non-linear constraint

So you are trying to add a quadratic penalty enforcing the second constraint

If that is the case, how are you actually adding the quadratic penalty to the energy minimization problem, as the usual way to formulate a penalty approach is to start with for instance the Dirichlet-energy

\min_{u} J = \min_{u} \int_\Omega \nabla u \cdot \nabla u~\mathrm{d}x - \int_\Omega f \cdot v ~ \mathrm{d}x

subject to

and add the quadratic penalty to this equation, i.e.

\min_{u} J + P =\min_{u} J + \frac{\alpha}{2}\int_\partial\Omega (u - g)^2~\mathrm{d}s

and then derive the optimality conditions (your residual) from this.
It is not super clear how you would do that in your case, and how you derived your system.

Additionally, your code is not reproducible, and one has to guess what spaces u, v, g, nu_u, nu_v are in.

1 Like