Skip to content

Fix dielectric attenuation, input validation, and header rebuilds - #10

Merged
osaether merged 1 commit into
mainfrom
fix/calculation-validation-regressions
Sep 13, 2026
Merged

osaether merged 1 commit into
mainfrom
fix/calculation-validation-regressions

Conversation

@osaether

Copy link
Copy Markdown
Owner

The calculator could report excessive dielectric attenuation and successfully calculate a different conductor configuration after rejecting an invalid conductor. Malformed numeric inputs could also produce NaN results or silently change frequency (30MHz became 30 Hz).

This change corrects the dielectric filling factor and attenuation coefficient, aborts on conductor validation errors, and requires finite numeric values with no trailing text. Mesh counts must be integers within their supported ranges. It also adds generated header dependencies to the Makefile and corrects the dB/m-to-Np/m explanation for gamma.

Regression tests build and run the C executable in temporary directories, cover all five findings, and check valid-input and lossless-substrate behavior. CI now runs the full test suite, and the README documents the corrected formula and input requirements.

Validation:

  • The initial regression suite reproduced all five findings with 11 failing cases before fixes.
  • python3 -m pytest -q: 56 passed after fixes.
  • make -B: full rebuild succeeded.
  • make check-z0: agreement within 0.03% of the Hammerstad-Jensen reference.
  • git diff --check: passed.

@osaether
osaether merged commit ee0e2ed into main Sep 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant