Hi,
I have a linac comprised of a number of cavities. I would like to vary the phase at which these are run. Is there a way I can define a single phase variable in the lattice file and change one number rather than many 10s of cavities individually?
Thanks,
chris
Cavity Phase
Moderators: cyao, michael_borland
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Cavity Phase
Chris,
There are several ways to do this.
1. Inside the lattice file, define a variable and then use it in the element definitions
% 10.7 sto phase1
l1: rfca,phase="phase1",...
l2: rfca,phase="phase1"
etc.
2. Same as 1, but set the phase1 value in the elegant command file:
&rpn_expression expression = "10.1 sto phase1"
&run_setup ... &end
3. Use the alter_elements command from within the elegant command file
&run_setup ... &end
&alter_elements
name = L*, type=RFCA, item=PHASE, value=10.1
&end
--Michael
There are several ways to do this.
1. Inside the lattice file, define a variable and then use it in the element definitions
% 10.7 sto phase1
l1: rfca,phase="phase1",...
l2: rfca,phase="phase1"
etc.
2. Same as 1, but set the phase1 value in the elegant command file:
&rpn_expression expression = "10.1 sto phase1"
&run_setup ... &end
3. Use the alter_elements command from within the elegant command file
&run_setup ... &end
&alter_elements
name = L*, type=RFCA, item=PHASE, value=10.1
&end
--Michael