Electron desktop application that calculates common electromagnetic engineering quantities — relative bandwidth, aperture efficiency, wavelength, transmission line impedance (microstrip / CPW / GCPW / coaxial), and SIW via design — with bilingual UI (English / 中文) and a stunning Apple Liquid Glass inspired interface. Ships as a portable executable; no installer, no user data stored.
- Relative bandwidth: enter
fminandfmax(with selectable Hz/kHz/MHz/GHz units); the app reports absolute bandwidth, center frequency, and the standard fractional bandwidth(fmax − fmin) / fcenter. - Aperture efficiency: enter frequency, antenna gain in dBi, and physical aperture area (m² or cm²); the app reports wavelength λ, effective aperture area Aₑ, and efficiency η, flagging over-unity inputs as physically inconsistent.
- Wavelength (new in v0.3.0): enter frequency and relative permittivity εᵣ; the app reports free-space wavelength λ₀, guided wavelength λg = λ₀/√εᵣ (TEM), λg/2, λg/4, and phase velocity.
- Transmission line impedance (new in v0.3.0): characteristic impedance Z₀, effective permittivity εeff, and phase velocity for four line types — microstrip (Hammerstad–Jensen), CPW and GCPW (Ghione–Naldi conformal mapping with an AGM-based elliptic integral), and coaxial (
Z₀ = 60/√εᵣ · ln(D/d)). Lengths accept mm / µm / mil. - SIW via design (new in v0.3.0): enter operating frequency, εᵣ, and via center-to-center width
a; the app recommends via diameterd ≈ λd/10and pitchp = 1.5·d(Deslandes & Wu rules), and reports the equivalent widthaeff = a − d²/(0.95·p)and TE₁₀ cutoff frequency, warning when the design is below cutoff.
- Apple Liquid Glass UI — Inspired by Apple's 2026 design language with real-time backdrop blur, dynamic transparency (65-75%), and enhanced color saturation
- Frameless Window — Custom title bar with window controls (minimize, maximize/restore, close), draggable region, and double-click to maximize
- Dynamic Animated Background — Flowing gradient blobs with smooth 20-25s animation cycles and subtle rotation effects
- Responsive Layout — Fluid scaling from 720×540 to 1600×900 with CSS
clamp()functions - Microsoft YaHei Font — Optimized for Chinese, Japanese, and Korean character rendering
Switch between English and 中文 via the in-app toggle or OS menu. The active language persists across sessions.
Each calculation tab exposes a "Verify with Python" button in development mode. The renderer spawns the Python implementation over IPC and reports the absolute delta against the in-process TypeScript result. Packaged builds drop Python entirely to keep the binary small.
Full keyboard navigation, ARIA roles, prefers-reduced-motion and prefers-reduced-transparency fallbacks.
- Electron 33 with
contextIsolation: true,sandbox: true,nodeIntegration: false, and a strict CSP meta in the renderer HTML. - electron-vite + Vite 6 + TypeScript + React 18.
- Glassmorphism layered surfaces (animated gradient blobs, SVG turbulence grain, real backdrop-filter cards).
- Vitest for renderer/lib tests; pytest for Python tests; shared
fixtures.jsonensures both implementations agree to within machine precision.
src/
├── main/ # Electron main process: BrowserWindow, IPC, menu, Python subprocess wrapper
├── preload/ # contextBridge surface exposed as window.emApi
├── shared/ # IPC payload types shared between preload and renderer
└── renderer/ # React UI
├── components/ # Reusable UI parts (Tabs, GlassCard, NumberInput, ...)
├── features/ # bandwidth/, aperture-efficiency/, wavelength/, transmission-line/, siw/, tbd/
├── lib/ # Pure calculation functions, formatting, unit conversion
├── i18n/ # Custom Context-based translation provider
└── styles/ # Design tokens + glass system
python/
├── em_calc.py # CLI: actions = bandwidth | aperture-efficiency
└── tests/ # pytest, consumes the same fixtures.json as Vitest
build/
└── afterPack.cjs # Strips unused Chromium locales during packaging
Latest Release: v0.2.0
| Platform | File | Size | Instructions |
|---|---|---|---|
| Windows | EM-Calculator-0.2.0-portable-x64.exe |
~65 MB | Double-click to run. Self-extracts to %TEMP% and cleans up on close. |
| Windows | EM-Calculator-0.2.0-x64.zip |
~98 MB | Extract and run EM Calculator.exe |
| Linux | EM-Calculator-0.2.0-x64.tar.gz |
~90 MB | Extract and run ./EM-Calculator |
No installation required! The portable .exe uses LZMA compression for the smallest single-file footprint. A custom afterPack hook strips ~40 MB of unused Chromium locale files (keeping only en-* and zh-*).
No user data is stored. Calculations are stateless — closing the app leaves nothing behind besides the OS-managed Chromium cache.
Prerequisites: Node 20+ and (for development) Python 3.10+.
npm install
npm run dev # Launches Electron pointing at the Vite dev server| Script | Purpose |
|---|---|
npm run dev |
Hot-reloading dev mode (Electron + Vite) |
npm run build |
Production bundle into out/ (no installer) |
npm run dist:win |
Windows portable .exe + .zip into release/ |
npm run dist:linux |
Linux .tar.gz into release/ |
npm test |
Vitest unit tests with v8 coverage |
npm run lint |
ESLint flat config across src/ |
npm run typecheck |
Composite tsc check for both node and web tsconfigs |
python -m pytest python/ |
Run the Python reference test suite (dev only) |
The app ships without an installer — pick whichever shape suits you:
| Artifact | Size | How to run |
|---|---|---|
EM Calculator-<v>-portable-x64.exe |
~65 MB | Double-click. Self-extracts to %TEMP% and cleans up on close. |
EM Calculator-<v>-x64.zip |
~98 MB | Unzip, run EM Calculator.exe from the extracted folder. |
EM Calculator-<v>-x64.tar.gz |
~90 MB | Extract, run ./em-calculator from the extracted folder. |
The portable .exe uses LZMA compression for the smallest single-file footprint. A custom afterPack hook in build/afterPack.cjs strips ~40 MB of unused Chromium locale files (keeping only en-* and zh-*), so the packaged app starts at ~75 MB on disk rather than the default ~115 MB.
Linux AppImage is supported by electron-builder but requires running the build on Linux (or via Docker / WSL with a real distribution) because the mksquashfs tool is Linux-only. The Windows host falls back to .tar.gz.
No user data is stored. Calculations are stateless — closing the app leaves nothing behind besides the OS-managed Chromium cache. The portable build keeps that cache in %TEMP% and discards it on exit.
Relative bandwidth uses the engineering convention (fmax − fmin) / fcenter × 100% where fcenter = (fmax + fmin) / 2.
Aperture efficiency follows η = Aₑ / Aphys where Aₑ = (λ² / 4π) · 10^(G/10) and λ = c / f with c = 299_792_458 m/s.
When the computed efficiency exceeds 100% the UI surfaces a warning, since this implies the supplied gain or physical area is physically inconsistent rather than the calculator being wrong.
- Wavelength:
λ₀ = c/f,λg = λ₀/√εᵣfor a TEM wave in a uniform dielectric, phase velocityvₚ = c/√εᵣ. - Microstrip: Hammerstad–Jensen closed-form model (1980), zero conductor thickness. The UI warns when
W/hleaves the validated0.01 – 100range. Verified against the classic 50 Ω FR4 design (W = 3.06 mm, h = 1.6 mm, εᵣ = 4.4) and the textbook 126.5 Ω air line atW/h = 1. - CPW / GCPW: conformal-mapping formulas (Ghione–Naldi 1987 / Simons) using the complete elliptic integral of the first kind, computed with the AGM iteration to ~1e-15. The implementation reproduces the analytic thick-substrate limit
εeff → (εᵣ+1)/2exactly. - Coaxial: TEM
Z₀ = 60/√εᵣ · ln(D/d), verified against RG-405 (50 Ω) and RG-6-class (75 Ω) cable geometries. - SIW: Deslandes & Wu (2001) —
aeff = a − d²/(0.95·p),fc = c/(2·aeff·√εᵣ), with the conservative via rulesd ≈ λd/10,p = 1.5·d(inside the typical1.5d – 2dwindow).
- Apple Liquid Glass Design — Completed in v0.2.0
- Frameless Window — Completed in v0.2.0
- Responsive Layout — Completed in v0.2.0
- GitHub Actions CI/CD — Automated release pipeline
- Wavelength, transmission line, and SIW calculators — Completed in v0.3.0
- SVG cross-section visualizations for the transmission line and SIW tabs
- Linux AppImage packaging via Docker or Linux host
- Playwright E2E tests for tab switch, language switch, and Python verification
- Additional calculators in the "More" tab (Friis path loss, antenna radiation pattern, impedance matching)
MIT






