Expand description
Passivity, energy conservation, and C02-C09 numerical budget verifiers.
Implements independent first-principles f64 evaluators for:
- C02-C09
f64small closed-form budget: $|y - y_{\text{ref}}| \le 64 \cdot 2^{-52} Q$. - C02-C09 $N$-term reduction / DFT budget: $16,\gamma_N \sum_{i=1}^N |t_i|$ with $\gamma_N = \frac{N u}{1 - N u}, u = 2^{-53}$.
- C02-C09 QAC
B32scalar budget: $|y - y_{\text{ref}}| \le 8,u_{32} S + 2\times 10^{-6} |y_{\text{ref}}|, u_{32} = 2^{-24}$, and vector relative $L_2 \le 5\times 10^{-6}$. - Electromagnetic Mode 0 (Poynting flux, energy density, static wavelength guard) and Mode 2 (3D Cartesian Yee CFL bound and exact discrete dispersion relation).
- Acoustic Mode 00 (fluid intensity/energy), Mode 01 (6-component Cauchy elasticity), and Mode 03 (impedance reflection/transmission energy conservation $R + T = 1$).
- Multi-port scattering matrix passivity ($|\mathbf{S}|_2 \le 1$) and grid-refinement observed convergence order $p = \frac{\ln(E_1/E_2)}{\ln(h_1/h_2)} \ge 1.8$.
Structs§
- Budget
Evaluation - Detailed audit record for a numerical budget comparison.
- EmMode0
Oracle Result - Instantaneous electromagnetic Mode 0 oracle output (vacuum or isotropic lossless medium).
- QacElastic
Mode01 Oracle Result - Independent QAC Mode 01 isotropic elastic solid oracle result.
- QacFluid
Mode00 Oracle Result - Independent QAC Mode 00 fluid acoustic oracle result.
Enums§
- Conservation
Validation Error - Errors emitted by passivity, conservation, and numerical budget verifiers.
Constants§
- C02_
AMPLITUDE_ SCALES_ B32 - Standard C02 QAC
B32amplitude scaling factors. - C02_
AMPLITUDE_ SCALES_ F64 - Standard C02 amplitude scaling factors for linear-domain invariance checks.
- F32_
UNIT_ ROUNDOFF - IEEE-754
f32unit roundoff $u_{32} = 2^{-24}$ (0.5 * f32::EPSILON as f64). - F64_
EPSILON - IEEE-754
f64machine epsilon $\varepsilon = 2^{-52}$. - F64_
UNIT_ ROUNDOFF - IEEE-754
f64unit roundoff $u = 2^{-53}$ (0.5 * f64::EPSILON). - VACUUM_
IMPEDANCE_ OHM - Characteristic impedance of vacuum $Z_0 = \mu_0 c_0$ ($\Omega$).
- VACUUM_
PERMEABILITY_ H_ PER_ M - Exact SI magnetic constant (vacuum permeability) $\mu_0 = 4\pi \times 10^{-7}\text{ H/m}$ consistent with $c_0 = 299,792,458\text{ m/s}$ and $Z_0 = \mu_0 c_0$.
- VACUUM_
PERMITTIVITY_ F_ PER_ M - Vacuum electric permittivity $\varepsilon_0 = \frac{1}{\mu_0 c_0^2}$ ($\text{F/m}$).
Functions§
- evaluate_
acoustic_ interface_ oracle - Evaluate QAC Mode 03 normal-incidence planar acoustic interface coefficients: $r = \frac{Z_2 - Z_1}{Z_2 + Z_1}$, $t = \frac{2 Z_2}{Z_2 + Z_1}$, energy reflectance $R = r^2$, energy transmittance $T = \frac{Z_1}{Z_2} t^2$, verifying energy conservation $R + T = 1$.
- evaluate_
em_ mode0_ instantaneous_ oracle - Evaluate the independent C02 Mode 0 instantaneous $\mathbf{E}/\mathbf{B}$ oracle in an isotropic medium ($\varepsilon_r > 0, \mu_r > 0$).
- evaluate_
em_ wavelength_ m - Evaluate phase wavelength $\lambda = \frac{c_0}{f \sqrt{\varepsilon_r \mu_r}}$, strictly rejecting static/aperiodic fields ($f \le 0$) per C02-C02 and Mode 0.
- evaluate_
qac_ elastic_ mode01_ oracle - Evaluate QAC Mode 01 small-strain isotropic elasticity oracle (C02 Mode 01): $\lambda = K - \frac{2}{3}\mu$, $c_P = \sqrt{\frac{\lambda + 2\mu}{\rho}}$, $c_S = \sqrt{\frac{\mu}{\rho}}$, $\boldsymbol{\sigma} = \lambda\operatorname{tr}(\boldsymbol{\varepsilon})\mathbf{I} + 2\mu\boldsymbol{\varepsilon}$, $p = -\frac{1}{3}\operatorname{tr}(\boldsymbol{\sigma})$.
- evaluate_
qac_ fluid_ mode00_ oracle - Evaluate QAC Mode 00 fluid acoustic perturbation oracle (C02 Mode 00):
$c = \sqrt{K/\rho}$, $Z = \sqrt{\rho K}$, $\mathbf{I} = p\mathbf{v}$, $e = \frac{1}{2}\rho|\mathbf{v}|^2 + \frac{p^2}{2K}$.
Rejects non-collocated $p$ and $\mathbf{v}$ when
collocatedis false. - gamma_
n_ f64 - Compute Higham’s rounding constant $\gamma_N = \frac{N u}{1 - N u}$ with $u = 2^{-53}$.
- verify_
acoustic_ energy_ conservation - Verify Acoustic energy flux conservation and passivity: $\nabla\cdot\mathbf{I} + \frac{\partial e}{\partial t} = -w_{\text{loss}}$ with $w_{\text{loss}} \ge 0$.
- verify_
b32_ scalar_ budget - Evaluate the C02-C09 QAC
B32scalar budget: $|y - y_{\text{ref}}| \le 8,u_{32} S + 2\times 10^{-6} |y_{\text{ref}}|, \quad u_{32} = 2^{-24}$. - verify_
b32_ vector_ budget - Evaluate the C02-C09 QAC
B32vector budget: per-componentB32scalar check plus relative $L_2 \le 5\times 10^{-6}$ when $|\mathbf{y}_{\text{ref}}|_2 > 0$. - verify_
f64_ closed_ form_ budget - Evaluate the C02-C09 small closed-form
f64budget: $|y - y_{\text{ref}}| \le 64 \cdot 2^{-52} Q$. - verify_
grid_ convergence_ order - Verify observed grid-refinement convergence order $p = \frac{\ln(E_1 / E_2)}{\ln(h_1 / h_2)} \ge p_{\min}$ across successive grid spacings $h_1 > h_2$ with positive errors $E_1 > E_2 > 0$.
- verify_
n_ term_ reduction_ budget - Evaluate the C02-C09 $N$-term reduction / DFT budget: $|y - y_{\text{ref}}| \le 16,\gamma_N \sum_{i=1}^N |t_i|$.
- verify_
poynting_ conservation_ balance - Verify Poynting energy conservation and passivity balance: $\nabla\cdot\mathbf{S} + \frac{\partial u}{\partial t} = -w_{\text{loss}}$ with $w_{\text{loss}} = \sigma |\mathbf{E}|^2 \ge 0$.
- verify_
scattering_ matrix_ passivity - Verify passivity of a multi-port complex scattering matrix $\mathbf{S}$ (up to $4\times 4$): $|\mathbf{S}|2 \le 1 + 64,\varepsilon \iff \lambda{\max}(\mathbf{S}^\dagger\mathbf{S}) \le (1 + 64,\varepsilon)^2$.
- verify_
yee_ cfl_ and_ dispersion - Verify Cartesian 3D Yee CFL stability (C02 Mode 2): $\Delta t \le \frac{1}{v \sqrt{\Delta x^{-2} + \Delta y^{-2} + \Delta z^{-2}}}$ with $v = \frac{c_0}{\sqrt{\varepsilon_r \mu_r}}$, and evaluate the exact discrete dispersion RHS $(v\Delta t)^2 \sum_{j=0}^2 \frac{\sin^2(k_j \Delta x_j / 2)}{\Delta x_j^2}$.