Tags

Sanity Check

Description

The sanity check check case is used to verify that an installation of the emittance component GPT element is working correctly. It involves a beam with x-x' correlation that focuses to a point after ~4nS. After installing the emittance component tools, please run the input file and verify that the output matches up with the plots below.

GPT Input

# This is an input file for GPT. It describes a situation where the beam is
# focused down to a point and space charge forces the particles to shoot out
# again.

# Set the GPT license
GPTLICENSE=1251405651;

# Define the beam parameters
gamma = 100;
radius = 1e-3;
length = 1e-6;
total_charge = -10E-15;
number_of_particles = 1000;
initial_emittance = 1E-9;

# Start the beam
setparticles("beam", number_of_particles, me, qe, total_charge);
setrxydist("beam", "u", radius/2, radius);
setphidist("beam", "u", 0, 2*pi);
setGdist("beam", "u", gamma, 0);
setzdist( "beam", "g", 0, length, 3, 3) ;

# Set its initial emittance to 1nm
setGBxdist("beam", "g", 0.0, 1e-3, 3.0, 3.0);
setGBxemittance("beam", initial_emittance);
setGBydist("beam", "g", 0.0, 1e-3, 3.0, 3.0);
setGByemittance("beam", initial_emittance);

# Introduce a correlation
divergence = -1E2;
addxdiv("beam", 0.0, divergence);
addydiv("beam", 0.0, divergence);

# Add space charge
Alpha  = 1.2;   
Fn     = 0.25;  
verror = 0.005; 
Nstd   = 12;    
spacecharge3Dmesh_caching("Cathode", "MeshNfac", Alpha, "MeshAdapt", Fn, "SolverAcc", verror, "MeshBoxSize", Nstd);

# Compute the emittance components
emittance_component("4d space charge");
emittance_component("4d beamline element");
emittance_component("4d non-force");

# Set the solver tolerance
#dtmax = 1e-12;
accuracy(6);

# Print touts
tout(0.0, 1.0e-8, 5e-11);

Also, download here.

Plots

Emittance Components

TestCase_SpaceCharge.png
Topic revision: r1 - 13 Aug 2018, ChristopherPierce
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback