Skip to Content.
Sympa Menu

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

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

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


Chronological Thread 
  • From: "Power, John" <JP AT anl.gov>
  • To: opal ‎[opal AT lists.psi.ch]‎ <opal AT lists.psi.ch>
  • Subject: [Opal] Rbend not working, what am I doing wrong?
  • Date: Mon, 25 Jul 2016 22:41:50 +0000
  • Accept-language: en-US

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