Metadata-Version: 2.1
Name: wakis
Version: 0.5.0
Summary: 3D Electromagnetic Time-Domain wake and impedance solver
Home-page: https://wakis.readthedocs.io/
Download-URL: https://pypi.python.org/pypi/wakis
Author: Elena de la Fuente et al.
Author-email: elena.de.la.fuente.garcia@cern.ch
License: Apache 2.0
Project-URL: Bug Tracker, https://github.com/ImpedanCEI/wakis/issues
Project-URL: Documentation, https://wakis.readthedocs.io/en/latest/index.html
Project-URL: Source Code, https://github.com/ImpedanCEI/wakis/wakis
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Physics
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<2.0
Requires-Dist: scipy
Requires-Dist: pyvista
Requires-Dist: h5py
Requires-Dist: tqdm
Provides-Extra: gpu
Requires-Dist: cupy; extra == "gpu"
Provides-Extra: notebook
Requires-Dist: aiohttp==3.9.5; extra == "notebook"
Requires-Dist: aiosignal==1.3.1; extra == "notebook"
Requires-Dist: anyio==4.4.0; extra == "notebook"
Requires-Dist: argon2-cffi==23.1.0; extra == "notebook"
Requires-Dist: argon2-cffi-bindings==21.2.0; extra == "notebook"
Requires-Dist: arrow==1.3.0; extra == "notebook"
Requires-Dist: asttokens==2.4.1; extra == "notebook"
Requires-Dist: async-lru==2.0.4; extra == "notebook"
Requires-Dist: async-timeout==4.0.3; extra == "notebook"
Requires-Dist: attrs==23.2.0; extra == "notebook"
Requires-Dist: Babel==2.15.0; extra == "notebook"
Requires-Dist: beautifulsoup4==4.12.3; extra == "notebook"
Requires-Dist: bleach==6.1.0; extra == "notebook"
Requires-Dist: certifi==2024.6.2; extra == "notebook"
Requires-Dist: cffi==1.16.0; extra == "notebook"
Requires-Dist: charset-normalizer==3.3.2; extra == "notebook"
Requires-Dist: cmocean==4.0.3; extra == "notebook"
Requires-Dist: colorcet==3.1.0; extra == "notebook"
Requires-Dist: comm==0.2.2; extra == "notebook"
Requires-Dist: contourpy==1.2.1; extra == "notebook"
Requires-Dist: cycler==0.12.1; extra == "notebook"
Requires-Dist: debugpy==1.8.2; extra == "notebook"
Requires-Dist: decorator==5.1.1; extra == "notebook"
Requires-Dist: defusedxml==0.7.1; extra == "notebook"
Requires-Dist: exceptiongroup==1.2.1; extra == "notebook"
Requires-Dist: executing==2.0.1; extra == "notebook"
Requires-Dist: fastjsonschema==2.20.0; extra == "notebook"
Requires-Dist: fonttools==4.53.0; extra == "notebook"
Requires-Dist: fqdn==1.5.1; extra == "notebook"
Requires-Dist: frozenlist==1.4.1; extra == "notebook"
Requires-Dist: h11==0.14.0; extra == "notebook"
Requires-Dist: h5py==3.11.0; extra == "notebook"
Requires-Dist: httpcore==1.0.5; extra == "notebook"
Requires-Dist: httpx==0.27.0; extra == "notebook"
Requires-Dist: idna==3.7; extra == "notebook"
Requires-Dist: imageio==2.34.2; extra == "notebook"
Requires-Dist: importlib_metadata==8.0.0; extra == "notebook"
Requires-Dist: importlib_resources==6.4.0; extra == "notebook"
Requires-Dist: ipykernel==6.29.4; extra == "notebook"
Requires-Dist: ipython==8.18.1; extra == "notebook"
Requires-Dist: ipywidgets==8.1.3; extra == "notebook"
Requires-Dist: ipympl==0.9.6; extra == "notebook"
Requires-Dist: isoduration==20.11.0; extra == "notebook"
Requires-Dist: jedi==0.19.1; extra == "notebook"
Requires-Dist: Jinja2==3.1.4; extra == "notebook"
Requires-Dist: json5==0.9.25; extra == "notebook"
Requires-Dist: jsonpointer==3.0.0; extra == "notebook"
Requires-Dist: jsonschema==4.22.0; extra == "notebook"
Requires-Dist: jsonschema-specifications==2023.12.1; extra == "notebook"
Requires-Dist: jupyter-events==0.10.0; extra == "notebook"
Requires-Dist: jupyter-lsp==2.2.5; extra == "notebook"
Requires-Dist: jupyter_client==8.6.2; extra == "notebook"
Requires-Dist: jupyter_core==5.7.2; extra == "notebook"
Requires-Dist: jupyter_server==2.14.1; extra == "notebook"
Requires-Dist: jupyter_server_proxy==4.2.0; extra == "notebook"
Requires-Dist: jupyter_server_terminals==0.5.3; extra == "notebook"
Requires-Dist: jupyterlab==4.2.3; extra == "notebook"
Requires-Dist: jupyterlab_pygments==0.3.0; extra == "notebook"
Requires-Dist: jupyterlab_server==2.27.2; extra == "notebook"
Requires-Dist: jupyterlab_widgets==3.0.11; extra == "notebook"
Requires-Dist: kiwisolver==1.4.5; extra == "notebook"
Requires-Dist: markdown-it-py==3.0.0; extra == "notebook"
Requires-Dist: MarkupSafe==2.1.5; extra == "notebook"
Requires-Dist: matplotlib==3.9.0; extra == "notebook"
Requires-Dist: matplotlib-inline==0.1.7; extra == "notebook"
Requires-Dist: mdurl==0.1.2; extra == "notebook"
Requires-Dist: meshio==5.3.5; extra == "notebook"
Requires-Dist: mistune==3.0.2; extra == "notebook"
Requires-Dist: more-itertools==10.3.0; extra == "notebook"
Requires-Dist: msgpack==1.0.8; extra == "notebook"
Requires-Dist: multidict==6.0.5; extra == "notebook"
Requires-Dist: nbclient==0.10.0; extra == "notebook"
Requires-Dist: nbconvert==7.16.4; extra == "notebook"
Requires-Dist: nbformat==5.10.4; extra == "notebook"
Requires-Dist: nest-asyncio==1.6.0; extra == "notebook"
Requires-Dist: notebook_shim==0.2.4; extra == "notebook"
Requires-Dist: numpy==1.24.2; extra == "notebook"
Requires-Dist: overrides==7.7.0; extra == "notebook"
Requires-Dist: packaging==24.1; extra == "notebook"
Requires-Dist: pandocfilters==1.5.1; extra == "notebook"
Requires-Dist: parso==0.8.4; extra == "notebook"
Requires-Dist: pexpect==4.9.0; extra == "notebook"
Requires-Dist: pillow==10.3.0; extra == "notebook"
Requires-Dist: platformdirs==4.2.2; extra == "notebook"
Requires-Dist: pooch==1.8.2; extra == "notebook"
Requires-Dist: prometheus_client==0.20.0; extra == "notebook"
Requires-Dist: prompt_toolkit==3.0.47; extra == "notebook"
Requires-Dist: psutil==6.0.0; extra == "notebook"
Requires-Dist: ptyprocess==0.7.0; extra == "notebook"
Requires-Dist: pure-eval==0.2.2; extra == "notebook"
Requires-Dist: pycparser==2.22; extra == "notebook"
Requires-Dist: Pygments==2.18.0; extra == "notebook"
Requires-Dist: pyparsing==3.1.2; extra == "notebook"
Requires-Dist: pytest; extra == "notebook"
Requires-Dist: python-dateutil==2.9.0.post0; extra == "notebook"
Requires-Dist: python-json-logger==2.0.7; extra == "notebook"
Requires-Dist: pyvista==0.43.10; extra == "notebook"
Requires-Dist: PyYAML==6.0.1; extra == "notebook"
Requires-Dist: pyzmq==26.0.3; extra == "notebook"
Requires-Dist: referencing==0.35.1; extra == "notebook"
Requires-Dist: requests==2.32.3; extra == "notebook"
Requires-Dist: rfc3339-validator==0.1.4; extra == "notebook"
Requires-Dist: rfc3986-validator==0.1.1; extra == "notebook"
Requires-Dist: rich==13.7.1; extra == "notebook"
Requires-Dist: rpds-py==0.18.1; extra == "notebook"
Requires-Dist: scipy==1.13.1; extra == "notebook"
Requires-Dist: scooby==0.10.0; extra == "notebook"
Requires-Dist: Send2Trash==1.8.3; extra == "notebook"
Requires-Dist: simpervisor==1.0.0; extra == "notebook"
Requires-Dist: six==1.16.0; extra == "notebook"
Requires-Dist: sniffio==1.3.1; extra == "notebook"
Requires-Dist: soupsieve==2.5; extra == "notebook"
Requires-Dist: stack-data==0.6.3; extra == "notebook"
Requires-Dist: terminado==0.18.1; extra == "notebook"
Requires-Dist: tinycss2==1.3.0; extra == "notebook"
Requires-Dist: tomli==2.0.1; extra == "notebook"
Requires-Dist: tornado==6.4.1; extra == "notebook"
Requires-Dist: tqdm==4.66.4; extra == "notebook"
Requires-Dist: traitlets==5.14.3; extra == "notebook"
Requires-Dist: trame==3.6.3; extra == "notebook"
Requires-Dist: trame-client==3.2.0; extra == "notebook"
Requires-Dist: trame-server==3.0.2; extra == "notebook"
Requires-Dist: trame-vtk==2.8.9; extra == "notebook"
Requires-Dist: trame-vuetify==2.6.0; extra == "notebook"
Requires-Dist: types-python-dateutil==2.9.0.20240316; extra == "notebook"
Requires-Dist: typing_extensions==4.12.2; extra == "notebook"
Requires-Dist: uri-template==1.3.0; extra == "notebook"
Requires-Dist: urllib3==2.2.2; extra == "notebook"
Requires-Dist: vtk==9.3.0; extra == "notebook"
Requires-Dist: wcwidth==0.2.13; extra == "notebook"
Requires-Dist: webcolors==24.6.0; extra == "notebook"
Requires-Dist: webencodings==0.5.1; extra == "notebook"
Requires-Dist: websocket-client==1.8.0; extra == "notebook"
Requires-Dist: widgetsnbextension==4.0.11; extra == "notebook"
Requires-Dist: wslink==2.1.1; extra == "notebook"
Requires-Dist: yarl==1.9.4; extra == "notebook"
Requires-Dist: zipp==3.19.2; extra == "notebook"

