#============================================================================
# modellipse test
#============================================================================

# ----------------- definition groval parameters  ------------------------------
dfrq = 2.856e9 ;		# operating frequency
omega = 2*pi*dfrq ;

ns = 1.0e-9 ;			# Define a nano second
ps = 1.0e-12;
nC = 1.0e-9 ;
mm = 1e-3;

lambda = c/dfrq;

Ib = 2.0;
Vb = 100e3;
pulsewidth=5/dfrq;


#==============================================================
# Electron Source
#==============================================================

Qtot= -Ib*pulsewidth;

radius=3*mm;
Ra=radius;
Rc = 0;                  # flat surface cathode

Eo=Vb;
G=1-q*Eo/(m*c*c);
GB=sqrt(G^2-1);


setparticles("beam",50000,me,qe,Qtot);
setrxydist("beam","g",0, radius,0,3);
setphidist("beam","u",0,2*pi);
setGBzdist("beam","u",GB,0);
setGBthetadist("beam","u",0,0);
setGBphidist("beam","u",0,0);
settdist("beam","u",pulsewidth/2,pulsewidth);
modellipse("beam", 1.0, 0.5, pi/6);


#==============================================================
# Simulation control
#==============================================================

screen("WCS", "I",0.005*mm,5*mm,0.01*mm);
