Skip to Content.
Sympa Menu

opal - [Opal] DC gun simulation: Unexpected longitudinal phase spaces

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

[Opal] DC gun simulation: Unexpected longitudinal phase spaces


Chronological Thread  
  • From: Simon Friederich <sifriede AT uni-mainz.de>
  • To: "opal AT lists.psi.ch" <opal AT lists.psi.ch>
  • Subject: [Opal] DC gun simulation: Unexpected longitudinal phase spaces
  • Date: Thu, 10 Sep 2020 15:40:06 +0200
  • Authentication-results: localhost; iprev=pass (ironport-1.zdv.net) smtp.remote-ip=134.93.178.241; spf=pass smtp.mailfrom=uni-mainz.de; dkim=pass header.d=uni-mainz.de header.s=20190702 header.a=rsa-sha256; dmarc=pass header.from=uni-mainz.de
  • Ironport-phdr: 9a23:tcHSnxNGxt2Mj+buesQl6mtUPXoX/o7sNwtQ0KIMzox0I/X7rarrMEGX3/hxlliBBdydt6sazbOL7Ou7ByQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagYL5+Ngi6oAXTu8UZj4ZvK7s6xwfUrHdPZ+lY335jK0iJnxb76Mew/Zpj/DpVtvk86cNOUrj0crohQ7BAAzsoL2465MvwtRneVgSP/WcTUn8XkhVTHQfI6gzxU4rrvSv7sup93zSaPdHzQLspVzmu87tnRRn1gyoBKjU38nzYitZogaxFoByhoAFxzY3abo6bO/VxYqLdcMgfRWZdRMtcTTBND42+YoYJEuEPPfxYr474p1YWsBW+BAysBOTpyjRVhnH2x6w63Po8Hg7YxgwgHs4BsHTJp9jyL6cSUO61zLPJzTrdcvxZxyzw6JXOchAguP2MWKh/ccvXyUguDQ/Kk0ufpJXjMjiI2esDr3KV4PB8VeKzlWEnsQdxryCgy8otlITEgowbxkzH+Cln3os7KsG1RFJ0b9CkDpZdqyOXOYRoTs4/QGxkpCg0x74atJO4ciUHypAqyhzfZfGJdYWD/xHtVP6JLDd2mX1od6yzihO9/EWu1OHxWMy53VVWoSVYj9bBs3EA2wDS58WCTvZy5Fut1DiK2g3X8e5EL040mK/VK5E/3LI/jZ8evl/fESPqhEn6lKube0U+9uWs9ujreKvqqoKdOoNuhAzzMaIjkdGlD+siKAgBRW2b9Py51L3k4EL2Xq1HjuYzkqnFqJDaItkbprKhDw9VzIkj7xG/Ai+439UXgHUKIl1IdA+eg4jsIFHDIPD4Ae6hj1muijtqxu3JPqP7DprDKHjDka7tc7Fn5E5dzgoyzMpT6ZxbBL0ZIfLzXFH+tMDAAx83LgO5zPjrBdBy244QR26CDKqUPaDOvlCV++0iJuiBaJMUtTv4L/Uq/eLigHE8lFIZZqap05UXZXW2Hvt4PUmWen/hjcwdHmsWogYyVOnqh0eDUT5XaXayRaU85jQjBYK9DIfDSJqtgL2f0yimAJJbfX1GClaNEXvxcoWLQfYMaCSTI8N7jzMLS6CtS5U92hG2qA/6171nI/LT+i0Ar53j0MN45+nSlREp6Tx0FN6R03mWT2F1hG8HWz82j+hDphk3zU+K1YB8gudEDppL/PIPWQdwfcrb1+V+I9TzQR7aOM+SSRCtQoP1Lys2S4cKwtoJZQ5TAdSvgh3Z3iGqS+sOlrKRBZE4/4rB2Xm0Is98zWSA2KR33ApueddGKWDz3v03zAPUHYOcy0g=
  • Ironport-sdr: U/63zeYi9GDTvOJ87oZvC83RPAUGaEtlw1EEFMczZGxeIMUVmhkm5v5N2KQsFuK6WXn0ddPai9 qgV7+DBDgN+D48yUUXPN1ECRHCINKg8SM4WHNE2wuMVLV5zEXgFTryqHaFtT13bi9m6XeKYD4h rZ+w6rQ83UTNJhlbiRG9j5LTGaddIG+XffWkOXFcb2oEXdXdJLTVPXSH3uPHuqCj/I1GpxDiww 8YH9A7cJrbFR7s97qFgOfBf/EJ8lRStcGdDEoxQRyKWBu73U1owaN4ZxcIZOqshHhGU+jymEa5 rng=
  • Organization: Institut für Kernphysik, JGU Mainz

Dear OPAL-Team,

I am trying to simulate a DC electron source. I implemented a 2DDynamics fieldmap into OPAL, that I've exported from CST. Furthermore I've set the frequency to 1 Hz as shown in the DC Gun example.

Unfortunately the longitudinal phase spaces look unexpected. Here I've plotted the h5-output for the gun simulation as well as a pure drift simulation of a 100keV electron beam (same bunch sizes and parameters but the energy is fixed) as comparison.

One can see a strange saw-tooth like pattern convoluted with another almost trident-like one.

