Cavity Phase

Moderators: cyao, michael_borland

Post Reply
tennant
Posts: 85
Joined: 31 Jul 2008, 07:19
Location: Jefferson Laboratory

Cavity Phase

Post by tennant » 26 Aug 2009, 07:02

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

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Cavity Phase

Post by michael_borland » 26 Aug 2009, 14:30

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

Post Reply