Skip to Content.
Sympa Menu

opal - RE: [Opal] Rbend not working, what am I doing wrong?

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

RE: [Opal] Rbend not working, what am I doing wrong?


Chronological Thread 
  • From: "Power, John" <JP AT anl.gov>
  • To: "Russell, Steve" <srussell AT lanl.gov>, opal ‎[opal AT lists.psi.ch]‎ <opal AT lists.psi.ch>
  • Subject: RE: [Opal] Rbend not working, what am I doing wrong?
  • Date: Thu, 28 Jul 2016 02:22:49 +0000
  • Accept-language: en-US

Hi Steve,

 

Thanks for the help and good catch on the particles <10 solution.

 

I tried it here and found that it does indeed run through RBEND but, interestingly, it only dumps the beam output on the last step; as opposed to following PSDUMPFREQ and STATDUMPFREQ.  And if I run with particles > 10 it dumps the output normally but does not run through RBEND.  I was planning on tracing a few particles through the RBEND and I think 10 will work ok but I was hoping to see the particle trajectories.

 

John

 

 


From: Russell, Steve [srussell AT lanl.gov]
Sent: Tuesday, July 26, 2016 3:46 PM
To: Power, John; opal ‎[opal AT lists.psi.ch]‎
Subject: Re: [Opal] Rbend not working, what am I doing wrong?

Hi John,

I'm getting closer to an answer. The problem occurs when you go from 10 particles to 11. Above 10, even though the space charge calculation is turned off, the boundary of the mesh that would be used in the space charge routine is still calculated. However, in this case all of the particles lie right on top of each other. This is causing the program to hang when it enters the bend field. I don't know why just yet, but if I change the starting xyz coordinates of one particle in the list to (0.001, 0.001, 0.001) it runs fine.

Steve

Sent from my BlackBerry 10 smartphone on the Verizon Wireless 4G LTE network.
From: Power, John
Sent: Monday, July 25, 2016 3:42 PM
To: opal ‎[opal AT lists.psi.ch]‎
Reply To: Power, John
Subject: [Opal] Rbend not working, what am I doing wrong?

Hi Opal'ers,

 

I am trying to learn how to use Rbend so I made a simple example file (it is pasted at the end of this email as item [1]) that sends 15 particles of gamma=300 (using an external file also pasted at the end of this email as item [2]) through a beamline that is drift + bend + drift. --> BendTest: Line = (DR1, MYRBEND, DR2); <-- but the simulation stops at the entrance to the Rbend element.

 

I would greatly appreciate any guidance!

John Power

 

 

[1] Rbend testfile-------------------------------------------------------------------

OPTION, ECHO=FALSE;
OPTION, INFO=TRUE;  //psdump and statdump are in time steps
OPTION, PSDUMPFREQ = 100;  //How often 6d info is dumped to .h5
OPTION, STATDUMPFREQ = 10; //How often beam stats dumped to .stat. 


//Convention: Element definitions are capitalized. Varaiables are lower case.
//------------------------------------------------------------------------
//     Global Parameters

q_e     = 1.60217653e-19;       // Charge of electrons. (C)
e_mass  = 9.10938188e-31;       // Mass of electrons. (kg)

rf_freq         = 1.3e9;                //RF frequency. (Hz)
rf_period       = 1.0 / rf_freq;        //Rf period. (s)
rf_wavelength   = clight / rf_freq;     //Rf wavelength. (m)
rf_degree_time  = rf_period / 360.0;    //Time of 1 degree of phase. (s)

n_particles             = 15;         //Number of particles in simulation.
beam_bunch_charge       = 0.01e-9;        //Charge of bunch. (C)


DR1:    DRIFT, L = 0.4, ELEMEDGE = 0.0;
DR2:    DRIFT, L = 2.0, ELEMEDGE = 1.3;

MYRBEND: RBend,  ANGLE = 2.0 * (Pi / 180.0), FMAPFN = "1DPROFILE1-DEFAULT",
  ELEMEDGE= 0.5, DESIGNENERGY = 50.0E6,
  L = 0.6, GAP = 0.03;


BendTest: Line = (DR1, MYRBEND, DR2);


Dist1:DISTRIBUTION, DISTRIBUTION = FROMFILE, FNAME = "15partDist.txt";


Beam1: BEAM, PARTICLE = ELECTRON, pc = P0, NPART = 15, BFREQ = rf_freq,
       BCURRENT = beam_bunch_charge * rf_freq, CHARGE = -1;

Fs1: Fieldsolver, FSTYPE = NONE,
              MX = 32, MY = 32, MT = 32,
        PARFFTX = false,
        PARFFTY = false,
        PARFFTT = true,
        BCFFTX = open,
        BCFFTY = open,
        BCFFTT = open,
        BBOXINCR = 1,
        GREENSF = INTEGRATED;

//-------------------------------------------------------------------------------------
// Run beamline
TRACK, LINE = BendTest, BEAM = BEAM1, MAXSTEPS = 1900000, DT = {5.0e-12}, ZSTOP={2.0};
RUN, METHOD = "PARALLEL-T", BEAM = Beam1, FIELDSOLVER = Fs1, DISTRIBUTION = Dist1;

ENDTRACK;

Stop;
Quit;

 

 

[2] 15 particle external files-------------------------------------------------------------------

15

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300

0 0 0 0 0 300




Archive powered by MHonArc 2.6.19.

Top of Page