Initial test of matching

This commit is contained in:
2025-05-28 10:24:57 +02:00
parent 85360da68e
commit 031c38b89a
3 changed files with 569 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
!-----------------------------------
! switch yard
! matching condition at the septum, the new design by Natalia on 27th July 2011
! find the correct kicker strength to have the right dispersion and offset.
y_sep=0.01;
py_sep=0.0;
dy_sep=-y_sep;
dpy_sep=-py_sep;
S20SY02.MKDC010.cory := SYKICK*2;
S20SY02.MKAC020.cory := SYKICK*3;
S20SY02.MKDC030.cory := SYKICK*2;
S20SY02.MKAC040.cory := SYKICK*3;
S20SY02.MKDC050.cory := SYKICK*2;
use,sequence=s20sy02;
MATCH,SEQUENCE=s20sy02,range=#s/#e,betx=20,alfx=0,bety=20,alfy=0;
VARY,NAME=s20sy02.mqua070.k1,STEP=0.0001,lower=-3,upper=3;
VARY,NAME=s20sy02.mqua100.k1,STEP=0.0001,lower=-3,upper=3;
VARY,NAME=s20sy02.mqua140.k1,STEP=0.0001,lower=-3,upper=3;
VARY,NAME=s20sy02.mqua180.k1,STEP=0.0001,lower=-3,upper=3;
VARY,NAME=SYKICK,STEP=0.0001;
CONSTRAINT,SEQUENCE=s20sy02,range=S20SY02.mbnd200,y=y_sep;
CONSTRAINT,SEQUENCE=s20sy02,range=S20SY02.mbnd200,py=py_sep;
CONSTRAINT,SEQUENCE=s20sy02,range=S20SY02.mbnd200,dy=-0.007;
CONSTRAINT,SEQUENCE=s20sy02,range=S20SY02.mbnd200,dpy<1;
CONSTRAINT,SEQUENCE=s20sy02,range=S20SY02.mqua180, BETY < 60;
LMDIF,CALLS=8000,TOLERANCE=1.e-21;
ENDMATCH;
twiss,sequence=s20sy02,range=#s/#e,rmatrix,betx=20,alfx=0,bety=20,alfy=0;