Dear Dr. Steven and meep users,
I'm a new meep user, and I'm trying to run my program after I defined a 
function and trying to get the integral of it.  But I'm having the following 
error:
ERROR: In procedure /:
ERROR: Wrong type argument in position 1: #(-0.05 -0.45 -0.05)
I'm not sure if I need to initial anything, I tried to look for solution but 
nothing worked.
also I'm not sure if the integral can be defined over an area (2-D) instead of 
volume (3-D).  
Please let me know what is wrong if you have any idea.  I really appreciate 
your help.  

here is my program:
(reset-meep)
;The dielectric parameters

(define-param feps 5.5)             ;fat permittivity,epsilon,at 900 MHz


(define-param fseg 3.493)           ;fat D-conductivity, segma, at 900 MHz

(define-param ro 916e-6)            ;Tissue density in Kg/cm3  

;the cell dimentions

(define-param fw 3)    ; fat thickness in cm 

(define-param dpml 1)  ; PML layer thickness
(define-param sx 8)    ; size of cell in x direction
(define-param sy 16)   ; size of cell in y direction

(init-fields)
(define (sar fseg ro ez)
    (* (/ fseg (* 0.5 ro))(+(sqr (ez))(* hz 0))))

(set! geometry-lattice (make lattice (size sx sy no-size)))


(set! geometry
   (list  
      (make block (center 0 0) (size infinity fw infinity) 
         (material (make dielectric (epsilon feps) (D-conductivity fseg))))))   
     

(set! sources (list
               (make source(src (make continuous-src
                        (wavelength 25.5)))
                 (component Ez)
                 (center 0 0) (size 0 3))))

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

(set! resolution 10)


(print "The integral of our sar function from (0,-1.5,0) to (0,1.5,0) is: "
       (integrate-field-function (list Ez Hz) sar (volume (size 0 3 0) (center 
0 0 0))) "\n")

(output-field-function "sar-function" (list Ez Hz) sar)


(define (my-sar-output) (output-field-function "sar-function" (list Ez Hz) sar))

(run-until 255 (at-every 1 my-sar-output))
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to