Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • S src
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 60
    • Issues 60
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • src
  • Wiki
  • Examples
  • cyclotron

cyclotron · Changes

Page history
cleanup authored Sep 16, 2021 by gsell's avatar gsell
Hide whitespace changes
Inline Side-by-side
Examples/cyclotron.md
View page @ b2cb0ed4
......@@ -17,19 +17,19 @@ For this project we need input files, that you obtain by clicking on links below
| File | Description |
| ---- |-----|
| [cyclotron1.in](/Cyclotron/cyclotron1.in) and [cyclotron2.in](Cyclotron/cyclotron2.in) ([cyclotron1.in]( Cyclotron/1.6/cyclotron1.in) and [cyclotron2.in]( Cyclotron/1.6/cyclotron2.in) for 1.6.x) | the OPAL input files |
| [bfield.dat]( Cyclotron/bfield.dat) | magnetic field map |
| [rffield1.dat]( Cyclotron/rffield1.dat) and [rffield2.dat](Cyclotron/rffield2.dat) | rf field maps |
| [dist1.dat]( Cyclotron/dist1.dat) [dist2.dat]( Cyclotron/dist2.dat) | the input distributions |
| [ic.dat]( Cyclotron/ic.dat) | initial conditions for the tune calculation |
| [refsol.dat]( Cyclotron/refsol.dat) | the reference solution for the tune calculation |
| [cyclotron1.gpl]( Cyclotron/cyclotron1.gpl) and [cyclotron2.gpl]( Cyclotron/cyclotron2.gpl) ([cyclotron2.gpl]( Cyclotron/1.6/cyclotron2.gpl) for 1.6.x) | plotting scripts for gnuplot |
| [cyclotron1.in](/Examples/Cyclotron/cyclotron1.in) and [cyclotron2.in](Examples/Cyclotron/cyclotron2.in) ([cyclotron1.in]( Examples/Cyclotron/1.6/cyclotron1.in) and [cyclotron2.in]( Examples/Cyclotron/1.6/cyclotron2.in) for 1.6.x) | the OPAL input files |
| [bfield.dat]( Examples/Cyclotron/bfield.dat) | magnetic field map |
| [rffield1.dat]( Examples/Cyclotron/rffield1.dat) and [rffield2.dat](Examples/Cyclotron/rffield2.dat) | rf field maps |
| [dist1.dat]( Examples/Cyclotron/dist1.dat) [dist2.dat]( Examples/Cyclotron/dist2.dat) | the input distributions |
| [ic.dat]( Examples/Cyclotron/ic.dat) | initial conditions for the tune calculation |
| [refsol.dat]( Examples/Cyclotron/refsol.dat) | the reference solution for the tune calculation |
| [cyclotron1.gpl]( Examples/Cyclotron/cyclotron1.gpl) and [cyclotron2.gpl]( Examples/Cyclotron/cyclotron2.gpl) ([cyclotron2.gpl]( Examples/Cyclotron/1.6/cyclotron2.gpl) for 1.6.x) | plotting scripts for gnuplot |
# Tune Calculation using cyclotron1.in
### Needed files: cyclotron1.{in,bash,gpl}, bfield.dat, dist1.dat, ic.dat & refsol.dat
For the tune calculation we need initial conditions (ic): energy, radius and radial momenta given to us by an other program in the file ic.dat.
The Bash script [cyclotron1.bash](Cyclotron/cyclotron1.bash) will run the tune calculation for all energies specified in ic.dat and store the
The Bash script [cyclotron1.bash](Examples/Cyclotron/cyclotron1.bash) will run the tune calculation for all energies specified in ic.dat and store the
radial and vertical tune values together with reference data.
Make sure the script has execute permission (`chmod u+x cyclotron1.bash`).
A comparison can be plotted with [gnuplot](http://www.gnuplotting.org), by executing
......@@ -38,16 +38,16 @@ A comparison can be plotted with [gnuplot](http://www.gnuplotting.org), by execu
The result is saved in cyclotron1.pdf and shown below.
![tunesFIXPO](Cyclotron/cyclotron1.png)
![tunesFIXPO](Examples/Cyclotron/cyclotron1.png)
### Tune Calculation with OPAL's closed orbit finder (only in OPAL 2.2 and higher)
### Needed files
| File | Description |
| ---- |-------|
| [cyclotronTune-2-1.in](Cyclotron/cyclotronTune-2-1.in) | OPAL input file |
| [bfield.dat]( Cyclotron/bfield.dat) | magnetic field map |
| [plotTunes.py]( Cyclotron/plotTunes.py) | python (version 3) plotting script for tune calculation |
| [cyclotronTune-2-1.in](Examples/Cyclotron/cyclotronTune-2-1.in) | OPAL input file |
| [bfield.dat]( Examples/Cyclotron/bfield.dat) | magnetic field map |
| [plotTunes.py]( Examples/Cyclotron/plotTunes.py) | python (version 3) plotting script for tune calculation |
Since version 2.2 OPAL has a closed orbit finder with tune calculation based on Gordon's algorithm.
......@@ -84,7 +84,7 @@ and plot the result from the output file `data/tunes.dat` with
The result is saved in `RingTunes.png` and shown below.
![TunesClosedOrbitFinder](Cyclotron/RingTunes.png)
![TunesClosedOrbitFinder](Examples/Cyclotron/RingTunes.png)
# Accelerated Orbit Calculation using cyclotron2.in
### Needed files: cyclotron2.{in,gpl}, bfield.dat, dist2.dat, rffield1.dat & rffield2.dat
......@@ -98,7 +98,7 @@ where you also save the output in cyclotron2.out. It is always a good idea to ch
As in the previous example, the result is saved in cyclotron2.pdf and shown below.
![Orbit](Cyclotron/cyclotron2.png)
![Orbit](Examples/Cyclotron/cyclotron2.png)
<!--
# 3D space charge calculation
......@@ -125,4 +125,4 @@ represents a beam with 3 mm rms. The field solver **Fs1** is the standard open d
and the beam is represented by **1E5** macro particles
**Beam1: BEAM, PARTICLE=PROTON, pc=P0, NPART=1E5, BCURRENT=1.0E-6, CHARGE=1.0, BFREQ= f1;**
-->
\ No newline at end of file
-->
Clone repository
  • Examples
    • FFA
    • RFPhotoInjector
    • cyclotron
    • regressiontestexamples
  • FFA school prerequisites
  • For Developers
    • CodingStyle
    • Compile OPAL at CSCS
    • Compile OPAL
    • Compile required software
    • File Format for stat Storage
    • Most Used Directories in the Code
    • OPAL Development Workflow
    • Pmodules
    • Release Procedure
    • Setup build environment at PSI
View All Pages