Using sddsurgent to calculate undulator radiation

Moderators: cyao, michael_borland

Sven Ackermann
Posts: 10
Joined: 08 Oct 2010, 04:07

Using sddsurgent to calculate undulator radiation

Post by Sven Ackermann » 04 Feb 2011, 05:57

Hello,

I wanted to calculate the integrated spectrum in one of the undulators we use here. So I tried sddsurgent and it did not work. Even calling just "sddsurgent" did produce a error message:


"Microsoft Visual C++ Runtime Library

Program: C:\Program Files\APS\Elegant\sddsurgent.exe

R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information"

and after clicking "OK" it states:

"sddsurgent.exe - Application Error
The application was unable to start correctly (0x0000142). Click OK to close the application"

The files to produce the file sddsurgent should proceed are attached. My undulator is 2m long and has 127 periods,kx=0,ky=2.83
Attachments
Magnets.sdds
Magnets for SFUND section
(3.5 KiB) Downloaded 741 times
FLASH_SFUND.ele
Elegant script for SFUND section
(1.19 KiB) Downloaded 738 times
FLASH_PARTS.lte
Beamline definitions for sFLASH
(11.41 KiB) Downloaded 763 times
Last edited by Sven Ackermann on 04 Feb 2011, 05:59, edited 1 time in total.

Sven Ackermann
Posts: 10
Joined: 08 Oct 2010, 04:07

Re: Using sddsurgent to calculate

Post by Sven Ackermann » 04 Feb 2011, 05:58

And the missing file
Attachments
InitialTwiss.sdds
Initial Twiss parameters
(11.56 KiB) Downloaded 747 times

soliday
Posts: 403
Joined: 28 May 2008, 09:15

Re: Using sddsurgent to calculate undulator radiation

Post by soliday » 04 Feb 2011, 09:57

I fixed this problem. Our FORTRAN programs needed to be distributed with manifest files. Not sure why this wasn't a problem before. Anyways, there is a new elegant download for Windows now.

Sven Ackermann
Posts: 10
Joined: 08 Oct 2010, 04:07

Re: Using sddsurgent to calculate undulator radiation

Post by Sven Ackermann » 04 Feb 2011, 16:22

Thanks for your fast response - this error is gone. But now occurs another one: When executing the following command:

sddsurgent OTR1SFUND1.twi OTR1SFUND1.spec -calculation=mode=5,method=1 -undulator=period=0.015,numberOfPeriods=127,kx=0,ky=2.83 -electronBeam=current=0.1 -emittanceRatio=1

Then the standard-windows error pops up: "sddsurgent has encountered a problem and needs to close". It seems that sddsurgent wants to calculate, but there is some error inside - or is my syntax just wrong, or the .ele-file?

If i just type "sddsurgent" into the shell, it states me the options and switched as it should. Could you provide me a working sddsurgent example to check if just my files are wrong? Thanks.

Best regards,
Sven
Last edited by Sven Ackermann on 05 Feb 2011, 20:12, edited 1 time in total.

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

Re: Using sddsurgent to calculate undulator radiation

Post by michael_borland » 05 Feb 2011, 19:17

Sven,

Try using sddsfluxcurve instead of sddsurgent for this application. It's easier to use.

Also, is your input file of the right type? You need to provide a twiss parameter file or an output from sddsanalyzebeam.

--Michael

Sven Ackermann
Posts: 10
Joined: 08 Oct 2010, 04:07

Re: Using sddsurgent to calculate undulator radiation

Post by Sven Ackermann » 05 Feb 2011, 20:30

Hello Michael,

I just copied the wrong part, of course I used the twiss file.

Today I tried sddsfluxcurve, and also this crashed like the sddsurgent with the standard windows error. I tried the following:

sddsfluxcurve OTR1SFUND1.twi OTR1SFUND1.rad -harmonics=3 -undulator=period=0.015,numberOfPeriods=127,kmin=2.8,kmax=3 -electronBeam=current=0.1,emittanceRatio=1

At least now the output file is produced, and it contains an header, but there is no data inside the columns.

Could you may be provide me a simple example of sddsfluxcurve that works on your computer, so that I can check if the error is in my files or in elegant?

Thanks in advance,
Sven

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

Re: Using sddsurgent to calculate undulator radiation

Post by michael_borland » 05 Feb 2011, 22:08

Sven,

Can you upload your .twi file so I can try your command? I don't see any reason it wouldn't work.

--Michael

Sven Ackermann
Posts: 10
Joined: 08 Oct 2010, 04:07

Re: Using sddsurgent to calculate undulator radiation

Post by Sven Ackermann » 06 Feb 2011, 04:19

Hi Michael,

here it is. Thanks for your effort.

Sven
Attachments
OTR1SFUND1.twi
Twiss file produced by elegant
(28.17 KiB) Downloaded 748 times

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

Re: Using sddsurgent to calculate undulator radiation

Post by michael_borland » 07 Feb 2011, 10:30

Sven,

I can duplicate the problem, but I'm not sure what causes it. We are looking into it.

--Michael

Sven Ackermann
Posts: 10
Joined: 08 Oct 2010, 04:07

Re: Using sddsurgent to calculate undulator radiation

Post by Sven Ackermann » 08 Feb 2011, 03:19

Thank you! At least I know it is not due to my pc. In case it matters: Also the last release, elegant 23.1.2 suffers from the same problem.

Best regards,
Sven

Post Reply