How can we implement a nonlinear robin boundary condition?
I found a suggestion to the old question posted here called "How to write Neumann conditions with non-linear term of "u"?"
It means, we do not want to implement the typical right side of this kind of boundary condition r(u-s) but r(u^(n)-s).
The suggestion made by Jan Blechta was to make a fixed point iteration for n=2
u0 = Function(V)
a = inner(nabla_grad(u), nabla_grad(v))*dx + p*u0*u*v*ds(0)
u = Function(V)
until convergence:
u0.assign(u)
solve(a == L, u, bcs)
or a Newton method
u = Function(V)
F = inner(nabla_grad(u), nabla_grad(v))*dx + p*u*u*v*ds(0) \
- f*v*dx - g*v*ds(1) + p*q*v*ds(0)
J = derivative(F, u)
solve(F == 0, u, bcs, J)
in the first case there is no convergence after 10000 iterations and in the second it simply does not work.
Any suggestion?
thx in advance