Re: [Meep-discuss] meep-discuss Digest, Vol 37, Issue 3
Hi Nathan, I had a similar problem when simulating real metals - it turns out that Meep will not accept negative permittivities without blowing up. You have to sneak up on the negative permittivity by using the polarizability feature of materials (see http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial/Material_dispersion) . If you set the infinite permittivity to 1 you can create the negative part using the Drude model (see Skinner et al., Appl. Optics Vol. 45, No. 9, p 1943, 2006). Another member of the mailing list helped me out with this. Regards, Ian On 5 Mar 2009, at 17:00, meep-discuss-requ...@ab-initio.mit.edu wrote: Send meep-discuss mailing list submissions to meep-discuss@ab-initio.mit.edu To subscribe or unsubscribe via the World Wide Web, visit http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss or, via email, send a message with subject or body 'help' to meep-discuss-requ...@ab-initio.mit.edu You can reach the person managing the list at meep-discuss-ow...@ab-initio.mit.edu When replying, please edit your Subject line so it is more specific than Re: Contents of meep-discuss digest... Today's Topics: 1. meep installation problem (guile related) (Hua Bao) 2. Complex field in meep (adrian) 3. meep initial field (Michal Martin?) 4. regarding single pulse source (prabhat behere) 5. Unstable simulation with evanescent fields in active medium (Nathan) -- Message: 1 Date: Wed, 04 Mar 2009 22:20:42 -0500 From: Hua Bao h...@purdue.edu Subject: [Meep-discuss] meep installation problem (guile related) To: meep-discuss@ab-initio.mit.edu Message-ID: 49af450a.9070...@purdue.edu Content-Type: text/plain; charset=ISO-8859-1; format=flowed Dear All, I am a new user of meep. I was trying to build up a meep executable but it shows error at the configure step. checking for guile-config... no checking for readline in -lreadline... no checking for dlopen in -ldl... yes checking for scm_lt_dlinit in -lguile-ltdl... no checking for dlopen in -lltdl... no checking for gh_eval_str in -lguile... no configure: error: linking to guile failed The linux cluster (amd64) has guile installed. There is no problem to run guile --version. Also, there is a libguile.so under /usr/lib64. /usr/lib64/libguile-srfi-srfi-1-v-3.so /usr/lib64/libguile-srfi-srfi-1-v-3.so.3 /usr/lib64/libguile-srfi-srfi-1-v-3.so.3.0.0 /usr/lib64/libguile-srfi-srfi-13-14-v-3.so /usr/lib64/libguile-srfi-srfi-13-14-v-3.so.3 /usr/lib64/libguile-srfi-srfi-13-14-v-3.so.3.0.0 /usr/lib64/libguile-srfi-srfi-4-v-3.so /usr/lib64/libguile-srfi-srfi-4-v-3.so.3 /usr/lib64/libguile-srfi-srfi-4-v-3.so.3.0.0 /usr/lib64/libguile-srfi-srfi-60-v-2.so /usr/lib64/libguile-srfi-srfi-60-v-2.so.2 /usr/lib64/libguile-srfi-srfi-60-v-2.so.2.0.0 /usr/lib64/libguile.so.17 /usr/lib64/libguile.so.17.0.0 /usr/lib64/libguilereadline-v-17.so /usr/lib64/libguilereadline-v-17.so.17 /usr/lib64/libguilereadline-v-17.so.17.0.0 ** I tried setenv LDFLAGS -L/usr/lib64 It is still not working. Also, it can not find lapack and blas on the cluster, either. And I am very sure they are appropriately installed. Can anyone give me some suggestions on this problem? Thanks, Hua -- Message: 2 Date: Thu, 5 Mar 2009 13:12:48 +0800 (CST) From: adrian hiaquar...@yahoo.com.tw Subject: [Meep-discuss] Complex field in meep To: meep-discuss@ab-initio.mit.edu Message-ID: 825480.96270...@web73705.mail.tp2.yahoo.com Content-Type: text/plain; charset=utf-8 ? Hi Meep users and Steven: ? ? I know this question has been discussed but I can't find the answer to previous poster. ? ? My question is: ??? 1. what is the definition of complex field in FDTD. Is it just E0*exp(j(wt - kr)) and the real field and imaginary field correspond to real part and imaginary part, respectively? ? If so, if we set force-complex-fields? false, then the real field we normally got is E0 times cos(wt - kr)? ? ? ? I try to reach Complex field in meep? but it requires password. so I can't find the definition of complex fields in meep. The purpose for getting complex field is to get the far field patterns from the near field patterns calculated by meep Thanks in advanced Adrian ?? __ ?Yahoo!??2.0? http://tw.mg0.mail.yahoo.com/dc/landing -- next part -- An HTML attachment was scrubbed... URL: http://ab-initio.mit.edu/pipermail/meep-discuss/attachments/20090305/9896d4d6/attachment.html -- Message: 3 Date: Thu, 5 Mar 2009 08:33:59 +0100 From: Michal Martin? cmelak9...@centrum.cz Subject: [Meep-discuss] meep initial field To: meep-discuss@ab-initio.mit.edu Message-ID: 01c99d64$bf8dee10$6f01a...@michalp4
[Meep-discuss] Transmissivity of a thin metal film
Hello all, I am attempting to use Meep to model the transmissivity of a thin metal (Au in fact) film in a thin bandwidth. As such I have defined a simple 1D simulation with a Gaussian pulse source with a small bandwidth, and defined the metal through the frequency independent conductivity term (using eps = -10 + 1j from Appl. Opt. 37(22) 1998 pp. 5271-5283). However, I seem to be running into instability problems with the fields quickly blowing up even for massive resolutions ( 1000). I have read in numerous posts on this lists of similar behaviour and wondered if anyone had a working solution for real metals in a narrow bandwidth (or broad bandwidth for that matter)? As an associated issue I noticed something odd (to me at least) after an h5dump of the epsilon data. The following is a snippet from the area around the metal: (4982): 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2.2, (5000): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, (5012): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, (5024): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, (5036): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, (5048): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, (5060): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, (5072): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, (5084): -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, (5096): -10, -10, -10, -10, 2.2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, I was wondering why, even with eps-averaging? set to off (and meep built with simple averaging to off: line 236 of anisotropic_averaging.cpp set to 0) I am still getting some sort of averaging. Also it seems to be averaging up to abs(eps) rather than the negative value? If anyone can shed any light on any of this I would be grateful. My ctl file is pasted below for reference. Thanks very much. Ian (set! eps-averaging? false) (define-param sz 100) ; size of cell in z direction (define-param fcen 1.49) ; centre frequency (define-param w 10) ; pulse width (1/e points?) (define-param df (/ 1 w)) ; frequency width (define-param dpml 1.0) ; pml layer thickness (define-param res 100) (define dx (/ 1 res)) ;(define-param hmetmult 1) ; cell multiplier (define-param hmetal 0.01) ; width of metal, d2 in doc (define-param hglass 4.0) ; width of glass, d1 in doc (define-param er1 -10.0) ; real part of metal refractive index (define-param er2 1.0) ; imaginary part of metal refractive index (define-param metal? true) (define-param glass? false) ;define custom stop function (define (stop-when-energy-decayed dT box decay-level) (if (null? fields) (init-fields)) (let ((T0 (meep-time))) (lambda () (begin (if (= (meep-time) (+ T0 dT)) false ; don't stop yet (let ((cur-energy 0)) (set! T0 (meep-time)) (set! cur-energy (field-energy-in-box box)) (print field energy at t= (meep-time): cur-energy \n) (= cur-energy decay-level))) (define (print-field-energy) (print field-energy: (field-energy-in-box (volume (center 0 0 0) (size 0 0 sz))) \n)) (set-param! dimensions 1) (set! geometry-lattice (make lattice (size no-size no-size sz))) (set! pml-layers (list (make pml (thickness dpml (set-param! resolution res) (set! geometry (if metal? (if glass? (list (make block (center 0 0 (- (/ hglass 2))) (size infinity infinity hglass) (material (make medium (index 1.5 (make block (center 0 0 (/ hmetal 2)) (size infinity infinity hmetal) (material (make medium (epsilon er1) (D-conductivity (/ (* 2 pi fcen er2) er1)) (list (make block (center 0 0 (/ hmetal 2)) (size infinity infinity hmetal) (material (make medium (epsilon er1) (D-conductivity (/ (* 2 pi fcen er2) er1))) (list (make block (center 0 0 0) (size infinity infinity infinity) (material air) (set! sources (list (make source (src (make gaussian-src (frequency fcen) (width w))) (component Ex) (center 0 0 (+ (- (/ sz 2))
[Meep-discuss] [Meep discuss] Get the maximum value and another question
Hi, 1) How can I get the maximum value of E-field of CW source I guess the easiest way is to output efield-X to an hdf5 file and then import it into Matlab (using h5read) or Python (using the 'tables' and 'scipy' modules for example) and do max(array) (in Matlab) where array is the name you gave the data on import. Alternatively, make a definition to call on each time step in Scheme which does the same thing during your simulation (see http://ab-initio.mit.edu/wiki/index.php/Meep_Reference#Writing_your_own_step_functions) . This might be simpler in the long run. Check out the Meep reference though as there might be something that already does this that I have missed. 2) When I run the time step to 2000, I only want to get the output of 1800-2000. How to deal with it? This is actually covered in the Meep tutorial in the Modes of a Ring Resonator example (http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial#Modes_of_a_ring_resonator ). You just need two run-until loops, e.g: (run-until time1) (run-until time2 (at-every blah blah blah...output-efield-X)) where time1 and time2 are 1800 and 200 iterations in your time units which is determined by your resolution and characteristic lengthscale (if your resolution is 20 say 1 iteration is 0.025 time units, so time1 would be 45). Another option is to enclose your step function in the (after- time ... ) enclosure (documented here: http://ab-initio.mit.edu/wiki/index.php/Meep_Reference#Controlling_when_a_step_function_executes) . Both methods will give you the same thing I believe. Regards, Ian Thanks! -- next part -- An HTML attachment was scrubbed... URL: http://ab-initio.mit.edu/pipermail/meep-discuss/attachments/20081029/40a17c01/attachment-0001.htm -- ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss End of meep-discuss Digest, Vol 32, Issue 19 --- Research PhD Student Photonics Group Dept. of Electrical Electrical Engineering University of Bristol Rm 2.11, Queen's Building University Walk Bristol BS8 1TR email: [EMAIL PROTECTED] ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] meep-discuss Digest, Vol 32, Issue 7
This is covered in the reference page somewhere, but just add: (if (null? fields) (init-fields)) before you call magnetic-energy-in-box in your definition. Ian On 14 Oct 2008, at 17:00, [EMAIL PROTECTED] wrote: -- Message: 1 Date: Tue, 14 Oct 2008 00:21:11 -0400 From: [EMAIL PROTECTED] Subject: [Meep-discuss] error of magnetic-energy-in-box To: meep-discuss@ab-initio.mit.edu Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=EUC-KR Dear Steven G. Johnson and meep users, I want to record total magnetic energy and fourier transform it to see photonic mode in spectral range. However, I failed the calculation. Error message is ERROR: init-fields is required before using magnetic-energy-in-box Could you help me? Jin-Kyu Yang --- (define (print-magnetic-energy) (print Meng: (magnetic-energy-in-box (volume (center 0 0) (size 5 5 infinity))) \n)) (run-until Deadtime (at-beginning output-epsilon) (print-magnetic-energy)) -- ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss End of meep-discuss Digest, Vol 32, Issue 7 *** --- Research PhD Student Photonics Group Dept. of Electrical Electrical Engineering University of Bristol Rm 2.11, Queen's Building University Walk Bristol BS8 1TR email: [EMAIL PROTECTED] ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
Re: [Meep-discuss] installing parallel hdf5 into nonstandard directory
Message: 6 Date: Thu, 15 May 2008 00:13:42 +0900 From: Seong Kyu Kim [EMAIL PROTECTED] Subject: Re: [Meep-discuss] installing parallel hdf5 into nonstandard directory To: meep-discuss@ab-initio.mit.edu Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=euc-kr Here I attached the config.log for hdf5 for the above problem. Seong Kyu Kim - Original Message - From: Seong Kyu Kim [EMAIL PROTECTED] To: meep-discuss@ab-initio.mit.edu Date: 2008-05-14 11:51:16 Subject: [Meep-discuss] installing parallel hdf5 into nonstandard directory Dear prof. Steven G. Johnson and many other meep helpers. This January, I myself successfully installed the meep into a single processor Linux PC, which I have a root privilege. I have run some small ctl files O.K. for a month. Now, I am installing mpi version of the programs into a cluster system, which I do not have a root privilege. So I had to install all files into a nonstandard directory /home/skkim/local instead of the standard /usr/local. The biggest difficulty I have is to set the path for sharing libraries. Previously, I edited /etc/ld.so.conf to include a line /usr/local/lib, and this made sharing libraries so easy. But without the root privilege, I cannot do it in the cluster PC. I tried the following ways. (1) I made sure that guile.x86_64 and guile-devel.x86_64 were installed. (2) For the mpi, I made sure that mpiblast.x86_64, mpich-ethernet- gnu.x86_64 , openmpi.x86_64 , openmpi-devel.x86_64 , openmpi- libs.x86_64 were installed. (3) In my .cshrc file, I added the following lines, setenv LDFLAGS -L/home/skkim/local/lib setenv CPPFLAGS -I/home/skkim/local/include setenv LD_LIBRARY_PATH home/skkim/local/lib setenv LD_RUN_PATH /home/skkim/local/lib and modified the path, set path = (. $HOME/bin $HOME/local/bin $path) (4) I successfully installed libctl-3.0.3 into /home/skkim/local and its daughter directories. (5) I tried to install parallel hdf5 (version 1.8.0) with following commands; % setenv CC /usr/local/mpich/bin/mpicc % setenv CXX /usr/local/mpich/bin/mpicc % ./configure --prefix=$HOME/local % make all % make install The series of commands seemed to work fine, creating hdf5-related files in /home/skkim/local/lib, /home/skkim/local/bin. (However, it did not produce /home/skkim/ local/doc.) (6) I tried to install h5utils (version-1.11.1) by typing; % ./configure --prefix=$HOME/local It gave configure: error: hdf5 libraries are required for compilation at the end of message display. When I typed % make all, it gave a whole bunch of error messages implying hdf5 is not found. Can someone help me with this problem? Hi, I had a similar problem a couple of weeks ago with h5utils and parallel hdf5 libraries on my Mac. It can be fixed, or was fixed in my case, by adding this to the configure flags in addition to your other ones: CC=mpicc I think this tells the configure script/compiler to be expecting parallel libraries instead of serial ones. Hope this helps. Regards, Ian --- Research PhD Student Photonics Group Dept. of Electrical Electrical Engineering University of Bristol Rm 2.11, Queen's Building University Walk Bristol BS8 1TR email: [EMAIL PROTECTED] ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] Problem during h5utils configure
Dear all, I am having a problem configuring h5utils on Mac OS X 10.5. I have installed meep-mpi with no problems with hdf5 support, and have tested the meep installation with the examples given, but on configuring h5utils it can't seem to find the hdf5 libraries. I have pasted the configure echo and the config.log files to http://pastebin.com/ m6496e8ec and http://pastebin.com/m43a35b19 to save space here. There are lots of references to h5 there but not sure what it is telling me. Thanks for any help. Regards, Ian Buss --- Research PhD Student Photonics Group Dept. of Electrical Electrical Engineering University of Bristol Rm 2.11, Queen's Building University Walk Bristol BS8 1TR email: [EMAIL PROTECTED] ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] flux-region questions
Hello Meep users, I am interested in investigating the flux distribution over a plane outside a certain scattering structure. Is there a quick way to access the flux-region data usefully in order to produce a hdf5 output file showing the distribution of energy at a particular frequency over the plane? I am largely interested in the Poynting vector information but storage of individual field components would be useful too. I think I have seen it mentioned before on the newsgroup (in the context of near-to-far transforms) that the flux-region data is stored during runs in a form not really suitable for looking at after a run. I could of course write my own step function to do all this fairly easily (I notice from the reference guide that you can output the Poynting vector directly), but just wanted to make sure I wasn't reinventing the wheel computationally or missing the obvious (more than likely). In a related point I know that unless you order it so to do, Meep will not store field data in a complex form. To calculate flux spectra however (E* x H) one must take the Fourier transform of the time-evolved fields which will result in complex forms for each field component. However when you save the flux-region data in hdf5 I see only 2 field components per plane. Can anyone shed light on what Meep is actually doing here to calculate the flux at each frequency? Thanks in advance. Best wishes, Ian -- Research PhD Student Photonics Group Dept. of Electrical Electronic Engineering University of Bristol Rm 2.11 Queen's Building, University Walk, Bristol, BS8 1TR email: [EMAIL PROTECTED] ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
[Meep-discuss] Defining random source currect vectors
Dear Meep users, I have written the following ctl file to create a number of random sources (in time, space and orientation) but am coming up against an error which, by a process of elimination, I have narrowed down to the set! sources paragraph. ;run vars (define-param rtime 100) ;define source variables (define src-vect (vector3 0 0 0)) (define src-coord (vector3 0 0 0)) ;geometry (define-param sx 10) ; x size (define-param sy 5) ; y size (define-param sz 10) ; z size (set! geometry-lattice (make lattice (size sx sy sz))) (define-param h 3.5) (set! geometry (list (make block (center 0 0.75 0) (size infinity h infinity) (material (make dielectric (epsilon 15.6816)) ;sources (define-param lam 3.3) ; wavelength = 3.3um (define-param lam_max 5.3) ; max wavelength = 5.3um (define-param lam_min 1.3) ; min wavelength = 1.3um (define-param fcen (/ 1 lam)); pulse center at 3.3um (define-param fmin (/ 1 lam_max)) ; min frequency (define-param fmax (/ 1 lam_min)) ; max frequency (define-param df (- fmax fmin)); spectral pulse width (set! sources (list (map (lambda (x) (random:hollow-sphere! src-vect) (set! src-coord (vector3 (- (* (random:uniform) 8) 4) (random:uniform) (- (* (random:uniform) 8) 4))) (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ex) (center src-coord) (amplitude (vector3-x src-vect)) (start-time (* (random:uniform) rtime))) (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ey) (center src-coord) (amplitude (vector3-y src-vect)) (start-time (* (random:uniform) rtime))) (make source (src (make gaussian-src (frequency fcen) (fwidth df))) (component Ez) (center src-coord) (amplitude (vector3-z src-vect)) (start-time (* (random:uniform) rtime (arith-sequence 1 1 10 (display sources) ;boundaries (set! pml-layers (list (make pml (thickness 1.0 (set-param! resolution 20) ;flux calculations (define-param nfreq 50) (define emitted ; emitted flux (add-flux fcen df nfreq (make flux-region (center 0 -1.5 0) (size 9 0 9) (weight -1.0 ;program run options (use-output-directory) (run-until rtime (at-beginning (in-volume (volume (center 0 0 0) (size 10 5 0)) output-epsilon))) (display-fluxes emitted) The error which Meep comes back with, after processing geometry and subpixel averaging, is as follows: ERROR: In procedure cdr: ERROR: Wrong type argument in position 1: #f I suspect that I am defining the amplitudes wrongly, but I have not found how. Following the details given in the Meep/Reference page I have overlayed the 3 components Ex, Ey and Ez to form a randomly oriented current vector and used the scheme random:hollow-sphere! to ensure each source has an overall amplitude of 1.0. Perhaps I am misunderstanding the concept; I notice other users have explicitly used a complex value for the amplitude (http://osdir.com/ml/science.electromagnetism.meep.general/2006-08/msg00039.html). Any help that anyone could give would be gratefully received. Regards, Ian Buss -- --- Research PhD Student Photonics Group Department of Electrical Electronic Engineering University of Bristol Rm 2.11 Queen's Building University Walk Bristol BS8 1TR [EMAIL PROTECTED] http://www.bris.ac.uk/eeng/oph/members/buss begin:vcard fn:Ian Buss n:Buss;Ian org:University of Bristol;Department of Electrical and Electronic Engineering adr;dom:;;Rm 2.11 Queen's Building;Bristol;;BS8 1TR email;internet:[EMAIL PROTECTED] title:Research PhD Student x-mozilla-html:FALSE url:http://www.bris.ac.uk/eeng/oph version:2.1 end:vcard ___ meep-discuss mailing list meep-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss