Hi!
I am wondering about the boundary conditions for the EM waveguide example from section 34 in the FEniCS book.
For an electric wall one has the boundary condition that the tangential component
of the electric field is zero (normal cross E =0)
This is implemented as a Dirichlet condition for all components.
from dolfin import *
width, height = 1, 0.5
mesh = RectangleMesh(0, 0, width, height, 8, 4, "right")
transverse_order, axial_order = 2, 1
V_N = FunctionSpace(mesh, "Nedelec 1st kind H(curl)", transverse_order)
V_L = FunctionSpace(mesh, "Lagrange", axial_order)
combined_space = V_N * V_L
class ElectricWalls(SubDomain):
def inside(self, x, on_boundary):
return on_boundary
zero = Constant((0.0, 0.0, 0.0)) # a vector constant value
dirichlet_bc = DirichletBC(combined_space, zero, ElectricWalls())
Edit: I think everything is correct although I got confused by the notation.
Questions:
If I have a H(curl) finite element space as above:
1) Is it correct that
DirichletBC(combined_space, zero, ElectricWalls())
means that all dofs associated with the boundary is zero and not
that all components of the field are zero?
2) If I use a non-homogeneous boundary condition
DirichletBC(combined_space, Constant((1.0, 2.0, 3.0)), ElectricWalls())
does this mean that I only set the tangential component of the field and not the normal component?
This is related to the questions
http://fenicsproject.org/qa/2694/electromagnetic-waveguide-example-from-the-fenics-book?show=2694
and
https://answers.launchpad.net/dolfin/+question/149376