Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a simple space charge benchmark for FFTX. #761

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

cemitch99
Copy link
Member

This is based on:
C. E. Mayes, R. D. Ryne, and D. C. Sagan, "3D Space Charge in BMAD," in proc. IPAC2018,
DOI:10.18429/JACoW-IPAC2018-THPAK085

It is a simplified version of PR#429, modified to use the FFT IGF Poisson solver, with an increase in numerical resolution.

sigma_z = r * sigma_r
gamma = energy_MeV / mass_MeV
beta = (1.0 - (1.0 / gamma) ** 2) ** 0.5
c0 = 2.99792458e8 # speed of light in m/s

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable c0 is not used.

gm = sim.Geom(lev=0)
dr = gm.data().CellSize()
dV = np.prod(dr)

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable dV is not used.

# plot data slices
ng = F_x.n_grow_vect
q_e = -1.602176634e-19

Check notice

Code scanning / CodeQL

Unused local variable Note

Variable q_e is not used.
)

# clean shutdown
del sim

Check warning

Code scanning / CodeQL

Unnecessary delete statement in function Warning

Unnecessary deletion of local variable
sim
in function
run_and_plot
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant