bennevans/waves

★ 0Forks 0PythonGitHub ↗Compare

README

waves — Meep-based Radar Stealth Optimization

A 3D FDTD framework for simulating and optimizing radar stealth. Given a parametric target (shape + radar-absorbing material layers) and a monostatic tracking-radar scenario (cone of aspect angles, frequency band), it runs a gradient-free optimizer (CMA-ES) to minimize radar cross-section (RCS).

Quickstart

1. Install Meep (system-wide)

Meep has no PyPI wheels, so it must be installed via your system package manager or built from source.

Ubuntu / Debian:

sudo apt update
sudo apt install meep python3-meep libmeep-dev

If your distro doesn't ship Meep, follow the upstream Build From Source instructions.

2. Create the uv environment

uv venv --system-site-packages
uv sync --extra dev

The --system-site-packages flag exposes the system meep module inside the uv venv. Everything else (numpy, scipy, nevergrad, etc.) is pinned and isolated via uv.lock.

3. Verify the environment

uv run python scripts/check_env.py

This should print the Meep version and confirm all dependencies are importable. If you see "meep not found", revisit step 1 — the --system-site-packages flag is almost always the issue.

4. Run the Mie-series validation (Milestone 2)

uv run pytest tests/test_rcs_sphere.py -v

PEC sphere FDTD RCS should match the analytic Mie series within 1 dB across size parameters ka ∈ [0.5, 5].

Project layout

src/stealth_opt/        — library code (geometry, materials, simulation, rcs, optimize)
configs/                — YAML scenario configs (default.yaml, validation_sphere.yaml, …)
examples/               — standalone runnable scripts (validation, demos)
tests/                  — pytest suite (validation + unit tests)
scripts/                — CLI entry points (run_optimization.py, check_env.py)
TODO.md                 — live milestone checklist

Progress

See TODO.md for the current milestone checklist. The planning document lives at /home/ben/.claude/plans/quirky-baking-puppy.md.

Caveats

  • Memory: 3D FDTD scales as (domain_vol / resolution³). The default 10 cm / X-band / 10-cells-per-λ config uses ~1–2 GB. Scale up cautiously.
  • MPI: Parallel Meep requires python3-meep built against MPI. Check uv run python scripts/check_env.py output.
  • Python version matching: apt install python3-meep targets your distro's system Python. If uv venv picks a different interpreter, import meep will fail. Force uv to use the system interpreter: uv venv --python /usr/bin/python3 --system-site-packages.

Contributors

bennevans

Issues