Neumann boundary condition

Hello,

This is my first post in FEniCS! Please let me know, if I have done something wrong, like I am not sure about the what category my question belongs to, so I selected “Uncategorized.” How to format latex like equation in FEniCS discussion group?

In Page 97, of the FEniCS tutorial, it is mentioned that the Neumann condition at y = 1 is $$-\frac{\partial u}{\partial n} = - \frac{\partial u}{\partial y} = 4y = 4$$. Should it not be -4y?

Kind regards

As the Neumann boundary is at y=1, the result should be -4. This can be verified by running the code snippet on page 97:

import sympy as sym
x, y = sym.symbols("x[0], x[1]")            # needed by UFL
u = 1 + x**2 + 2*y**2                       # exact solution
u_e = u                                     # exact solution
u_00 = u.subs(x, 0)                         # restrict to x = 0
u_01 = u.subs(x, 1)                         # restrict to x = 1
f = -sym.diff(u, x, 2) - sym.diff(u, y, 2)  # -Laplace(u)
f = sym.simplify(f)                         # simplify f
g = -sym.diff(u, y).subs(y, 1)
print(g)

1 Like