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

CSDA Range of proton or ion - final energy = 0 #304

Closed
Vojtone opened this issue Apr 15, 2019 · 2 comments · Fixed by #673
Closed

CSDA Range of proton or ion - final energy = 0 #304

Vojtone opened this issue Apr 15, 2019 · 2 comments · Fixed by #673

Comments

@Vojtone
Copy link
Contributor

Vojtone commented Apr 15, 2019

While working on #301 I've found bug at: https://libamtrack.github.io/web/#Particlerangeandstoppingpower/CSDArangeofproton/ion.

Scenario:

  1. Submit the form with default values (final energy = 0)
  2. Change final energy and submit the form
  3. Change final energy back to 0 and submit the form <- error occurs
    image
    image

Shouldn't be final energy > 0?

@grzanka
Copy link
Contributor

grzanka commented Apr 15, 2019

Final energy should be smaller than start energy.

Imagine a particle which is slowing down from some kinetic energy E_kin down to E_final.
We are interesting in plotting a range (think of it as "braking distance") as a function of different starting energies (including E_kin = 0, which means being at rest). As long as E_final is zero it is pretty simple.

Also as long as these different initial kinetic energies E_kin are larger than E_final everything is also fine. But keeping the lower plot limit (lowest possible E_kin) at zero and increasing E_final to some value creates an unphysical condition for which there is no error check in C backend.

@Vojtone
Copy link
Contributor Author

Vojtone commented Apr 15, 2019

Therefore I suggest changing default parameters. Right now both final energy and start energy equals 0.

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 a pull request may close this issue.

2 participants