-
Notifications
You must be signed in to change notification settings - Fork 23
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
Added examples for 3D space charge benchmarking. #141
Added examples for 3D space charge benchmarking. #141
Conversation
Thanks a lot, @cemitch99 ! Do we need to increase tolerances for these tests? I think they should fail as long as space charge is not enabled, right? |
Yes, they should fail if space charge is not enabled. I will modify the tolerances now. |
Thanks. Looks like we need to be even stricter :) |
27f79c5
to
b73defc
Compare
207c193
to
051a4e8
Compare
Hi @cemitch99, can you please check if the updates make sense? I think there is a 4. th test (another Kurth addition) that is not mentioned in the PR description yet. Can you also check all 4 Kurth tests are also described in the README.rst of |
365b45d
to
261f32e
Compare
b7285a9
to
20b6b65
Compare
- 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.
20b6b65
to
cd84186
Compare
Modified tolerance slightly
Selected amr.n_cell, lattice.nslice parameters, and geometry.prob_relative parameters.
Added nonzero charge. However, this is not a space charge test. It is, rather, another distribution/lattice test. It should be run algo.space_charge = false.
Modified tolerance slightly.
Added appropriate numerical parameters for amr.n_cell, lattice.nslice, and geometry.prob_relative.
1) Improved the accuracy of the target values used for analysis, 2) modified the tolerance slightly
Improved the accuracy of the target values.
Selected numerical values for amr.n_cell, lattice.nslice, and geometry.prob_relative.
Modified the tolerance slightly.
Hi @cemitch99, I prepared the branch so far and we just need to make the tolerances a bit more strict I think.
The other two are good: fail if space charge is off and pass if turned on :) |
Tightened the tolerance. This test should pass if space charge is OFF, and fail is space charge is ON.
Increased the default charge to match the value in input_kurth_10nC_periodic.in. This test should be run with space charge OFF. If it is run with space charge ON, then it will fail with large error.
@@ -35,3 +32,6 @@ constf1.kt = 1.0 | |||
############################################################################### | |||
algo.particle_shape = 2 | |||
algo.space_charge = false | |||
|
|||
amr.n_cell = 40 40 32 | |||
geometry.prob_relative = 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.
The above test, "input_kurth.in", uses only a Kurth distribution and a constant focusing element (without space charge), features that are already tested elsewhere. I suggest that this test can be removed to save time. The two important Kurth tests are "input_kurth_periodic.in" (without space charge) and "input_kurth_10nC_periodic.in" (with space charge).
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.
I agree - thanks for the update, I will add one more push that removes input_kurth.in
:)
examples/kurth/input_kurth_10nC.in
Outdated
|
||
amr.n_cell = 48 48 40 | ||
#amr.n_cell = 72 72 72 #optional for increased precision | ||
geometry.prob_relative = 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.
The above test, "input_kurth_10nC.in", uses only a Kurth distribution and a constant focusing element (with space charge), features that are already tested elsewhere. I suggest that this test can be removed to save time. The two important Kurth tests are "input_kurth_periodic.in" (without space charge) and "input_kurth_10nC_periodic.in" (with space charge).
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.
I agree - thanks for the update, I will add one more push that removes input_kurth_10nC.in
:)
Modified documentation of the relevant benchmarks tests using the Kurth distribution, "input_kurth_periodic.in" and "input_kurth_10nC_periodic.in". (One without space charge, and one with space charge.)
examples/CMakeLists.txt
Outdated
|
||
# w/ space charge | ||
add_impactx_test(kurth_10nC | ||
examples/kurth/input_kurth_10nC.in |
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.
Suggest that the test here, corresponding to "input_kurth_10nC.in", can be removed since the previous test "input_kurth_10nC_periodic.in" is more comprehensive.
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.
Thanks - removed :)
See Chad's GitHub comments for context.
amr.n_cell
andgeometry.prob_relative
The following examples were added to test 3D space charge:
Corresponding to 3), an example was added for the same lattice, but without space charge:
Follow-ups commits: