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)
load “msh3”
load “Element_Mixte3d”
load “gmsh”
load “iovtk”
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
mesh3 Th = gmshload3(meshFileName);
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;
macro grad(phi) [dx(phi),dy(phi),dz(phi)] // 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);