Skip to Content.
Sympa Menu

opal - [Opal] Some questions regarding our current simulations

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

[Opal] Some questions regarding our current simulations


Chronological Thread  
  • From: Galo Gallardo <ggallardo AT hi-iberia.es>
  • To: Opal <opal AT lists.psi.ch>
  • Subject: [Opal] Some questions regarding our current simulations
  • Date: Mon, 30 Oct 2023 13:10:30 +0100
  • Organization: HI-Iberia

Dear OPAL members,

We have checked and modified (with the help of the manual) the OPAL FODO example that was provided in the Wiki:
https://gitlab.psi.ch/OPAL/regression-tests/blob/master/RegressionTests/MAP-FODO/MAP-FODO.in

Please, find attached the deuterons modified lattice.in fodo_file.in input file.

It turns out that the FODO example is exactly what we were looing for. The goal is to run multiple simulations for different quadrupole values (which we have done already) and obtain a single bunch distribution at the end. But before proceeding any further we would like cross-check if everything is alright within the file and if you would change or add lines to make it more realistic.

Here are the questions:

1. Is this running a single bunch simulation with 20k particles? We have doubts here because there is a bunch frequency parameter in the file (BFREQ), but the initial gaussian distribution has 20k particles too.

2. The output file we read is the .h5, from which we take the last step and the (x,y) information. Is this correct?

3. Is "Edes" the initial kinetic energy of the beam in GeV?

4. "brho" is not required for anything?

3. Would you change the field solver, that is set, to other than NONE?

4. Is the RUN, METHOD command correct?

5. What physical effects does this baseline simulation include? Is this enough or can we make it more accurate? (without the need of extra files from Superfish or other software).

Thanks for your attention and best regards,

Galo Gallardo
Junior Artificial Intelligence Engineer
HI-Iberia
ggallardo AT hi-iberia.es
+34 697 68 70 16
//DOUBT: Bunch with 20k particles tracking?

//10.3 OPTION statement in manual
//Controls printing of an echo of input lines on the standard error file. Its
default value is false.
OPTION, ECHO=FALSE;
OPTION, INFO=TRUE;
//Defines after how many time steps the phase space is dumped into the H5hut
file. Its default value is 10.
Option, PSDUMPFREQ=10;
//Defines after how many time steps we dump the phase space of single
particle. It is always useful to record the trajectory of reference particle
or some specified particle for primary study
Option, SPTDUMPFREQ = 50;
//Defines after how many time steps we dump statistical data, such as RMS
beam emittance, to the .stat file. The default value is 10. Currently only
available for OPAL-t.
Option, STATDUMPFREQ=1;
//For version 1.6.0 of OPAL VERSION should read 10600.
OPTION, VERSION=20400;

//Set title name for the simulation
TITLE, STRING="DONES test";

// Some particle and bunch variables
//Kinetic energy GeV - DOUBT
REAL Edes = 0.10;
//Gamma factor = total energy (kinetic + rest mass)/ rest mass
REAL gamma = (Edes+DMASS)/DMASS;
//Relatistic beta factor
REAL beta = sqrt(1-(1/gamma^2));
//Lorentz factor * beta
REAL gambet = gamma*beta;
//The particle momentum in GeV/c.
REAL P0 = gamma*beta*DMASS;
//clight speed of light, brho not used for anything - DOUBT
//REAL brho = (DMASS*1.0e9*gambet) / CLIGHT;
//used for the bunch freq in MHz
REAL rf = 50.6328e6;

//Declare the quadrupole strengths here
//check 11.5 Quadrupole K1
REAL k1=0.5;
REAL k2=-2.5;
REAL k3=-2.0;


VALUE,{gamma,Edes,beta,gambet};

//Elements of the lattice
//ELEMEDGE physical start of element, s coordinate in meters. End is start +
length
//NSLICES provides the opportunity to split one element in smaller steps.
D1: DRIFT, L=0.25, ELEMEDGE=0.000, NSLICES=10;
QP1: QUADRUPOLE, L=0.25, K1= k1, ELEMEDGE=0.25, NSLICES=15;
DG1: DRIFT, L=0.25, ELEMEDGE=0.5, NSLICES=10;
QP2: QUADRUPOLE, L=0.25, K1=k2, ELEMEDGE=0.75, NSLICES=15;
DG2: DRIFT, L=0.25, ELEMEDGE=1.0, NSLICES=10;
QP3: QUADRUPOLE, L=0.25, K1= k3, ELEMEDGE=1.25, NSLICES=15;
D3: DRIFT, L=0.25, ELEMEDGE=1.5, NSLICES=10;


//The lattice
DONES_LATTICE: LINE=( D1, QP1 , DG1, QP2, DG2, QP3, D3);


//Particles initial distribution
DIST: DISTRIBUTION, TYPE=GAUSS,
SIGMAX = 0.0005, SIGMAPX = 1.0e06, CORRX = 0.0,
SIGMAY = 0.0005, SIGMAPY = 1.0e06, CORRY = 0.0,
OFFSETZ = 0.005, SIGMAT = 0.0005,
SIGMAPT= 0.0, CORRT= 0.0, R61= 0.0,
INPUTMOUNITS=EVOVERC, WRITETOFILE= TRUE;

//Particles initial distribution from file
//DIST: DISTRIBUTION, TYPE = FROMFILE, FNAME="data/FODO_DIST.dat";
//FNAME="PartDatabase.dat";

//Fieldsolver type set to none?
//16.4. The FIELDSOLVER Command
//MX, MY defines the grid
//PARFFTX distributed processing
//BCFFTX open boundary condition
//GREENSF define the green function for the FFT solver
FS1:FIELDSOLVER, FSTYPE=NONE, MX=64, MY=64, MT=64,
PARFFTX=true, PARFFTY=true, PARFFTT=true,
BCFFTX=open, BCFFTY=open, BCFFTT=open,
BBOXINCR=1, GREENSF=STANDARD;

//Beam definition

//Particle, momentum, number of particles, beam current in A, bunch
frequency in MHz, deuteron charge = 1


BEAM1: BEAM, PARTICLE=DEUTERON, PC=P0, NPART=20000, BCURRENT=2.0e-03,
BFREQ=rf, CHARGE=1;

SELECT, LINE=DONES_LATTICE;

//Information needed by integrator DT step size
//The maximal order of the beam line maps MAP_ORDER


TRACK, LINE= DONES_LATTICE, BEAM=BEAM1, MAXSTEPS=10000, DT=1.0e-10,
ZSTOP=4.0, MAP_ORDER=2;

//To RUN OPAL-map, the METHOD attribute gets set to THICK.
//his command starts or continues the actual tracking
//Method PARALLEL-T for OPAL-T

RUN, METHOD = "THICK", BEAM=BEAM1, FIELDSOLVER=FS1, DISTRIBUTION=DIST;

ENDTRACK;

STOP;



Archive powered by MHonArc 2.6.24.

Top of Page