On Sat, 1 Dec 2007, Jeong Bo Shim wrote:
> I want to calculate the attenuation time of a certain resonant mode in a
> resonator.
>
> For this purpose, I'd like to start with the initial field distribution
> of the resonant mode which is calculated by other program(this program
> is only available for static calculation.), but I can't find the proper
> function to make a file input from the meep, at least in the tutorial.

Well, in the C++ you can use the fields::initialize_field method, which 
allows you to supply an arbitrary function to initialize the fields with, 
and you can compute this function based on some fields you've loaded from 
a file or whatever you want.

However, what you are trying to do is almost certainly not the right way 
to go about it.  Just hit the resonator with a broad-bandwidth current 
source that has the same symmetry as the mode you want to excite, and 
harminv will tell you the lifetime of that mode (and any other modes of 
the same symmetry).  To make sure you are hitting the mode you want, you 
just hit it again with narrow-bandwidth source at the frequency harminv 
identified, and look at the field pattern.

You'll pretty much have to do this anyway, since your other calculation 
won't exactly match Meep due to differences in discretization, and hence 
you may excite other modes anyway (even starting from your precomputed 
field pattern) with some small amplitudes.

> Also, I want to increase the field values at all nodes in the
> computational domain by same factor,in the middle of the time evolution.
>
> Precisely speaking, I want to stop the time evolution at a certain time
> step and multiply a constant factor to all field value and then come
> back to the time evolution. Is it possible with the meep functions,
> currently? In the case above, the calculation is done without the active
> source, so the process is totally artificial and just for the
> theoretical pupose.
>
> I think the ultimate solution to my two question above would be the way
> to acess and modify the array for the field values, and I want to know
> if it is possible.

This is not so easy to do without traversing the internal data structures 
a fair amount.  However, it would be better for you to explain what 
specifically you are trying to accomplish by modifying the field values in 
the middle of a simulation.

The purpose of Meep is to simulate Maxwell's equations.  If you modify the 
field values, you aren't obeying Maxwell's equations, and why would you 
want to do this?  If you just want to excite fields at various times, it 
is much better to do that by inserting various current sources.

Regards,
Steven G. Johnson

_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to