MRFDF switch available?

Moderators: cyao, michael_borland

Post Reply
gpark
Posts: 18
Joined: 07 Dec 2017, 13:15

MRFDF switch available?

Post by gpark » 20 Aug 2019, 13:50

I am trying to use MRFDF element to implement multipole fields to my RF kick. But with a kick inside a ring, I would like to turn on/off this kick (MRFDF) on a particular pass only. Like RFDF where the switch is available, is there switch in MRFDF?
Thanks

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

Re: MRFDF switch available?

Post by michael_borland » 04 Sep 2019, 17:35

I think you are referring to the START_PASS and END_PASS parameters on RFDF. Unfortunately, we don't have that feature on MRFDF. However, you should be able to use the &modulate_elements command to get the same effect.

For example, suppose your revolution period is 4e-6 s and you want to turn the MRFDF on for Pass>=1000 and off again for Pass>1010:

Code: Select all

&rpn_expression 
      expression = "4e-6 sto T0"
&end
 
&modulate_elements 
	name = *, type = MRFDF, item = FACTOR, differential = 0, multiplicative = 1,
	expression = "T0 / int sto Pass  Pass 1000 <  Pass 1010 > || ? 0 : 1 $ "
&end	
Be sure to use a precise value for the revolution period.

--Michael

Post Reply