Module maxwell_emf
Expand description
etalon_sim::maxwell_emf — 3D Continuum Maxwell Vector Calculus, Cartesian Yee FDTD,
Dispersive ADE Media, Poynting Energy Balance, and C02 Electromagnetic Oracles.
Pure dependency-free (core/std + bytemuck) continuum electromagnetic simulation
substrate consumed by qualia_core_db::q42::emf_operators.
Modules§
- cpml_
restart - 3D Roden-Gedney Convolutional PML (
CPML) Stretched-Coordinate Boundary & Multi-Pole Debye/Drude/Lorentz ADE Coupled Leapfrog Stepper with Bitwise Restart (Schema 103Keys26/29). - dispersion_
ade - Debye, Drude, and Lorentz Auxiliary Differential Equation (ADE) Dispersive Media Operators (
etalon-sim). - poynting_
energy - Poynting Theorem, Spatiotemporal Collocation, and C02 Mode 0/1/3/4/5/6/7 Oracles (
etalon-sim). - vector_
calculus - 3D Staggered & Collocated Electromagnetic Vector Calculus Operators (
etalon-sim). - yee_
fdtd - 3D Cartesian Yee FDTD Solver, CFL Gate, and Discrete Dispersion Oracle (
etalon-sim).
Structs§
- AdePole
Auxiliary State - Cpml
AdeState - Cpml
Axis Coeffs - Cpml
Grading Spec - Debye
Pole - Single-pole Debye relaxation parameters: $$\tau_p \frac{d\mathbf{P}_p}{dt} + \mathbf{P}_p = \varepsilon_0 \Delta\varepsilon_p \mathbf{E}$$
- Drude
Pole - Drude conduction / cold-plasma pole parameters: $$\frac{d\mathbf{J}_D}{dt} + \gamma_D \mathbf{J}_D = \varepsilon_0 \omega_p^2 \mathbf{E}$$
- Grid3d
Spec - 3D structured Cartesian grid geometry (
[nx, ny, nz]cells with spacings[dx, dy, dz]in metres). - Lorentz
Pole - Lorentz second-order resonant oscillator pole parameters: $$\frac{d^2\mathbf{P}_L}{dt^2} + \gamma_L \frac{d\mathbf{P}_L}{dt} + \omega_0^2 \mathbf{P}_L = \varepsilon_0 \Delta\varepsilon_L \omega_0^2 \mathbf{E}$$
- YeeMaterial
Params - Homogeneous isotropic constitutive parameters for a 3D Yee grid domain.
- YeePlane
Wave Result - Result of a periodic 3D Yee plane-wave propagation and exact-time phase evaluation at $T = L / c_0$.
Enums§
- Boundary
Condition - Spatial boundary condition for 3D structured electromagnetic operators.
- EmfOperator
Error - Typed error enumeration for 3D electromagnetic operators, Yee FDTD, ADE, and C02 oracles.
- YeeSolver
Profile - Supported Mode 2 Yee solver profiles.
Constants§
- C0_
M_ PER_ S - Exact SI speed of light in vacuum $c_0 = 299,792,458\text{ m/s}$.
- CPML_
ADE_ RESTART_ MAGIC - ELEMENTARY_
CHARGE_ C - Exact SI elementary charge $e = 1.602,176,634 \times 10^{-19}\text{ C}$.
- EPS0_
REF_ F_ PER_ M - Mutually consistent reference vacuum permittivity $\varepsilon_0 = \frac{1}{\mu_0 c_0^2}\text{ F/m}$.
- MU0_
REF_ H_ PER_ M - CODATA 2022 reference vacuum magnetic permeability $\mu_0 = 1.256,637,061,27 \times 10^{-6}\text{ H/m}$.
- PLANCK_
H_ J_ S - Exact SI Planck constant $h = 6.626,070,15 \times 10^{-34}\text{ J}\cdot\text{s}$.
- PSI_XY
- PSI_XZ
- PSI_YX
- PSI_YZ
- PSI_ZX
- PSI_ZY
- SCHEMA_
103_ KEY_ ADE_ AUXILIARY_ STATE - SCHEMA_
103_ KEY_ PML_ AUXILIARY_ STATE - YEE_
CONDUCTIVE_ PERIODIC_ NO_ PHI_ URI - Canonical model URI for Mode 2 conductive periodic no-phi Yee profile.
- YEE_
LOSSLESS_ PERIODIC_ NO_ PHI_ URI - Canonical model URI for Mode 2 lossless periodic no-phi Yee profile.
- Z0_
REF_ OHM - Mutually consistent reference characteristic impedance of vacuum $Z_0 = \mu_0 c_0\text{ }\Omega$.
Functions§
- admit_
stokes_ vector - Admit a physical Stokes vector $[I, Q, U, V]$ per C02 Mode 1.
- admit_
yee_ timestep - Admit a candidate solver timestep $\Delta t$ against the 3D Cartesian Yee CFL bound.
- c02_
preview_ f32_ budget - C02 derived
f32preview algebraic budget: $32 \times 2^{-23} \times Q$. - c02_
reduction_ f64_ budget - C02 $N$-term matrix/DFT reduction budget: $16 \gamma_n \sum_i |t_i|$ with $\gamma_n = \frac{n u}{1 - n u}, u = 2^{-53}$.
- c02_
small_ op_ f64_ budget - C02 small closed-form
f64algebraic budget: $64 \times 2^{-52} \times Q$. - collocate_
yee_ poynting_ and_ energy_ cell_ centers - Collocate staggered Yee fields $\mathbf{E}^n$ and $\mathbf{H}^{n\mp 1/2}$ to cell centers at time $t = n\Delta t$.
- convert_
iq_ emf_ to_ qac_ conjugated - Convert between EMF negative-carrier
(I, Q)and QAC positive-carrier(I, Q)per C02-C08. - dft_
forward_ unscaled - Mode
0x0105forward unnormalized DFT. - gauss_
electric_ residual - Compute the electric Gauss-law residual $r_D = \nabla \cdot \mathbf{D} - \rho_v$.
- gauss_
magnetic_ residual - Compute the magnetic Gauss-law residual $r_B = \nabla \cdot \mathbf{B}$.
- instantaneous_
poynting_ and_ energy - Mode
0x0100(instantaneous_E_B_v1) instantaneous Poynting vector and energy density. - jones_
to_ stokes_ candidate_ v1 - Convert a complex transverse Jones vector $(E_1, E_2)$ to Stokes parameters $[I, Q, U, V]$.
- mode0_
carrier_ wavelength_ m - Evaluate vacuum wavelength $\lambda = c_0 / f$ for Mode
0x0100, strictly rejecting static/aperiodic records. - mode6_
photon_ attenuation_ and_ independent_ dose - Mode
0x0106monoenergetic uncollided Beer-Lambert photon fluence attenuation and independent dose. - mode7_
quasi_ static_ dipole_ potential_ v - Mode
0x0107synthetic infinite homogeneous isotropic quasi-static volume-conductor dipole potential. - mueller_
apply - Mode
0x0104$4 \times 4$ Mueller matrix multiplication $\mathbf{S}{\text{out}} = M \mathbf{S}{\text{in}}$. - mueller_
ideal_ linear_ polarizer_ x - Ideal horizontal ($+x$) linear polarizer $4 \times 4$ Mueller matrix.
- peak_
phasor_ time_ average_ poynting - Time-averaged Poynting vector from peak complex phasors $(\hat{\mathbf{E}}{\text{peak}}, \hat{\mathbf{H}}{\text{peak}})$.
- ray_
geometric_ delay_ s - Geometric ray propagation delay $t = \text{path} / v$.
- reconstruct_
rf_ emf_ negative_ carrier - Mode
0x0105real RF waveform reconstruction under EMF negative-exponential carrier. - reconstruct_
rf_ qac_ positive_ carrier - Real RF waveform reconstruction under QAC positive-exponential carrier.
- restore_
cpml_ ade_ restart_ from - rms_
phasor_ time_ average_ poynting - Time-averaged Poynting vector from RMS complex phasors $(\hat{\mathbf{E}}{\text{rms}}, \hat{\mathbf{H}}{\text{rms}})$.
- rotate_
eb_ hamilton_ xyzw - C02-C04 active local-to-parent Hamilton quaternion rotation (
q = [x, y, z, w]) for $(\mathbf{E}, \mathbf{B})$. - rotate_
mueller_ matrix_ passive - Rotate a $4 \times 4$ Mueller matrix by passive basis angle $\theta$.
- rotate_
stokes_ basis_ passive - Passive transverse basis rotation of a Stokes vector by angle $\theta$.
- run_
yee_ periodic_ plane_ wave_ fixture - Evaluate the C02 Mode 2 periodic plane-wave fixture on a 3D isotropic Yee lattice.
- serialize_
cpml_ ade_ restart_ into - spectral_
density_ wavelength_ midpoint_ integral - Mode
0x0103spectral density Jacobian conversion and $N$-bin midpoint integration. - spectral_
plane_ wave_ curl - Exact spectral Fourier-mode curl oracle for a real plane wave $\mathbf{A}(\mathbf{r}) = \mathbf{A}_0 \cos(\mathbf{k}\cdot\mathbf{r} + \phi_0)$.
- spectral_
plane_ wave_ divergence - Exact spectral Fourier-mode divergence oracle for a real plane wave $\mathbf{A}(\mathbf{r}) = \mathbf{A}_0 \cos(\mathbf{k}\cdot\mathbf{r} + \phi_0)$.
- verify_
cpml_ ade_ restart_ parity - verify_
discrete_ charge_ conservation - Verify discrete charge conservation on the Yee lattice: $\frac{(\nabla \cdot \mathbf{D})^{n+1} - (\nabla \cdot \mathbf{D})^n}{\Delta t} + \nabla \cdot \mathbf{J}^{n+1/2} = 0$.
- verify_
discrete_ poynting_ power_ balance - Evaluate the exact local staggered Poynting balance residual at each cell
(i, j, k). - verify_
div_ curl_ zero_ 2nd - Verify the exact staggered discrete vector identity $\nabla \cdot (\nabla \times \mathbf{A}) = 0$.
- verify_
stokes_ circulation_ cell - Verify integral Stokes theorem $\oint_{\partial S} \mathbf{E} \cdot d\mathbf{l} = \iint_S (\nabla \times \mathbf{E}) \cdot d\mathbf{A}$
on a single Yee cell
(ix, iy, iz). - yee_
cfl_ limit_ 3d - Compute the exact 3D Cartesian Yee Courant-Friedrichs-Lewy (CFL) maximum stable timestep: $$\Delta t_{\text{CFL}} = \frac{1}{v \sqrt{\Delta x^{-2} + \Delta y^{-2} + \Delta z^{-2}}}$$
- yee_
curl_ e_ 2nd - Second-order staggered Yee forward curl $\nabla \times \mathbf{E}$ mapping edge-staggered electric fields $(E_x, E_y, E_z)$ to face-staggered magnetic flux rates.
- yee_
curl_ e_ 4th - Fourth-order staggered forward curl $\nabla^{(4)} \times \mathbf{E}$ (Fang-type 4th-order stencil with weights $c_1 = 9/8$ and $c_2 = -1/24$).
- yee_
curl_ h_ 2nd - Second-order staggered Yee backward curl $\nabla \times \mathbf{H}$ mapping face-staggered magnetic fields $(H_x, H_y, H_z)$ to edge-staggered electric displacement rates.
- yee_
curl_ h_ 4th - Fourth-order staggered backward curl $\nabla^{(4)} \times \mathbf{H}$.
- yee_
discrete_ omega_ rad_ per_ s - Evaluate the exact 3D Cartesian Yee discrete dispersion relation for wavevector $\mathbf{k}$: $$\sin^2\left(\frac{\omega_{\text{num}} \Delta t}{2}\right) = (v \Delta t)^2 \sum_{j \in {x,y,z}} \frac{\sin^2(k_j \Delta x_j / 2)}{\Delta x_j^2}$$
- yee_
div_ b_ 2nd - Second-order staggered cell-center divergence $\nabla \cdot \mathbf{B}$ for face-staggered fields.
- yee_
div_ d_ 2nd - Second-order staggered vertex divergence $\nabla \cdot \mathbf{D}$ for edge-staggered fields.
- yee_
double_ curl_ e_ 2nd - Evaluate the staggered double-curl operator $\nabla \times (\mu^{-1} \nabla \times \mathbf{E})$.
- yee_
step_ leapfrog_ in_ place - Advance a 3D staggered Yee electromagnetic state by one full leapfrog step $\Delta t$.