CST STUDIO SUITE - Charged Particle Simulation PDF
CST STUDIO SUITE - Charged Particle Simulation PDF
CST STUDIO SUITE - Charged Particle Simulation PDF
Workflow &
Solver Overview
Trademarks
CST, CST STUDIO SUITE, CST MICROWAVE STUDIO, CSTEM STUDIO, CST
PARTICLE STUDIO, CST CABLE STUDIO, CST MPHYSICS STUDIO, CST PCB
STUDIO, CST MICROSTRIPES, CST DESIGN STUDIO, CST BOARDCHECK,
PERFECT BOUNDARY APPROXIMATION (PBA), and the CST logo are
commercial trademarks or registered trademarks of Dassault Systèmes,
a French “société européenne” (Versailles Commercial Register # B 322
306 440), or its affiliates in United-States and/or other countries. All
other trademarks are owned by their respective owners. Use of any
Dassault Systèmes or its subsidiaries trademarks is subject to their
express written approval.
Chapter 1 – Introduction
Welcome
Welcome to CST PARTICLE STUDIO, the powerful and easy-to-use electromagnetic
field and charged particle dynamics simulation software. This program combines a user-
friendly interface with high simulation performance.
CST PARTICLE STUDIO is part of the CST STUDIO SUITE. Please refer to the CST
STUDIO SUITE Getting Started manual first. The following explanations assume that
you have already installed the software and familiarized yourself with the basic concepts
of the user interface.
The simulators support the Perfect Boundary Approximation (PBA) feature, which
increases the accuracy of the electromagnetic simulation significantly in comparison to
conventional simulators. To calculate electromagnetic fields and analyze particle
dynamics this software contains four different solvers: a time domain Wakefield
4 CST STUDIO SUITE® 2019 – Charged Particle Simulation
If you are unsure which solver best suits your needs, contact your local sales office for
further assistance.
Each solver's simulation results can be visualized with a variety of different options.
Again, a strongly interactive interface will help you to achieve the desired insight into
your device quickly.
The last – but not least – outstanding feature is the full parameterization of the structure
modeler, which enables the use of variables in the definition of your component. In
combination with the built-in optimizer and parameter sweep tools, CST PARTICLE
STUDIO is capable of both the analysis and design of particle accelerating devices.
General
Native graphical user interface based on Windows 7, Windows 2008 Server R2,
Windows 8, Windows 2012 Server, Windows 8.1, Windows 2012 Server R2 or
Windows 10
The structure can be viewed either as a 3D model or as a schematic. The latter
allows a parametrized approach of coupled simulation with our System Assembly
and Modeling workflow.
Various independent solver strategies allow accurate results with a high
performance
For specific solvers, highly advanced numerical techniques offer features like
Perfect Boundary Approximation (PBA) ® for hexahedral grids and curved and
higher order elements for tetrahedral meshes
Structure Modeling
Note: some solvers features may be available for hexahedral or tetrahedral meshes only.
Note: some solvers features may be available for hexahedral or tetrahedral meshes only.
Particle-in-Cell Simulator
Wakefield Simulator
High performance absorbing boundary conditions also for charged particle beams
Conducting wall boundary conditions
CST STUDIO SUITE® 2019 – Charged Particle Simulation 9
Eigenmode Simulator
Electrostatics Simulator
Magnetostatics Simulator
Result Export
Automation
Powerful VBA (Visual Basic for Applications) compatible macro language including
editor and macro debugger
OLE automation for seamless integration into the Windows environment (Microsoft
Office®, MATLAB®, AutoCAD®, MathCAD®, Windows Scripting Host, etc.)
12 CST STUDIO SUITE® 2019 – Charged Particle Simulation
The main part of the manual is the Simulation Workflow (Chapter 2) which will guide you
through the most important features of CST PARTICLE STUDIO. We strongly
encourage you to study this chapter carefully.
Document Conventions
Buttons that should be pressed within dialog boxes are always written in italics, e.g.
OK.
Key combinations are always joined with a plus (+) sign. Ctrl+S means that you
should hold down the Ctrl key while pressing the S key.
The program’s features can be accessed through a Ribbon command bar at the top
of the main window. The commands are organized in a series of tabs within the
Ribbon. In this document a command is printed as follows: Tab name: Group name
Button name Command name. This means that you should activate the
proper tab first and then press the button Command name, which belongs to the
group Group name. If a keyboard shortcut exists, it is shown in brackets after the
command.
Example: View: Change View Reset View (Space)
The project data is accessible through the navigation tree on the left side of the
application’s main window. An item of the navigation tree is referenced in the
following way: NT: Tree folder Sub folder Tree item.
Example: NT: 1D Results Port Signals i1
Your Feedback
We are constantly striving to improve the quality of our software documentation. If you
have any comments regarding the documentation, please send them to your local
support center. If you do not know how to contact the support center near you, send an
email to SIMULIA.CST.Hotline@3ds.com.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 13
This chapter covers three different workflow examples for Particle Tracking, Particle in
Cell (PIC) and Wakefield computations:
Go through the following explanations carefully even if you are not planning to use the
software for Particle Tracking simulations. Only a small portion of the example is specific
to this particular application type since most of the considerations are general to all
solvers and application domains.
At the end of this example, you will find some remarks concerning the differences
between the typical simulation procedures for electrostatic and magnetostatic
calculations and some useful hints for setting up the Particle Tracking and gun
algorithm.
The following explanations always describe the menu-based way to open a particular
dialog box or to launch a command. Whenever available, the corresponding toolbar item
is displayed next to the command description. Due to the limited space in this manual,
the shortest way to activate a particular command (i.e. by pressing a shortcut key or
activating the command from the context menu) is omitted. You should regularly open
the context menu to check available commands for the currently active mode.
The Structure
Usually an electron gun is only one part of a complex device, for example a particle
accelerator. The gun is used to create a collimated particle beam, so that other parts of
the device are driven with a beam of good quality.
The way this gun works is quite simple. Electrons are emitted from a cathode by a
particle source based on space charge limited emission. These particles are accelerated
and focused by an anode. Additional focusing is realized by a set of magnets behind the
anode.
The following picture shows the structure of interest. It has been sliced open to aid
visualization. Anode and cathode consist of perfect electrical conductor (PEC) material
whereas the magnetic structure above the anode consists of iron and permanent
magnets.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 15
Before you start modeling the structure, let us spend a few moments discussing how to
describe this structure efficiently.
At first, CST PARTICLE STUDIO allows to define the properties of the background
material. Anything you do not fill with a particular material will automatically be filled with
the background material. For this structure it is sufficient to model anode, cathode, two
iron discs and three permanent magnets of the electron gun. The background properties
will be set to vacuum.
After launching the CST STUDIO SUITE, you will enter the start screen showing a list of
recently opened projects and allowing to specify the application which suits your
requirements best. The easiest way to get started is to configure a project template,
which defines the basic settings that are meaningful for your typical application.
Therefore, click on the New Template button in the New Project from Template section
within the New and Recent tab.
Next you should choose the application area, which is Charged Particle Dynamics for
the example in this tutorial and then select the workflow by double-clicking on the
corresponding entry.
For the electron gun, please select Vacuum Electronic Devices Particle Gun
Particle Tracking .
Finally, you are requested to select the units, which fit your application best. For this
example, please select the dimensions as follows:
16 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Dimensions: mm
Frequency: Hz
Time: s
For the specific application in this tutorial the other settings can be left unchanged. After
clicking the Next button, you can specify a name for the project template and review a
summary of your initial settings:
Finally click the Finish button to save the project template and to create a new project
with appropriate settings. CST PARTICLE STUDIO will be launched automatically due to
the choice of this specific project template within the application area Charged Particle
Dynamics.
Please note: When you click again on the File: New and Recent you will see that the
recently defined template appears below the Project Templates section. For further
projects in the same application area you can simply click on this template entry to
launch CST PARTICLE STUDIO with useful basic settings. It is not necessary to define
a new template each time. You are now able to start the software with reasonable initial
settings quickly with just one click on the corresponding template.
Please note: All settings made for a project template can be modified later during the
construction of your model. For example, the units can be modified in the units dialog
box (Home: Settings Units ) and the solver type can be selected in the Home:
Simulation Setup Solver drop-down list.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 17
An interesting feature of the online help system is the QuickStart Guide, an electronic
assistant that will guide you through your simulation. If it does not show up
automatically, you can open this assistant by selecting QuickStart Guide from the
dropdown list next to the Help button in the upper right corner.
The following dialog box should then be visible at the upper right corner of the main
view:
As the project template has already set the solver type, units and background material,
the Particle Tracking Analysis is preselected and some entries are marked as done. The
red arrow always indicates the next step necessary for your problem definition. You do
not have to follow the steps in this order, but we recommend to follow this guide at the
beginning to ensure that all necessary steps have been completed.
Look at the dialog box as you follow the various steps in this example. You may close
the assistant at any time. Even if you re-open the window later, it will always indicate the
next required step.
If you are unsure of how to access a certain operation, click on the corresponding line.
The QuickStart Guide will then either run an animation showing the location of the
related menu entry or open the corresponding help page.
The Particle Gun template has already applied some settings for you. The defaults for
this structure type are geometrical units in mm and time in s. You can change these
settings by entering the desired settings in the units dialog box (Home: Settings Units
), but for this example you should just leave the settings as specified by the template.
Additionally, the used units are also displayed in the status bar:
18 CST STUDIO SUITE® 2019 – Charged Particle Simulation
As discussed above, the structure will be described within vacuum. The material type
Normal is set as default background material in the Particle Gun template. For this
example, you do not need to make any changes as the default properties of the material
type Normal are those of vacuum. In case you need to change the properties, you may
do so in the corresponding dialog box Simulation: Settings Background .
The basic settings have been made, now we are able to set up the structure. Since the
electron gun is rotationally symmetric, a special but very efficient technique can be used
to design the structure. First of all, the cathode is created.
1. Open the Rotate Profile dialog box Modeling: Shapes Rotate Face to create
the cathode.
2. Press the ESC key to show the dialog box. Do not click a point in the working plane.
3. Enter the name "cathode" and choose Z as axis of rotation. Set the material to PEC.
Now enter the polygon data as shown in the table below.
x z
1.5 0.0
7.0 0.0
7.0 6.0
6.5 6.0
6.5 0.5
1.5 0.5
CST STUDIO SUITE® 2019 – Charged Particle Simulation 19
4. You may click the Preview button during the construction to get a preview of the
solid. This makes it easy to detect any possible mistakes when entering the data.
The dialog box should now look like in the picture above. Click the OK button to
confirm your settings and to construct the cathode.
5. The structure is displayed in the working plane and now your cathode should look
like this:
One part of the cathode is still missing, the inner cylinder. We will need this inner
cylinder to define the particle source. To create this cylinder, open the Cylinder
dialog Modeling: Shapes Cylinder . Press the ESC key to show the dialog box.
Change the name the name to "cathode_inner", enter an Outer radius of 1.5 and
Zmax of 0.5. Click the OK button to confirm your changes. The cylinder should fit
perfectly into the hole of the solid cathode:
20 CST STUDIO SUITE® 2019 – Charged Particle Simulation
6. The construction of the cathode is completely finished and now we will construct the
anode in the same way as we constructed the outer cathode. Open the Rotate
Profile dialog box Modeling: Shapes Rotate Face .
7. Press the ESC key to show the dialog box. Do not click a point in the working plane.
8. Enter the name "anode" and choose z as axis of rotation. The material PEC should
be automatically selected.
Your dialog box should now look like in the picture above. Now enter the polygon
data as shown in the following table:
x z
20.0 25.0
40.0 25.0
40.0 31.0
2.1 31.0
2.1 30.0
20.0 30.0
CST STUDIO SUITE® 2019 – Charged Particle Simulation 21
Click the OK button to confirm your changes. The creation of the anode is complete
and the whole structure should look like this (rotated for better visibility):
9. As you might have noticed, the magnetic part of the structure is still missing. First,
we will construct the three vacuum discs that will serve as permanent magnets. To
create one disc, open the Cylinder dialog box Modeling: Shapes Cylinder .
Press the ESC key to show the dialog box.
10. Enter the name "magnet", outer radius 32.8 and the inner radius 5.8. The z range
extends from 31 to 37.9 mm. Change the material to vacuum. Click the OK button to
confirm your changes.
11. Since the same cylinder exists three times, we will use the transform dialog box to
create the missing two cylinders. First select the solid "magnet" in the navigation
tree NT: Components component 1 magnet.
12. Open the Transform Selected Object dialog box Modeling: Tools Transform to
copy the cylinder.
22 CST STUDIO SUITE® 2019 – Charged Particle Simulation
13. Before the iron discs will be defined, we create a new and simple iron material. To
do this, open the material dialog box Modeling: Materials New/Edit New
Material. Change the Material name to "Iron", the Color to red and value of Mu to
100 like in the picture below. Now we have quickly defined a simple iron material.
Click the OK button to confirm your changes and to leave this dialog box.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 23
14. The iron discs are created in the same way as the magnets. Open the cylinder
dialog Modeling: Shapes Cylinder . Press the ESC key to show the dialog box.
24 CST STUDIO SUITE® 2019 – Charged Particle Simulation
15. Enter the Name "iron", an Outer radius of 32.8 and Inner radius of 5.8. The z range
extends from 37.9 to 41 mm. Change the material to the new material "Iron". Your
dialog box should now look like the picture above.
16. Finally click the OK button and confirm your changes. To create the second iron
disc, we will use the transform mechanism again. Select the solid "iron" in the
navigation tree.
17. Open the Transform Selected Object dialog box Modeling: Tools Transform to
copy the cylinder.
18. Select Copy and enter a translation of 10 in z-direction. Click the OK button to
confirm your changes. Now the structure should look like this:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 25
19. The structure creation part is finished and we can start to define the sources, i.e.
potentials, magnets and particle sources.
Congratulations! You have just created your first particle tracking structure within CST
PARTICLE STUDIO.
With all components for the electrostatic part of the configuration defined, the
appropriate potentials can be set. First define the potentials of the cathode and anode:
1. Select Simulation: Sources and Loads Static Sources Electric Potential and
double-click on the surface of the “cathode” solid in the working plane. Press the
Return key to finish your selection and to open the Define Potential dialog box.
2. Enter the name "cathode_pot" and a value of -3e4 V. As usual, click the OK button
to confirm your changes.
3. In the same way the potential for the anode is defined. Select Simulation: Sources
and Loads Static Sources Electric Potential and double-click on the surface
of the anode. Press the Return key to finish your selection and to open the Define
Potential dialog box.
4. Enter the name "anode_pot" and a value of 0 V. Click the OK button to confirm your
changes.
5. If you now select the potential folder in the navigation tree your structure should
look like the picture below:
26 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Note: As the solids "cathode" and "cathode_inner" are in direct contact, both have
the same potential. That means "cathode_inner" also has a potential of -30 kV.
6. After the potential definition is finished, we will create three permanent magnets for
the three vacuum discs. To define the first magnet select Simulation: Sources and
Loads Static Sources Permanent Magnet .
7. Then select the solid that should become a permanent magnet. Thus double-click
on the vacuum disc named "magnet".
8. The Permanent Magnet dialog box opens. Ensure that the vectorial components are
set to X: 0, Y: 0, Z: 1 and Inverse direction is not checked. Enter a value of 0.02 T
for the remanent flux. Leave other settings unchanged and click OK to confirm.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 27
9. In the same way define magnets for the vacuum solids "magnet_1" and "magnet_2"
in z-direction. The solid "magnet_1" should be the vacuum disc in the middle of the
three discs.
10. If you now select the Permanent Magnets folder in the navigation tree you should
see the following picture:
In practice it is advisable to visualize and refine the mesh before the particle source is
defined. The reason is that the number of emission points of the particle source can
depend on the mesh settings. This matter is discussed in detail in the later chapter
Define Particle Sources.
By default, the particle tracking solver uses a hexahedral mesh for computing
electrostatic and magnetostatic fields. This is the optimal choice for axis-aligned
structures as used in this example. However, especially when surfaces in the vicinity of
the particle trajectories are curved, their representation by tetrahedral mesh cells might
be better-suited and will deliver more accurate results. In order to keep the focus on the
simulation workflow itself, we will deal with tetrahedral meshes in a later, specialized
section.
The mesh generation for the structure’s analysis is performed automatically based on an
expert system. However, in some situations it may be helpful to inspect the mesh to
improve the simulation speed by changing the parameters for the mesh generation.
The mesh can be visualized by entering the mesh view Home: Mesh Mesh View .
For this structure, the mesh information will be displayed as follows:
28 CST STUDIO SUITE® 2019 – Charged Particle Simulation
One 2D mesh plane is visible at a time. You can modify the orientation of the mesh
plane by adjusting the selection in the Mesh: Sectional View Normal dropdown list or
just by pressing the X/Y/Z keys. Move the plane along its normal direction using the
Up/Down cursor keys. The current position of the plane will be shown in the Mesh:
Sectional View Position field.
There are some thick mesh lines shown in the mesh view. These mesh lines represent
important planes (so-called snapping planes) at which placement of mesh lines is
considered necessary by the expert system. You can control these so-called snapping
planes in the Special Mesh Properties dialog by selecting Simulation: Mesh Global
Properties Specials Snapping.
In a lot of cases the automatic mesh generation will produce a reasonable initial mesh,
but in our case we will refine the mesh in the cathode region to have a finer mesh
resolution for the particle beam.
1. Make sure you are in the mesh view mode. Select the solid cathode in the
navigation tree NT: Components component1 cathode.
2. Open the dialog box Mesh: Mesh Control Local Properties to modify the
local mesh settings of the cathode. Uncheck both Use same setting in all three
directions boxes. Change Step width in x and y to a value of 0.4. Extend the x
and y range by 1.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 29
3. Confirm your changes as usual by clicking on the OK button. The dialog box
closes and you can see the modified mesh.
30 CST STUDIO SUITE® 2019 – Charged Particle Simulation
The number of mesh cells should be 497,536. You can get this information from the
status bar.
You can now leave the mesh inspection mode via Mesh: Close Close Mesh View .
A particle source is a shaped surface of a component where charged particles enter the
computational domain under a specific emission condition, which is determined by the
emission model settings. Such a source is often located on the surface of a PEC solid,
but it can also be defined on the surface of any arbitrary material. In our case the particle
source will be placed on the inner cathode. To facilitate the selection of the surface of
the inner cathode, some solids will be hidden.
1. Select "cathode" and "cathode_inner" in the navigation tree. Use the Shift key
for multi-selection. Select the option View: Visibility Hide Hide Unselected.
Now we are able to define the particle source.
3. After selecting the emission surface, press the Return key to open the Define
Particle Area Source dialog box. Here, the particle type and particle density at
the previously selected surface are adjustable. Change the Tracking emission
model to Space charge. The blue points in the preview visualize the particle
emission points. Their density can be influenced using the Number of emission
points slider. An increase of the number of emission points leads to a smoother
CST STUDIO SUITE® 2019 – Charged Particle Simulation 31
current density. The checkbox Adjust density to mesh should be enabled if the
emission model Space charge is chosen. Otherwise the number of emission
points might be too low to obtain good simulation results and has to be
increased manually when refining the mesh.
Note: As seen in the lower part of the dialog box, standard or user-defined
particle types can be specified. A particle definition library allows you to export
such user-defined particle definitions to a database and also to import them.
This library is accessible through the Load and Save buttons. In this example,
we keep the default particle type electron.
4. Move the Number of emission points slider until the number is 375. For fine-
control, you can use the left/right arrow keys while the slider is focused. To
change the emission model settings, click the Edit button next to the emission
model drop down list. The SCL Emission Settings dialog box opens:
32 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Note:
The red triangular mesh shows the discretization of the cathode surface, while
the blue points visualize the start positions of the particles for the simulation. In
this case the emission model Space charge limited requires the start positions
to be shifted a little bit away from the cathode surface. This shifting is done
automatically depending on the mesh close to the cathode.
6. We finished the particle source definition and leave the Define Particle Area
Source dialog box by clicking the OK button again.
7. Since some solids are currently hidden, we have to unhide them to see the
whole structure again. Select View: Visibility Show (dropdown list) Show
All. It is often helpful to hide some solids in order to select faces inside a
structure.
The particle source is now defined and ready for emission. Before you continue, have a
look at the QuickStart Guide to see the next steps.
The point “Set boundary conditions” already has been set to be finished as the
boundaries were defined by the Particle Gun template. Nevertheless, the boundary
conditions will be discussed in the next section to illustrate the basics of the boundary
condition setup.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 33
The simulation will be performed only within the bounding box of the structure, the so-
called computational domain. You can specify certain boundary conditions for each
plane (Xmin, Xmax, Ymin, Ymax, Zmin, Zmax) of the computational domain. These
boundary conditions reflect the appropriate behavior of the surrounding world.
The boundary conditions are specified in a dialog box which can be opened by choosing
Simulation: Settings Boundaries .
While the boundary dialog box is open, the boundary conditions are visualized in the
structure view as shown in the next picture.
You can change boundary conditions from within the dialog box or interactively in the
view. Select a boundary by double-clicking on the boundary symbol within the view and
select the appropriate type from the context menu.
The following table gives an overview of available boundary conditions and their effect
on the tangential and normal component of the electric and magnetic fields:
34 CST STUDIO SUITE® 2019 – Charged Particle Simulation
In our case we want to use open boundaries in all directions. As we use the Charged
Particle Dynamics template, the default boundaries are already set to open.
Furthermore, some extra space is added between the structure and the open
boundaries. Click the button Open Boundary to check this setting.
The distance of this extra space is the length of the bounding box diagonal times the
user defined factor, in our case 0.1. This value is also defined in the Charged Particle
Dynamics template. Click Cancel to leave this setting unchanged. Click Cancel again to
leave the Boundary Conditions dialog box.
Note: There are two ways to create some space (background material) between
structure and boundaries. The first way is described above. Alternatively, some extra
space can be defined in the Background Properties dialog box. You can have a look in
the paragraph Define the Background Material.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 35
After having defined all necessary parameters, you are ready to perform your first
simulation. The simulation is started from within the particle tracking solver control dialog
box: Simulation: Solver Setup Solver .
In this dialog box you can specify the settings of the Particle Tracking Solver and start
the simulation process. If multiple particle sources are defined, you can choose between
a simulation where all sources emit particles and a simulation where only a single
source is active. Enable the Gun iteration option to activate the iterative gun solver
algorithm, set the Relative accuracy to be -20 dB and the Max. number of iterations to
20. Thus the Tracking Solver does not just track the particles once through the
computational domain. Instead, the solver iteratively repeats an electrostatic calculation
and then tracks the particles until the desired accuracy of the space charge deviation
between two successive iterations is reached.
36 CST STUDIO SUITE® 2019 – Charged Particle Simulation
The Tracking fields box lists all electromagnetic fields that are available for the particle-
tracking solver. In order to consider a specific field type for the tracking process, check
the respective Active checkbox, in our case for the E- and the M-Static field
Now you can start the simulation procedure by clicking the Start button in the particle
tracking dialog box. A few progress bars will appear to keep you up to date with the
solver’s progress.
As you can see in the next paragraph, the complete solving procedure consists of three
to four parts, depending upon the selected post processing steps. Part two (electrostatic
solver) and part three (particle tracking) are repeated iteratively until the relative
accuracy condition specified in the gun iteration section is reached.
1. Magnetostatic Solver
1.1. Checking model: During this step, your input model is checked for errors such
as invalid overlapping materials, etc.
1.2. Calculating matrices: During these steps, the system of equations, which will
subsequently be solved, is set up.
1.3. Magnetostatic solver is running: During this stage a linear equation solver
calculates the field distribution inside the structure.
2. Electrostatic Solver
2.1. Calculating matrices: During these steps the system of equations, which will
subsequently be solved, are set up.
2.2. Electrostatic solver is running: During this stage a linear equation solver
calculates the field distribution inside the structure.
3. Particle Tracking
3.1. Initializing Tracking Solver: The data structure for the collision detection of
particles with solids is constructed.
3.2. Tracking Solver is running: The particles are emitted and tracked through the
computational domain.
4. Post Processing
4.1. From the field distribution, additional results like the inductance matrix or the
energy within the computational domain can be calculated.
After a few repetitions of steps two and three, the desired accuracy of -20 dB of the gun
iteration is reached, i.e. the relative difference of the space charge distribution between
two consecutive solver runs is less than -20 dB. The algorithm of the iterative gun solver
and its convergence condition are explained by the following diagram:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 37
START
Calculate magnetostatic
field distribution
Calculate electrostatic
field distribution
Converged?
no
yes
END
38 CST STUDIO SUITE® 2019 – Charged Particle Simulation
In tracking applications, users are often interested in the particle beam behavior. To
have an overview of the particle movement, a 3D visualization of the trajectories is
available in the navigation tree NT: 2D/3D Results Trajectories. The trajectories
should now look like in the following picture:
Colors indicate the particle energy. There are lots of options to modify this plot using the
Particle Plot properties dialog box 2D/3D Plot: Plot Properties Properties .
Open the dialog box and change some settings, for example the Display type. Click the
Start button on the Animation tab to see the movement of the particles. Detailed
explanations can be obtained from the online help. Click the Help button to open the
online help in your browser. If you like to close this dialog box, click the Close button.
Field plots are also available in the navigation tree. To obtain the current density of the
particle beam select NT: 2D/3D Results Particle Current Density in the navigation
tree. To enable logarithmic scaling check the respective box at 2D/3D Plot Color
Ramp Log.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 39
Further plot settings can be changed in the 3D Vector Plot dialog box. This can be
opened as usual via 2D/3D Plot: Plot Properties Properties .
To create the field plot above, the Density slider on the Arrows and Bubbles tab was
shifted to the right. Try to change some settings. Click the Close button to leave this
dialog box.
In the case of gun simulations with space charge limited emission, the emitted current is
an important parameter. The 1D result plot emitted current versus gun iteration NT: 1D
Results Particle Sources Current vs. Iteration particle1 is available in the
navigation tree:
40 CST STUDIO SUITE® 2019 – Charged Particle Simulation
This 1D result offers you the possibility to control the emission process. Thus it is very
helpful that this plot is already available during the gun iteration.
Another plot is also available during the gun iteration, the gun code accuracy. If the user
defined accuracy is reached, the iterative gun solver stops. To get this 1D result plot
select the folder NT: 1D Results Convergence Gun Iteration Charge Accuracy in
the navigation tree:
Apart from these 1D graphs, the development of the emitted charge and the perveance
during the gun iteration process are also available via NT: 1D Results Particle
Sources Charge vs. Iteration and NT: 1D Results Particle Sources Perveance
vs. Iteration.
The collision information under NT: 1D Results Total Collision Information can also be
very interesting, because these graphs contain e.g. information about the power that is
absorbed by a solid. Precise numbers can easily be read from these graphs via the entry
Show Axis Marker from the context menu:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 41
In this case the background consists of vacuum, thus all particles are absorbed by the
boundary of our calculation domain.
The previous steps demonstrated how to enter and analyze a simple structure.
However, structures are usually analyzed to improve their performance. This procedure
may be called “design” in contrast to the “analysis” done before.
After you get some information on how to improve the structure, you will learn how to
optimize the structure’s parameters. This could be done by modifying each parameter
manually, but this of course is not the best solution. CST PARTICLE STUDIO offers
various options to describe the structure parametrically in order to change the
parameters easily.
Let us assume you are interested in the dependency of the emitted current on the
cathode's potential. To obtain this dependency, first of all the potential has to be
parameterized. Thus double click on the potential NT: Potentials cathode_pot in the
navigation tree.
The Edit Potential dialog box opens and the potential can be edited. Instead of a number
type the string "phi" in the Potential value field.
42 CST STUDIO SUITE® 2019 – Charged Particle Simulation
If you click the OK button, you will be asked to delete the current results. Just click the
OK button to delete the results. Then the dialog box New Parameter opens to define the
value of your parameter "phi".
Enter a value of -3e4 and click the OK button. You have successfully defined your first
parameter. The values of your parameter can be edited and checked in the Parameter
List window that is usually located in the lower left part of the main window:
Since we did not change the value of the cathode's potential, the results of the
simulation would be the same. We will now change the setup to run a so called
Parameter Sweep to get the emitted current for potentials in the range from -32 kV to
-28 kV. To do this, open the Particle Tracking solver dialog box Simulation: Solver
Setup Solver .
CST STUDIO SUITE® 2019 – Charged Particle Simulation 43
To save some time during the parameter sweep disable the checkbox Gun iteration. The
tracking solver will now run only one calculation and will not operate in the iterative
mode.
Click the button Par. Sweep to open the dialog box Parameter Sweep and to configure
the parameter range and also the expected results of the parameter sweep.
44 CST STUDIO SUITE® 2019 – Charged Particle Simulation
In this dialog box you can specify calculation sequences that consist of various
parameter combinations. To add such a sequence, click the New Seq. button now. Then
click the New Par button to add a parameter variation to the sequence:
In the resulting dialog box you can select the name of the parameter to vary in the Name
field. Then you can specify different sweep types to define the sampling of the
parameter space (Linear sweep, Logarithmic sweep, Arbitrary points). Depending on this
selection the sampling can be defined further, e.g. the linear sweep option allows us to
define the lower (From) and upper (To) bounds for the parameter variation as well as the
definition of either the number of samples or the step width.
In this example you should perform a linear sweep from -32 kV to -28 kV in 5 steps.
Click the OK button to confirm your changes. The definition of the sequence is finished
but we still need to configure the expected result, the emitted current. The parameter
sweep dialog box should look as follows:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 45
Next, you have to specify the results of interest. Here, the current emitted from the
particle source should be monitored.
As can be seen above, this quantity is available as a plot versus gun iteration number
under NT: 1D Results Particle Sources Current vs. Iteration particle1. For finding
the final value obtained during the gun iteration, we have to extract the value that
corresponds to the rightmost point in the plot. Note that this approach is also valid if
Perform gun iteration is deactivated as we did above since then the plot only contains a
single point.
In order to define the results of interest, click on the button Result Template. The
Template Based Postprocessing dialog box opens. Templates are separated into
several Template Groups.
Choose the template 0D or 1D Result from 1D Result (Rescale Derivation, etc) in the
General 1D group. This very powerful template is intended for postprocessing or
extracting data from any 1D plot. Once you choose this template, a dialog box opens
where the data source and the operation have to be entered.
46 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Under Specify Action select y at x-Maximum. Under 1D Results, the data source has to
be selected – in our case Particle Sources\Current vs. Iteration\particle1. Leave the
dialog by pressing OK.
The Template Based Postprocessing dialog box should be still open and contain the
following row:
The Result name can be changed by clicking onto the respective cell. You should
change it to something more recognizable since this will finally be the result plot title,
choose, “Emitted Current”:
Click the Close button to return to the parameter sweep. Now start the parameter sweep
by clicking the Start. After confirming the request to delete existing results with OK, the
calculation may take a few minutes. After the solver has finished, leave the dialog box by
clicking the Close button. The navigation tree contains a new item called Tables from
which you can select the item NT: Tables 0D Results Emitted Current. The 1D
result plot should look like in the picture below and gives you the relation between input
voltage and emitted current of the electron gun:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 47
Let us assume that you wish to adjust the emitted current to a value of -0.22 A (which
can be achieved within the parameter range of -32 kV to -30 kV according to the
parameter sweep). Figuring out the proper parameter may be a lengthy task that can
also be performed automatically.
CST PARTICLE STUDIO offers a very powerful built-in optimizer feature for such
parametric optimizations.
To use the optimizer, open the tracking solver control dialog box Simulation: Solver
Setup Solver in the same way as before, or directly via Simulation: Solver
Optimizer . Click the Optimizer button to open the optimizer control dialog box.
48 CST STUDIO SUITE® 2019 – Charged Particle Simulation
First activate the desired parameter(s) for the optimization in the Settings Tab of the
optimization dialog box, here the parameter "phi" should be checked. Next specify the
minimum and maximum values for this parameter during the optimization. From the
parameter sweep, we already know that the searched potential is greater than -32 kV
and lower than -30 kV. Therefore, you can enter a parameter range between -32 kV and
-30 kV. Deactivate Use current as initial value and set the initial start value for the
optimization, e.g. to -31.5 kV.
For this simple example, the other settings can be kept as default. Refer to the online
documentation for more information on these settings. You can specify a list of goals
you wish to achieve during the optimization. In this example the objective is to find a
parameter value for which the emitted current becomes -0.22 A. The next step is to
specify this optimization goal. Switch to the Goals Tab and click Add New Goal.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 49
Now you can define the goal for the emitted current. Since you would like to find a value
of -0.22 A, you should select the equal operator in the conditions frame. Then set the
Target to -0.22. After you click OK, the optimizer dialog box should look as follows:
Up to now, you have specified which parameters to optimize and set the goal that you
want to achieve. The next step is to start the optimization procedure by clicking the Start
button. As shown in the next picture, the optimizer will display its progress in an output
window in the Info tab which is activated automatically. After the whole process has
finished, the optimizer output window contains the best parameter values in order to
achieve the desired goal.
50 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Note that due to sophisticated optimization technology only five solver runs are
necessary to find the optimal solution with very high accuracy.
Click the Close button to leave the dialog box. Now look at the final result of the emitted
current for the optimal parameter setting phi = -30482.5 V by clicking NT: 1D Results
Particle Sources Current vs. Iteration. You should obtain the following result:
As you can see, the final emitted current for the optimized voltage parameter is -0.22 A
as it was previously defined by the setting of the optimization goal.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 51
The Particle Tracking and the Particle Tracking Specials dialog boxes offer many more
options to change the solver properties. The latter is available by selecting Simulation:
Solver Setup Solver and clicking the Specials button.
The Particle dynamics frame offers the possibility to change specific settings of the
particle tracking algorithm. The setting Max. timesteps defines the maximum number of
simulated steps performed by the tracking algorithm. The Min. pushes per cell value
determines the spatial sampling rate of the particle trajectories. The Timestep dynamic
parameter specifies the variation of the time step between two pushes and introduces a
dynamic adaptation of the time step to the highest particle velocity. Activating the
checkbox Monitor charge and current results in monitoring the space charge and current
density generated by the particles. This is automatically activated for gun iteration
simulations.
In the Gun iteration frame, in addition to the desired Relative accuracy, the maximum
number of iterations of consecutive electrostatic simulations and particle tracking
computations is defined. The Relaxation parameter describes the influence of the last
obtained space charge distribution to the overall charge distribution, which is considered
in the next electrostatic computation. By checking Consider self-magnetic field, the
magnetic field generated by the particles can be included in the gun iteration.
In order to save disk space, usually not all time steps are written to the trajectory data.
Instead, a subsampling is performed. The sampling method and its parameter can be
set in the Trajectory sampling section of the Particle Tracking Specials dialog.
52 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Simulation Setups used for Particle Tracking or PIC simulations often consist of a
metallic beam pipe or similar enclosing structure. If these structures are modeled using
PEC material, they effectively cannot be penetrated by magnetic fields, which is
physically correct within the simulation model but usually not desired.
This is why it is possible the treat PEC as a normal material for the Magnetostatic Solver
via a setting in its Specials dialog.
The option Consider PEC as Normal is default only when a Particle Tracking or PIC
project template is used - otherwise this checkbox is disabled by default. If you want to
change or check this setting, open the Special Settings dialog box of the Magnetostatic
Solver Parameters via Home: Simulation Setup Solver (dropdown list) M-Static
Solver, Home: Simulation Setup Solver Specials.
If the checkbox Consider PEC as Normal is enabled, PEC materials are considered like
normal materials with a permeability µ which can be defined in the material properties of
the PEC material.
Please note that in stand-alone Magnetostatic simulations using the Problem Type “Low
Frequency”, different results compared to Problem Type “Particle” are obtained despite
otherwise identical settings due to the different default regarding the consideration of
PEC type materials.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 53
Especially for models with curved surfaces in the vicinity of the particle beam, a
representation of the structure by a hexahedral mesh may require a large number of
cells. In these cases, it can be helpful to use a tetrahedral mesh that will model the
structure’s surfaces more naturally and thus can yield more accurate surface fields.
You can either switch to the tetrahedral mesh type by selecting Simulation: Mesh
Global Properties (dropdown list) Tetrahedral and pressing OK in the appearing
Mesh Properties dialog or alternatively via the option the solver setup dialog Simulation:
Solver Setup Solver Mesh Tetrahedral.
When changing the mesh, you will be informed that any existing results have to be
deleted. Confirm the deletion of the results by clicking OK.
Before starting a new simulation based on a tetrahedral mesh, a few settings in the
model setup have to be changed part of which can be seen as general
recommendations for using the tetrahedral tracking solver:
Open boundaries are not supported. They are automatically replaced by magnetic
boundaries (Ht = 0) upon solver start.
In many cases, the automatically generated mesh will be a good starting point for
performing your simulations. However, in order to obtain a mesh well adapted to the
simulation type, some settings should be changed.
o For modifying the global mesh resolution, you can set the mesh properties via
Mesh Global Properties . In the mesh properties dialog, enter 10 under
Cells per max model box edge for Model and 15 for Background.
o As the particles interact with the electromagnetic fields in the vacuum regions, a
mesh refinement of the permanent magnets is not of highest priority in the first
place. Therefore, you may disable the checkbox Consider material properties
for refinement in the Specials dialog. Moreover, the value in the edit field
54 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Smooth mesh with equilibrate ratio should be changed to 1.3 in order to avoid
generating a too large number of tetrahedrons for this example.
Due to using the project template for setting up the simulation project, most of these
settings already have been applied automatically.
The mesh can be visualized by entering the mesh view Home: Mesh Mesh View
and then pressing Mesh Update to invoke the tetrahedral mesher. In case you do
not trigger the mesh generation manually, the mesh is automatically constructed upon
solver start. After a few seconds, the mesh appears. For the structure in this example, it
looks as follows:
The right image has been generated using Mesh: Visibility Background and Mesh:
Sectional View Cutting Plane . It includes a visualization of the background mesh
cells, i.e., the free-space region where finally the particle trajectories will be computed.
Naturally, the mesh quality in the beam region is important for achieving accurate
results.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 55
Please note that particle tracking simulations using a tetrahedral mesh will in general be
slower than simulations with the same number of hexahedral cells. However, since
tetrahedral meshes yield a more precise surface representation, a considerably smaller
number of cells will often be sufficient for getting accurate results.
Press Update in the Mesh Properties dialog. This requests the tetrahedral mesher to
update the mesh representation. The total number of tetrahedrons is 63,274 now, as
can be seen in the status bar:
As in the hexahedral case, a more local control of the mesh resolution can be reached
via the local mesh properties of the respective component.
After leaving the mesh inspection mode via Mesh: Close Close Mesh View , you
could start the simulation as before using the particle tracking solver control dialog box:
Simulation: Solver Setup Solver Start. However, due to some restrictions that
apply to the tracking solver when used with tetrahedral meshes, the following
preparations have to be performed (if you omit these steps, the solver will emit
respective messages to guide you towards solving possible issues):
While being relative to the mesh dimensions in the hexahedral case, the emission
distance for the space charge limited emission model has to be an absolute value
when using a tetrahedral mesh. In general, it is a good idea to review all settings of
the particle source after switching the mesh type.
In order to do so, right-click onto the particle source in the navigation tree NT:
Particle Sources particle1 and select Properties from the context menu.
This will open the Edit Particle Area Source dialog again. Here you should increase
the Number of emission points to a value around 400 again by setting the Scale
Factor to 10 and adjusting the slider appropriately.
56 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Furthermore, open the settings of the emission model using the Edit button in the
Tracking emission model frame, check the settings and press OK twice to close
both dialogs.
Finally, you can now run the particle tracking solver with a tetrahedral mesh via its solver
control dialog box: Simulation: Solver Setup Solver Start.
The results should look similar to the ones obtained using a hexahedral mesh for the
workflow example described earlier in this section (here for phi = -30 kV and active gun
iteration again):
CST STUDIO SUITE® 2019 – Charged Particle Simulation 57
Summary
This example gave you a basic overview of the key concepts of the Tracking Solver of
CST PARTICLE STUDIO. You should now have a good idea of how to do the following:
If you are familiar with all these topics, you have a very good starting point for further
improving your usage of CST PARTICLE STUDIO.
For more information on a particular topic, we recommend that you look at the contents
page of the online help manual, which can be opened via File: Help Help Contents –
Get Help using CST STUDIO SUITE . If you have any further questions or remarks,
do not hesitate to contact our technical support team. We also strongly recommend that
you participate in one of our special training classes held regularly at a location near
you. Please ask us for details.
58 CST STUDIO SUITE® 2019 – Charged Particle Simulation
The algorithm shown above reflects the fundamentals for the PIC method. In contrast to
the CST tracking and wakefield solvers, the interdependency of fields and charges is
taken into account.
The following example demonstrates how to perform a PIC calculation for a simple
output cavity of a klystron. Studying this example carefully will allow you to become
familiar with many standard operations that are necessary to perform a PIC simulation
within CST PARTICLE STUDIO.
Go through the following explanations carefully even if you are not planning to use the
software for PIC simulations. Only a small portion of the example is specific to this
particular application type since most of the considerations are general to all solvers and
application domains.
The following explanations always describe the menu-based way to open a particular
dialog box or to launch a command. Whenever available, the corresponding toolbar item
is displayed next to the command description. Due to the limited space in this manual,
the shortest way to activate a particular command (i.e. by pressing a shortcut key or
activating the command from the context menu) is omitted. You should regularly open
the context menu to check available commands for the currently active mode.
The Structure
This workflow example demonstrates how to build up the output cavity of a klystron for a
PIC simulation. A klystron is a device to amplify microwave and/or radio frequency
signals. The output resonator is the last stage (cavity) of a klystron. The amplified signal
can be extracted using waveguide ports.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 59
Since only the output resonator as a part of the klystron is simulated, a Gaussian
emission model is used to define an already bunched particle beam.
CST PARTICLE STUDIO allows you to define the properties of the background material.
Background material is considered for the space in which no shape is defined. For this
structure, it is sufficient to use vacuum for the klystron cavity and perfect electrical
conductor (PEC) for the surrounding background space.
After launching the CST STUDIO SUITE you will enter the start screen showing you a
list of recently opened projects and allowing you to specify the application which suits
your requirements best. The easiest way to get started is to configure a project template
which defines the basic settings that are meaningful for your typical application.
Therefore click on the New Template button in the New Project from Template section.
Next you should choose the application area, which is Charged Particle Dynamics for
the example in this tutorial and then select the workflow by double-clicking on the
corresponding entry.
60 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Please select then the following workflow: Vacuum Electronic Devices Klystron Hot
Test Particle in Cell .
You are then requested to select the units which fit your application best. For this
example, please select the dimensions as follows:
Dimensions: mm
Frequency: GHz
Time: ns
Temperature: Kelvin
For the specific application in this tutorial the other settings can be left unchanged. After
clicking the Next button, you can give the project template a name and review a
summary of your initial settings:
Finally click the Finish button to save the project template and to create a new project
with appropriate settings. CST PARTICLE STUDIO will be launched automatically due to
the choice of this specific project template within the application area Charged Particle
Dynamics. Save the newly created “Untitled” project on your hard disk using a name of
your choice.
Please note: When you click again on the File: New and Recent you will see that the
recently defined template appears below the Project Templates section. For further
projects in the same application area you can simply click on this template entry to
launch CST PARTICLE STUDIO with useful basic settings. It is not necessary to define
a new template each time. You are now able to start the software with reasonable initial
settings quickly with just one click on the corresponding template.
Please note: All settings made for a project template can be modified later on during the
construction of your model. For example, the units can be modified in the units dialog
box (Home: Settings Units ) and the solver type can be selected in the Home:
Simulation Setup Solver drop-down list.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 61
An interesting feature of the online help system is the QuickStart Guide, an electronic
assistant that will guide you through your simulation. If it does not show up
automatically, you can open this assistant by selecting QuickStart Guide from the Help
button in the upper right corner.
The following dialog box should then be visible at the upper right corner of the main
view:
As the project template has already set the solver type, units and background material,
the PIC Analysis is preselected and some entries are marked as done. The red arrow
always indicates the next step necessary for your problem definition. You do not have to
follow the steps in this order, but we recommend you follow this guide at the beginning
to ensure that all necessary steps have been completed.
Look at the dialog box as you follow the various steps in this example. You may close
the assistant at any time. Even if you re-open the window later, it will always indicate the
next required step.
If you are unsure of how to access a certain operation, click on the corresponding line.
The QuickStart Guide will then either run an animation showing the location of the
related menu entry or open the corresponding help page.
62 CST STUDIO SUITE® 2019 – Charged Particle Simulation
The Klystron Hot-Test template has already made some settings for you. The defaults
for this structure type are geometrical units in mm and times in ns. You can change
these settings by entering the desired settings in the units dialog box (Home: Settings
Units ), but for this example you should just leave the settings as specified by the
template. Additionally, the used units are also displayed in the status bar:
As discussed above in the Structure section, the klystron cavity is surrounded by perfect
electrical conductor (PEC). The material type PEC is already set as default background
material in the Klystron Hot-Test template. You may change the background material in
the corresponding dialog box (Simulation: Settings Background ). For this example
no change of the background material is needed.
Having defined the initial general settings, the 3D view window is now visible and the
working plane is shown therein. The working plane can be turned off (and on) by clicking
on View: Visibility Working Plane .
Then, you can start building the 3D structure. First, create a vacuum cylinder along the
z-axis of the coordinate system using the following steps:
4. Enter the parameters "Rcav" as outer radius and "Lcav" as Zmax. Click the OK
button to confirm the changes.
5. The "New Parameter" dialog box appears. Enter 38.8 as value for Rcav. Press the
Return key to confirm. It is also possible to add a description of the parameter.
6. Another "New Parameter" dialog box appears. Enter 22 as value for Lcav. Press the
Return key to confirm. The defined parameters are shown in the Parameter List
window of the CST STUDIO SUITE. To view the newly created shape, click on
View: Change View Reset view .
7. Activate and move the working coordinate system to the center of the upper cylinder
face: Select Modeling: WCS Align WCS and pick the face in the maximum z-
direction. This setting is used in the following step (step 8) to define a vacuum
cylinder based on the axes of the working coordinate system.
8. Define a second vacuum cylinder: select the cylinder creation tool Modeling:
Shapes Cylinder . Press the ESC key to open the dialog box.
64 CST STUDIO SUITE® 2019 – Charged Particle Simulation
9. Enter the parameters "Rtub" as outer radius and "Ltub" as Wmax. Press the Return
button to confirm the changes.
10. The "New parameter" dialog boxes appear again. Choose 15.9 for Rtub and 55 for
Ltub. Press the Return button to confirm.
11. In the same way as before move the origin of the working coordinate system to the
center of the lower face of the cavity cylinder. Select Modeling: WCS Align WCS
and pick the face in the minimum z-direction.
12. Define a third vacuum cylinder. Select the cylinder creation tool Modeling: Shapes
Cylinder . Press the ESC key to open the dialog box.
13. Enter the parameters "Rtub" as outer radius and "Ltub" as Wmax. Press the Return
button to confirm the changes.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 65
14. Rotate the local coordinate system 180° around the v-axis: open the Transform
dialog box from Modeling: WCS Transform WCS and select the Rotate button.
Enter 180° for the V-direction. Then click the Apply button.
15. Move the local coordinate system about Rcav in v-direction: Select the Move button
and enter Rcav for the DV shift. Click OK to confirm.
66 CST STUDIO SUITE® 2019 – Charged Particle Simulation
The origin of the local coordinate system should be shifted now to this position:
16. Define a vacuum brick. Select the brick creation tool Modeling: Shapes Brick .
Press the ESC key to open the dialog box.
17. Enter the values as shown in the picture above. For Umax enter the length "WW"
and for Umin the length "-WW". Click the OK button. The "New Parameter" dialog
box will appear again. Enter 36.1 as length for WW and click OK.
18. Since the structures intersect, the "Shape Intersection" dialog box shown below
appears. Select "None" and click OK.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 67
19. Switch to the global coordinate system by disabling the WCS: Modeling: WCS
Local Coordinate System .
20. Select "solid3" in the navigation tree.
21. Open the "Transform Selected Object" dialog box: Modeling: Tools Translate .
22. Enable "Mirror" and "Copy". Choose “Y” as mirror plane normal. Click the OK
button.
23. Since the structures intersect, the "Shape Intersection" dialog box appears again.
Select "None" and click OK. Your structure should now look like this:
68 CST STUDIO SUITE® 2019 – Charged Particle Simulation
24. Select all existing solids in the navigation tree. Transform all selected solids into one
vacuum solid: Modeling: Tools Boolean Add .
Congratulations! You have just created your first PIC structure within CST PARTICLE
STUDIO.
1. Define a circular particle source on the beam tube at the lower z-coordinate:
Simulation: Sources and Loads Particle Sources Particle Circular Source .
Select the following edge (lower z-direction) of the beam tube with a double-click:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 69
2. The dialog box "Define Particle Circular Source" opens where you can modify the
settings of the particle source:
3. Deselect the checkbox “Use pick”, enter an Outer Radius value of Rtub*0.3 and a
Znormal value of 1. Click the Preview button to check these settings.
70 CST STUDIO SUITE® 2019 – Charged Particle Simulation
In the PIC emission model section, the Gauss emission model is already selected
from the drop-down list. Click the Edit button to define the parameters of the
Gaussian emission model. The Gauss emission settings are organized in two tabs:
“General” and “Kinetic Settings”. Enter the values shown in the following table:
General Kinetic
Setting Value Setting Value
Charge (abs) 50e-9 Kinetic type Gamma
Bunches 15 Kinetic value 2
Time / Length Length
Sigma 0.5*Lcav
Cutoff Length 1.25*Lcav
Offset 1.25*Lcav
Bunch distance 87
After configuring the emission settings, the dialog boxes should look as follows:
Click OK to confirm the changes and click OK again to close the "Define Particle
Circular Source" dialog box.
Note: For more information about emission models and appropriate settings please
refer to the online manual.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 71
1. Pick the following face of one brick and double-click to define a port on it: Modeling:
Picks Picks Pick Points, Edges or Faces.
2. Open the "Waveguide Port" dialog box to define a waveguide port on the picked
face (upper y-direction): Simulation: Sources and Loads Waveguide Port .
72 CST STUDIO SUITE® 2019 – Charged Particle Simulation
5. Confirm the settings with the OK button. The port definition is finished now.
Simulation Setup
The solver parameters can be set up within the PIC solver dialog box. A maximum
simulation frequency must be defined. The PIC solver results are only valid in the
defined frequency range. The mesh generation depends on the maximum frequency.
1. Define the maximum frequency within the Frequency Range Settings dialog box
Simulation: Settings Frequency .
4. Change the simulation time to 5 and enable the checkbox Analytic Field.
5. To define the analytic field, click the Settings button of the analytic fields. The
Define Analytic Magnetic Source Field dialog box appears.
6. Change the z-component of the "Constant B Vector" to -0.2 and click the OK button
to confirm. This will apply a homogeneous magnetic flux density of 0.2T along the
–z direction to focus the particle beam.
Before leaving the Particle in Cell Solver Parameters dialog box we want to draw your
attention to the Excitation List button which might be important if ports or other HF-
sources are defined:
74 CST STUDIO SUITE® 2019 – Charged Particle Simulation
If the ports are excited, one can define the amplitude and the time shift for a previously
defined excitation signal. For example, applications like traveling wave tubes feature
driven ports.
Note: The amplitude value is the amplitude of the port signal (units sqrt(W)), which
represents the square root of the peak power applied to the port. For simplicity, the
corresponding average power of the exited port is shown in the column Power avg.
No changes need to be made for this example, so you can leave the dialog box by
clicking Cancel.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 75
Now the solver could be started, but before the mesh will be modified and some particle
monitors will be defined. First click the Apply and then the Close button in the main
solver dialog box.
The mesh settings for this example are already specified in a good way by the Klystron
Hot-Test template. However, in some cases the mesh has to be adjusted manually, as
the mesh does not know anything about the particle movement. To change the mesh
settings, proceed as follows:
1. Click on Simulation: Mesh Global Properties to open the dialog box of the
mesh properties.
76 CST STUDIO SUITE® 2019 – Charged Particle Simulation
2. Play a little bit with the settings. E.g. set Cells per wavelength – Near to model to
20, click Apply to observe the change in the number of mesh cells.
3. Undo your changes and click OK to leave the dialog box.
The particle distribution can be recorded with an equidistant sampling in time. You may
need to switch back to the modeler mode by selecting the Components folder in the
navigation tree before the monitor definition can be activated.
For this example a 3D PIC Position Monitor will be defined. Select and open the PIC
Position Monitor dialog box: Simulation: Monitors PIC Position Monitor .
Enter a Step width of 0.1 and create the monitor by pressing the OK button.
In addition to the 3D particle position monitor a phase space monitor will be set up.
Select Simulation: Monitors PIC Position Monitor PIC Phase Space Monitor to
open the PIC Phase Space Monitor dialog box:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 77
For the abscissa select the z-position and for the ordinate select Gamma. Enter a Step
width of 0.1 for the time sampling. As the beam moves parallel to the z-axis, we are
interested in monitoring the particle γ as a function of the z-position.
Apart from the 3D position monitor and the phase space monitor, a 2D position monitor
is available as well. Please refer to the online help for further details.
All necessary parameters have been now defined and you are ready to perform your first
PIC simulation. You can start the solver directly by clicking Home: Simulation Start
Simulation . Alternatively, you can reopen the PIC solver dialog box, Simulation:
Solver Setup Solver , and start the solver by clicking the Start button.
In the progress window, a progress bar will be shown which informs you on the solver's
status. Information regarding the operation will be displayed next to the progress bar.
The most important stages are listed below:
1. Calculating matrices: Processing CAD model: During this step, the input model
is checked and processed.
2. Calculating matrices: Computing coefficients: During these steps, the system of
equations, which will subsequently be solved, is set up.
3. Data rearrangement: Merging results: For larger models the matrices are
calculated in parallel and the results are merged at the end.
4. Transient analysis: Calculating port modes: In this step, the solver calculates the
port mode field distributions if any ports were defined. This information will be used
later in the time domain analysis of the structure.
5. Transient analysis: Processing excitation / transient field analysis: During this
stage, the particles are emitted into the calculation domain and tracked through the
electromagnetic fields. The solver stops when the previously defined Simulation
time has been reached.
For this simple structure, the entire analysis takes a few minutes to complete.
Note: During the simulation, the position of the particles can be watched by selecting
NT: 2D/3D Results Particles Particle preview in the Navigation Tree. The view of
particles can be then updated by pressing the F5 key or by clicking on 2D/3D Plot: Plot
Properties Update Results .
78 CST STUDIO SUITE® 2019 – Charged Particle Simulation
The results of the PIC simulation can be analyzed in several ways. By clicking on NT:
2D/3D Results Particles Particle preview, the last sample of the simulation can be
visualized in the default 3D particle monitor “Particle preview”.
The charged particle motion can be visualized by selecting the result entry for the
previously defined 3D particle monitor . Select NT: 2D/3D Results Particles
position monitor 1. Open the Particle Position Plot dialog box by double clicking inside
the 3D view window or by selecting 2D/3D Plot: Plot Properties Properties .
CST STUDIO SUITE® 2019 – Charged Particle Simulation 79
You can enter a frame number to plot another time sample. Another way to move back
and forth in the time sample sequence is to use the left and right arrow keys, after
having clicked somewhere in the 3D view window. To start an automatic animation, click
the Animation button in the Particle Position Plot dialog box. This dialog box allows
several other plot modifications, described in more detail in the online help. Close the
dialog box by clicking the Close button.
The phase space plot monitor result can be accessed by selecting NT: 1D Results
PIC Phase Space Monitor pic phase space monitor 1:
This result illustrates the gamma (proportional to energy) variation in time versus the
longitudinal position. The results can be visualized as animation: select Home: Macros
Macros Report and Graphics Save Video. Set the Framerate to 5 Hz and then
click OK. The animation is saved by default in the folder where the .cst project lies and
starts to be executed automatically. It takes less than a minute to create the video. For a
specific time instance of the space phase, you can select a single frame in the
Navigation Tree:
In addition to the results of the previously defined monitors, the PIC solver creates
several other entries in the result tree. Below you can find a selection of interesting
results:
80 CST STUDIO SUITE® 2019 – Charged Particle Simulation
If ports are defined, the output signals at these ports are added automatically to the
results. In this example the signal at port 1 shows that the bunched particle beam
creates high power radio waves. As mentioned earlier, the output signals correspond to
the square root of the peak power, which means that the average output power
extracted from the beam amounts to 0.5*3000*3000 = 4.5 MW.
This 1D result shows the total number of macro particles inside the calculation domain
vs. time. The curve increases when new particles are emitted by the source. It
decreases, when particles are absorbed by solids and/or the background. Especially if a
multipacting event is expected, this type of plot can be very useful.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 81
This 1D result shows the amount of emitted current for all particle sources vs. time.
Especially for field based emission models, like explosive emission, this result is very
important.
The wave-particle power transfer is the power (loss or gain) that is transferred from the
electromagnetic fields to the particles. In case of oscillators, this quantity can be very
interesting. Superposed fields, i.e. analytic fields and field imports, are not taken into
account for this plot.
There are even more possibilities for monitoring the particle data during the simulation
and for analyzing the results, but the previously presented methods provide a good
starting basis. For further options we would like to refer to the online help.
82 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Particles can interact not only with electromagnetic fields but also directly with materials.
To activate and edit the settings of the particle-material interaction, you can open the
dialog box of a previously selected material with Modeling: Materials New/Edit
Material properties and click on the tab Particles. The following dialog box will then be
visible.
It is implicitly assumed that in most of the applications particles move in vacuum space.
Subsequently, particles can collide with shapes filled with any material other than
vacuum. In some cases, it is useful to model the space in which particles move using a
material with non-vacuum properties. This is possible using the volume transparency
feature. Particles can then move in the volume to which the material is assigned.
Furthermore, the PIC solver includes a model for electron impact ionization. The
ionization model can be enabled and configured in this dialog box in the frame
Ionization.
Via the drop-down list in the Property frame, you can select the kind of particle-material
interaction. Several options are available: Secondary Emission (for electrons), Sheet
Transparency and Special Dispersion.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 83
Secondary emission occurs when primary incident particles of sufficient energy hit a
surface and induce the emission of secondary particles. In the frame Secondary
emission model, the parameters of the secondary emission model can be specified.
Options include a phenomenological probabilistic model (Furman), a heuristic model
(Vaughan) and a model based on an imported secondary electron yield (Import).
In some applications, very thin grids or foils are present, through which some particles
are absorbed. This can be represented by an infinitely thin body, a so-called sheet,
which can become transparent to particles. In the frame Sheet transparency, the
transparency level can be specified, which can be either constant or energy-dependent.
Under certain conditions, PIC simulations can be corrupted by numerical instabilities,
often referred to as Cerenkov instability. To mitigate its effects, a special dispersive
material can be defined here using the Special Dispersion property.
Please refer to the online help or the GPU computing guide which is available online
under http://updates.cst.com/downloads/GPU_Computing_Guide_2019.pdf for more
detailed information about the different acceleration features as well as the required
hardware. If you have an appropriate GPU try to enable the GPU acceleration feature
and start the solver again. The PIC solver supports also multi-GPU simulations.
84 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Summary
This example should have given you an overview of the key concepts of CST
PARTICLE STUDIO. You should now have a basic idea of how to do the following:
If you are familiar with all these topics, you have achieved a very good starting point for
further improving your usage of the PIC solver inside CST PARTICLE STUDIO.
For more information on a particular topic, we recommend that you browse through the
online help system which can be opened by pressing the F1 key or clicking on Help
Help Contents – Get Help using CST STUDIO SUITE . If you have any further
questions or remarks, do not hesitate to contact your technical support team. We also
strongly recommend that you participate in one of our special training classes held
regularly at a location near you. Ask your support center for details.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 85
In order to understand the necessity of the ES-PIC solver a glance into physics modeling
applied in the remaining solvers is useful first. In the EM-PIC solver, the EM field and the
particle dynamics are self-consistently described because all the terms in the Maxwell
equations are retained in the equation scheme. This formulation is well-suited for
problems where the interplay between particles and electromagnetic waves is dominant.
This applies especially to light, highly-mobile electrons, which carry a particle current
great enough to affect the EM wave propagation. However, in many applications, the
effect of total particle current is negligible and therefore, the particles do not affect the
electromagnetic wave propagation or vice-versa. Instead, the dominant effect consists in
modifying the electrostatic field via the particle space charge. Furthermore, ions are
typically slow compared with the electrons and the EM waves. For these cases, the
current electromagnetic PIC solver represents excessive computational effort. On the
other hand, the Particle Tracking Solver in the gun-iteration is not well-suited either,
because the coupling between the charged particles and the electrostatic field is too
strong to be sufficiently described by its formulation. These are the cases, where the ES-
PIC solver has advantages and it is therefore the right choice to study electrostatic
effects, such as breakdowns, sheath formation, space charge compensation and
electrostatic waves.
Regarding the numerical computation details, similarly to the EM-PIC solver, a time
integration takes place and the particle movement is calculated using the standard
equations of motion for charges in electromagnetic fields. In contrary to the EM-PIC
solver, the particle current is assumed to be negligible in the ES-PIC solver. Instead, the
particle distribution is used to calculate the space-charge density, which is then used to
solve the Poisson problem in every time step. This allows the simulation of fast particle
dynamics of electrostatic type. This is in contrast to the Particle Tracking Solver, where it
is additionally assumed that the space charge varies very slowly compared to the
particle movement.
86 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Go through the following explanations carefully even if you are not planning to use the
software for wakefield simulations. Only a small portion of the example is specific to this
particular application type since most of the considerations are general to all solvers and
application domains.
The following explanations always describe the menu-based way to open a particular
dialog box or to launch a command. Whenever available, the corresponding toolbar item
is displayed next to the command description. Due to the limited space in this manual,
the shortest way to activate a particular command (i.e. by pressing a shortcut key or
activating the command from the context menu) is omitted. You should regularly open
the context menu to check available commands for the currently active mode.
The Structure
This workflow example considers a particle beam passing through a pillbox cavity. Since
only the vacuum parts of the structure need to be modeled, it is very easy to set up the
geometrical description. It consists only of two added cylinders with a couple of blended
edges. The following picture shows the structure of interest. It is shown in a transparent
way, in order to see the particle beam axis.
CST PARTICLE STUDIO allows you to define the properties of the background material.
Anything you do not fill with a particular material will automatically be considered as
background material. For this structure, it is sufficient to model only the vacuum space.
The background properties will be set to PEC (Perfect Electric Conductor).
1. Model the cylindrical vacuum parts of the resonator and the beam tube.
2. Blend the circular edges of the cavity.
3. Define the beam parameters (axis, charge, velocity).
CST STUDIO SUITE® 2019 – Charged Particle Simulation 87
After launching the CST STUDIO SUITE you will enter the start screen showing you a
list of recently opened projects and allowing you to specify the application which suits
your requirements best. The easiest way to get started is to configure a project template
which defines the basic settings that are meaningful for your typical application.
Therefore, click on the New Template button in the New Project from Template section.
Next you should choose the application area, which is Charged Particle Dynamics for
the example in this tutorial and then select the workflow by double-clicking on the
corresponding entry.
For the pillbox cavity, please select Accelerator Components Cavities Wakefields
Wakefield .
At last you are requested to select the units which fit your application best. For this
example, please select the dimensions as follows:
Dimensions: cm
Frequency: GHz
Time: ns
For the specific application in this tutorial the other settings can be left unchanged. After
clicking the Next button, you can give the project template a name and review a
summary of your initial settings:
88 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Finally click the Finish button to save the project template and to create a new project
with appropriate settings. CST PARTICLE STUDIO will be launched automatically due to
the choice of this specific project template within the application area Charged Particle
Dynamics.
Please note: When you click again on the File: New and Recent you will see that the
recently defined template appears below the Project Templates section. For further
projects in the same application area you can simply click on this template entry to
launch CST PARTICLE STUDIO with useful basic settings. It is not necessary to define
a new template each time. You are now able to start the software with reasonable initial
settings quickly with just one click on the corresponding template.
Please note: All settings made for a project template can be modified later on during the
construction of your model. For example, the units can be modified in the units dialog
box (Home: Settings Units ) and the solver type can be selected in the Home:
Simulation Setup Solver drop-down list.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 89
An interesting feature of the online help system is the QuickStart Guide, an electronic
assistant that will guide you through your simulation. If it does not show up
automatically, you can open this assistant by selecting QuickStart Guide from the Help
button in the upper right corner.
The following dialog box should then be visible at the upper right corner of the main
view:
The project template has already automatically set the Solver type appropriately. Also
Units and background settings have been predefined by the project template.
The red arrow always indicates the next step necessary for your problem definition. You
may not have to process the steps in this order, but we recommend you follow this guide
at the beginning in order to ensure all necessary steps have been completed.
Look at the dialog box as you follow the various steps in this example. You may close
the assistant at any time. Even if you re-open the window later, it will always indicate the
next required step.
If you are unsure of how to access a certain operation, click on the corresponding line.
The QuickStart Guide will then either run an animation showing the location of the
related Ribbon entry or open the corresponding help page.
The Wakefields template has already made some settings for you. The defaults for this
structure type are geometrical units in cm and times in ns. You can change these
settings by entering the desired settings in the units dialog box (Home: Settings Units
), but for this example you should just leave the settings as specified by the template.
Additionally, the used units are also displayed in the status bar:
90 CST STUDIO SUITE® 2019 – Charged Particle Simulation
First, create a cylinder along the z-axis of the coordinate system using the following
steps:
Since the material type “Vacuum” is already predefined, you can create the cylinder
without defining a new material by clicking OK. Your result should look like the picture
below. Press the Space bar to zoom the cylinder to window size.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 91
To create the cavity, you will now construct another vacuum cylinder with the help of the
working coordinate system (WCS):
Confirm your setting by pressing OK. The automatic intersection check detects that both
cylinders are intersecting and ask how to resolve the overlap:
It is important for the following construction steps to add both shapes to one. In order to
do so, select “Add both shapes” and confirm with OK.
The final construction step is to blend the outer circular edges at the cavity and the
intersection edges between the cavity and the beam-tube. Since four edges have to be
blended in one step you can activate the Keep Pick Mode tool Modeling: Picks Picks
Pick Modes Keep Pick Mode before picking the four edges. Now activate
Modeling: Picks Pick Points, Edges or Faces to pick the first edge – you might also
use the keyboard shortcut e:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 93
Cavity edges
By moving the mouse cursor to the first edge and performing a double-click you select
the appropriate edge. Repeat this operation for the other three circular edges on the
cylindrical cavity.
Now press the Return key to store all picks. Deactivate Modeling: Picks Picks Pick
Modes Keep Pick Mode by selecting it once more. To activate the blend tool finally
select Modeling: Tools Blend Blend Edges and enter the value 2 for the blend
radius.
Confirm with OK. Now the work of defining the geometric part is done, and your model
should look as follows (after switching off the visualization of the working plane by
pressing the Alt+W keys):
Congratulations! You have just created your first wakefield structure within CST
PARTICLE STUDIO.
94 CST STUDIO SUITE® 2019 – Charged Particle Simulation
3. Open the particle beam dialog box by selecting Simulation Sources and Loads
Particle Beam :
CST STUDIO SUITE® 2019 – Charged Particle Simulation 95
Enter a value of 10 (cm) for the longitudinal spatial width of the Gaussian pulse, and
a total bunch charge of -1e-12 C. Confirm the settings with the OK button and the
beam source is created. Since the structure is hiding the source visualization you
might select NT: Particle Beams to take a look at the beam source:
Note: The blue arrows indicate the beam position, whereas the orange arrows
indicate the position of the wake integration path.
The simulation of this structure will only be performed within the bounding box of the
structure. You may, however, specify certain boundary conditions for each plane
(Xmin/Xmax/Ymin/Ymax/Zmin/Zmax) of the bounding box.
The boundary conditions are specified in a dialog box which opens after choosing
Simulation: Settings Boundaries .
While the boundary dialog box is open, the boundary conditions will be visualized in the
structure view as in the picture above.
96 CST STUDIO SUITE® 2019 – Charged Particle Simulation
In this simple case, the structure is embedded in perfect conducting material, so all x-
and y- boundary planes may be specified as “electric” planes (which is the default). The
z-boundaries are defined as “open” planes, such that eventual scattering fields traveling
along the beam tube can be absorbed at the lower and upper z-boundaries.
In addition to these boundary planes, you can also specify “symmetry planes." The
specification of each symmetry plane will reduce the simulation time by a factor two.
In our example, the structure is rotationally symmetric with respect to z-axis, therefore
the yz-plane and the xz-plane can be set to be symmetry planes. The excitation of the
fields will be performed by the particle beam source for which the magnetic field is
shown below:
The magnetic field has no component tangential to the planes of the structure’s
symmetry (the entire field is oriented perpendicular to this plane). If you specify these
planes as “magnetic” symmetry planes, you can direct CST PARTICLE STUDIO to limit
the simulation to one quarter of the actual structure while taking the symmetry conditions
into account.
For the YZ and XZ symmetry planes, you can choose magnetic either by selecting the
appropriate option in the dialog box or by double-clicking on the corresponding
symmetry plane visualization in the view and selecting the proper choice from the
context menu. Once you have done so, your screen will appear as follows:
Finally click OK in the dialog box to store the settings. Then the boundary visualization
will disappear.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 97
The mesh generation (hexahedral mesh) for the structure’s analysis is performed
automatically based on an expert system. However, in some situations it may be helpful
to inspect the mesh to improve the simulation speed by changing the parameters for the
mesh generation.
The mesh can be visualized by entering the mesh view Home: Mesh Mesh View .
For this structure, the mesh information will be displayed as follows:
One 2D mesh plane is in view at a time. Because of the symmetry setting, the mesh
plane extends across only one half of the structure. You can modify the orientation of
the mesh plane by adjusting the selection in the Mesh: Sectional View Normal
dropdown list or just by pressing the X/Y/Z keys. Move the plane along its normal
direction using the Up/Down cursor keys. The current position of the plane will be shown
in the Mesh: Sectional View Position field.
There are some thick mesh lines shown in the mesh view. These mesh lines represent
important planes (so-called snapping planes) at which the expert system finds it
necessary to place mesh lines. You can control these snapping planes in the Special
Mesh Properties dialog by selecting Simulation: Mesh Global Properties
Specials Snapping.
98 CST STUDIO SUITE® 2019 – Charged Particle Simulation
For wakefield computations the minimization of dispersion due to the mesh is very
important, especially in longitudinal beam direction. Therefore the particle bunch has to
be sampled adequately in space. Open the mesh properties dialog box by selecting
Home: Mesh Global Mesh Properties .
This example is driven by quite a long bunch (compared to the structure’s dimensions),
therefore the sampling rate can be increased by entering a value of 25 for the Lines per
wavelength setting. In case the bunch length is very short, this might increase the
number of mesh cells significantly. However, a simulation is still possible using cluster
simulation via MPI. Please refer to the Online Help->Simulation Acceleration -> MPI
Computing. Leave the dialog box by clicking OK and have a look at the refined mesh:
You should now leave the mesh inspection mode by toggling Mesh: Close Close
Mesh View .
CST STUDIO SUITE® 2019 – Charged Particle Simulation 99
The fields can be recorded at arbitrary frequencies or with a given sampling rate in the
time domain. Since storing all computed field data would require a large amount of
memory only samples are stored. In order to obtain these field samples so called
monitors have to be defined.
Monitors can be defined in a dialog box that opens after choosing Simulation: Monitors
Field Monitor . You may need to switch back to the modeler mode by selecting the
Components folder in the navigation tree before the monitor definition is activated.
After selecting the proper Type for the monitor, you may specify its time settings in the
Specification field. Clicking Apply stores the monitor while leaving the dialog box open.
All time settings are specified in the active time unit, which was previously set to “ns”.
For this analysis you should enter the following settings:
100 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Finally leave the dialog box by clicking OK. All defined monitors are listed in the NT:
Field Monitors folder. Within this folder you may select a particular monitor to reveal its
parameters in the main view.
Note: After the simulation has finished, you can visualize the recorded field by choosing
the corresponding item from the navigation tree. The monitor results can then be found
in the NT: 2D/3D Results folder. The results are ordered according to their physical
quantity E-Field / H-Field / Currents / Power flow.
After having defined all necessary parameters, you are ready to start the wakefield
simulation. Start the simulation from the Wakefield Solver control dialog box: Simulation:
Solver Setup Solver .
In this dialog box, you can specify the maximum wakelength behind the bunch which
should be calculated. Enter a value of 200 (cm) in this field.
The accuracy of the results mainly depends on the discretization of the structure and
can be improved by refining the mesh. In case a resonant structure is observed, a short
simulated wakelength introduces a truncation error in the wake potential. This could lead
to ripples in the wake impedance.
You can now start the simulation procedure by clicking the Start button. A progress bar
will appear in the status bar which will inform you on the solver's progress. Information
text regarding the operation will appear next to the progress bar. The most important
stages are listed below:
CST STUDIO SUITE® 2019 – Charged Particle Simulation 101
For this simple structure, the entire analysis takes only a few seconds to complete.
After the solver has completed the wake computation, you can view the results. In order
to look at the wake potential, choose the solution from the navigation tree. You can
visualize them by selecting NT: 1D Results Particle Beams ParticleBeam1 Wake
potential. If you open this subfolder, you will see all signals assigned to that folder.
After selecting the folder you should see the following plot:
102 CST STUDIO SUITE® 2019 – Charged Particle Simulation
The Reference Pulse graph is shown only for orientation purposes. As expected due to
the symmetry of structure and beam, only the longitudinal z–wake potential is different
from zero.
If you select the electric field result from the previously defined monitor NT: 2D/3D
Results E-Field e-field (…)[pb], you may obtain a plot showing no arrows at all.
This is due to the fact that the first time sample has been selected automatically at a
time where the beam has not yet entered the calculation domain. Deactivate the all
transparent mode 2D/3D Plot: Plot Properties All Transparent and select another
time frame by using the left / right cursor keys when the focus is in the main window.
Not all plot options and modifications can be explained here. Please refer to the Online
Help for more details. The different view options can be selected using the dropdown list
under 2D/3D Plot: Plot Type.
The following gallery shows some possible plot options for the absolute electric field
values. Can you reproduce them?
CST STUDIO SUITE® 2019 – Charged Particle Simulation 103
Contour plot of the absolute E-field Carpet plot of the absolute E-Field
Hint: In order to see the absolute field values recorded by the monitor, switch from
Arrows to, e.g., Contour, and also try the other possible selections.
Hint: As the time monitor contains multiple frames, try stepping through those while
trying to reproduce the pictures shown above. When selecting frame 22 at 10.5 ns the
results should look alike.
104 CST STUDIO SUITE® 2019 – Charged Particle Simulation
During the solver run complex-valued wake impedances are computed by dividing the
wake potential by the charge distribution of the beam in frequency domain. These
impedances are accessible from the navigation tree. The following picture shows the
real part of the Z-impedance for the previous example with a Simulated Wakelength
setting of 2000:
Real part of the z-wake impedance for the previous example using Simulated
Wakelength of 2000.
This impedance shows the typical truncation error (ripples) for a time signal which has
not decayed to zero before the simulation was completed. In this particular case, the
wake potential is truncated in time domain.
This post processing option allows recomputing of the wake impedances. Additionally, a
low-pass filter can be applied to the impedance in order to smooth the signal. Moreover,
it is possible to recompute certain frequency intervals with a given sampling rate (only
for DFT transformation type). For a very fast computation of the complete spectrum, use
the FFT transformation type. The impedance spectra can be accessed by selecting NT:
1D Results Particle Beams ParticleBeam1 Wake impedance [Name] Z:
Real part of the z- wake impedance computed with a cos²- filter and the FFT
transformation type.
The wake impedance describes the behavior of the cavity in the frequency domain. For
this type of impedance the beam serves as a current source and the wake potential as
voltage. Thus this impedance can be used to detect the modes where beam and
structure interact.
Note: The DFT transformation type is helpful when computing only a few samples within
a specified frequency range, while the FFT type computes a full spectrum very fast.
106 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Summary
This example should have given you an overview of the key concepts of CST
PARTICLE STUDIO. You should now have a basic idea of how to do the following:
If you are familiar with all these topics, you have a very good starting point for further
improving your usage of CST PARTICLE STUDIO.
For more information on a particular topic, we recommend that you browse through the
online help system which can be opened by selecting File: Help Help Contents – Get
Help using CST STUDIO SUITE . If you have any further questions or remarks,
please do not hesitate to contact your technical support team. We also strongly
recommend that you participate in one of our special training classes held regularly at a
location near you. Please ask your support center for details.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 107
In general, all fields defined for a PIC or tracking simulation are superposed before
being used for the particle update. Specifically, in case of the PIC solver, these fields
are superposed to the self-consistent and time-dependent fields based on
Maxwell’s equations.
CST PARTICLE STUDIO has the ability to use fields from other CST STUDIO SUITE 3D
EM solvers as input, particularly CST EM STUDIO and CST MICROWAVE STUDIO.
Electrostatics Solver
The Electrostatics Solver of CST EM STUDIO is used to calculate the accelerating
fields for static guns, or the deflecting electrostatic fields of beam steering units in
cathode ray tubes (CRT).
Magnetostatics Solver
CST EM STUDIO's Magnetostatics Solver pre-calculates the fields of various types
of magnets (such as solenoids, dipoles, quadrupoles, etc.) for beam optics
simulation.
Eigenmode Solver
The particles can also be tracked through resonant fields in cavities calculated with
CST MICROWAVE STUDIO's Eigenmode Solver.
Besides the possibility of calculating fields before or during a particle simulation, CST
PARTICLE STUDIO offers the option to define and use analytical H- and B-field
distributions for the Tracking- and the PIC-solver.
Three different types of analytic magnetic field distributions are currently available:
The picture above shows the “measured” tangential field along the z-axis and the
rotationally symmetric field distribution of the resulting B-field.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 109
The third possibility to consider fields for a tracking or PIC simulation is to import them
from an ASCII file or from another CST-project. Thus it is easily possible to superpose
multiple fields. In order to define one or more field imports, open the dialog box by
selecting Simulation: Sources and Loads Source Field Import External Field:
This feature allows importing of eigenmodes, e-, h- or b-fields even from different
projects based on different meshes. When creating a field import with the Add from
Project option, one can pick an existing field distribution from a CST project file. Fields
based on hexahedral (HEX) and/or tetrahedral (TET) meshes can be imported. Add from
File offers the possibility to import ASCII files or HEX mesh based monitor files.
By clicking the Preview button the overlapping regions of the imported data and the
current domain can be visualized with a magenta colored frame.
It is possible to combine fields from different structures with a particle simulation, but
care has to be taken since the program does not check the consistency of fields on
material boundaries.
Another nice aspect is that a recalculation of tracking or PIC problems does not require
the recalculation of fields. This results in a simulation speed up.
110 CST STUDIO SUITE® 2019 – Charged Particle Simulation
Particle Interfaces
Particle interfaces allow you to connect tracking and/or PIC simulations from different
CST PARTICLE STUDIO projects. Two types of interfaces are available:
Export Interface
Import Interface
Assuming that you have a tracking or gun project, which has to be linked to a
subsequent PIC or tracking project by using Particle interfaces, perform the following
steps to define a proper connection:
Note: An ASCII import of files with user defined particle emission information is also
available. Further information about the file format can be obtained from the online help.
Since an averaged power is needed for the thermal coupling, the time period in that the
power data are averaged has to be defined. Per default, this time period is set to the
user specified simulation time.
The QuickStart Guide is opened automatically on each project start, when the checkbox
File: Options Preferences Open QuickStart Guide is checked. Alternatively, you
may start this assistant at any time by selecting QuickStart Guide from the Help button
in the upper right corner.
When the QuickStart Guide is launched, a dialog box opens showing a list of tasks,
where each item represents a step in the model definition and simulation process.
Usually, a project template will already set the problem type and initialize some basic
settings like units and background properties. Otherwise, the QuickStart Guide will first
open a dialog box in which you can specify the type of calculation you wish to analyze
and proceed with the Next button:
As soon as you have successfully completed a step, the corresponding item will be
checked and the next necessary step will be highlighted. You may, however, change
any of your previous settings throughout the procedure.
In order to access information about the QuickStart Guide itself, click the Help button. To
obtain more information about a particular operation, click on the appropriate item in the
QuickStart Guide.
CST STUDIO SUITE® 2019 – Charged Particle Simulation 113
Online Documentation
The online help system is your primary source of information. You can access the help
system’s overview page at any time by choosing File: Help Help . The online help
system includes a powerful full text search engine.
In each of the dialog boxes, there is a specific Help button which directly opens the
corresponding manual page. Additionally, the F1 key gives some context sensitive help
when a particular mode is active. For instance, by pressing the F1 key while a block is
selected, you will obtain some information about the block’s properties.
When no specific information is available, pressing the F1 key will open an overview
page from which you may navigate through the help system.
Please refer to the CST STUDIO SUITE - Getting Started manual to find some more
detailed explanations about the usage of the CST STUDIO SUITE Online Documen-
tation.
Technical Support
The support area on our homepage (www.cst.com) contains additional helpful and
frequently updated material.
You need to set up a support account before you can access the support area’s content.
The procedure to create an account is simple and can be performed online in the
support section of our website (CST.COM Support).
You can also create and maintain your support account from within our software by
selecting File: Help Support Account Settings . Once the support account is
properly configured, the support area can be easily accessed by selecting File: Help
Online Support Area .
Please note that the online help system’s search function may optionally also include the
support area contents in its search.
114 CST STUDIO SUITE® 2019 – Charged Particle Simulation
History of Changes
An overview of important changes in the latest version of the software can be obtained
by following the What’s New in this Version link on the help system’s main page or
from the File: Help backstage page. Since there are many new features in each new
version, you should browse through these lists even if you are already familiar with one
of the previous releases.
The more detailed Comprehensive List of Improvements can be also accessed through
the What’s New in this Version page. This page offers a link to the Changes in the
Service Packs page that provides information to changes, released during intermediate
service packs.