Skip to main content

3D Electromagnetic Time-Domain wake and impedance solver

Project description

wakis-logo-light-background

Open-source Wake and Impedance Solver

Documentation Status nightly_tests_CPU_py3.14 codecov Ruff LoC

PyPI - Version PyPI - Downloads PyPI - License DOI

wakis is a 3D Time-domain Electromagnetic solver that solves the Integral form of Maxwell's equations using the Finite Integration Technique (FIT) numerical method. It computes the longitudinal and transverse wake potential and beam-coupling impedance from the simulated electric and magnetic fields. It is also a multi-purpose solver, capable of simulating planewaves interaction with nano-structures, optical diffraction, and much more!

About

🚀 Some of wakis features:

  • Wake potential and impedance calculations for particle beams with different relativistic $\beta$
  • Material tensors: permittivity $\varepsilon$, permeability $\mu$, conductivity $\sigma$. Possibility of anisotropy.
  • CAD geometry importer (STL & STEP format) for definition of embedded boundaries and material regions, based on pyvista
  • Boundary conditions: PEC, PMC, Periodic, ABC-FOEXTRAP, Perfect Matched Layers (PML)
  • Different time-domain sources: particle beam, planewave, gaussian wavepacket
  • 100% python, fully exposed API (material tensors, fields $E$, $H$, $J$). Matrix operators based on numpy and scipy.sparse routines ensure multithreaded calculations using Intel's mkl-service.
  • 1d, 2d, 3d built-in plotting on-the-fly
  • Optimized memory consumption & GPU acceleration using cupy/cupyx on double and single precision: added in#v0.6.1
  • CUDA-aware MPI parallelization with mpi4py and ipyparallel: added in#v0.6.0
  • Snappy Smart mesh added in #v0.6.2

🧩 Other complementary tools in the ecosystem:

  • Wakefield extrapolation via broadband resonator fitting with PIML iddefix evolutionary algorithms
  • Non-equidistant Filon Fourier integration with neffint
  • Beam-induced heating estimation due to impedance with bihc

📣 Tag and version changes are decribed in each Wakis Github Release

How to use

📖 Documentation, powered by sphinx, is available at wakis.readthedocs.io

Check 📁 examples/ and notebooks/ for different physical applications:

  • Planewave interacting with a PEC or dielectric sphere
  • Gaussian wavepacket travelling through vacuum / dielectric
  • Custom perturbation interacting with PEC geometry
  • Wakefield simulation of accelerator cavity on CPU, GPU and with MPI

Check 🌐📁 SWAN_tutorial/ for hands-on notebook examples ready to run on CERN's SWAN service's GPUs (A100, Tesla T4):

Open this Gallery in SWAN

Check 🌐📁 wakis-benchmarks/ for beam-coupling impedance calculations & comparisons to the commercial tool CST® Wakefield solver:

  • PEC cubic cavity below cutoff (mm) and above cutoff (cm)
  • Conductive cubic cavity below cutoff
  • Lossy pillbox cavity (cylindrical) above cutoff
  • Simulations using beams with different relativistic $\beta$

Check 🌐📁 BE-Seminar-demo/ for a complete demonstration of Wakis usage.

Installation

Wakis supports Python 3.9 - 3.14 and can be installed in any conda or venv environment.

📖 For a detailed installation guide (GPU, MPI setup, FAQs), check our documentation.

Install via PyPI

For basic usage, simply run:

pip install wakis

For additional features, including interactive 3D plots in Jupyter notebooks and Wakis' satellite packages, use:

pip install wakis['all']

To use the version-frozen environment specified in requirements.txt, with python 3.9-3.11 do:

conda create --name wakis-env python=3.11
conda activate wakis-env
pip install wakis['notebook']

To install Wakis from the source, clone the repository and install it in editable mode:

git clone https://github.com/ImpedanCEI/wakis.git
cd wakis
pip install -e .

Install via Docker

A pre-built Docker image of Wakis is available for easy setup and reproducibility.

sudo docker pull docker.io/edelafue/wakis:latest
sudo docker run --rm -it docker.io/edelafue/wakis:latest /bin/bash

💡 Have a bug, feature request, or suggestion? Open a GitHub Issue so the community can track it.

🛠️ Want to contribute? To merge your changes into main, create a Pull Request (PR) following our PR template.

Motivation

🎯 The determination of electromagnetic wakefields and their impact on accelerator performance is a significant issue in current accelerator components. These wakefields, which are generated within the accelerator vacuum chamber as a result of the interaction between the structure and a passing beam, can have significant effects on the machine. These effects can be characterized through the beam coupling impedance in the frequency domain and wake potential in the time domain. Accurate evaluation of these properties is essential for predicting dissipated power and maintaining beam stability. wakis is an open-source tool that can compute wake potential and impedance for both longitudinal and transverse planes for general 3D structures.

Citing Wakis

🔖 Each Wakis release is linked to a Zenodo publication under a unique DOI. If you are using Wakis in your scientific research, please help our scientific visibility by citing this work:

[1] E. de la Fuente Garcia et. al., “Wakis”. Zenodo, 2025. doi: https://doi.org/10.5281/zenodo.15527405


Tests badges

nightly_tests_CPU_py3.10 nightly_tests_CPU_py3.11 nightly_tests_CPU_py3.12 nightly_tests_CPU_py3.13 nightly_tests_CPU_py3.14

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wakis-0.7.0.tar.gz (119.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wakis-0.7.0-py3-none-any.whl (96.7 kB view details)

Uploaded Python 3

File details

Details for the file wakis-0.7.0.tar.gz.

File metadata

  • Download URL: wakis-0.7.0.tar.gz
  • Upload date:
  • Size: 119.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wakis-0.7.0.tar.gz
Algorithm Hash digest
SHA256 abe85b3b21d6f184a2b7004b4493016bb08da6f4fde016628c305fb4592193e0
MD5 891e68ff19e307c6abac84336a36a112
BLAKE2b-256 0ba2b53cce2966fd698f8a0d4a1ca8a66d25ba066e61d25c939fa774e54473fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for wakis-0.7.0.tar.gz:

Publisher: publish.yml on ImpedanCEI/Wakis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wakis-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: wakis-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 96.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wakis-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 260408d80082c8ebf70bde9333ee99f92d9eade6f7c712bd6ed65b2bcab2d196
MD5 5441172669499aad12294ff2b0b66b4a
BLAKE2b-256 177231e6641b4dcc86e81a1e3207013d955c0f6e587f7c2dafcbf1a2256590eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for wakis-0.7.0-py3-none-any.whl:

Publisher: publish.yml on ImpedanCEI/Wakis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page