This is my emitted gaussian distribution (nothing special, I'd say):

distr_gauss:
    DISTRIBUTION,
    TYPE = GAUSS,
    SIGMAR = 0.5e-3, CUTOFFR = 3,
    CUTOFFLONG = 3;

distr_debug:
    distr_gauss,
    EMITTED=true,
    SIGMAT = 10.0e-12,
    NBIN = 0,  // This I've varied
    EMISSIONSTEPS=10,  // this I've varied too
    EMISSIONMODEL = NONE;

Maybe you see something obvious, that I did wrong? (I've also put my input file in the attachement, the fieldmaps are quite large, if you want them I'll add a seafile link)

I've compared the Ez-field of the reference particle. It looks exactly like the one I've exported from CST. (My next idea was to dumb all E-fields and plot this, but this could be a lot of work and might not bring up the source of the problem). And I've also imported a 3DDynamics field, but there is also no difference to be seen (the source has a cylindrical symmetry, so both should work).

Best regards and thank you very much as always in advance

Simon

-- 
-----------------------------------
Dr. Simon Friederich
Helmholtz-Institut Mainz
Kollaboration B/ACID
Johannes Gutenberg-Universität Mainz
Staudingerweg 18
55128 Mainz, Deutschland

Tel.: +49 (0)6131 39-23160
E-Mail: sifriede AT uni-mainz.de
----------------------------------------

PNG image

TITLE, STRING="DCGun-test";

OPTION,
VERSION = 24000,
//SEED = 123456789, // fix seed for particle generation and
comparison reason
ECHO = false,
INFO = false,
STATDUMPFREQ = 1, // after how many time steps we dump statistical
data
ENABLEHDF5 = true,
PSDUMPFREQ = 10, // Affects the stdout information **BUNCH**
AUTOPHASE = 1;

//----------------------------------------------------------------------------
// Beam parameter
REAL freq = 1.3e9;
// REAL Qbunch = 7.7e-12; // 10mA
// REAL Qbunch = 0.77e-12; // 1mA
REAL Qbunch = 0.77e-15; //1 uA
REAL current = Qbunch*freq;

// Simulation parameter
REAL nelectrons = 100000;
REAL dt_s = 10e-12; // time step in s
REAL zstop = 0.5; // in m

//----------------------------------------------------------------------------
// Distribution
distr_gauss:
DISTRIBUTION,
TYPE = GAUSS,
SIGMAR = 0.5e-3, CUTOFFR = 3,
CUTOFFLONG = 3;
//WRITETOFILE=true;

distr_gauss_injected:
distr_gauss,
EMITTED=false,
//DEBUG SIGMAZ = 0.015960;
SIGMAZ = 0.001;// [SIGMAZ]=m;

distr_gauss_emitted:
distr_gauss,
EMITTED=true,
NBIN = 10,
EMISSIONSTEPS=20, // prior=20, Refine number of simulation steps
around emission
// SIGMAT = 100.0e-12; // [SIMGAT]=s; SIGMAT is used for EMITTED distr
SIGMAT = 100.0e-12; // Debug [SIMGAT]=s; SIGMAT is used for EMITTED
distr

distr_gauss_emitted_100kV:
distr_gauss_emitted,
Ekin=1e5; //[Ekin] = eV;thermionic energy; not yet known why BEAM,
ENERGY=EMASS+1e-4 does not work the same way
//[default: 1eV] Thermal energy added to beam during emission.

distr_debug:
distr_gauss,
EMITTED=true,
SIGMAT = 10.0e-12,
NBIN = 0,
EMISSIONSTEPS=10,
EMISSIONMODEL = NONE;
//, EKIN=5;
// EMISSIONMODEL = ASTRA, EMISSIONSTEPS=300, NBIN = 10, EMITTED =
TRUE;

//----------------------------------------------------------------------------
distribution_to_be_used: distr_debug;
//----------------------------------------------------------------------------
// Fieldsolver
fieldsolver_default:
FIELDSOLVER,
FSTYPE = FFT, // Specify type of field solver ("none" does not
respect space charge)
MX = 20, // Number of grid points in x specifying rectangluar grid
MY = 20,
MT = 50,
PARFFTX = true, // dimension x is distributed among the processors
PARFFTY = true,
PARFFTT = true, // changed that!
BCFFTX = open, // Boundary condition in x,y options: [open]
BCFFTY = open,
BCFFTT = open, // Boundary condition in z options: [open, periodic]
BBOXINCR = 10, // Enlargement of the bounding box in %
GREENSF = INTEGRATED;

//----------------------------------------------------------------------------
// Source
cathode: SOURCE, Z = 0.0; // not yet known if really necessary
gun: RFCavity,
Z = 0,// Z=-0.0015,
VOLT=2.805, // peak rf field amplitude in MVpm
FMAPFN="cst2opal_100keV_xz_2DDynamic.t7", // 2DDynamic
// 3DDynamic
// FMAPFN="cst2opal_100keV_xyz_3DDynamic.t7", // 3DDynamic
APVETO=TRUE,
FREQ=1e-6; // Zero frequency = DC gun

//----------------------------------------------------------------------------
// Beamline
mybeamline: LINE = (cathode, gun);


//----------------------------------------------------------------------------
// Beam
mybeam: BEAM,
PARTICLE = ELECTRON,
//ENERGY = EMASS+1e-4, // in MeV // But for gun no starting energy
needed
ENERGY = EMASS+1e-10, // in GeV
BCURRENT = current, // in A
NPART = nelectrons,
BFREQ = freq*1e-6; // [BFREQ] = MHz

//----------------------------------------------------------------------------
// Simulation
TRACK,
LINE = mybeamline,
BEAM = mybeam,
MAXSTEPS=100000,
DT=dt_s, // in s
ZSTOP=zstop; // in m

RUN,
METHOD = "OPAL-T",
BEAM = mybeam,
FIELDSOLVER=fieldsolver_default,
DISTRIBUTION=distribution_to_be_used;

ENDTRACK;

STOP;



Archive powered by MHonArc 2.6.19.

Top of Page