-
Notifications
You must be signed in to change notification settings - Fork 20
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
Adding EPAC2004 space charge benchmarks #422
Adding EPAC2004 space charge benchmarks #422
Conversation
- Modified the initial beam size in the IOTA lens benchmark example. - Added 2 benchmarks of 3D space charge for initial testing. - Add documentation for 2 benchmarks with space charge. - Add a benchmark example with space charge and periodic s-dependent focusing. - Added an s-dependent example using a Kurth beam without space charge. - Modified tolerance for IOTA lens benchmark example. Reduced tolerance to account for smaller initial beam size and improved preservation of invariants of motion. - Modified tolerances of space charge examples to allow CI tests to pass when space charge is not active. - Modified tolerance for space charge examples. These should fail unless space charge is turned on.
Selected numerical values for amr.n_cell, lattice.nslice, and geometry.prob_relative.
Not part of this PR.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Added missing commas in Python input.
for more information, see https://pre-commit.ci
Lowercase sc -> uppercase SC
/* comment in for debugging | ||
amrex::PrintToFile("density1.out") << reval << " " << data.f1 << "\n"; | ||
amrex::PrintToFile("density2.out") << reval << " " << data.f2 << "\n"; | ||
amrex::PrintToFile("phi1.out") << reval << " " << data.phi1 << "\n"; | ||
amrex::PrintToFile("phi2.out") << reval << " " << data.phi2 << "\n"; | ||
*/ |
Check notice
Code scanning / CodeQL
Commented-out code Note
amrex::ParticleReal r_scale = matched_scale_radius(data); | ||
amrex::ParticleReal rmin = rin*r_scale; | ||
amrex::ParticleReal rmax = rout*r_scale; | ||
// amrex::PrintToFile("equilibrium_params.out") << r_scale << " " << data.Cintensity << "\n"; |
Check notice
Code scanning / CodeQL
Commented-out code Note
Avoid GnuPlot dependency.
docs/source/usage/parameters.rst
Outdated
* ``beam.kT`` (``float``, dimensionless) temperature of core population | ||
* ``beam.kT_halo`` (``float``, dimensionless, default ``kT``) temperature of halo population |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cemitch99 what is the temperature normalized to? The energy of the reference particle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here kT = <(px/p0)^2> = <(py/p0)^2>, where p0 is the momentum of the reference particle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add this detail to the doc strings?
* ``beam.normalize`` (``float``, dimensionless) normalizing constant for core population | ||
* ``beam.normalize_halo`` (``float``, dimensionless) normalizing constant for halo population |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this normalizing constant used for and what is a good default value of this? 1.0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, a good default value is 1.0. The explanation of this constant is too complex to provide here. I will think about how best to document this.
Co-authored-by: Chad Mitchell <[email protected]>
Make executable with `chmod a+rx`
Full resolution run results.
Adding the space charge benchmark problems from:
R. D. Ryne et al, "A Test Suite of Space-Charge Problems for Code Benchmarking," in proceedings of EPAC2004, Lucerne, Switzerland, p. 1942 (2004).
Some of these are already implemented. The following need to be added:
Plot for bithermal test (full resolution):