MCPcopy Index your code
hub / github.com/EA1FUO/AntennaSim

github.com/EA1FUO/AntennaSim @v1.2.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.2 ↗ · + Follow
617 symbols 1,396 edges 166 files 161 documented · 26%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AntennaSim

Free, open-source antenna simulator for the browser -- powered by NEC2

GitHub stars Docker pulls Pages deploy Version License NEC2 WebAssembly

Launch the live demo

...or self-host in one line: docker run -p 80:80 ea1fuo/antennasim

AntennaSim -- Simulator with 3D radiation pattern

AntennaSim -- Wire editor with 3D viewport

17 antenna templates  ·  3D radiation patterns  ·  SWR & Smith charts  ·  Wire editor + optimizer  ·  NanoVNA overlay  ·  Dark / light theme

Antenna modeling without the install. No license fee, no Windows-only desktop app, no account -- open a browser (or your phone) and start designing. Powered by the same NEC2 engine the classic tools (EZNEC, 4nec2, MMANA-GAL) are built on.

Design antennas from built-in templates or build your own from scratch in the wire editor. Run NEC2 simulations and instantly visualize SWR, impedance, Smith chart, 3D radiation patterns, current distribution, and near-field heatmaps -- all in your browser.

Two deployment modes: self-hosted with Docker (backend + Redis) or fully static via WebAssembly on GitHub Pages -- zero server required.


Quick Start

Prerequisites

One-liner (Docker Hub)

docker run -p 80:80 ea1fuo/antennasim

Open http://localhost in your browser. Done. This pulls the all-in-one image from Docker Hub with everything bundled (frontend, backend, Redis, nginx).

From source

git clone https://github.com/EA1FUO/AntennaSim.git
cd AntennaSim
cp .env.example .env
docker compose up --build

The first build takes a few minutes (downloading base images, compiling nec2c, installing dependencies). Subsequent starts are fast.

Prefer to run it without a server? AntennaSim also runs fully in the browser via WebAssembly -- see the Deployment guide.


Documentation

Full guides live in the docs/ folder:

Guide What's inside
Usage Antenna templates, full feature list, keyboard shortcuts
Development Dev setup, local WASM build, architecture, project structure, tech stack
Deployment GitHub Pages (WebAssembly) and production Docker deployment
API Reference REST + WebSocket endpoints and configuration (.env)

Highlights

  • 17 antenna templates -- dipoles, verticals, loops, Yagi/Moxon/Hex beams, LPDA, magnetic loop, and more (full list)
  • Full NEC2 pipeline -- card deck generation, nec2c execution, and parsed results, all automated
  • Interactive 3D viewport -- radiation patterns, current distribution with animated flow, near-field heatmaps
  • Charts & analysis -- SWR, impedance, Smith chart, polar pattern, balun/unun matching, NanoVNA .s1p overlay
  • Wire editor -- build arbitrary geometries, import/export .nec and .maa files
  • Optimizer -- Nelder-Mead with 5 objective functions and real-time progress
  • Runs anywhere -- desktop, tablet, or phone; touch-friendly controls and a responsive layout, no install or account

See the Usage guide for the complete feature list.


Contributing

Contributions are welcome -- this is a free and open-source project for the amateur radio community. See CONTRIBUTING.md for setup, branch/commit conventions, and how to add an antenna template.

Found a bug or have an idea? Open an issue or a discussion.


License

AntennaSim is free software released under the GNU General Public License v3.0.

You are free to use, modify, and distribute this software. If you distribute modified versions, they must also be released under the GPL-3.0. See LICENSE for the full text.


Acknowledgments

  • NEC2 -- the Numerical Electromagnetics Code developed at Lawrence Livermore National Laboratory. The foundation of antenna simulation for decades.
  • nec2c -- the C translation of NEC2 by Neoklis Kyriazis (5B4AZ), making NEC2 accessible on modern systems.
  • The amateur radio community -- for decades of antenna design knowledge, experimentation, and sharing.

Built for amateur radio operators, by amateur radio operators.

73 de AntennaSim

Extension points exported contracts — how you extend this code

SimulationEngine (Interface)
(no doc) [4 implementers]
frontend/src/engine/types.ts
ImportMetaEnv (Interface)
(no doc)
frontend/vite-env.d.ts
JunctionSpheresProps (Interface)
* Renders junction spheres where multiple wires connect. * Slightly larger than end caps for visual distinction.
frontend/src/components/three/AntennaModel.tsx
ImportMeta (Interface)
(no doc)
frontend/vite-env.d.ts
GroundPlaneProps (Interface)
* Ground plane visualization with auto-sizing grid at Y=0. * Grid extends at least 2x the antenna's horizontal footprin
frontend/src/components/three/GroundPlane.tsx
WireParticleData (Interface)
Per-wire data for particle animation
frontend/src/components/three/CurrentFlowParticles.tsx
ColorScaleProps (Interface)
* Color scale legend bar for the radiation pattern. * Shows the gain colormap from min to max with labeled ticks.
frontend/src/components/ui/ColorScale.tsx

Core symbols most depended-on inside this repo

round
called by 50
frontend/src/engine/parsers/nec-output.ts
buildCardDeck
called by 32
frontend/src/engine/parsers/nec-input.ts
autoSegment
called by 30
frontend/src/engine/segmentation.ts
pushUndo
called by 27
frontend/src/stores/editorStore.ts
validateSimulationRequest
called by 17
frontend/src/engine/validation.ts
_parse_float_token
called by 17
backend/src/converters/nec_file.py
computeSteps
called by 15
frontend/src/utils/ham-bands.ts
parseNecOutput
called by 15
frontend/src/engine/parsers/nec-output.ts

Shape

Function 377
Interface 131
Method 53
Class 50
Route 6

Languages

TypeScript82%
Python18%

Modules by API surface

frontend/src/utils/units.ts16 symbols
frontend/src/engine/parsers/nec-file.ts16 symbols
frontend/src/engine/wasm/index.ts15 symbols
frontend/src/engine/types.ts15 symbols
frontend/src/api/nec.ts15 symbols
backend/src/models/simulation.py14 symbols
backend/src/models/antenna.py13 symbols
frontend/src/utils/ham-bands.ts12 symbols
frontend/src/templates/types.ts11 symbols
frontend/src/stores/editorStore.ts11 symbols
frontend/src/engine/wasm/worker-optimizer.ts10 symbols
frontend/src/engine/matching.ts10 symbols

For agents

$ claude mcp add AntennaSim \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page