Hello, dr.Steven and all meep users

 

I use meep for a short time and feel that meep is very powerful. 

This is also my first poster. I really hope you can help me.

Now I am doing some work about the 2d near-to-far transformation. 

But I am confused about two points. 

First, I want to use meep to get the near field data.

For a TM wave, I need to get scattered field (Ez, Hx and Hy) in near zone.

So I did the simulation twice. One has the object, one no object. In order to 
get the scattered fields, I use the fields (Ez, Hx, Hy) that I got with object 
subtract the fields without the object.

In fact, I just need the scattered E and H fields tangential to a virtual 
rectangle shape surface completely surrounding the object or scatterer.

Is this right?

Below is my code. Can I take the E and H at the same timestep 300 or I should 
take E at timestep 300 and get the average value of H at 299.5 and 300.5?  

 

Second question.

For my ntf code, I set the parameters like this:

Eps0=1

Mu0=1

Z (intrinsic impedance of free space) =1

K=1 (the wave vector of incident wave)

Omiga (angular frequency)=1

Wavelength=a=1 (also a=wavelength)

Wl=40 (resolution)

 

Then get the tangential E and H and calculate the current Jx, Jy and Mz

Integrate the current 

do i=iomin,iomax

!-------the lower boundary ---------

ctemp=cmplx(0.,(float(i)*cos(phi)+(jomin-0.5)*sin(phi))*rk)

ctemp=cexp(ctemp)

mx=mx+mx1(i)*ctemp

jz=jz+jz1(i)*ctemp

…………….

 

Finally, calculate the electric field in the far zone.

ctemp=cmplx(.0,-rk*r)

ctemp=cexp(ctemp)

Ez(dg)=0.5*(cmplx(.0,k)/(2*pi*r))**.5*ctemp*(-jz*z-mx*sin(phi)+my*cos(phi))

Ez(dg)=cabs(Ez(dg))

………………………………….

Are these parameters right?

Especially for the omiga, for my ntf code I used to set eps0, mu0… as the real 
value (8.85e-12…) and omiga=pi/wl, so now how should I set the omiga then it 
can match the data from meep? 

Is this procedure right?

If it is helpful, I can post my ntf code. 

Thanks a lot!

 

Lei

---------------------------------------------------------------------------------------------------

(set! geometry-lattice (make lattice (size 6 6 no-size)))

(set! eps-averaging? false)

(set-param! force-complex-fields? true)

(define-param pec? true)

(set! geometry

      (if pec?     

       (list (make block (center 0 0 0) (size 2 2 0) 

           (material (make perfect-metal))))

      (list (make block (center 0 0 0) (size 6 6 0) (material air)))))

 

(set! sources (list

               (make source

                 (src (make continuous-src (wavelength 1) (width 5)))

                 (component Ez) (size 0 6)

                 (center -1.9 0))))

(set! pml-layers (list (make pml (thickness 1.0))))

(set! resolution 40)

(run-until 300

         (at-end  

           (to-appended "down" (in-volume (volume (center 0 -1.75 0) (size 3.5 
0 0))  

           output-efield-z output-hfield-x output-hfield-y ))

           (to-appended "upper" (in-volume (volume (center 0 1.75 0) (size 3.5 
0 0))  

            output-efield-z output-hfield-x output-hfield-y))

           (to-appended "right" (in-volume (volume (center 1.75 0 0) (size 0 
3.5 0))  

           output-efield-z output-hfield-x output-hfield-y))

           (to-appended "zero" (in-volume (volume (center -1.8 0 0) (size 0 0 
0))  

           output-efield-z))

           (to-appended "left" (in-volume (volume (center -1.75 0 0) (size 0 
3.5 0))  

           output-efield-z output-hfield-x output-hfield-y))))

 

 

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

Reply via email to