Settings ports on Hcurl fields

29 views
Skip to first unread message

Gadi Lahav

unread,
Dec 15, 2024, 4:27:42 AM12/15/24
to sparselizardforum
Hello again

I am trying to set a port in a full 3D EM simulation.
The fields are defined as

E = field("hcurl", [2,3])

E_re = E.harmonic(2)

E_im = E.harmonic(3);


(I think) the primal and dual parts are E and J. So I defined two ports


Ep = port()

Jp = port()


But the fact of the matter is I want to set them only in the z direction. And this is illegal in Sparselizard:


E_re.compz().setport(feed,Ep,Jp)

As it results in this:

RuntimeError: Error in 'rawfield' object: cannot get a component for vector fields with no subfields (e.g. hcurl)

I am not sure this how to do this, of course. I also added the relevant part to the integral

# Include excitation part of the integral

maxwell += integral(feed,-(1/C0)*sigma*dt(dof(E))*tf(E))


Any advice? 
Reply all
Reply to author
Forward
0 new messages