Hi Mike,
A couple comments. I'm not sure I understand your set-up for this
scattering problem. A proper measurement of scattering cross section
requires a few things:
1. If you want a plane wave, make your source extend spatially along
an entire PML boundary at the side of incidence. For example, use
(size sx 0 0). Otherwise your incident fields are likely to diffract.
2. Make sure your your flux regions enclose the ENTIRE simulation
geometry, but don't enclose any sources. Otherwise your notion of
scattering cross section is ill-defined. It looks to me that your
flux regions are too small to enclose the cylinders, or am I missing
something?
3. MEEP does not support the TFSF formalism. That's a fundamentally
different method as I understand it; you'd have to revise the the MEEP
source code. It can't be kludged in. Instead, do something more
simple: run the simulation without geometric objects, then again with
geometric objects. The scattered field is given by
E_scattered=E_total-E_incident. Get E_incident with this
"normalization" run. You'll have to subtract these fields by hand,
then compute scattered fluxes in the normal way: S_scattered=1/2
E_scattered "cross" B_scattered. You'll have to use some scripting to
accomplish this. So, output E and B fields from enclosing volume
surfaces instead of using flux regions.
4. The cross section equals your scattered flux divided by incident
flux-per-area. If you're not normalizing by the incident flux then
that would explain why your response spectrum has the same peak
wavelength as your incident source.
Also, the above steps even give you all the fields you need to
calculate far-field radiation patterns. Just apply a near-to-far-
field transform to scattered field values along all enclosing volume
surfaces. Cool stuff!
Good luck,
Alex
____________________________________________________________________
Alexander S. McLeod
B.A. Physics and Astrophysics - University of California at Berkeley
Simulation Engineer - Theory Group, Molecular Foundry (LBNL)
Site Lead - Network for Computational Nanotechnology at Berkeley / MIT
[email protected] 707-853-0716
____________________________________________________________________
On Aug 27, 2010, at 9:00 AM, [email protected]
wrote:
Send meep-discuss mailing list submissions to
[email protected]
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
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of meep-discuss digest..."
Today's Topics:
1. termination due to instance "std::bad_alloc" (Triratna Muneshwar)
2. Simulation in mid-infrared (Shiqiang Li (Mike))
From: Triratna Muneshwar <[email protected]>
Date: August 26, 2010 3:10:14 PM PDT
To: [email protected]
Subject: [Meep-discuss] termination due to instance "std::bad_alloc"
Hi,
Since last 2 days i am constantly seeing this particular error
message following which meep exits its execution:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Error message comes after subpixel-averaging which i strongly
believe has to do something with this error.
Triratna
From: "Shiqiang Li (Mike)" <[email protected]>
Date: August 26, 2010 6:54:19 PM PDT
To: [email protected]
Subject: [Meep-discuss] Simulation in mid-infrared
Dear all,
I am trying to use MEEP to simulation TFSF in mid-infrared region
for 2-D cylindrical structure. As I am new to MEEP, I need some help
to proceed:
1. If the wavelength is long (maximum is around 10um), do I need
very thick PML layer?
2. If the simulation box needs to be big comparing to the structure
that I am working on, is there a way I can make the grids finer
regionally at the structure that I was simulating?
The absorption cross-section that I obtained using following code
centered around the peak of gaussian source, which is obviously
artificial. Is it due to thickness problem?
;Unit: um
(define-param sx 4) ;
' Size of cell in X-direction
(define-param sy 4) ; ' Size of cell in Y-
direction
(define-param pad 2) ; ' padding distance
between waveguide and cell edge
(define-param dpml 1) ; ' thickness of PML
Layers 3.0
(define-param w 1) ; ' width of block
along y-direction
(define-param l 0.1) ; ' lengh of block
along x-direction
(define-param underlayer 0.03) ;
SiO2 passivation layer thickness
(define-param w1 0.03) ; ' width of flux-
region
(define-param slen
0.2) ;source length
(define-param offy 0) ; Offset value in y-
direction
(define-param res 200) ; resolution of
simulation box
(define-param standard? false) ;
condition for choosing sample run or reference run
(define-param d_e (/(* w_p w_p) (* w_n w_n))) ;
(define-param fmax 1) ; ' Maximum
Frequency
(define-param fmin 0.1) ; ' Minimum
Frequency
(define-param fcen (* 0.5 (+ fmax fmin))) ; '
Frequency Centered at 0.7 or wavelength = 1.428 micrometer
(define-param df (* 2 (- fmax fcen))) ; '
Frequency Width Gives range from 0.4 to 1.0
(define-param nfreq 100) ; ' Number of
Frequencies to calculate flux
(set! geometry-lattice (make lattice (size sx sy no-size)))
(define gold (make dielectric (epsilon 5.339)
(polarizations
(make polarizability
(omega 1e-20) (gamma 0.0486) (sigma 6.2634e41))
(make polarizability
(omega 2.1201) (gamma 0.1772)(sigma 0.1906))
(make polarizability
(omega 4.4214) (gamma 1.9662)(sigma 0.9835))
(make polarizability
(omega 3.353) (gamma 1.1844)(sigma 1.5974))
(make polarizability
(omega 2.7116) (gamma 0.578)(sigma 0.6653))
(make polarizability
(omega 2.3525) (gamma 0.3012)(sigma 0.4508)))))
;=================defining simulation cell======================
(set! geometry
(append; combine all objects
;==================set standard and experiment runs=============
(if standard?
(list (make block
(center 0 (+ 0 offy))
(size w (- l underlayer))
(e1 (cos theta_rad) (* (sin theta_rad) -1) 0)
(e2 (sin theta_rad) (cos theta_rad) 0)
(e3 0 0 1)
(material air)))
(list (make cylinder
(center 0 (+ 0 offy))
(radius l)
(height infinity)
(material gold)))
))) ; end of if and append and set-geo
;================running procedure=====================
(set! pml-layers (list (make pml (thickness dpml))))
(set! resolution (* fmax res))
(set! sources (list
(make source
(src (make gaussian-src (frequency fcen) (fwidth
df)))
(component Hz)
(center -0.4 0)
(size 0 slen))))
;================total field region calc================
(define left ;left side of the region
(add-flux fcen df nfreq
(make flux-region
(center -0.15 0) (size 0 0.3)(direction X))))
(define right ;right side of the region
(add-flux fcen df nfreq
(make flux-region
(center 0.15 0) (size 0 0.3)(direction X))))
(define top ; left side of the region
(add-flux fcen df nfreq
(make flux-region
(center 0 0.15) (size 0.3 0)(direction Y))))
(define btm ; left side of the region
(add-flux fcen df nfreq
(make flux-region
(center 0 -0.15) (size 0.3 0)(direction Y))))
;===============scattered field region calc==============
(define sleft ;left side of the region
(add-flux fcen df nfreq
(make flux-region
(center -0.25 0) (size 0 0.5)(direction X))))
(define sright ;right side of the region
(add-flux fcen df nfreq
(make flux-region
(center 0.25 0) (size 0 0.5)(direction X))))
(define stop ; left side of the region
(add-flux fcen df nfreq
(make flux-region
(center 0 0.25) (size 0.5 0)(direction Y))))
(define sbtm ; left side of the region
(add-flux fcen df nfreq
(make flux-region
(center 0 -0.25) (size 0.5 0)(direction Y))))
(run-sources+
(stop-when-fields-decayed 0.5 Hz (vector3 (- -0.01 l) 0)
1e-3)
(at-beginning output-epsilon)
(to-appended "pwr" (at-every (/ 1 fcen 20) output-dpwr)))
(display-fluxes left right top btm sleft sright stop sbtm)
--
Mike
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss