This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Source Term in Non-Linear Poisson Equation

0 votes

I am solving a nonlinear poisson equation of the form

$$-\nabla \cdot (\epsilon \nabla u) = (N - \rho*e^{(u-f)/c})$$

I am getting an unexpected results, and I'd like to know if I am defining the question properly. My question is, is the following the correct definition of the above problem?

u = Function(V)
v = TestFunction(V)
F = inner(eps*grad(u),grad(v)))*dx - (N - rho*exp((u-f)/c)) * v * dx

solve(F == 0, u, boundary_conditions, solver_parameters = \
{'newton_solver':{'relative_tolerance':1e6}})

Thanks

asked Nov 17, 2014 by sixtysymbols FEniCS User (2,280 points)
edited Nov 20, 2014 by sixtysymbols

1 Answer

+1 vote

Try:

F = inner(eps*grad(u),grad(v)))*dx - (N - rho*exp((u-f)/c)) * v * dx
answered Nov 18, 2014 by cevito FEniCS User (5,550 points)

Thanks for the reply.

Oops, that was actually a typo on my part. I did have the vdx at the end (updated my question accordingly).

...