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

Electromagnetic waveguide boundary condition

+2 votes

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

asked Oct 18, 2014 by Stefan_Jakobsson FEniCS Novice (810 points)
edited Oct 19, 2014 by Stefan_Jakobsson

1 Answer

0 votes

The answer to both questions is yes.
You set the value of the edges of the Nédélec elements, which are tangential on the boundary. The same holds for the Lagrange elements here, since they account for the lateral field component (along propagation direction, if I'm not mistaken).

Well, I hope this answer finds you and might be of some use 1.5 years later ... ^^

answered May 13, 2016 by cweickhmann FEniCS Novice (550 points)
...