{
 "nbformat": 4,
 "nbformat_minor": 5,
 "metadata": {
  "kernelspec": {
   "display_name": "OneSimulation (venv)",
   "language": "python",
   "name": "onesim"
  },
  "language_info": {
   "name": "python"
  }
 },
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Circularly polarized waves in a lossy magnetized plasma layer\n",
    "\n",
    "A static magnetic field $\\mathbf B_0=B_0\\hat{\\mathbf z}$ makes a plasma anisotropic: the electrons\n",
    "gyrate around the field lines at the cyclotron frequency $\\omega_c=eB_0/m_e$, and a wave travelling\n",
    "along $\\mathbf B_0$ splits into two circularly polarized waves with different refractive indices.\n",
    "The **right-hand (R) wave** turns with the electrons and is absorbed strongly at the electron cyclotron\n",
    "resonance $\\omega=\\omega_c$, the principle of ECR plasma sources; the **left-hand (L) wave** turns the\n",
    "other way and does not resonate. Collisions with frequency $\\nu$ make the plasma lossy.\n",
    "\n",
    "Here a plane wave from air falls at normal incidence on a plasma layer of thickness $d=50$ mm with\n",
    "electron density $n_e=5\\times10^{16}$ m$^{-3}$ (plasma frequency $f_p=2.01$ GHz), $B_0=87.5$ mT\n",
    "(cyclotron frequency $f_c=2.45$ GHz) and $\\nu=10^9$ s$^{-1}$. The ions are immobile. OneSimulation\n",
    "describes the plasma by `MagnetizedColdPlasma`, whose conductivity tensor follows from the cold electron\n",
    "equation of motion with the Lorentz force and the collision drag, and solves\n",
    "$\\nabla\\times\\nabla\\times\\mathbf E-k_0^2\\,\\boldsymbol\\varepsilon_r\\cdot\\mathbf E=0$ with Nédélec\n",
    "elements of order 2.\n",
    "\n",
    "The 3D model is a 10 mm $\\times$ 10 mm column of the layer, periodic in $x$ and $y$ so that it\n",
    "represents the unbounded layer and an unbounded plane wave. It comes from the CAD file\n",
    "`magnetized_plasma_slab_waves.step`, written by `magnetized_plasma_slab_waves_geometry.py`:\n",
    "\n",
    "| boundary | condition |\n",
    "|---|---|\n",
    "| $x$ and $y$ sides | periodic pairs |\n",
    "| $z=0$ (front surface) | impedance of the air half-space, $Y_0=\\sqrt{\\varepsilon_0/\\mu_0}$, with the incident field $\\mathbf E_0=(\\hat{\\mathbf x}\\pm\\mathrm i\\hat{\\mathbf y})/\\sqrt2$ |\n",
    "| $z=d$ (rear surface) | impedance of the air half-space behind the layer |\n",
    "\n",
    "The impedance condition $\\mathbf n\\times\\mathbf H=Y_0\\,\\mathbf n\\times\\big(\\mathbf n\\times(\\mathbf E-2\\mathbf E_0)\\big)$\n",
    "is exact for a plane wave at normal incidence, so the air need not be meshed. With the time factor\n",
    "$e^{-\\mathrm i\\omega t}$, $\\mathbf E_0=(\\hat{\\mathbf x}+\\mathrm i\\hat{\\mathbf y})/\\sqrt2$ turns from $x$\n",
    "to $y$, with the electrons: it excites the R wave; the other sign excites the L wave.\n",
    "\n",
    "**Reference** (T. H. Stix, *Waves in Plasmas*, AIP 1992, §1-4 and §2-2; F. F. Chen, *Introduction to\n",
    "Plasma Physics and Controlled Fusion*, 3rd ed., Springer 2016, §4.18; K. G. Budden, *The Propagation of\n",
    "Radio Waves*, Cambridge 1985, ch. 3). For propagation along $\\mathbf B_0$ the Appleton-Hartree\n",
    "equation with collisions gives\n",
    "\n",
    "$$n_{R,L}^2=1-\\frac{X}{1\\mp Y+\\mathrm iZ},\\qquad X=\\frac{\\omega_p^2}{\\omega^2},\\quad Y=\\frac{\\omega_c}{\\omega},\\quad Z=\\frac{\\nu}{\\omega},$$\n",
    "\n",
    "with the wavenumber $k=n\\,\\omega/c$ and the field attenuation $\\operatorname{Im}k$. The R wave is cut off\n",
    "between $f_c=2.45$ GHz and $f_R=3.57$ GHz, the L wave below $f_L=1.12$ GHz. A layer of index $n$ in air\n",
    "reflects and transmits (M. Born and E. Wolf, *Principles of Optics*, 7th ed., §1.6.4)\n",
    "\n",
    "$$r=\\frac{r_1\\,(1-e^{2\\mathrm ink_0d})}{1-r_1^2\\,e^{2\\mathrm ink_0d}},\\qquad\n",
    "  t=\\frac{(1-r_1^2)\\,e^{\\mathrm ink_0d}}{1-r_1^2\\,e^{2\\mathrm ink_0d}},\\qquad r_1=\\frac{1-n}{1+n},$$\n",
    "\n",
    "and absorbs $A=1-|r|^2-|t|^2$ of the incident power."
   ]
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "import numpy as np\n",
    "from onesim.cad.exchange import load\n",
    "from onesim.meshing import PeriodicPair, StructuredHexahedralMesher\n",
    "from onesim.numerics import Numerics\n",
    "from onesim.numerics.fem import FiniteElement, Nedelec\n",
    "from onesim.numerics.linear import ComplexSparseDirect\n",
    "from onesim.physics.electromagnetics import FrequencyDomainMaxwell, ImpedanceBoundary\n",
    "from onesim.physics.plasma import MagnetizedColdPlasma\n",
    "from onesim.simulation import PeriodicBoundary, Problem, Simulation\n",
    "from onesim.visualization import plots, theme\n",
    "from scipy.constants import c, e, epsilon_0, m_e, mu_0\n",
    "\n",
    "theme.set()"
   ],
   "execution_count": null,
   "outputs": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Geometry and mesh\n",
    "\n",
    "Hexahedra, one across the periodic column and 24 through the layer; two coarser meshes serve the\n",
    "mesh study."
   ]
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "layer = load(\"magnetized_plasma_slab_waves.step\")\n",
    "faces = layer.boundaries\n",
    "width, depth, thickness = layer.size\n",
    "meshes = {\n",
    "    cells: StructuredHexahedralMesher(cells=(1, 1, cells)).generate(layer)\n",
    "    for cells in (6, 12, 24)\n",
    "}\n",
    "mesh = meshes[24]\n",
    "\n",
    "fig = plots.figure(1, 2, size=(13, 5.5))\n",
    "plots.geometry(\n",
    "    layer,\n",
    "    selection={\"front surface (incidence)\": faces.z_min, \"rear surface\": faces.z_max},\n",
    "    labels=False,\n",
    "    camera=plots.Camera(elevation=20, azimuth=-60),\n",
    "    title=\"Column of the plasma layer\",\n",
    "    ax=fig[0],\n",
    ")\n",
    "plots.mesh(\n",
    "    mesh,\n",
    "    groups=(\"all\",),\n",
    "    legend=False,\n",
    "    camera=plots.Camera(elevation=20, azimuth=-60),\n",
    "    title=f\"Mesh: {mesh.cell_count} hexahedra\",\n",
    "    ax=fig[1],\n",
    ")\n",
    "plots.show()"
   ],
   "execution_count": null,
   "outputs": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Model\n",
    "\n",
    "The plasma is given by its three constant inputs. One solve per frequency and sense of rotation;\n",
    "`waves` maps the sense to the incident field."
   ]
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "electron_density, magnetic_field, collision_frequency = 5e16, 0.0875, 1e9\n",
    "plasma = MagnetizedColdPlasma.uniform(\n",
    "    electron_density=electron_density,\n",
    "    magnetic_field=(0.0, 0.0, magnetic_field),\n",
    "    collision_frequency=collision_frequency,\n",
    ")\n",
    "admittance = np.sqrt(epsilon_0 / mu_0)\n",
    "numerics = Numerics(\n",
    "    spatial=FiniteElement(element=Nedelec(order=2)), linear_solver=ComplexSparseDirect()\n",
    ")\n",
    "waves = {\n",
    "    \"R\": np.array([1, 1j, 0]) / np.sqrt(2),\n",
    "    \"L\": np.array([1, -1j, 0]) / np.sqrt(2),\n",
    "}\n",
    "maxwell = lambda frequency: FrequencyDomainMaxwell(\n",
    "    domain=layer.volume,\n",
    "    frequency=frequency,\n",
    "    material=plasma,\n",
    "    phasor_convention=\"exp(-i*omega*t)\",\n",
    "    amplitude_convention=\"peak\",\n",
    ")\n",
    "solve = lambda model, wave, mesh: Simulation(\n",
    "    problem=Problem(\n",
    "        name=\"Wave on a magnetized plasma layer\",\n",
    "        geometry=layer,\n",
    "        physics=(model,),\n",
    "        boundary_conditions=(\n",
    "            *(\n",
    "                PeriodicBoundary(\n",
    "                    physics=model,\n",
    "                    pair=PeriodicPair(faces[side + \"_min\"], faces[side + \"_max\"]),\n",
    "                )\n",
    "                for side in \"xy\"\n",
    "            ),\n",
    "            ImpedanceBoundary(\n",
    "                physics=model,\n",
    "                boundary=faces.z_min,\n",
    "                admittance=admittance,\n",
    "                incident_electric_field=tuple(waves[wave]),\n",
    "            ),\n",
    "            ImpedanceBoundary(\n",
    "                physics=model, boundary=faces.z_max, admittance=admittance\n",
    "            ),\n",
    "        ),\n",
    "    ),\n",
    "    mesh=mesh,\n",
    "    numerics=numerics,\n",
    ").solve_stationary()\n",
    "frequencies = np.round(np.arange(1.0e9, 6.01e9, 0.1e9), -6)\n",
    "models = {frequency: maxwell(frequency) for frequency in frequencies}\n",
    "results = {\n",
    "    (wave, frequency): solve(models[frequency], wave, mesh)\n",
    "    for wave in waves\n",
    "    for frequency in frequencies\n",
    "}"
   ],
   "execution_count": null,
   "outputs": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Refractive index inside the plasma\n",
    "\n",
    "Inside the layer the field is a forward and a backward wave of the same wavenumber, so\n",
    "$E(z+h)+E(z-h)=2\\cos(kh)\\,E(z)$ for its circular component, whatever the two amplitudes. A least-squares\n",
    "fit of this relation on a line through the layer ($h=5$ mm) gives the computed index $n=k/k_0$."
   ]
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "plasma_frequency2 = electron_density * e**2 / (epsilon_0 * m_e)\n",
    "cyclotron = e * magnetic_field / m_e\n",
    "appleton_hartree = lambda frequency, sign: np.sqrt(\n",
    "    1\n",
    "    - plasma_frequency2\n",
    "    / (\n",
    "        (2 * np.pi * frequency) ** 2\n",
    "        - sign * cyclotron * 2 * np.pi * frequency\n",
    "        + 1j * collision_frequency * 2 * np.pi * frequency\n",
    "    )\n",
    ")\n",
    "sign = {\"R\": 1, \"L\": -1}\n",
    "z_fit = np.linspace(0, thickness, 11)\n",
    "fit_line = np.column_stack(\n",
    "    (np.full_like(z_fit, 0.4 * width), np.full_like(z_fit, 0.6 * depth), z_fit)\n",
    ")\n",
    "circular = {\n",
    "    key: result.field(models[key[1]].electric_field).evaluate(fit_line)\n",
    "    @ waves[key[0]].conj()\n",
    "    for key, result in results.items()\n",
    "}\n",
    "index = {\n",
    "    key: np.arccos(\n",
    "        np.linalg.lstsq(E[1:-1, None], (E[2:] + E[:-2]) / 2, rcond=None)[0][0]\n",
    "    )\n",
    "    / (z_fit[1] * 2 * np.pi * key[1] / c)\n",
    "    for key, E in circular.items()\n",
    "}\n",
    "print(\"wave   f [GHz]   computed n          Appleton-Hartree n    deviation\")\n",
    "for key in [(wave, f) for wave in waves for f in (1.5e9, 2.4e9, 3.0e9, 5.0e9)]:\n",
    "    exact = appleton_hartree(key[1], sign[key[0]])\n",
    "    print(\n",
    "        f\"  {key[0]}  {key[1] / 1e9:8.2f}   {index[key].real:7.4f}{index[key].imag:+.4f}i     {exact.real:7.4f}{exact.imag:+.4f}i      \"\n",
    "        f\"{100 * abs(index[key] / exact - 1):.3f} %\"\n",
    "    )"
   ],
   "execution_count": null,
   "outputs": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Reflection, transmission and absorption\n",
    "\n",
    "The reflected wave is the field on the front surface minus the incident wave, the transmitted wave the\n",
    "field on the rear surface. The absorbed power from the plasma's own dissipation density,\n",
    "$\\tfrac12\\operatorname{Re}(\\mathbf J^*\\cdot\\mathbf E)$ integrated over the column, must close the power balance."
   ]
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "ends = np.array(\n",
    "    [[0.4 * width, 0.6 * depth, 0.0], [0.4 * width, 0.6 * depth, thickness]]\n",
    ")\n",
    "end_fields = {\n",
    "    key: result.field(models[key[1]].electric_field).evaluate(ends)\n",
    "    for key, result in results.items()\n",
    "}\n",
    "reflection = {key: E[0] @ waves[key[0]].conj() - 1 for key, E in end_fields.items()}\n",
    "transmission = {key: E[1] @ waves[key[0]].conj() for key, E in end_fields.items()}\n",
    "incident_power = 0.5 * admittance * width * depth\n",
    "absorbed = {\n",
    "    key: result.field(models[key[1]].absorbed_power_density).integrate().value\n",
    "    / incident_power\n",
    "    for key, result in results.items()\n",
    "}\n",
    "k0 = lambda frequency: 2 * np.pi * frequency / c\n",
    "layer_r = (\n",
    "    lambda n, f: (1 - n)\n",
    "    / (1 + n)\n",
    "    * (1 - np.exp(2j * n * k0(f) * thickness))\n",
    "    / (1 - ((1 - n) / (1 + n)) ** 2 * np.exp(2j * n * k0(f) * thickness))\n",
    ")\n",
    "layer_t = (\n",
    "    lambda n, f: (1 - ((1 - n) / (1 + n)) ** 2)\n",
    "    * np.exp(1j * n * k0(f) * thickness)\n",
    "    / (1 - ((1 - n) / (1 + n)) ** 2 * np.exp(2j * n * k0(f) * thickness))\n",
    ")\n",
    "exact_r = {\n",
    "    key: layer_r(appleton_hartree(key[1], sign[key[0]]), key[1]) for key in results\n",
    "}\n",
    "exact_t = {\n",
    "    key: layer_t(appleton_hartree(key[1], sign[key[0]]), key[1]) for key in results\n",
    "}\n",
    "for wave in waves:\n",
    "    keys = [(wave, f) for f in frequencies]\n",
    "    print(\n",
    "        f\"{wave} wave, {len(keys)} frequencies 1-6 GHz: largest deviation |R - R_exact| = \"\n",
    "        f\"{max(abs(abs(reflection[k]) ** 2 - abs(exact_r[k]) ** 2) for k in keys):.1e}, |T - T_exact| = \"\n",
    "        f\"{max(abs(abs(transmission[k]) ** 2 - abs(exact_t[k]) ** 2) for k in keys):.1e}; \"\n",
    "        f\"power balance |R + T + A_plasma - 1| <= {max(abs(abs(reflection[k]) ** 2 + abs(transmission[k]) ** 2 + absorbed[k] - 1) for k in keys):.1e}\"\n",
    "    )\n",
    "peak = max(frequencies, key=lambda f: absorbed[(\"R\", f)])\n",
    "print(\n",
    "    f\"R wave absorbs most at {peak / 1e9:.1f} GHz: A = {absorbed[('R', peak)]:.3f} \"\n",
    "    f\"(exact {1 - abs(exact_r[('R', peak)]) ** 2 - abs(exact_t[('R', peak)]) ** 2:.3f}); L wave there: A = {absorbed[('L', peak)]:.3f}\"\n",
    ")\n",
    "cross = max(\n",
    "    np.abs(\n",
    "        result.field(models[key[1]].electric_field).evaluate(fit_line)\n",
    "        @ waves[\"L\" if key[0] == \"R\" else \"R\"].conj()\n",
    "    ).max()\n",
    "    for key, result in results.items()\n",
    ")\n",
    "print(\n",
    "    f\"largest field of the opposite sense of rotation anywhere on the line: {cross:.1e} V/m (incident 1 V/m)\"\n",
    ")"
   ],
   "execution_count": null,
   "outputs": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A mesh study of the R wave at the resonance, 2.45 GHz: the error of the transmitted field against the\n",
    "exact layer solution on 6, 12 and 24 cells through the layer."
   ]
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "resonance = maxwell(2.45e9)\n",
    "study_t = [\n",
    "    solve(resonance, \"R\", m).field(resonance.electric_field).evaluate(ends)[1]\n",
    "    @ waves[\"R\"].conj()\n",
    "    for m in meshes.values()\n",
    "]\n",
    "exact_resonance = layer_t(appleton_hartree(2.45e9, 1), 2.45e9)\n",
    "study_errors = [abs(t / exact_resonance - 1) for t in study_t]\n",
    "order = np.log(study_errors[0] / study_errors[-1]) / np.log(4.0)\n",
    "print(\n",
    "    \"mesh study at 2.45 GHz: \"\n",
    "    + \", \".join(\n",
    "        f\"{cells} cells: {100 * e:.4f} %\" for cells, e in zip(meshes, study_errors)\n",
    "    )\n",
    "    + f\"; observed order {order:.2f}\"\n",
    ")"
   ],
   "execution_count": null,
   "outputs": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Figure\n",
    "\n",
    "Top: transmitted and absorbed power over frequency for both senses of rotation, computed (solid) and\n",
    "from the exact layer formulas (dashed). The R wave is absorbed most strongly just below the cyclotron\n",
    "frequency, where its wavelength shrinks, and is blocked in its cut-off band between $f_c$ and $f_R$; the\n",
    "L wave passes with little loss. Bottom: the Appleton-Hartree indices\n",
    "with the values read from the computed fields (dash-dotted: imaginary parts), and the field strength\n",
    "through the layer at 2.4 GHz, close to the resonance."
   ]
  },
  {
   "cell_type": "code",
   "metadata": {},
   "source": [
    "z = np.linspace(0, thickness, 300)\n",
    "line = np.column_stack((np.full_like(z, 0.4 * width), np.full_like(z, 0.6 * depth), z))\n",
    "fine = np.linspace(1.0e9, 6.0e9, 600)\n",
    "ghz = frequencies / 1e9\n",
    "profile = {\n",
    "    wave: np.abs(\n",
    "        results[(wave, 2.4e9)].field(models[2.4e9].electric_field).evaluate(line)\n",
    "        @ waves[wave].conj()\n",
    "    )\n",
    "    for wave in waves\n",
    "}\n",
    "inside = lambda n: np.abs(\n",
    "    (\n",
    "        np.exp(1j * n * k0(2.4e9) * z)\n",
    "        - (1 - n) / (1 + n) * np.exp(1j * n * k0(2.4e9) * (2 * thickness - z))\n",
    "    )\n",
    "    * 2\n",
    "    / (1 + n)\n",
    "    / (1 - ((1 - n) / (1 + n)) ** 2 * np.exp(2j * n * k0(2.4e9) * thickness))\n",
    ")\n",
    "fig = plots.figure(2, 2, size=(14, 9))\n",
    "plots.line(\n",
    "    ghz,\n",
    "    {\n",
    "        f\"{wave} wave\": [abs(transmission[(wave, f)]) ** 2 for f in frequencies]\n",
    "        for wave in waves\n",
    "    },\n",
    "    reference={\n",
    "        f\"{wave} wave\": (\n",
    "            fine / 1e9,\n",
    "            np.abs(layer_t(appleton_hartree(fine, sign[wave]), fine)) ** 2,\n",
    "        )\n",
    "        for wave in waves\n",
    "    },\n",
    "    vlines={\"f_c\": cyclotron / (2e9 * np.pi)},\n",
    "    ylimits=(0, 1.05),\n",
    "    xlabel=\"frequency [GHz]\",\n",
    "    ylabel=\"transmittance |t|²\",\n",
    "    title=\"Transmitted power\",\n",
    "    legend=\"lower right\",\n",
    "    ax=fig[0],\n",
    ")\n",
    "plots.line(\n",
    "    ghz,\n",
    "    {f\"{wave} wave\": [absorbed[(wave, f)] for f in frequencies] for wave in waves},\n",
    "    reference={\n",
    "        f\"{wave} wave\": (\n",
    "            fine / 1e9,\n",
    "            1\n",
    "            - np.abs(layer_r(appleton_hartree(fine, sign[wave]), fine)) ** 2\n",
    "            - np.abs(layer_t(appleton_hartree(fine, sign[wave]), fine)) ** 2,\n",
    "        )\n",
    "        for wave in waves\n",
    "    },\n",
    "    vlines={\"f_c\": cyclotron / (2e9 * np.pi)},\n",
    "    ylimits=(0, 1.05),\n",
    "    xlabel=\"frequency [GHz]\",\n",
    "    ylabel=\"absorbed fraction\",\n",
    "    title=\"Absorbed power (from the plasma dissipation)\",\n",
    "    legend=\"upper right\",\n",
    "    ax=fig[1],\n",
    ")\n",
    "plots.line(\n",
    "    fine / 1e9,\n",
    "    {\n",
    "        \"Re n, R wave\": appleton_hartree(fine, 1).real,\n",
    "        \"Im n, R wave\": appleton_hartree(fine, 1).imag,\n",
    "        \"Re n, L wave\": appleton_hartree(fine, -1).real,\n",
    "        \"Im n, L wave\": appleton_hartree(fine, -1).imag,\n",
    "    },\n",
    "    points={\n",
    "        \"Re n, R wave\": (ghz, [index[(\"R\", f)].real for f in frequencies]),\n",
    "        \"Im n, R wave\": (ghz, [index[(\"R\", f)].imag for f in frequencies]),\n",
    "        \"Re n, L wave\": (ghz, [index[(\"L\", f)].real for f in frequencies]),\n",
    "        \"Im n, L wave\": (ghz, [index[(\"L\", f)].imag for f in frequencies]),\n",
    "    },\n",
    "    colors={\"Re n, R wave\": 0, \"Im n, R wave\": 0, \"Re n, L wave\": 1, \"Im n, L wave\": 1},\n",
    "    styles={\"Im n, R wave\": \"dashdot\", \"Im n, L wave\": \"dashdot\"},\n",
    "    ylimits=(0, 3.5),\n",
    "    xlabel=\"frequency [GHz]\",\n",
    "    ylabel=\"refractive index\",\n",
    "    title=\"Appleton-Hartree (lines) and computed fields (markers)\",\n",
    "    legend=\"upper right\",\n",
    "    ax=fig[2],\n",
    ")\n",
    "plots.line(\n",
    "    1e3 * z,\n",
    "    {f\"{wave} wave\": profile[wave] for wave in waves},\n",
    "    reference={\n",
    "        f\"{wave} wave\": inside(appleton_hartree(2.4e9, sign[wave])) for wave in waves\n",
    "    },\n",
    "    xlabel=\"depth in the layer z [mm]\",\n",
    "    ylabel=\"|E| [V/m]\",\n",
    "    title=\"Field through the layer at 2.4 GHz\",\n",
    "    legend=\"upper right\",\n",
    "    ax=fig[3],\n",
    ")\n",
    "plots.show()"
   ],
   "execution_count": null,
   "outputs": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Going further\n",
    "\n",
    "Tilt the static field in `MagnetizedColdPlasma.uniform(magnetic_field=...)`: for propagation across\n",
    "$\\mathbf B_0$ the eigenwaves become the linearly polarized ordinary and extraordinary waves, and an\n",
    "incident circular wave splits into both. Raising the density beyond the R cut-off at the operating\n",
    "frequency turns the layer into a reflector for one sense of rotation only."
   ]
  }
 ]
}