<img src="https://github.com/ImpedanCEI/wakis/blob/main/docs/img/wakis-logo-pink.png" alt="wakis-logo-light-background" width="240">

> **Wak**e and **I**mpedance **S**olver

[![Documentation Status](https://readthedocs.org/projects/wakis/badge/?version=latest)](https://wakis.readthedocs.io/en/latest/?badge=latest)
![Tests badge](https://github.com/impedanCEI/wakis/actions/workflows/nightly_tests_CPU.yml/badge.svg)
[![codecov](https://codecov.io/github/elenafuengar/wakis/graph/badge.svg?token=7QPYJC23A0)](https://codecov.io/github/elenafuengar/wakis)

![PyPI - Version](https://img.shields.io/pypi/v/wakis?style=flat-square&color=blue)
![PyPI - License](https://img.shields.io/pypi/l/wakis?style=flat-square&color=pink)
![Tokei - LOC](https://tokei.rs/b1/github/ImpedanCEI/wakis?category=code?/style=square&color=green)
![Zenodo DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14988677.svg)


`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
:rocket: 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` format) for definition of embedded boundaries and material regions, based on [`pyvista`](https://github.com/pyvista/pyvista) 
* Boundary conditions: PEC, PMC, Periodic, ABC-FOEXTRAP
* 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 fast calculations.
* 1d, 2d, 3d built-in plotting on-the-fly
* Optimized memory consumption
* GPU acceleration using `cupy/cupyx`
* Perfect matching layer (PML) 
* Wakefield extrapolation with PIML [`iddefix`](https://github.com/ImpedanCEI/IDDEFIX) evolutionary algorithm
* Non-equidistant Filon Fourier integration with [`neffint`](https://github.com/ImpedanCEI/neffint)
* Beam-induced heating estimation due to impedance with [`bihc`](https://github.com/ImpedanCEI/BIHC)

## How to use
:book: Documentation, powered by `sphinx`, is available at [wakis.readthedocs.io](https://wakis.readthedocs.io/en/latest/index.html)

Check :file_folder: `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 :file_folder: `examples/` for different physical applications
* Planewave interacting with a PEC or dielectric sphere
* Gaussian wavepacket travelling through vacuum / dielectric
* Custom perturbation interacting with PEC geometry 

For specific needs, please contact the developer :woman_technologist: :wave:
* elena.de.la.fuente.garcia@cern.ch

## 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. 

* `wakis` was first presented at IPAC23 conference as a post-processing tool: https://doi.org/10.18429/JACoW-IPAC2023-WEPL170
  
* It has now evolved from a post-processing tool to a full 3D electromagnetic, time domain solver; and has been presented at the 14th International Computational Accelerator Physics Conference (ICAP24): https://indico.gsi.de/event/19249/contributions/82636/

## Installation
This section explains how to set up the environment to start using `wakis` 3d electromagnetic time domain simulations, and beam-coupling impedance computations

#### Developers: Download wakis repository from Github
```
# SSH:
git clone git@github.com:ImpedanCEI/wakis.git

# or HTTPS:
git clone https://github.com/ImpedanCEI/wakis.git

# Create python environment
cd wakis/
conda create --name wakis-env python=3.9
conda activate wakis-env
pip install -r requirements.txt
```

#### Users: pip install from PyPI
For basic usage, simply do:
```
pip install wakis
```
For some extra features, including interactive 3d plots in python notebooks, use: 
```
pip install wakis['notebook']
```




