NanoComp/meep

Why is the signal calculated by the Gaussian function inconsistent with the signal obtained by the get_field_point function for the field component?

Closed this issue · 4 comments

Hello, I am conducting a 2D simulation by modifying the dip function in the source.cpp file to exp (- tt * tt/(2 * width * width)), which is a simple Gaussian function. As shown in the figure, when using this function for two-dimensional simulation, the red line is the light source. I obtained the time signal of the Ex component using the get_field_point function at y=2, but this signal is inconsistent with the signal returned by the Gaussian function. May I ask why this is happening? Did meep automatically perform a transformation during the calculation process? This problem has been bothering me for a long time. The red line in the figure represents the time signal calculated by the Gaussian function, and the blue line represents the time signal obtained for the Ex component. (I guarantee that in this simulation, the dipole function is called to add a Gaussian time source)
hanshu
shili
xinhao
yuan

First, and most importantly, the field is not equal to the current in Maxwell's equations. The current is added to the rate of change of the field, but the field is also influenced by past fields, scattered fields, and so on. This is a FAQ: How does the current amplitude relate to the resulting field amplitude?

Second, and less importantly the ::dipole method is not actually the current, it is the (discretized) integral of the current.

(A field equal to the source would correspond to what is called a "hard source" in FDTD, essentially a Dirichlet boundary condition. Hard sources, while they may seem more intuitive, are much less useful in practice, because they effectively modify your geometry, essentially putting a "hard wall" into your geometry that waves will bounce off of.)

Another way to think of this is to imagine the equations of a mass on a spring:

$$ m\frac{d^2 x}{dt^2} = -kx + F(t) $$

where $F(t)$ is an external force. The force $F(t)$ certainly influences the position $x(t)$, but you wouldn't expect it to equal the position. The current in Maxwell's equations plays the same role.

首先,也是最重要的一点,该场不等于麦克斯韦方程组中的电流。电流被添加到场的变化率中,但场也会受到过去场、分散场等的影响。这是一个常见问题解答:电流振幅与产生的场振幅有何关系?

其次,但不太重要的是,该方法实际上不是电流,而是电流的(离散化)积分。::dipole
Thank you for your prompt reply. I will study how to handle it again. Thank you