On Jul 31, 2008, at 3:28 AM, Jefferson Thomas wrote:
> Thanks. One more thing about adding the sources in case of  
> symmetries :
> If I have a box of sizes 4, 4, 4 with odd symmetry on X and I want  
> to add
> a source with Ex with
>       f.add_point_source(Ex, src, vec(1, 1, 1), 10); where 10 means
> the amplitude
> then as far as I understand I have to add a symmetric source with
>       f.add_point_source(Ex, src, vec(3, 1, 1), 10);

Right. Technically, that is an odd-symmetry source even though the two  
sources have the same sign, because of the way you mirror-flip a  
vector field.

> But if my symmetry was not on X but on Y axis then I think I should
> add a source with a negative amplitude :
>       f.add_point_source(Ex, src, vec(1, 3, 1), -10);

Right, that's the how you do an odd mirror flip of a vector field when  
the mirror plane is parallel to the field.

Basically, to mirror a vector field you just imagine an arrow being  
reflected in a mirror.  Then if it is odd, you flip the direction of  
the arrow after mirroring it.  If it is a pseudovector (e.g. magnetic  
field or magnetic current) then you have to multiply by an additional  
factor of -1.

> Furthermore, if I have both X and Y symmetries then
> beside adding previous two sources I should also add an additional
> source in :
>       f.add_point_source(Ex, src, vec(3, 3, 1), -10);
> Is it correct ?

Just to be clear, if you have both X and Y symmetries then you need to  
have four point sources, because your original source is doubled  
twice.  i.e. (for odd X and odd Y):

        f.add_point_source(Ex, src, vec(1, 1, 1), 10);
        f.add_point_source(Ex, src, vec(4-1, 1, 1), 10);
        f.add_point_source(Ex, src, vec(1, 4-1, 1), -10);
        f.add_point_source(Ex, src, vec(4-1, 4-1, 1), -10);

Alternatively, you could create a source that is odd in both X and Y  
by putting a single Hz source at the center:

        f.add_point_source(Hz, src, vec(2, 2, 1), 10);

(This is odd in X and Y because of the extra factor of -1 for  
pseudivectors mentioned above.  Equivalently, you can imagine an Hz  
source, a magnetic dipole, as corresponding to an infinitesimal  
electric current loop in the plane perpendicular to Hz -- if you think  
about the directions of the electric fields in a current loop, you  
will see that the fields are odd in both X and Y.)

Note also that when you define your volume v, you can call  
v.center_origin() to put the (0,0,0) origin at the center of the  
volume.  This may make it a bit easier to think about the symmetry.

Steven

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to