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

Maxwell's equation boundary conditions

+1 vote

Hi,

I'm considering non-homogeneous Dirichlet boundary conditions for Maxwell's equations. The form of the boundary condition is given by

n cross u = n cross u_b

where u_b is given. At the moment I am using the

V = FunctionSpace(mesh, "N1curl", 2)
bc = DirichletBC(v,u_b, boundary) 

but this does not seem to implement these boundary conditions correctly. Do you have any advise for me?

asked Jan 13, 2014 by mwathen FEniCS Novice (710 points)

2 Answers

0 votes

If you use the first order elements:

V = FunctionSpace(mesh, "N1curl", 1)

do those seem to work properly?

answered Jan 13, 2014 by Marie E. Rognes FEniCS User (5,380 points)

I remember having some unresolved problems with using higher order N1curl elements for Maxwell's equations, while everything worked for first order elements...

so maybe the problem is not with the boundary condition but with the higher order elements.

That doesn't seem to make a difference

Ok, could you please post a minimal, but running example clearly stating what you expect the result to be (and what it is)?

So you mean the below is right ?

n x u = n x u_b, where u_b is given. At the moment I am using the

V = FunctionSpace(mesh, "N1curl", 1)
bc = DirichletBC(v, u_b, boundary)

Thank for your help !!!

Dear fanronghong,

As for the original question, I would recommend you to post a complete minimal example if you think there is a bug that needs fixing.

0 votes

If it also doesn't work with first order elements,
the problem will probably be situated somewhere else in your code.

I suggest you post your full code (preferably a minimal example)...

answered Jan 15, 2014 by stevenvdk FEniCS User (1,590 points)
...