-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Field in position of source #43
Comments
hey @GenB31415 , It's probably best to write a custom source for this. The grid to which the source is attached is available as To write a custom source you just have to an update_E and an update_H method (look for example at sources.py). For example, you could do something like this: class MyPointSource(PointSource):
def update_E(self):
E_n = self.grid.E[self.x, self.y, self.z, 2]
E_n[:, :, :] = my_func(E_n) * En |
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 |
May be it is better to replace the word LineSource by PlaneSource in the description of PlaneSource ? PlaneSource classclass PlaneSource:
|
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: