Tracking phase space coordinates during simulation

https://www.dacm-logiciels.fr/toutatis
Post Reply
United States of Americaaustin-hoover
Novice
Novice
Posts: 2
Joined: Thu 13 Apr 2023 10:50
Country:
United States of America (us)
United States of America

Tracking phase space coordinates during simulation

Post by United States of Americaaustin-hoover »

Is it possible to write the 6D phase space coordinates to a file at multiple points in the simulation, controlling the output file names; e.g., "coords_001.dst", "coords_002.dst", etc.?

Second, one issue I have with PARMTEQ is that I cannot keep track of individual particles; particle indices are relabeled at various points during the simulation. Is it any different in Toutatis?
FranceRomualdDuperrier
Global moderators
Global moderators
Posts: 74
Joined: Fri 28 Aug 2020 14:59
Location: Paris-Saclay
Country:
France (fr)
France

Re: Tracking phase space coordinates during simulation

Post by FranceRomualdDuperrier »

Bonjour!

To export particle distribution along the RFQ, the solution is to set .plt export in .inp file with the command COMPRESSION_FACTOR ncompress. ncompress gives the data resolution in .plt file as follow:

if (ncompress==0) { // float (32 bits)
cc1=125; cc2=100;
}
if (ncompress==1) { // short int (16 bits)
cc1=124; cc2=99;
}
if (ncompress==2) { // char (8 bits)
cc1=123; cc2=98;
}
if (ncompress==3) { // 1/2 char (4 bits)
cc1=122; cc2=97;
}

If ncompress does not match the interval [0;3] no .plt file will be generated. Once you got your .plt file, you can view it with PlotWin (freeware) and Plotwin allows you to save a .dst at any position (actually one portrait at a cell middle). If you want a .dst at a very specific position, use RFQFINISH command. Also you will have to run the code as many time as you have positions to consider because the code will stop after all particles passed through the RFQFINISH position.

For individual particle tracking, yes Toutatis will support you doing this. Once you produced a .plt file, with Plotwin, you can graphically select a group of particles at any position (zoom on the particles of interest, double click and they will be colored, unzoom then). Then you can follow them downstream or upstream until there are lost if it happens.

I hope it helps,

Romuald
United States of Americaaustin-hoover
Novice
Novice
Posts: 2
Joined: Thu 13 Apr 2023 10:50
Country:
United States of America (us)
United States of America

Re: Tracking phase space coordinates during simulation

Post by United States of Americaaustin-hoover »

Thanks Romuald, I was able to generate a .plt file and view it using PlotWin. Is it possible to include only a subset of the cells in the plt file?
FranceRomualdDuperrier
Global moderators
Global moderators
Posts: 74
Joined: Fri 28 Aug 2020 14:59
Location: Paris-Saclay
Country:
France (fr)
France

Re: Tracking phase space coordinates during simulation

Post by FranceRomualdDuperrier »

Hi

Toutatis will save one distribution every cell, sorry. In case it would help, you can finish earlier the simulation with the command "RFQFinish z". Toutatis will run until the last particle in the bunch passed through the z coordinate in meter. By doing this, you should get a .plt file with all cells until z.

Best,

Romuald
Post Reply