Cross-Validation and Accuracy
rfx validation is easiest to read as a layered evidence story:
- Published benchmark scripts for the core RF cases
- Cross-solver checks against Meep and OpenEMS
- Workflow validation for advanced examples and GPU regression scripts
Use those layers in that order when making public claims: benchmark first, cross-solver second, workflow validation third.
1. Published benchmark scripts
Section titled “1. Published benchmark scripts”These are the current public-facing numbers to quote first. Each row maps to a
script under examples/40_accuracy_validation/.
| Structure | Script | Reference | Error |
|---|---|---|---|
| Patch antenna resonance | examples/40_accuracy_validation/01_patch_balanis.py | Balanis Ch. 14 | 1.97% |
| WR-90 TE10 cutoff | examples/40_accuracy_validation/02_waveguide_te10.py | Analytical | 0.60% |
| Dielectric cavity TM110 | examples/40_accuracy_validation/03_cavity_tm110.py | Analytical | 0.016% |
| Microstrip characteristic impedance | examples/40_accuracy_validation/04_microstrip_z0.py | Hammerstad-Jensen | 0.47% |
| Coupled-line filter | examples/40_accuracy_validation/05_coupled_filter.py | Pozar Ch. 8 | 22.5% (closed-form limitation) |
Interpretation
Section titled “Interpretation”- The cavity, waveguide, and microstrip numbers are the strongest numerical anchors.
- The coupled-line filter discrepancy comes from the closed-form reference, so treat it as a limitation in the formula rather than evidence of solver instability.
- Patch resonance is good public evidence, but feed and port calibration still deserve more context than a cavity-style benchmark.
2. Cross-solver checks against Meep and OpenEMS
Section titled “2. Cross-solver checks against Meep and OpenEMS”The strongest independent checks live in the test suite:
tests/test_meep_crossval.py— PEC cavity TM110 vs analytical and Meep.tests/test_meep_crossval_patch.py— dielectric-loaded cavity vs Meep.tests/test_crossval_comprehensive.py— multi-case comparisons against Meep and OpenEMS.
Use these comparisons when you want to justify the solver core rather than a single RF design workflow.
| Benchmark family | Evidence | What it proves |
|---|---|---|
| PEC cavity resonance | tests/test_meep_crossval.py, tests/test_crossval_comprehensive.py | The solver matches the analytical cavity resonance and stays tightly aligned with Meep. |
| Dielectric-loaded cavity resonances | tests/test_meep_crossval_patch.py, tests/test_crossval_comprehensive.py | The dielectric-loaded cases stay within the documented cross-solver tolerance. |
| WR-90 cutoff | tests/test_crossval_comprehensive.py | The cutoff case is essentially exact at the documented resolution. |
| Lumped-port sanity checks | tests/test_crossval_comprehensive.py | The port model preserves the expected magnitude and phase behavior. |
The public summary in README.md currently quotes 0.000–0.007% agreement on
cavities and waveguides. Keep that number paired with the exact benchmark family
it describes.
3. Workflow validation
Section titled “3. Workflow validation”The advanced examples are useful, but they are not the same as the core benchmark set.
examples/50_advanced/contains research-style workflows such as bandwidth optimization, inverse design, matching, coupling, lensing, and material characterization.examples/50_advanced/gpu_validation/contains regression checks for those workflows on accelerated runs.
Use these examples to show that an end-to-end workflow remains stable. Do not use them as the primary numerical anchor for solver accuracy.
Reproducibility pointers
Section titled “Reproducibility pointers”| Script / area | Purpose |
|---|---|
examples/40_accuracy_validation/run_all.py | Runs the core published benchmark set |
examples/50_advanced/gpu_validation/run_gpu_validation.py | Runs the advanced workflow regression checks |
tests/test_crossval_comprehensive.py | Compact reference for the strongest cross-solver assertions |
docs/public/guide/changelog.mdx | Public summary of current headline results |
Practical takeaway
Section titled “Practical takeaway”For the strongest public messaging, lead with the published benchmark table, then cite Meep/OpenEMS agreement as independent confirmation, and finally use the advanced examples as workflow evidence.