# Reproducible ideal-geometry comparison

Run `python calculate.py` (Python 3 standard library). The script writes calculated-results.csv. This is an independently implemented closed-form calculation, NOT an executed KiCad/Qucs/Polar solver, not a field solution, and not a manufactured-board result.

Assumptions: isolated single-ended uniform lines; infinitely wide perfect reference planes; zero conductor thickness; uniform relative permittivity 3.66 (illustrative constant, not an approved RO4835 model); no coating, dispersion, roughness, dielectric/conductor/radiation loss, coupled neighbor, via, connector or transition. Microstrip substrate height h=0.20mm, air above. Symmetric stripline total plane spacing B=0.40mm, centered conductor (0.20mm to either plane). These are different cross-sections; equal nearest-plane distance is an explicit comparison choice, not an invariant advantage.

Microstrip uses the Hammerstad–Jensen quasi-static zero-thickness expressions documented by Qucs, equations 11.4/11.6/11.15–18: https://qucs.sourceforge.net/tech/node75.html . Educational values W/h=1.5 and ~2.189 fall inside documented effective-permittivity range 0.01–100, er<128. No finite-thickness or dispersive extension is used.

Stripline uses the ideal centered thin-strip elliptic relation documented in KiCad's own implementation and Polar's technical appendix: Z0=eta0*K(sech(pi*W/(2B)))/(4*sqrt(er)*K(tanh(pi*W/(2B)))). K takes modulus, not squared parameter. Independent AGM implementation; checked against scipy.special.ellipk(k*k) at k=.1/.5/.9. Sources:
- https://docs.kicad.org/doxygen/coupled__stripline_8cpp_source.html (source cites Cohn 1954; mathematical expression near calcSingleStripImpedances).
- https://www.polarinstruments.com/man/operator/Si6000b%20User%20Guide%20(A5%20format).pdf (primary tool-developer reference; not execution of that proprietary software).

Delay per unit length uses sqrt(effective_er)/c and is only this non-dispersive approximation. Do not publish 6-decimal results as fabrication precision. Display about 62.4Ω vs41.4Ω at W=.30mm; ideal 50Ω widths about .438mm vs .218mm. A real stackup with finite copper requires a suitable model and fabricator review. This result establishes that equal width does not imply equal impedance for these chosen structures; it does not prove universal width ratios, loss, crosstalk or EMC ranking.

Checks executed: K(0)=pi/2; impedance decreases as width increases in selected range; synthesized roots reproduce 50Ω within 1e-9Ω arithmetic residual; separate scipy elliptic cross-check. Arithmetic residual is not model accuracy.
