Re: [Meep-discuss] Scaling - dielectric-epsilon, metal-copper, lattice/resolution and Symmetry

2014-11-25 Thread Filip Dominec
Dear Steve,
thanks for your long e-mail.

Ad 2. Now I can see that your simulation will not be overwhelmingly
big; if you set size to 320,000 microns and resolution to  0.01, the
pixels would be 100 microns and you would get 3200x3200 pixels
simulation, which may be acceptable if you have a powerful computer.
It could give sound results. Still it is inefficient in the sense that
you are using relatively high resolution for a very simple and smooth
structure. I wonder whether the 99 % of empty simulation volume could
not be replaced by some analytical model...

But, if it is so, why not get along completely without the 1e6
scaling and use the SI units instead? I suggest to define the size to
0.32 meter, so setting the resolution to 0.01*1e6 = 10,000) should
give you the same result, but in better readable units.

This also touches the problem of simulation time: if you use 1 meter
as size unit, and define MEEP to run for 9 internal time units, it is
quite clear the physical run time would be 9/c = 3.002-08 seconds =
30.02 nanoseconds. If the prescaling of 1e6 is applied, then it goes
more complicated and I tend to make errors in estimations in such
cases.


Ad 3. If a sheet of 50 micrometers is to be simulated, the resolution
has either to be increased at least 60 times, or some informed
approximation has to be applied. As I wrote, thin metallic sheets can
sometimes be well approximated by a thicker resistive metal slab, but
I do not have any clue as to what extent this can be applied to
Casimir force simulations.


Ad 4. I can recall I got big problems with symmetries that also
applied to my sources; as a result, I could never excite a plane wave
in such cases. But maybe it is only related to Python meep or maybe I
just did something wrong. I had to try everything from scratch as I
found no example of symmetries in Python-meep anywhere.

Filip


2014-11-24 20:57 GMT+01:00, Steve russell7...@roadrunner.com:
 Dear Filip,

 Thank you for your response.

 Item 1. I am using 2.3 because I didn't have anything else to use. I am
 happy to know that it is the right value to use. I am working a highly
 visible problem so my mistakes will be scrutinized. Of course I only
 expect to break the ice to encourage someone to use available funding
 and skills to work the problem in detail, but I also want my answers to
 be good enough to do that.

 Another aspect is that I know of an experimental effort to build and
 test this device with variations but as I wrote in an earlier message,
 there is no working theory which explains previous experimental results
 so all efforts to date have been cut and try type methods. (Of course
 there are rudiments of theory which are being used, 5 different ones
 publicly known, at last count.)

 Item 2. I will need to read your read on your web site to understand
 this. This is what I have done.

 I set lattice size to 32 x 32 and scaling 1:1e6 and used copper
 normalized to 1e-6 as my material. Then I set resolution to 1e-2. My
 idea was that my wavelength is about 0.15 meters (frequency ~2 GHz) so I
 need a minimum of 10 samples per cycle to characterize the driving
 frequency.  Anyway, 320,000 x 1e-6 gives 0.32 meters which is a little
 larger than my geometry. Then with my resolution of 0.01, I am sampling
 the lattice at only 3200 points. That should be more than enough, maybe
 100 times more than enough, but it runs. Slowly but it runs and for very
 short runs h5topng produces usable PNG files. I expect that to maintain
 for longer runs. I started a run last night which should finish about
 noon tomorrow. Simulating 9 seconds real time so run time is 9/1e-6 =
 9,000,000. That is confusing and I don't know why Meep was made to use
 Meep time as run time, but I guess that using simulated time would also
 be confusing as well as hiding Meep's operation under another layer of
 conversion.

 Item 3. Well, 50 um is the dimension of the material used and that I
 have coded into my geometry. If I can avoid approximations I want to do
 so for reasons I wrote about in Item 1. above. I will need to look into
 this in more detail but if the simulation currently running produces a
 viable resonate field image then that will be a consideration.

 Item 4. I really could benefit from symmetry. The ability cut a 36 hour
 run time by 3/4 or even 1/2 is significant, and even more so when doing
 what amounts to test runs. I wonder if it is simply a coding error that
 mismatches the coordinates between the lattice and the geometry. After
 my run completes tomorrow I will change the axis on my geometry to see
 if symmetry can be maintained that way. It is pretty easy to see the
 mismatch of the field phases. I may need to play with that, too.

 Item 5. Cylindrical coordinates - maybe an answer will come from the
 discussion group.

 Filip - If my current run is successful I want to calculate forces
 around the outside of the modeled resonate cavity. I am hopeful that
 Meep can detect forces 

[Meep-discuss] Making Symetry work -

2014-11-25 Thread Steve
Dear Steven and Meep users,

The geometry for my case is a tapered cone (axis (1 0 0)). It is easy to
see from the PNG file whether or not the geometry resulting from (set!
symmetries (list (make ... is symmetric or not.

I have found that the geometry resulting from  
 (make mirror-sym (direction Y )) is symmetric, also
 (make rotate2-sym (direction X )) gives symmetric geometry but,
 (make rotate4-sym (direction X )) displays only half the cone.

The fields must be considered. When I run with default phase the Ez
field appears to be correct for mirror-sym, but it is not correct with
rotate2-sym . This is expected as the default phase is +1. When I set
the phase switch (phase -1) or even (phase 1) Guile throws an error, 

ERROR: Wrong type (expecting exact integer): #f

With the rotate4-sym setting it is impossible to tell whether or not the
fields are symmetric from only half the geometry. 

You may note that the one case that works is mirror-sym with the
direction Y, when the Geometric axis of symmetry is X.

If anyone wants to play with symmetry, feel free to use my SCHEME test
file, attached.



(reset-meep)

(define-param c 299792458.); Speed of light
(define-param meple 1.0e-2); Characteristic length 0.15943 .024
   
; Signal parameters - SI units
(define-param freq  1880.4e+6)  ; Frequency (1880.4MHz claimed)
(define-param waveling (/ c freq))  ; Wavelength, ~0.159 m

; -- Set the lattice and coordinate system

(set! geometry-lattice (make lattice (size 20 20 no-size) ))
(set! pml-layers (list (make pml (thickness 1.0
(set! resolution 20)
(display signal parameters)(newline)
;  Signal Parameters in Meep units
(define mple_c 1); Speed of light = 1 in Meep 
(define mple_t (/ meple c))  ; Time
(define-param mple_f (* freq mple_t)); Source Frequency
(define-param mple_f (/ meple waveling)) ; Source Frequency

(newline)
(print   frequency = ) (display freq) (newline) 
(print   mple_f = ) (display  mple_f) (newline) 
(print   mple_t = ) (display  mple_t) (newline) 
(print   meple = ) (display meple) (newline)

(display set geometry) (newline)

(set! geometry  (list ; Start of Geometry
  ; A tapered tin can. 
(make cone (center 0 0 0) (radius 5) 
(radius2 2) (height 8.5) (material metal) (axis 1 0 0) )
(make cone (center 0 0 0) (radius 4.97) 
(radius2 1.97) (height 8.497) (material air) (axis 1 0 0) )
))
   
(display set source ) (newline)
 (set! sources (list (make source  ; **Continuous source***  
 (src (make continuous-src (frequency mple_f) (end-time 200)))
 (component Ez) (center 0 0 ) 
 )))  
 (display set symmetries) (newline)

(set! symmetries (list ;   Symmetry **
;*
  (make rotate4-sym (direction X )) ; (phase -1);defaults to +1  *
;   ERROR: Wrong type (expecting exact integer): #f

;*
)) ; *

 (display Continuous 1, RUNing Continuous source) (newline)

(run-until 10 ; *** RUN Continuous source 
(at-beginning output-epsilon)
   (at-end output-efield-z))
(newline) (display DONE) (newline)(newline)
(quit)

; h5topng ./sym-eps-00.00.h5 

; h5topng -S1 -Zc dkbluered -a yarg -A ./sym-eps-00.00.h5 ./sym-ez-10.00.h5


___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss