bmad-sim / bmad-ecosystem

Bmad simulation ecosystem for simulating high energy storage rings.
https://www.classe.cornell.edu/bmad/
11 stars 13 forks source link

Momentum Compaction Not Calculated when Lattice is below Transition #325

Open henrylovelace3 opened 1 year ago

henrylovelace3 commented 1 year ago

Why is show universe giving a negative momentum compaction value? image

If we calculate the value the simple way, the value is clearly positive. Normal form is also not consistent.

image image

Normal form is also not consistent. image

Attach is the lattice file.

error.zip

DavidSagan commented 1 year ago

Looks like the calculation makes a high energy approximation. I am working on a fix.

DavidSagan commented 1 year ago

I have put in a fix.

henrylovelace3 commented 1 year ago

@DavidSagan Thanks I see it. Is the lat::momentum_compaction[] linked to the value shown from the universe table? image

DavidSagan commented 1 year ago

Should be.

On Jan 25, 2023, at 7:09 PM, henrylovelace3 @.***> wrote:

@DavidSaganhttps://github.com/DavidSagan Thanks I see it. Is the lat::momentum_compaction[] linked to the value shown from the universe table? [image]https://user-images.githubusercontent.com/30727946/214722376-2ef5b0a1-0aa3-4285-b0e9-41e1a7b40d9b.png

— Reply to this email directly, view it on GitHubhttps://github.com/DavidSagan/Bmad/issues/324#issuecomment-1404384016, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAH2PVULQ4XW5AZPG2NILLDWUG6EBANCNFSM6AAAAAAUEJOO6M. You are receiving this because you were mentioned.Message ID: @.***>

henrylovelace3 commented 1 year ago

In the png is there two values are very different @DavidSagan image

henrylovelace3 commented 1 year ago

@DavidSagan I also noticed that lat::rad_int.i1[end]|model does not update even though the lattice model changes

image

The two numbers do not need to agree but what to notice is that 1: does not change with the change in the dispersion of the lattice.

DavidSagan commented 1 year ago

OK will reopen and have a look...