.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/fields/radiation/plot_larmor_radiation.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_fields_radiation_plot_larmor_radiation.py: Larmor's formula: the power radiated by an accelerated charge ============================================================= In 1897 Joseph Larmor worked out how fast a slowly moving electron loses energy when it accelerates. Its radiation field falls off as :math:`1/r`, is proportional to the acceleration, and carries the power .. math:: P = \frac{q^2a^2}{6\pi\varepsilon_0c^3}, spread over angle as the doughnut .. math:: \frac{dP}{d\Omega} = \frac{q^2a^2}{16\pi^2\varepsilon_0c^3}\sin^2\theta, which is zero along the acceleration and largest across it. The same formula, applied to an electron orbiting a nucleus, made Rutherford's atom collapse in a fraction of a nanosecond, one of the puzzles that led to the Bohr model. This example gets both results in two independent ways. First it integrates :func:`~physicskit.fields.linear_acceleration_pattern` at :math:`\beta = 0` over the sphere. Then it computes the full :func:`~physicskit.fields.lienard_wiechert_fields` of a charge momentarily at rest, on a sphere far away, and integrates the Poynting flux :math:`\mathbf E\times\mathbf B/\mu_0` through it. Units are natural (:math:`c = \varepsilon_0 = 1`). .. GENERATED FROM PYTHON SOURCE LINES 32-40 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from physicskit.fields import larmor_power, lienard_wiechert_fields, linear_acceleration_pattern q, a = 1.0, 1e-3 .. GENERATED FROM PYTHON SOURCE LINES 41-46 A charge momentarily at rest ---------------------------- Hyperbolic motion is the relativistic constant-acceleration trajectory. At t_r = 0 the charge is at rest at the origin with acceleration a along z. Light emitted then reaches the sphere of radius Rs at t = Rs. .. GENERATED FROM PYTHON SOURCE LINES 46-69 .. code-block:: Python def trajectory(tr): s = np.sqrt(1 + (a * tr) ** 2) return np.array([0, 0, (s - 1) / a]), np.array([0, 0, a * tr / s]), np.array([0, 0, a / s**3]) Rs = 1e4 x, w = np.polynomial.legendre.leggauss(64) theta, w = 0.5 * np.pi * (x + 1), 0.5 * np.pi * w pts = Rs * np.column_stack([np.sin(theta), np.zeros_like(theta), np.cos(theta)]) E, B = lienard_wiechert_fields(trajectory, pts, Rs, q=q, c=1.0, eps=1.0) S_r = np.sum(np.cross(E, B) * pts / Rs, axis=1) # mu0 = 1 / (eps0 c^2) = 1 dP_flux = Rs**2 * S_r P_flux = np.sum(w * 2 * np.pi * np.sin(theta) * dP_flux) dP_larmor = linear_acceleration_pattern(theta, 0.0, q=q, a=a, c=1.0, eps=1.0) P_pattern = np.sum(w * 2 * np.pi * np.sin(theta) * dP_larmor) P_larmor = larmor_power(q, a, c=1.0, eps=1.0) print(f"Larmor power {P_larmor:.6e}") print(f"pattern integrated {P_pattern:.6e}") print(f"Poynting flux {P_flux:.6e}") .. rst-class:: sphx-glr-script-out .. code-block:: none Larmor power 5.305165e-08 pattern integrated 5.305165e-08 Poynting flux 5.305165e-08 .. GENERATED FROM PYTHON SOURCE LINES 70-72 The sin-squared doughnut ------------------------ .. GENERATED FROM PYTHON SOURCE LINES 72-88 .. code-block:: Python th = np.linspace(0, 2 * np.pi, 361) fig = plt.figure(figsize=(11, 4.5)) ax0 = fig.add_subplot(1, 2, 1, projection="polar") ax0.plot(th, np.abs(linear_acceleration_pattern(th, 0.0, q=q, a=a, c=1.0, eps=1.0)) / P_larmor, "k-") ax0.set_theta_zero_location("N") ax0.set_title(r"$dP/d\Omega$, acceleration up") ax1 = fig.add_subplot(1, 2, 2) ax1.plot(np.degrees(theta), dP_larmor / P_larmor, "k-", label=r"$\sin^2\theta$ pattern") ax1.plot(np.degrees(theta), dP_flux / P_larmor, "o", ms=4, label=r"$R^2 S_r$ from LiƩnard-Wiechert") ax1.set_xlabel(r"$\theta$ (degrees from the acceleration)") ax1.set_ylabel(r"$(dP/d\Omega)\,/\,P$") ax1.legend() fig.tight_layout() plt.show() .. image-sg:: /api/gallery/fields/radiation/images/sphx_glr_plot_larmor_radiation_001.png :alt: $dP/d\Omega$, acceleration up :srcset: /api/gallery/fields/radiation/images/sphx_glr_plot_larmor_radiation_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 89-94 Check ----- The sin^2 pattern integrates to Larmor's q^2 a^2 / (6 pi eps0 c^3), and so does the Poynting flux of the Lienard-Wiechert field through a far sphere, angle by angle. .. GENERATED FROM PYTHON SOURCE LINES 94-97 .. code-block:: Python assert abs(P_pattern / P_larmor - 1) < 1e-12 assert abs(P_flux / P_larmor - 1) < 1e-3 assert np.max(np.abs(dP_flux - dP_larmor)) < 2e-3 * np.max(dP_larmor) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.085 seconds) .. _sphx_glr_download_api_gallery_fields_radiation_plot_larmor_radiation.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_larmor_radiation.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_larmor_radiation.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_larmor_radiation.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_