Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: Dark-Elektron
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: origin
  • Size: 33.5 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

PyMultipact

Multipacting is a phenomenon arising from the emission and subsequent multiplication of charged particles in accelerating radiofrequency (RF) cavities, which can limit the achievable RF power. Predicting field levels at which multipacting occurs is crucial for optimising cavity geometries. This paper presents an open-source Python code (PyMultipact) for analysing multipacting in 2D axisymmetric cavity structures. The code leverages the NGSolve framework to solve the Maxwell eigenvalue problem (MEVP) for the electromagnetic (EM) fields in axisymmetric RF structures. The relativistic Lorentz force equation governing the motion of charged particles is then integrated using the calculated fields within the domain to describe the motion of charged particles. Benchmarking against existing multipacting analysis tools is performed to validate the code's accuracy.

Workflow

ALT TEXT

The workflow begins by defining the domain using geometry_writer.py. Next, the Maxwell eigenvalue problem (MEVP) is solved with the NGSolve finite element method (FEM) framework via domain.compute_field. Collision detection and handling are performed in Python. The multipacting metrics currently defined are the counter and enhanced counter functions. To analyse the domain for multipacting, domain.analyse_multipacting is used.

Example - TESLA Cavity Geometry (Jupyter)

To get started, import the Project and Domain classes from domain. A Project object is used to define the project folder and required to initialise a Domain object. A Domain object contains every object that can be found in the domain. For example, a Particles object can be added to the Domain object. Certain physics can also be defined in a Domain object. For example, the eigenmodes of the domain can be computed by calling the <domain_object>.compute_field(). A Domain object also contains the necessary methods for making plots and post-processing.

```python from pymultipact.domain import Project, Domain

create project

proj = Project() proj.createproject('<projectfolder>/TESLA')

define domain

domain = Domain(proj) ```

The defined domain contains, by default, the TESLA cavity geometry (mid-cell) [1]. One possible parameterisation of the mid-cell of an elliptical cavity geometry is given in the figure below.

ALT TEXT

The default elliptical cavity geometry installed with PyMultipact is the TESLA cavity mid-cell geometry. The following line of code can be used to define a new elliptical geometry boundary,

```python

import numpy as np

format: cell = [A, B, a, b, Ri, L, Req] in meters.

midcell = np.array([42, 42, 12, 19, 35, 57.7, 103.3])*1e-3 domain.defineellipticalcavity(midcell=mid_cell) ```

The geometry can be visualised using

```python

domain.draw() ```

A Domain object is meshed automatically with a default size if no specification for the mesh is given after definition. The mesh can be regenerated for a specific mesh resolution and visualised using

python domain.mesh_domain(<maxh>) domain.draw_mesh()

Next, compute and visualise the fields using

python domain.compute_fields() domain.draw_fields(mode=1, which='E')

where the which keyword is used to specify if the electric (E) or magnetic (H) field should be plotted. The mode keyword specifies for which mode the field should be plotted. Mode indexing starts from 1. Multipacting analysis is then carried out using

python domain.analyse_multipacting()

The currently implemented multipacting metrics are the counter and enhanced counter functions. Results from multipacting can be plotted with the following lines of code.

python domain.plot_cf() # to plot counter function domain.plot_Ef() # to plot final impact energy domain.plot_ef() # to plot enhanced counter function

The results can be compared with the result obtained in [2].

References

[1] Aune, Bernard, et al. "Superconducting TESLA cavities." Physical Review special topics-accelerators and beams 3.9 (2000): 092001.

[2] Zhu, Feng, et al. "High field multipacting of 1.3 GHZ Tesla cavity." This Workshop, TuP51. 2003.

Owner

  • Name: Sosoho-Abasi Udongwo
  • Login: Dark-Elektron
  • Kind: user

Computational scientist

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: PyMultipact
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Sosoho-Abasi
    family-names: Udongwo
    email: soskey94@gmail.com
    affiliation: University of Rostock
identifiers:
  - type: url
    value: 'https://github.com/Dark-Elektron/PyMultipact'
repository-code: 'https://github.com/Dark-Elektron/PyMultipact.git'
abstract: >-
  Multipacting is a phenomenon arising from the emission and
  subsequent multiplication of charged particles in
  accelerating radiofrequency (RF) cavities, which can limit
  the achievable RF power. Predicting field levels at which
  multipacting occurs is crucial for optimising cavity
  geometries. This paper presents a new open-source Python
  code for analysing multipacting in 2D axisymmetric cavity
  structures. The code leverages the NGSolve framework to
  solve the MEVP for the cavity's resonant modes'
  electromagnetic (EM) fields. The relativistic Lorentz
  force equation governing the motion of charged particles
  is then integrated using the fields within the cavity.
  Benchmarking against existing multipacting analysis tools
  is performed to validate the code's accuracy.
keywords:
  - '#multipacting'
  - '#ngsolve'
  - '#cavity'
  - '#radiofrequency'
license: MIT
version: 05.05.2024
date-released: '2024-05-05'

GitHub Events

Total
Last Year

Dependencies

requirements.txt pypi
  • PyQt5 *
  • icecream *
  • matplotlib *
  • mpi4py *
  • networkx *
  • numpy *
  • numpydoc *
  • oapackage *
  • openpyxl *
  • pandas *
  • plotly *
  • ply *
  • psutil *
  • pyparsing *
  • pyqtgraph *
  • pyvista *
  • pyvistaqt *
  • qtpy *
  • qtvscodestyle *
  • scikit-learn *
  • scipy *
  • seaborn *
  • setuptools *
  • swig-4.1.1 *
  • sympy *
  • termcolor *
  • tqdm *
  • vtk *