dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22075
Re: [Question #149376]: Perfect conducting BCs for Nedelec Elements
Question #149376 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/149376
Status: Open => Answered
Evan Lezar proposed the following answer:
John,
Since the curl-conforming Nedelec basis functions are associated with
the tangential components of the field on the facets (faces or edges)
anyway, it is sufficient to set these to zero using a zero function.
Thus consider the following PyDolfin code:
# the function space
vector_space = FunctionSpace ( mesh, "Nedelec 1st kind H(curl)", 2 )
# define the subdomain on which the boundary condition must be applied
class PECWall ( SubDomain ):
def inside(self, x, on_boundary):
return on_boundary;
# create the boundary condition using the combined function space, a zero Expression and the PECWall sub-domain
electric_wall = DirichletBC ( nedelec_space, Expression ( ("0.0", "0.0") ) , PECWall() )
# apply the boundary condition to the assembled matrices:
electric_wall.apply ( S )
Here the outside boundary of the mesh is implemented as a perfect
electrical conductor, with a Dirichlet boundary condition created on
this subdomain (PECWall). The zero expression is used to zero the DOFs
associated with the boundary when the boundary condition is applied to
the assembled matrix S.
I have more complete examples available, so let me know if you need
these. I am however a little unsure of the more general boundary
condition that you talk about, but I assume that it can be handled in a
similar manner.
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.