Skip to content

Commit

Permalink
Add test with ASTRA and KENV for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fuodorov committed Aug 29, 2023
1 parent b07378a commit b55582d
Show file tree
Hide file tree
Showing 17 changed files with 165,012 additions and 1,615 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Relativistic Difference Scheme Particles-In-Cell (REDPIC)

[![PyPI version](https://badge.fury.io/py/redpic.svg)](https://badge.fury.io/py/redpic)
[![Check](https://github.com/fuodorov/redpic/actions/workflows/check.yml/badge.svg)](https://github.com/fuodorov/redpic/actions/workflows/check.yml)
[![Test](https://github.com/fuodorov/redpic/actions/workflows/test.yml/badge.svg)](https://github.com/fuodorov/redpic/actions/workflows/test.yml)
[![Release](https://github.com/fuodorov/redpic/actions/workflows/release.yml/badge.svg)](https://github.com/fuodorov/redpic/actions/workflows/release.yml)

This PIC code has been developed since 2022 as an alternative to
[ASTRA](https://www.desy.de/~mpyflo/),
[WARP](https://bitbucket.org/berkeleylab/warp/),
Expand Down
11 changes: 6 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ Contents of the documentation
-----------------------------

If you are new to REDPIC, we **strongly recommend** that you read the
section :doc:`tutorial` first, so as to have a basic understanding of
section :doc:`tutorial/tutorial` first, so as to have a basic understanding of
what the code does.

You can then see the section :doc:`installation` and
:doc:`tutorial`, to get started with using REDPIC.
You can then see the section :doc:`install/installation` and
:doc:`tutorial/tutorial`, to get started with using REDPIC.

.. toctree::
:maxdepth: 1

installation
tutorial
install/installation
tutorial/tutorial
test/test

Contributing to REDPIC
----------------------
Expand Down
File renamed without changes.
1,603 changes: 0 additions & 1,603 deletions docs/notebooks/tutorial/tutorial.ipynb

This file was deleted.

File renamed without changes.
File renamed without changes.
80,000 changes: 80,000 additions & 0 deletions docs/test/notebooks/test.data.astra

Large diffs are not rendered by default.

80,000 changes: 80,000 additions & 0 deletions docs/test/notebooks/test.ini

Large diffs are not rendered by default.

2,077 changes: 2,077 additions & 0 deletions docs/test/notebooks/test.ipynb

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions docs/test/notebooks/test_beam.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
35 &INPUT
FNAME = 'Example.ini'
Ref_clock=0.0E0
IPart=80000
Species='electrons'
Probe=.t.
Noise_reduc=.t.
Cathode=.t.
Q_total=10E3
Ref_zpos=0.7E0,Ref_Ekin=1.32E0
Dist_z='p', Lt=20, rt=0.01
Dist_pz='p', sig_Ekin=.00,cor_Ekin=0.0E0
Dist_x='r', Lx=48E0, rx=0.1
Dist_y='r'
Dist_px='r', Dist_py='r'
Nemit_x=200
Nemit_y=200
cor_px = 35
cor_py = 35
/

202 changes: 202 additions & 0 deletions docs/test/notebooks/test_track.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
&NEWRUN
Head=' Example of ASTRA users manual'

RUN=1

Distribution = 'Example.ini', Xoff=0.0, Yoff=0.0,

Loop=F, NLoop=2,

TRACK_ALL=T, Auto_phase=F

Phase_Scan=F

H_max=1.0000E-02, H_min=0.0

EmitS=.T.

PhaseS=.T.

TrackS=.T.

RefS=.t.

TcheckS=.T.

CathodeS=.t.

High_res=.T

!Q_Schottky=0.1

C_EmitS = True

Check_ref_part=f

/


&SCAN

LScan=f


Scan_para='Q_K(1)'

!Scan_para='MaxE(1)'

!Scan_para='MaxB(1)'

!Scan_para='MaxB(2)'

!Scan_para='S_pos(1)'

S_min=1 S_max=5, S_numb=10

!S_zmin=4 S_zmax=5

!FOM(1)='hor.emit'

!FOM(2)='ver.tr.emit'

! FOM(3)='hor.emit'

FOM(4)='hor.spot'

FOM(5)='ver.spot'

!FOM(6)='rms energy'

!FOM(7)='momentum'

FOM(8)='charge'

FOM(9)='ver emit'

!FOM(10)='length'
/



&OUTPUT

ZSTART=0.7, ZSTOP=5

Zemit=100, Zphase=20

RefS=T

EmitS=T, PhaseS=T

Tr_EmitS=T,


/


&CHARGE


LSPCH=t

Nrad=9, Cell_var=2.0, Nlong_in=21

min_grid=0.01

Max_Scale=0.01

Lmirror=t


/

&CAVITY

LEField=t,


File_Efield(1)='Ez.dat', C_pos(1)=0.0000, C_higher_order(1) = f

Nue(1)=0, MaxE(1)=-0.0


File_Efield(2)='Ez.dat', C_pos(2)=4.096, C_higher_order(2) = t

Nue(2)=0, MaxE(2)=-1.1


File_Efield(3)='Ez.dat', C_pos(3)=5.944, C_higher_order(3) = t

/


&SOLENOID

LBField=t,


File_Bfield(1)='Bz.dat', S_pos(1)=0.45

MaxB(1)=-0.058, S_smooth(1)=4


File_Bfield(2)='Bz.dat', S_pos(2)=0.957

MaxB(2)=0.039, S_smooth(2)=4

!previous - 0.49


File_Bfield(3)='Bz.dat', S_pos(3)=2.107

MaxB(3)=0.025, S_smooth(3)=4


File_Bfield(4)='Bz.dat', S_pos(4)=2.907

MaxB(4)=0.044, S_smooth(4)=4


File_Bfield(5)='Bz.dat', S_pos(5)=3.670

MaxB(5)=0.040, S_smooth(5)=4


File_Bfield(6)='Bz.dat', S_pos(6)=4.570

MaxB(6)=0.0595, S_smooth(6)=4


File_Bfield(7)='Bz.dat', S_pos(7)=5.470

MaxB(7)=0.059, S_smooth(7)=4


/





&QUADRUPOLE

LQUAD=f,

Q_length(1)=0.2, Q_K(1)= 6.00, Q_pos(1)=15.28, Q_bore(1)= 0.075,


/



&Aperture
Lapert=f
File_Aperture(1)='input/aperture.dat'

/






9 changes: 9 additions & 0 deletions docs/test/test.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Test
======================================================

REDPIC test with astra and kenv.

.. toctree::
:maxdepth: 2

notebooks/test.ipynb
Loading

0 comments on commit b55582d

Please sign in to comment.