Neumann boundary condition in 2D #3417
-
Hi, Here, the Neumann BC are implemented at the outer edges ( The variational equation for the above set of equations are I tried implementing this in Firedrake, but it seems that the Neumann BC are not being implemented correctly. I changed the values of h1 to h4, but the final result seems unchanged which leads me to believe that the Neumann fluxes are being zero for some reason. I am attaching my code Here is how my linear and bilinear functional look like where u and v are the trial and test functions respectively. Any suggestions on how to implement Neumann BC in 2D? Thanks for the help. Arijit |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Your variational form that you wrote is the the correct one. Most likely you are not getting the boundary tags correctly created or read in. Easiest way to test this is to create a Dirichlet boundary condition of 1 on each boundary separately, then create a zero field and use bc.apply to set the boundary condition, and visualise the field. Then you can see if the tagging is correct. |
Beta Was this translation helpful? Give feedback.
-
many of your h values *are * zero |
Beta Was this translation helpful? Give feedback.
-
I think you want to use |
Beta Was this translation helpful? Give feedback.
I think you want to use
ds
instead ofdS
: the former represents the exterior facet integrations and the latter the interior.