I'm not sure I'm understanding your problem. For dipole like source you just have to create a normal meep.Source() which size is 0. The orientation of the source would be determined by the orientation of the E field of your choice.
As you said, if you place the dipole anywhere rather than the centre, you will not be simulating a dipole like source, but a ring. So, after placing the source at r=0, you remain with three options for the field orientation: * If you set the field component to be meep.Ez, then the field emission pattern will correspond to that of an actual ELECTRIC dipole-like source, which electric dipole is oriented along z. If instead you needed to simulate an electric dipole which dipole moment is oriented differently then the z direction, then this cannot be simulated in cylindrical coordinates because the emitted field would loose the radial symmetry (w.r.t. the geometry) required in this coordinate system. * If you choose meep.Ephi, then the field emission pattern will correspond to that of a MAGNETIC dipole-like source, which magnetic dipole is oriented along z. This has an emission pattern which is identical to the electric dipole, but with the electric field rotated 90degrees with respect to the previous case. * Instead, by choosing meep.Er as component of your source, I don't know if you can get anything at all. The problem is that the dipole doesn't emit in the direction of the dipole moment, hence no emission in the xy plane. But also in the z direction there cannot be any emission because, due to the rotational symmetry, the Er components would perfectly cancels out anywhere along the z axis. Therefore I don't know if this would produce some emission for angles outside the xy-plane and the z axis or if simply you get no emission at all. This said, are you sure you still need to use both Er and Ephi dephased by 90degrees? Cheers, Niccolò Il 09/11/20 14:33, Bogusz, Dominika P ha scritto: > > Hello there, > > > > I am trying to get a linear, dipole-like source in a circular cavity, > taking advantage of cylindrical coordinates. > > I am looking for the best way to do that and encountered two problems, > with the linearity of the source and positioning. > > First, I assumed that to get a linear point like source I need two > sources Er and Ephi 90 degrees out of phase, but simulating a quick, > 2D case of a source in free space and comparing emission patterns (Er, > Ephi, Ez) it doesn't look the case - the best way to do that seems to > be addition of m=+1 and m=-1 simulations with Er source only. While it > solves the problem for flux monitors (simply adding fluxes) I am not > sure if the LDOS and Harminv are affected in any way, would it be > enough to take results for only one simulation? > > Secondly, my source should ideally lie in the middle of the simulation > area, so r=0. From looking at spectrum from a broadband source in such > scenario, it looks completely wrong, with several steep peaks, not a > smooth Gaussian-like distribution. This problem disappears if the > source is placed a bit off the center, but that, as I assume, results > in a more ring-like source and the electrical field patterns are no > longer correct. I tried placing it in the center and giving it a > bigger size and got a combination of these two cases - a Gaussian like > shape with a few protruding peaks. I guess it is some effect from > having a source at the edge of simulation area, but is there any way > to get around it? > > Best wishes, > > > > Dominika > > > > > _______________________________________________ > meep-discuss mailing list > meep-discuss@ab-initio.mit.edu > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
_______________________________________________ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss