Re: [Meep-discuss] Absorbed Photon Density in Meep

2020-07-15 Thread Ardavan Oskooi
For your reference, we recently added a new tutorial example which 
demonstrates how to compute a density map of the absorbed power:


https://meep.readthedocs.io/en/latest/Python_Tutorials/Basics/#absorbed-power-density-map-of-a-lossy-cylinder

On 6/17/20 12:21, J. Philip Haupt wrote:
Sorry to bother again. While I think this works, I have encountered 
some issues and am wondering if they're avoidable. Namely, when I use 
add_dft_fields the run time is substantially increased and when I use 
output_dft, the file size is tens of GB.


I am ultimately interested in the total absorbed photon density (for 
all frequencies) of the cell integrated along the y axis. Is my best 
option using add_dft_fields (for the entire volume), calculating 
Im(ε(ω)) |E|^2/hω, then integrating both frequency and space along y?


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

Re: [Meep-discuss] Absorbed Photon Density in Meep

2020-06-18 Thread Steven G. Johnson

> On Jun 17, 2020, at 3:21 PM, J. Philip Haupt  
> wrote:
> I am ultimately interested in the total absorbed photon density (for all 
> frequencies) of the cell integrated along the y axis. Is my best option using 
> add_dft_fields (for the entire volume), calculating Im(ε(ω)) |E|^2/hω, then 
> integrating both frequency and space along y?

If you just want the total absorbed power at each point, integrated over 
frequency, it would be more efficient to integrate Re[E* dP/dt] (the work done 
on the polarization currents) over time at each point.

I don't know offhand if there is an easy way in Meep to get access to the 
polarization currents, but this would be a nice feature to add.
___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Re: [Meep-discuss] Absorbed Photon Density in Meep

2020-06-17 Thread J. Philip Haupt

Hi,

Sorry to bother again. While I think this works, I have encountered some 
issues and am wondering if they're avoidable. Namely, when I use 
add_dft_fields the run time is substantially increased and when I use 
output_dft, the file size is tens of GB.


I am ultimately interested in the total absorbed photon density (for all 
frequencies) of the cell integrated along the y axis. Is my best option 
using add_dft_fields (for the entire volume), calculating Im(ε(ω)) 
|E|^2/hω, then integrating both frequency and space along y?


Best,
Philip

On 2020-06-13 6:43 a.m., Steven G. Johnson wrote:

You can use add_dft_fields to compute the Fourier-transformed electric field in 
some region.   The absorbed energy density (for linear media) is then Im(ε(ω)) 
|E|^2 at each frequency ω at each point in the absorbing material.


On Jun 12, 2020, at 10:06 PM, J. Philip Haupt  
wrote:

Hello,

I wish to calculate the absorbed photon density (as a function of space) in 
Meep, to be input to an electrical device simulation. Is there an 
efficient/quick way of doing this? The only method I can think of is to use 
output_poynting() to get the Poynting flux at every time step, then after the 
simulation time-average all of these fluxes, numerically find the divergence, 
and then finally divide by h*(frequency of photon). However, this seems like it 
would be very inefficient. Is there another approach (perhaps somehow using a 
FluxRegion object)?

Best regards,
Philip

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



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

Re: [Meep-discuss] Absorbed Photon Density in Meep

2020-06-13 Thread Steven G. Johnson
You can use add_dft_fields to compute the Fourier-transformed electric field in 
some region.   The absorbed energy density (for linear media) is then Im(ε(ω)) 
|E|^2 at each frequency ω at each point in the absorbing material.

> On Jun 12, 2020, at 10:06 PM, J. Philip Haupt  
> wrote:
> 
> Hello,
> 
> I wish to calculate the absorbed photon density (as a function of space) in 
> Meep, to be input to an electrical device simulation. Is there an 
> efficient/quick way of doing this? The only method I can think of is to use 
> output_poynting() to get the Poynting flux at every time step, then after the 
> simulation time-average all of these fluxes, numerically find the divergence, 
> and then finally divide by h*(frequency of photon). However, this seems like 
> it would be very inefficient. Is there another approach (perhaps somehow 
> using a FluxRegion object)?
> 
> Best regards,
> Philip
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


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