problem with alter_element applied on RFCA element

Moderators: michael_borland, soliday

Post Reply
Philippe Piot
Posts: 83
Joined: 20 Aug 2008, 13:18
Location: Northern Illinois University & Argonne National Laboratory
Contact:

problem with alter_element applied on RFCA element

Post by Philippe Piot » 11 Nov 2016, 11:55

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.
Attachments
test.tar
tar file to reproduce problem
(1.39 MiB) Downloaded 471 times

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

Re: problem with alter_element applied on RFCA element

Post by michael_borland » 11 Nov 2016, 14:42

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

Philippe Piot
Posts: 83
Joined: 20 Aug 2008, 13:18
Location: Northern Illinois University & Argonne National Laboratory
Contact:

Re: problem with alter_element applied on RFCA element

Post by Philippe Piot » 11 Nov 2016, 14:53

Michael,
Thank you very much. Sorry I should have thought about the parenthesis... -- Philippe.

Post Reply