Defining tangential boundary functions for Nedelec 1 curl basis

Asked by Renier Marchand

Hi,

I am trying to define a boundary condition for N1curl basis functions in three dimensions. This boundary condition is defined as tangential to the boundary edge and only defined on the exterior boundary e.g. BC = n x F, that is -- BC = normal cross F

If I define the expression for BC using a N1curl FunctionSpace the facet integration is incorrect because the function is projected onto N1curl elements, see https://answers.launchpad.net/dolfin/+question/214866 and invalid bug https://bugs.launchpad.net/bugs/1083092 this cause normal components to be present on the boundary because BC = n x F is evaluated away from the boundary.

It is also not possible to create a BoundaryMesh from my mesh and use this to generate a N1curl FunctionSpace as this gives

m = D.UnitCube(1,1,1)
bm = D.BoundaryMesh(m)
fs = D.FunctionSpace(bm, "N1curl", 1)

*** -------------------------------------------------------------------------
*** Error: Unable to create mapping of degrees of freedom.
*** Reason: Geometric dimension of the UFC dofmap and the mesh do not match.
*** Where: This error was encountered inside DofMap.cpp.
*** -------------------------------------------------------------------------

and I don't think this is the correct space to use in any case.

I can also not restrict the N1curl FunctionSpace to only facets on the original mesh as this is not supported!

Is there some way to implement a tangential boundary condition in this manner?

Regards

Renier

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chris Tiee (choni0281) said :
#1

I'm also majorly interested in getting surface finite elements and elements for differential forms and electromagnetism to work. Count me in! If you really need some interpolated function object defined on the boundary, I'm not sure how to help, but if you type in the tangential boundary condition as an Expression object, (cross(F,n) ==0 something like that, where F is an actual algebraic expression). That's my next big issue I'm trying to learn in vector finite elements (I managed to get away with no boundary conditions by reformulating things in which the conditions are natural, which is possible and interesting in many cases!), so I'll definitely get back here with any findings.

Revision history for this message
Marie Rognes (meg-simula) said :
#2

The edge/face degrees of freedom for the Nedelec elements include tangential degrees of freedom natively.
How to apply these should be very similar to how to apply strong boundary conditions for H(div) elements,
please read the documentation for the Mixed Poisson demo carefully (and essentially replace normal with tangent.)

You need to provide a vector field g such that you can enforce L(u) = L(g), where L is the degree of freedom,
and u is the solution you want to enforce this constraint on.

So, for instance to ensure that tangential component is zero everywhere, do:

n = 4
mesh = UnitCubeMesh(n, n, n)
V = FunctionSpace(mesh, "N1curl", 1)
v = Function(V)
v.vector()[:] = 1.0
bc = DirichletBC(V, (0.0, 0.0, 0.0), "on_boundary")
bc.apply(v.vector())
plot(v, interactive=True)

If you want something else, say v \cross n = f, you need to construct a g such that g \cross n = f first.

For the record, all of the supported L^2, H(div), H(curl) and H^1 elements should work. Finite elements on
surfaces is currently work in progress, but I don't think you should need to define any function spaces on the
boundary only in this case.

Revision history for this message
Renier Marchand (renierm) said :
#3

Marie,

Firstly, thank you for your thorough response.

I see now that the question I have asked is not quite clear. The actual boundary condition that I am trying to enforce is a natural boundary condition, namely,

n x curl(u) = F

where u is in the solution function space N1curl. I have previously tried to project F (which should only have tangential components on the boundary!) onto N1curl , but this resulted in the incorrect introduction of normal components as I realised in the previously mentioned bug. This is also why I am convinced that a function space is required on the boundary for a correct surface integral to be performed.

This is where the confusion started when I started asking about tangential boundary conditions!

Revision history for this message
Marie Rognes (meg-simula) said :
#4

Ok, so you want to replace n x curl(u) by F in your forms (whatever they are) somewhere.

My first suggestion would be to just use F. Or, if you really want to project, I would think
that projection into DG would be more natural for F (I don't see why F should have
as much continuity as u.)

In your previous question, you asked about integration over facets seeming to happen
in the interior of the domain, you did not say anything about spurious normal components.

Note that integration over exterior facets only involve points on the exterior facets,
so it does not matter what the function is in the interior as long as it has
the right values on the boundary.

Can you help with this problem?

Provide an answer of your own, or ask Renier Marchand for more information if necessary.

To post a message you must log in.