You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @flaport, Happy New Year! At FDTD calculations I need to periodically change the power of a source (initially F_0) dependently on the local field amplitude E_0. So first I have to know the amplitude of field E_0 in current position of a source in 3D. Latter I will modify the power of this source periodically as F_{n+1} = f(E_n)*F_n with the interval dt. As I understand, to do that I have to periodically remove old source (n) from the grid and insert in this position new source (n+1). What is the optimal way to do all of that? Thank you in advance.
The text was updated successfully, but these errors were encountered:
It's probably best to write a custom source for this. The grid to which the source is attached is available as self.grid, and hence you have access to the field values at the current time step.
To write a custom source you just have to an update_E and an update_H method (look for example at sources.py).
Hi @flaport, please specify the formula of spatial shape of the fdtd.LineSource. In the docs it is only indicated “""Create a LineSource with a gaussian profile. Does it mean \exp(-(x-x0)^2-(y-y0)^2-(z-z0)^2) ? Is it possible to indicate a width of a gaussian? Thanks
Hi @flaport, Happy New Year! At FDTD calculations I need to periodically change the power of a source (initially F_0) dependently on the local field amplitude E_0. So first I have to know the amplitude of field E_0 in current position of a source in 3D. Latter I will modify the power of this source periodically as F_{n+1} = f(E_n)*F_n with the interval dt. As I understand, to do that I have to periodically remove old source (n) from the grid and insert in this position new source (n+1). What is the optimal way to do all of that? Thank you in advance.
The text was updated successfully, but these errors were encountered: