Skip to content
New issue

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

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

Already on GitHub? # to your account

Proton adiabatic only propagation #1

Open
afedynitch opened this issue May 12, 2020 · 1 comment
Open

Proton adiabatic only propagation #1

afedynitch opened this issue May 12, 2020 · 1 comment

Comments

@afedynitch
Copy link
Collaborator

Sorry I commited by fault to master! This was unintetionally. Gomennasai

What I wanted to discuss in the PR was that in the adiabatic only proton example the propagated spectrum doesn 't match the expectation. It did a couple of trivial checks, but it didn't really solve the issue. BDF and EULER give different results as well. I'm not sure if this is due to the issue where the last injection was or so, but I wanted to let you know that the results are different. I remember you've spent plenty of time on it, so you may know better what's going on if you see it.

@joheinze
Copy link
Owner

Yes, I saw this as well when converting the proton example. I know I checked this over two years ago and they matched exactly. So it is some bug, that we reintroduced.

My best guess is that this is due to how the partial differential equation is solved, i.e. now by finite differences. I probably checked this only for the SemiLagrangian method that we used earlier. There I checked, that particle number and enery are conserved.
Probably the finite differences defined in the DifferentialOperator class are not exactly accurate for the given step width. This would also explain the difference between EULER and BDF, due to forward vs backward steps in z.

To check this, we can go back to the SemiLagrangian for EULER. Unfortunately this will not work together with BDF, since the interface to scipy does not allow to apply SemiLagrangian in between steps.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants