2D PIC code used at SPC for simulation of trapped electron clouds in Penning like traps.
General electrode geometries are simulated using web-splines method.
Poisson solver is based on finite element methods.
Electron collisions against a uniform room temperature neutral gas are simulated using monte-carlo algorithms.
Recent Commits
Commit | Author | Details | Committed | ||||
---|---|---|---|---|---|---|---|
58b91615dcc4 | meditz | branch merges | Mar 20 | ||||
e8ba9e18aa23 | meditz | improve GT170 geometry | Mar 20 | ||||
6afd3c950f14 | lebars | Commented unused code and improved poisson | Mar 17 | ||||
8e7aae9fb08f | lebars | corrected bug on matcoef reshape | Mar 17 | ||||
b503eab8e0af | lebars | corrected bug in gradgtilde add to loc_rhs | Mar 17 | ||||
e073c71c1628 | lebars | Added more omp regions | Mar 17 | ||||
a494effb5a96 | lebars | Added gt118 magnet configuration | Mar 14 | ||||
b121cf310431 | lebars | Moved files to best separate geometries and magnetic field configurations | Mar 14 | ||||
281c5d168cb6 | lebars | improved ellipseweight2 for better scaling and compatibility with other weights | Mar 13 | ||||
17cb981b6f0b | lebars | Merge branch 'master' of ssh://c4science.ch/source/fennecs | Mar 13 | ||||
1bfc3ff76e99 | lebars | Added capability to search file in path and read "" strings | Mar 13 | ||||
2eb9a934d936 | meditz | Merge branch 'master' of ssh://c4science.ch/source/fennecs | Mar 13 | ||||
711d55157dff | meditz | ajouter displazgeomweight | Mar 13 | ||||
c721db7021f2 | lebars | Improved the gt170_geom_proto definition | Mar 10 | ||||
49634115c156 | lebars | Added some geometry data | Mar 10 |
README.md
FENNECS
Dependencies
This code needs the following libraries to run:
- futils for writing and reading to .h5 files https://c4science.ch/diffusion/FUTILS/
- bsplines for 2D b-splines interpolation, solving and evaluating the Poisson equation https://c4science.ch/source/spclibs/
- SINTEF SISL a C library for NURBS curves interrogation and calculating the distance to a NURBS curve https://github.com/SINTEF-Geometry/SISL
- forSISL a library layer to use SINTEF SISL in Fortran https://github.com/rweed/forSISL/blob/main/LICENSE.txt
- xgrafix optional library to display a graphical interface during a run and show simulation variables https://ptsg.egr.msu.edu/
Each of these libraries must be compiled according to their respective instructions.
Compilation
To compile the program, the dependencies must first be compiled according to their respective instructions. A Makefile is found in the src folder and prior to the compilation the environment variable $PLATFORM must be defined to use the correct *.mk file, which includes options specific to gcc or intel compilers and specifies the paths to the different libraries. An example can be found and adapted in intel.mk and gcc.mk.
To compile in linux:
- modify the intel.mk or gcc.mk to point to the correct libraries path
- $> export PLATFORM=intel
- $> make release
The code can also be compiled using cmake
- $> mkdir build
- $> cd build
- $> cmake .. -DFUTILS=<path to futils> -DBSPLINES=<path to bsplines> -DSISL=<path to SISL> -DforSISL=<path to forSISL>
- $> make
Running the code
An example of a simulation configuration can be found in wk/T-REX. The code can be run on a cluster using slurm, by calling the run.sh in command line. The code can be stopped using the stop.sh which will create a file called "mystop" containing the remaining number of time-steps to run.
Post-processing
A number of post-processing routines using matlab have been written and can be found in the matlab folder. To open a hdf5 result file, use the class fennecshdf5 with "result=fennecshdf5(filename);". The object result can then be interrogated to access variables stored in the hdf5 file.