However, this expression implies that a dipole at the origin $r = 0$ would have zero contribution to the final result because of the $2\pi r$ term. In the implementation of this formula, $s(r_0)=1$ where $r_0$ is the dipole position at the "origin" (i.e., at 1.5 / resolution) and $s(r) = 0.5 * (r_0/r)^2$ for $r > 0$.
Because $r = 0$ is the axis of symmetry in cylindrical coordinates, the correct expression should be:
That is, the radiation pattern for the dipole at $r_0 \approx 0$, $P(r_0, \theta)$, is weighted differently than the other dipoles at $r > 0$ and does not include the $2 \pi r$ term. Note that the new weighting factor $w(r)$ includes the original scaling factor $s(r)$.
In the recently added Tutorial/Extraction Efficiency of a Collection of Dipoles in a Disc, an integral expression is provided for computing the total radiation pattern from an ensemble of incoherent dipoles:
$$P(\theta) \approx \int0^R P(r,\theta) s(r) 2\pi rdr = \sum{n=0}^{N-1} P(r_n,\theta) s(r_n) 2\pi r_n \Delta r$$
However, this expression implies that a dipole at the origin $r = 0$ would have zero contribution to the final result because of the $2\pi r$ term. In the implementation of this formula, $s(r_0)=1$ where $r_0$ is the dipole position at the "origin" (i.e., at
1.5 / resolution
) and $s(r) = 0.5 * (r_0/r)^2$ for $r > 0$.Because $r = 0$ is the axis of symmetry in cylindrical coordinates, the correct expression should be:
$$P(\theta) \approx \int{0}^R P(r,\theta) w(r) dr = \sum{n=0}^{N-1} P(r_n,\theta) w(r_n) \Delta r$$
$$w(r_n) = s(r_n), n = 0$$
$$w(r_n) = s(r_n) 2\pi r_n, n > 0$$
That is, the radiation pattern for the dipole at $r_0 \approx 0$, $P(r_0, \theta)$, is weighted differently than the other dipoles at $r > 0$ and does not include the $2 \pi r$ term. Note that the new weighting factor $w(r)$ includes the original scaling factor $s(r)$.