Closed cottrell closed 3 years ago
The boundary condition du/dn = 0, aka the Neumann condition, is implicit and automatic for this variational formulation.
The boundary condition du/dn = 0, aka the Neumann condition, is implicit and automatic for this variational formulation.
Yes, but is there an example of how to set non-zero Neumann conditions elsewhere? I have not found it yet.
Maybe the assumption is you always transform to zero Neumann so you never need to implement the boundary derivative conditions?
If you have arbitrary derivative conditions on the boundary, I can't remember if that is always a trivial task to simply have some polynomial term in the solution and then let the mesh handle the rest.
Ok, I think I remember that you can typically add some term that might or might not be in the null space of your differential operator. If not you carry some complexity into the forms.
is there an example of how to set non-zero Neumann conditions elsewhere?
Maybe the assumption is you always transform to zero Neumann so you never need to implement the boundary derivative conditions?
Not exactly. In the finite element method (in general, thie isn't specific to scikit-fem) one integrates the laplacian conduction term by parts (a.k.a. applies Green's second theorem). This results in a domain term and a boundary term. The domain term is something skfem.models.poisson.laplace
.
The boundary term involves the flux; if the boundary condition involves this flux, we call the boundary condition 'natural' or 'Neumann' and use it to eliminate the flux by expressing it in terms of the given Neumann data.
For the integration by parts, see, e. g. https://en.wikipedia.org/wiki/Finite_element_method#The_weak_form_of_P1.
a.k.a. applies Green's second theorem
A.k.a. https://en.wikipedia.org/wiki/Green%27s_identities#Green's_second_identity
The problem is stating that the the normal derivative of u on the curved boundaries is zero but I don't see that boundary condition being used anywhere explicitly in the code. Possible it is not needed or I am not understanding something.
https://github.com/kinnala/scikit-fem/blob/master/docs/examples/ex13.py#L64