From 885ccc5458e5dd242ce47dcecf79ef074e83091a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Thu, 16 Jan 2025 16:43:42 +0100 Subject: [PATCH] fix(lib): antenna aperture --- differt/src/differt/em/_antenna.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/differt/src/differt/em/_antenna.py b/differt/src/differt/em/_antenna.py index 0f016eef..af157b65 100644 --- a/differt/src/differt/em/_antenna.py +++ b/differt/src/differt/em/_antenna.py @@ -79,9 +79,8 @@ def wavenumber(self) -> Float[Array, " "]: @property @jaxtyped(typechecker=typechecker) def aperture(self) -> Float[Array, " "]: - r"""The antenna aperture :math:`A`.""" - # TODO: check the name, as this is not the physical aperture - return (self.wavelength / (4 * jnp.pi)) ** 2 + r"""The aperture :math:`A` of an isotropic antenna.""" + return self.wavelength**2 / (4 * jnp.pi) @jaxtyped(typechecker=typechecker) @@ -91,10 +90,12 @@ class Antenna(BaseAntenna): @property @abstractmethod def reference_power(self) -> Float[Array, " "]: - r"""The reference power (:math:`\text{W}/m^2`) radiated by this antenna. + r"""The reference power (W) radiated by this antenna. This is the maximal value of the pointing vector at a distance - of one meter from this antenna. + of one meter from this antenna, multiplied by the area of the sphere + (:math:`4\phi`), + to obtain a power. """ @abstractmethod @@ -379,14 +380,15 @@ def __init__( def reference_power(self) -> Float[Array, " "]: p_0 = jnp.linalg.norm(self.moment) - # Equivalent to mu_0 * self.angular_frequency**4 * p_0**2 / (16 * jnp.pi**2 * c) + # Equivalent to + # 4 * pi * (r=1) * mu_0 * self.angular_frequency**4 * p_0**2 / (16 * jnp.pi**2 * c) # but avoids overflow r = mu_0 * self.angular_frequency t = self.angular_frequency * p_0 r *= t r *= t - r *= self.angular_frequency / (16 * jnp.pi**2 * c) + r *= self.angular_frequency / (4 * jnp.pi * c) return r