Page 1 of 1

MRFDF switch available?

Posted: 20 Aug 2019, 13:50
by gpark
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

Re: MRFDF switch available?

Posted: 04 Sep 2019, 17:35
by michael_borland
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