Page 1 of 1

problem with alter_element applied on RFCA element

Posted: 11 Nov 2016, 11:55
by Philippe Piot
Hi Michael,
Today I noticed an issue with the alter_element when applied to the RFCA element. I have attached a simplified example that reproduces my observation. To reproduce my problem I have prepared two .ele file one as the alter_element command that set the voltage to what it is in the .lte file while the other does not have the alter_element command.
The sequence is as follows:
run elegant test_noalter.ele
sddsanalyzebeam cryomodule_end.out -pipe=out | sddsprintout -pipe=in -col=pAverage
gives 2.801039e+02
run elegant test.ele
sddsanalyzebeam cryomodule_end.out -pipe=out | sddsprintout -pipe=in -col=pAverage
gives 1.780903e+03

I have double check and think my rpn expressions are all OK. Thank you for any help.

-- Philippe.

Re: problem with alter_element applied on RFCA element

Posted: 11 Nov 2016, 14:42
by michael_borland
Philippe,

I found two problems with your input files
  • When giving an rpn expression for a value in the .ele file, the expression must be enclosed in parentheses, e.g.,

    Code: Select all

    &alter_elements
        name = CAVE
        item = VOLT
        value = "(12.0305E+06 0.11797 * 0.9665 *)"
    &end
    
    This tells the parser to treat the string as an rpn expression, rather than a literal string.
  • Some of the expressions in test.ele have the value 0.11797 for the length, while those in test.lte have 0.11543. I think the latter is correct.
Once I fix these, everything agrees.

--Michael

Re: problem with alter_element applied on RFCA element

Posted: 11 Nov 2016, 14:53
by Philippe Piot
Michael,
Thank you very much. Sorry I should have thought about the parenthesis... -- Philippe.