# Boundary Conditions of the Edge element

We are working on a three-dimensional low-frequency electromagnetic problem based on an A-phi formulation as follows.
We are using Nedlec elements for vector potentials A and P2 elements for scalar potentials phi. We would like to enforce the boundary conditions to \vec{\bf{n}} \times \vec{\bf{A}}= 0
We looked into some examples, but they are written as on(S, Ax=0, Ay=0, Az=0)
with which we are not sure with what we would like to.
Would you tell me how to enforce \vec{\bf{n}} \times \vec{\bf{A}}= 0?

cylinder_Gmsh_2D5.zip (66.2 KB)

real a = 1;
real h = 0.2;
real sig = 5.8e7;
real mu = 4pi1.e-7;

string meshFileName = â€śCylinder_Gmsh_2D5.mshâ€ť; //1,side 2,top 3,bottom

fespace Uh(Th, [Edge13d, P2]);
fespace Nh(Th, Edge13d);

Uh [Ax,Ay,Az, phi];
Uh [wx,wy,wz, psi];
Nh [Jx,Jy,Jz] = [0.0, 0.0, 1.0];

macro rot(Ax,Ay,Az) [dy(Az)-dz(Ay),dz(Ax)-dx(Az),dx(Ay)-dy(Ax)] // EOM;
macro div(Ax,Ay,Az) (dx(Ax)+dy(Ay)+dz(Az)) // EOM;

solve Prob([Ax,Ay,Az,phi],[wx,wy,wz,psi]) = int3d(Th)((1./mu)*rot(Ax,Ay,Az)'rot(wx,wy,wz) + grad(phi)'[wx,wy,wz] + [Ax,Ay,Az]'grad(psi)) - int3d(Th)([wx,wy,wz]'[Jx,Jy,Jz]) + on(2,3, Ax=0, Ay=0, Az=0) + on(2,3, phi=0);

int[int] orderOut = [1, 1, 1, 1];
savevtk(â€śA_vect.vtuâ€ť, Th, [Ax, Ay, Az], dataname=â€śA vectorâ€ť, order = orderOut);

Our question is when use use Edge13d, and use Dirichlet boundary conditions,
then we are enforcing {\bf \vec n} \times {\bf \vec A} = 0
If we say
on(2,3, Ax=0, Ay=0, Az=0)
it is {\bf \vec A} = 0 and it is not equivalent.

But the results seem to be equivalent.
Are there any way to express {\bf \vec n} \times {\bf \vec A} = 0 using
on(2,3,****)
statement?

I may be able to assist you with low-frequency electromagnetic problems, specifically those based on A-phi formulations, as it aligns with my research topic.

As far as I know: In case of edge elements the Dirichlet boundary condition on(2,3, Ax=0, Ay=0, Az=0) only applies to the tangential values, resulting in \vec n \times \vec A = 0. In this case, the syntax of on() is not intuitive.

1 Like

Rermak, on Nedelelc Finite element (Edge13d) the interpolation is

int1d(Edge) ( [Ax,Ay,Az]'*T)

where T is the tangent vector to the edges
so the dirichlet Boundaru condition on(2,3, Ax=0, Ay=0, Az=0) set only tangent component of the field (Ax,Ay,Az).

1 Like