More points in .out files?

https://www.dacm-logiciels.fr/tracewin
Post Reply
FranceAdrienPlacais
Novice
Novice
Posts: 3
Joined: Thu 27 Apr 2023 10:25
Country:
France (fr)
France

More points in .out files?

Post by FranceAdrienPlacais »

Dear Didier,

I understand that when the partran1.out and tracewin.out files are saved, their 'resolution' is lowered. When I re-compute some quantities, such as the phase using z (m) and gama-1 columns, I observe a growing error between this phase and the one calculated by TraceWin (e.g. in the .dat file). Increasing the calculation steps would allow me to have more points in the .out, but it would also increase the calculation time.

Is it possible to add a command to manually set the number of points/the resolution in the .out files? It could be an out_step similar to part_step command, or a command to set the fraction of saved points with respect to what TraceWin uses.

Thank you,
Adrien
User avatar
FranceDidier
Administrator
Administrator
Posts: 869
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: More points in .out files?

Post by FranceDidier »

Dear Adrien,

So to answer your question I'd really need to know what kind of simulation you're talking about. Field map or hard-edge elements, because the behaviour is not at all the same.
That said, whatever the type of element used, I really don't understand this comment that should never be true.
When I re-compute some quantities, such as the phase using z (m) and gama-1 columns, I observe a growing error between this phase and the one calculated by TraceWin (e.g. in the .dat file)
Regards,

Didier
FranceAdrienPlacais
Novice
Novice
Posts: 3
Joined: Thu 27 Apr 2023 10:25
Country:
France (fr)
France

Re: More points in .out files?

Post by FranceAdrienPlacais »

I am talking about FIELD_MAP simulations.

Here is the phase difference I am talking about:
phase_diff.png
phase_diff.png (133.15 KiB) Viewed 13104 times
  • I attached the Python file to compute phase (ΔΦ = ωΔz / (βc)) and produce the figure.
  • The project that I used is from examples: cavity_failure_recovery, but I commented out the ADJUST and ERROR commands.
  • I kept the default 30 steps per βλ
Indeed, the absolute error is very small - I think that the maximum that I ever observed was around 20 degrees, on MYRRHA-ADS linac (250m). I cannot manage to retrieve this version of my project, though.
I retrieve this kind of error with other quantities that I compute from the .out file, such as envelopes or emittances. I am not always sure if it comes from the resolution of the .out file, from a mistake that I made, or if I ran into a corner case. It is particularily important for me to understand what happens when I launch batch runs with an consequent number of simulations (balance simulation time/precision).
Attachments
tracewin.out
Produced by TraceWin
(377.25 KiB) Downloaded 524 times
data.txt
From TraceWin Data tab
(18.02 KiB) Downloaded 528 times
compute_phases.py
(3.24 KiB) Downloaded 528 times
Cavity_Field1.edz
From examples
(558 Bytes) Downloaded 520 times
cavity_failure_recovery_no_error.dat
From examples, no ADJUST, no ERROR
(7.34 KiB) Downloaded 532 times
cavity_failure_recovery.ini
From examples
(43.77 KiB) Downloaded 524 times
User avatar
FranceDidier
Administrator
Administrator
Posts: 869
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: More points in .out files?

Post by FranceDidier »

Dear Adrien,

Using your example, I looked at the phase calculated directly in TraceWin on the "Data" page and found 54985.648 deg for cal_step=3000 and 54985.458 for cal_step=30. This gives an error of less than 0.0004%. These values are calculated using the calculation step and not the file saving step.
Data from "Data" page can be saved automatically in a file using the "tab_file" argument.

Regards,

Didier
FranceAdrienPlacais
Novice
Novice
Posts: 3
Joined: Thu 27 Apr 2023 10:25
Country:
France (fr)
France

Re: More points in .out files?

Post by FranceAdrienPlacais »

Dear Didier,

I will now load the "Data" file to systematically check if my phase calculated from .out is close enough to what I should have.
I cannot reproduce a case where phases calculated from .out diverge from the Data table, so I must have overlooked something, sorry for that.

Thanks for your help,
Adrien
User avatar
FranceDidier
Administrator
Administrator
Posts: 869
Joined: Wed 26 Aug 2020 14:40
Country:
France (fr)
France

Re: More points in .out files?

Post by FranceDidier »

Dear Adrien,

No problem

Regards,

Didier
Post Reply