Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworked a bit the Makefile, the Documentation, and pulled in some useful older commits from other branches. #78

Open
wants to merge 164 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
ea29e25
Create README.md
volshevsky Aug 26, 2013
7486f83
Deleted unused Beam/Parsek files
volshevsky Aug 26, 2013
f259f31
put "#include <mpi.h>" at top of .cpp files for compiler
alecjohnson Jun 13, 2014
c89cecc
added ${MPI_INCLUDE_PATH} line in CMakeLists needed for parallel HDF5
alecjohnson Jun 13, 2014
bbd441e
set "WriteMethod = Parallel" for parallel HDF5 in GEM.inp
alecjohnson Jun 13, 2014
6d3a8e5
turned on parallel HDF5 by default in main/CMakeLists.txt
alecjohnson Jun 13, 2014
1a32739
Preparing for merge with volshevsky's "master" branch.
PABourdin Oct 8, 2015
e8190e7
Merge remote-tracking branch 'volshevsky/master'
PABourdin Oct 8, 2015
7555d02
Merge pull request #1 from CmPA/amaya-library
PABourdin Oct 8, 2015
fccbbd5
Added download instructions.
PABourdin Oct 8, 2015
9be5325
Adapting to better resemble the GEM setup from Birn et al. (2001).
PABourdin Oct 8, 2015
0a0b65b
Added ".gitignore" for typical C++ projects.
PABourdin Oct 8, 2015
babf3b8
Merge pull request #2 from CmPA/master
PABourdin Oct 21, 2015
80b76a9
Making sure you can actually compile without the H5hut library.
PABourdin Oct 21, 2015
5c81d42
Can replace hard-coded name of executable with $(IPIC3D_EXE).
PABourdin Oct 22, 2015
4b67de1
When compiling in parallel with "make -j", we need to wait with linki…
PABourdin Oct 22, 2015
c6e0ea1
Simplified significantly and added some explanations for novice users…
PABourdin Oct 22, 2015
c924e93
Restoring original drift velocities in the Z-direction.
PABourdin Oct 22, 2015
d37ee6b
Updated and extended documentation for novice users.
PABourdin Oct 22, 2015
3daf69c
Fixed Makefile to compile and link everything.
PABourdin Oct 22, 2015
196e475
Renamed 'ALLOBJ' to 'ALL_OBJS'.
PABourdin Oct 22, 2015
688da33
Avoid double compilation of 'iPic3D.cpp'.
PABourdin Oct 22, 2015
feae654
Need to allow a different name of the executable.
PABourdin Oct 22, 2015
b2e9093
Merge pull request #3 from CmPA/master
PABourdin Oct 28, 2015
ad13990
Default setup should not use any optional packages (pHDF5 or H5HUT), …
PABourdin Oct 31, 2015
8338d5c
Removed spurious quotes that broke compilation when there are no "IPI…
PABourdin Nov 18, 2015
8c59a04
Some HDF5 library seems to be mandatory, adapting the Makefile to ref…
PABourdin Nov 18, 2015
bbb965d
Standardized the names of variables.
PABourdin Nov 30, 2015
90e55bc
Converted to UNIX formatting (newlines).
PABourdin Nov 30, 2015
5f5db40
Improved comments a little.
PABourdin Nov 30, 2015
93c1239
Merge pull request #4 from CmPA/master
PABourdin Nov 30, 2015
913f70a
Fixed some comments. Header was wrong.
PABourdin Nov 30, 2015
7d17b93
Fixed some minor readability issues.
PABourdin Nov 30, 2015
1a3da8f
Added one comment.
PABourdin Nov 30, 2015
bca2b27
Fixed some more comments for readability.
PABourdin Nov 30, 2015
e1fdabc
Added a warning about non-implemented mover.
PABourdin Nov 30, 2015
a9ff536
One more comment fixed for readability.
PABourdin Nov 30, 2015
7775c2b
Inserted a comment.
PABourdin Nov 30, 2015
1c3c3e2
Added time-dependent fading-in factor, a smooth quintic step function.
PABourdin Nov 30, 2015
c5f307c
Simplified comments for readability.
PABourdin Nov 30, 2015
613ff6e
Fixed syntax error.
Nov 30, 2015
f808fa0
Added 'myrank' as parameter for the output.
PABourdin Nov 30, 2015
0561380
Need to refer to the class, fully compiles now.
PABourdin Nov 30, 2015
71ca574
changes for Original GEM Simulations
Dec 2, 2015
c015000
bug fixes
Dec 2, 2015
fa5fd37
change of HDF5 Output
Dec 2, 2015
ac5cb2f
Merge branch 'master' of https://github.com/CmPA/iPic3D into CmPA-master
PABourdin Mar 4, 2016
d894e5d
Resolved conflicts from 'CmPA'.
PABourdin Mar 4, 2016
7d91dbb
Ignore local changes of Makefile.
PABourdin Mar 4, 2016
7ba1c5a
Ignore also the local executable.
PABourdin Mar 4, 2016
9344677
Removed time-consuming MPI_Barriers that are of no use.
PABourdin Mar 4, 2016
0c5675d
Fixed formatting.
PABourdin Mar 4, 2016
6375847
I'm not quite seeing why 'By' is fixed only in the outermost y-layer,…
PABourdin Mar 4, 2016
2b58530
I do not see a reason why to maintain the inital perturbation for all…
PABourdin Mar 4, 2016
2923d08
I now see that the 'tanh' term came from the current sheet, not from …
PABourdin Mar 4, 2016
b2f023f
Unified hanling of field and particles output parameters: We want "0"…
PABourdin Mar 7, 2016
dd66a43
Reworked a bit the Makefile.
PABourdin Mar 7, 2016
3e5374d
Removed useless comment.
PABourdin Mar 8, 2016
58fd918
Trying to be a bit more clever when enlarging the buffer. Doubling is…
PABourdin Mar 8, 2016
f8ee9fb
Removing useless comments.
PABourdin Mar 8, 2016
5889d4c
Releasing the hand-breakes. Why copy the data twice, if changing one …
PABourdin Mar 8, 2016
820751f
Not even this extra pointer is needed, since the buffer itself is alr…
PABourdin Mar 8, 2016
c1562b2
We must declare 'temp' only once.
PABourdin Mar 8, 2016
8cd11f7
Format string was broken, this version at least fits from the variabl…
PABourdin Mar 9, 2016
839d893
A particle that was deleted does not need space in the communication …
PABourdin Mar 14, 2016
d2b1616
Formatting.
PABourdin Mar 14, 2016
fa763c0
Switching this experimental feature off.
PABourdin Mar 14, 2016
ab81ef0
Renaming "GEMOriginal" to "GEM-original" and adding a swamp diffusion…
PABourdin Mar 14, 2016
d9847eb
Restoring Lukas' "GEMOriginal" setup for historical reasons.
PABourdin Mar 14, 2016
5244458
Making the swamp diffusion stronger in B_y and actually fix B_y and B…
PABourdin Mar 14, 2016
71796b7
Damp away also electric fields.
PABourdin Mar 15, 2016
fa89f3b
Formatting.
PABourdin Mar 15, 2016
71a2d4a
Added possibility to set debug compiler options.
PABourdin Apr 28, 2016
6949a4b
Added possibility to choose a small perturbation.
PABourdin Apr 28, 2016
8c7c18f
Renamed functions for global sum and global maximum.
PABourdin Apr 30, 2016
d58287d
Disabling for now the fading in of forces.
PABourdin Apr 30, 2016
c526ad2
Formatting.
PABourdin Apr 30, 2016
5e08f47
Fading is now de-/activated inside the 'getFadeFactor' function.
PABourdin Apr 30, 2016
df907d7
Say something, if you leave...
PABourdin May 2, 2016
984fa52
Added reference input file for letter submission.
PABourdin May 3, 2016
0c76580
Changed the numebr of cycles in GEM.inp
Jul 4, 2016
4223257
Resolved conflict.
PABourdin Jul 8, 2016
1d20b61
Merge branch 'Gianni-open' of https://github.com/CmPA/iPic3D
PABourdin Jul 8, 2016
3a8d29c
Adding security break-point for not running into problems, later.
PABourdin Jul 8, 2016
ebc726e
Made swamp region more configurable and removed cloned code into a loop.
PABourdin Jul 10, 2016
9b13d4f
Apply swamp region dynamically in the outer 1/40 of grid layers. Incr…
PABourdin Jul 10, 2016
fcce934
Merge pull request #7 from CmPA/master
PABourdin Jul 14, 2016
ecc73e4
No includes are needed for linking.
PABourdin Aug 20, 2016
6a953d6
Removed useless output.
PABourdin Aug 20, 2016
deb0200
Removed double code.
PABourdin Sep 9, 2016
96f3292
Removed empty lines and added 'break' where missing.
PABourdin Sep 9, 2016
37f349f
Formatted commented-out code nicely.
PABourdin Sep 9, 2016
e701821
Activated commented-out handling of Z boundary - I can't quite see wh…
PABourdin Sep 9, 2016
df5ba38
Corrected code formatting.
PABourdin Sep 9, 2016
ed09330
Removed commented-out code that was proven to be wrong anyways.
PABourdin Sep 9, 2016
c935bbc
Only need to call subroutine, if really a boundary condition is to be…
PABourdin Sep 9, 2016
23f8be7
Corrected code formatting.
PABourdin Sep 9, 2016
37c02ba
New bounary condition treatment needs box size if both, left and righ…
PABourdin Sep 9, 2016
42781d8
New functions to apply particle boundary conditions with less compari…
PABourdin Sep 9, 2016
10f5cb8
Adapted header file accordingly...
PABourdin Sep 9, 2016
01e66e2
The existence of a neighbour is irrelevant for applying these boundar…
PABourdin Sep 10, 2016
fb49b4c
Add possibility to override the periodicity of fields for the particl…
PABourdin Sep 10, 2016
bcbf484
Reorganized particle's boundary conditions completely. Computation sh…
PABourdin Sep 10, 2016
b9376a1
Code formatting.
PABourdin Sep 10, 2016
52174b6
Fixed typo.
PABourdin Sep 10, 2016
53ee29f
Reduced amout of output drastically without loosing information.
PABourdin Sep 10, 2016
487e816
Grouping particle boundary conditions together and apply them before …
PABourdin Sep 10, 2016
188a8c6
Fixed typo.
PABourdin Sep 10, 2016
98995a4
Fixed typo.
PABourdin Sep 10, 2016
ac7c24f
Fixed another forgotten ;
PABourdin Sep 10, 2016
2c755d7
Trying to be a bit more clever and continue to process the other boun…
PABourdin Sep 10, 2016
8554cbf
Minor clean-up and optimization.
PABourdin Sep 10, 2016
0183ff1
Fixed an obvious Copy&Paste error.
PABourdin Sep 12, 2016
6bda467
Fixed obvious mistake: When interpolating from nodes to centers, all …
PABourdin Sep 13, 2016
acb7eb8
Added new parameter to set the periodicity for particles separate to …
PABourdin Sep 13, 2016
28188de
Need to treat also the degenerated case correctly.
PABourdin Sep 13, 2016
7fd3d82
Make sure, other boundary conditions are surely switched off when the…
PABourdin Sep 13, 2016
6dff0fe
Reorganized deleting of the particle from processor, to make coding e…
PABourdin Sep 14, 2016
d56d910
Making sure we never free an empty array.
PABourdin Sep 14, 2016
3fe7e5f
Cleanup of buffering code.
PABourdin Sep 14, 2016
053c012
Renamed misleading variable name to 'wrong_domain'.
PABourdin Sep 14, 2016
310e7b3
This variable is not used anywhere.
PABourdin Sep 14, 2016
99229ad
Reorganized sending/receiving buffers completely.
PABourdin Sep 15, 2016
9a72af1
Simplified calculation of the maximum numbers of particles leaving th…
PABourdin Sep 15, 2016
d3c5560
Prepared to trigger communication on each direction independently. E.…
PABourdin Sep 15, 2016
7d0143e
Simplified and generalized the function that buffers leaving particle…
PABourdin Sep 15, 2016
7c15f5a
Fixed a mistake from last commit, position in the buffer is now compu…
PABourdin Sep 15, 2016
7220d3b
Replaced 'MIN_VAL' with a more reasonable name and of course also wit…
PABourdin Sep 15, 2016
7e6b1ec
Code formatting.
PABourdin Sep 15, 2016
0357f76
Removed 'nplast', which is completely unnecessary.
PABourdin Sep 15, 2016
173f607
Fixed some typos from last commit.
PABourdin Sep 15, 2016
2f73fcc
Removed 'nplast' also from here, like done in "Particles3Dcomm".
PABourdin Sep 15, 2016
81b4fe3
Filling communication buffers from the beginning and add end marker.
PABourdin Sep 15, 2016
f20737d
There should not be a need any more to initialize communication buffe…
PABourdin Sep 15, 2016
51ae00c
"communicateParticles" of course expects the number of elements in th…
PABourdin Sep 15, 2016
aff487d
Added default parameter to stop the automatic extension of the commun…
PABourdin Sep 15, 2016
0c28ed2
Forgot to actually return the global maximum.
PABourdin Sep 15, 2016
ce4ce17
Just for security, making sure the recieved buffer is empty after add…
PABourdin Sep 15, 2016
82b5709
Fixed a typo.
PABourdin Sep 15, 2016
3b3d862
Moved these few code lines to main particle routine. This allows to e…
PABourdin Sep 15, 2016
0790464
Treating each communication direction differently means there is no u…
PABourdin Sep 15, 2016
c914a43
'globalMaximum' expects a primary value.
PABourdin Sep 15, 2016
cb6138a
Changed a comment a litte.
PABourdin Sep 15, 2016
a4d32c9
Made some useful booleans global.
PABourdin Sep 15, 2016
3b96f14
Renamed all 'ptVCT' to 'vct', as it is the name in the rest of the code.
PABourdin Sep 15, 2016
2113d5a
Try to be more efficient on very fast for-loops.
PABourdin Sep 15, 2016
dd2d413
Got sick of using a re-invented wheel, trying "std::vector" instead.
PABourdin Sep 15, 2016
ca84b50
Initialize all buffer elements to 'INVALID_PARTICLE'.
PABourdin Sep 15, 2016
4556347
Using more reliable way to access pointer to first element of the buf…
PABourdin Sep 15, 2016
c6e71e3
'npExit' is without function now.
PABourdin Sep 15, 2016
3def28e
Reorganized communication completely, again. 'communicate' can now on…
PABourdin Sep 16, 2016
ddb1b6a
We want to initialize buffers to an integer multiple ov 'nVar'.
PABourdin Sep 16, 2016
6c576bb
Just for security, clear temporary buffer after usage.
PABourdin Sep 16, 2016
ef3bc7c
Need to deal also with empty buffers.
PABourdin Sep 16, 2016
2062841
Why interpolate if you can have "the real thing"(TM).
PABourdin Sep 16, 2016
fa05a08
Looks like 'B[xyz]_ext' was used uninitialized in case there was no e…
PABourdin Sep 17, 2016
dd3578a
Obviously, one grid layer was uninitialized for the damping factor.
PABourdin Sep 18, 2016
cc5ac2a
Will now store the number of particles in the first element of the co…
PABourdin Oct 2, 2016
21059ed
Converted particle arrays to resizable C++ vectors.
PABourdin Oct 31, 2016
fe6140c
'Lambda' was used uninitialized.
PABourdin Feb 15, 2017
c388051
Added missing EOL after 'rhoINIT'.
PABourdin Feb 15, 2017
88300bb
Merge branch 'master' of https://github.com/CmPA/iPic3D into CmPA-master
PABourdin Aug 2, 2017
092f1a4
Merge branch 'CmPA-master'
PABourdin Aug 2, 2017
bf33824
Merge pull request #9 from CmPA/master
PABourdin Nov 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app
iPic3D

# Local Makefile changes
Makefile
129 changes: 74 additions & 55 deletions Documentation/readme.txt
Original file line number Diff line number Diff line change
@@ -1,55 +1,74 @@
How-to install and run iPic3D on your (local) Linux machine.
Doesn't need sudo or root permissions, everything could be installed locally.

1. Install HDF5 library. The current version working properly with iPIC3D is 1.8.9
http://www.hdfgroup.org/ftp/HDF5/releases/

$ cd <top HDF5 source code directory>
$ ./configure --prefix=<location for HDF5 software>
$ make
$ make check
$ make install


2. Install the MPICH2 (or OpenMPI) that supports -lmpe library. For example, this one:
http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.3.2p1/mpich2-1.3.2p1.tar.gz
During the installation of MPICH follow all the instructions in the README file.

Newer versions of OpenMPI should be fine by default in a linux distro.

3. Set environment variables:

$ PATH=mpich2_install_path/bin/:$PATH
$ PATH=hdf5_install_path/lib/:$PATH
$ LD_LIBRARY_PATH=hdf5_install_path/lib/:$LD_LIBRARY_PATH

Note: these paths can also go at the beginning of the makefile.

where mpich2_install_path is the path to the installed MPICH2, and hdf5_install_path is the path to the installed HDF5.

4. Check out the repository:

$ svn co https://svn.esat.kuleuven.be/iPIC/iPic3D/trunk/ iPic3D_folder

where iPic3D_folder is the desired folder for the code.

5. Compiling the code

$ cd iPic3D_folder

$ cp makefiles/makefile.YourSystem makefile

where the makefile.YourSystem is a makefile suitable for your system.
Set the following paths in the makefile:

INC_HDF5 = -I/hdf5_install_path/include
LIB_HDF5 = -L/hdf5_install_path/lib
HDF5LIBS = -L/hdf5_install_path/lib/ -lhdf5 -L/hdf5_install_path/lib/ -lhdf5_hl
MPELIB = -L/mpich2_install_path/lib/ -lmpe

Finally, make everything:
$ make

6. Running iPic3D

$ mpiexec (or mpirun) -n 4 ./iPic3D inputfiles/GEM.inp
How-to install and run iPic3D on your (local) Linux machine.
Doesn't need sudo or root permissions, everything could be installed locally.


1. Install the MPICH2 (for code development) or OpenMPI (for performance runs).

You may choose to use the official "openmpi" library from your operating system's repository.
If you do so, you may skip over to step 2.

For example, this version should work:
http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.3.2p1/mpich2-1.3.2p1.tar.gz
During the installation of MPICH follow all the instructions in the README file.

Newer versions of OpenMPI should be fine by default in a linux distro.


2. Install HDF5 library.

You may choose to use the official "libhdf5-openmpi" package from your operating system's repository.
Please note that you also need the "libhdf5-openmpi-dev" package for the required include files.
If you do so, you may skip over to step 3.

The current version working properly with iPIC3D is 1.8.9
http://www.hdfgroup.org/ftp/HDF5/releases/

$ cd <top HDF5 source code directory>
$ ./configure --prefix=<location for HDF5 software>
$ make
$ make check
$ make install


3. Install H5hut library (optional).

If you want to use also the optional H5hut library, you may follow the same steps as for the HDF5 library as described in step 2.
You may download this library from:
https://amas.psi.ch/H5hut/
Build and installation are linked on this website.


4. Set environment variables:

$ PATH=mpich2_install_path/bin/:$PATH
$ PATH=hdf5_install_path/lib/:$PATH
$ LD_LIBRARY_PATH=hdf5_install_path/lib/:$LD_LIBRARY_PATH

Note: these paths can also go at the beginning of the makefile.

where mpich2_install_path is the path to the installed MPICH2, and hdf5_install_path is the path to the installed HDF5.


5. Download the repository:

$ git clone https://github.com/IWF-Graz/iPic3D.git iPic3D_folder

where "iPic3D_folder" is the desired folder for the code.


6. Compiling the code

$ cd iPic3D_folder

Edit the "Makefile" and check the documentation in the "USER-DEFINED SECTION".

Finally, build everything and compile in parallel:

$ make -j


7. Running iPic3D

$ mpiexec -n 4 ./iPic3D inputfiles/GEM.inp
Or for some MPI libraries that do not have "mpiexec":
$ mpirun -n 4 ./iPic3D inputfiles/GEM.inp
155 changes: 79 additions & 76 deletions Documentation/units.txt
Original file line number Diff line number Diff line change
@@ -1,76 +1,79 @@
Units in iPic3D

---------------------------------------------------------------------------------------------------
1) The input file.

Everything is normalized to ion plasma parameters.
So that in the input file Lx, Ly, Lz are in units of ion skin depth:

[L] == d_i.

The time unit is reversed ion plasma frequency:

[t] == 1 / f_{p,i}.

Hence, the light speed is unity:

c == 1 (given in the inputfile).

Charge is normalized to e:

[e] == 1.

Mass:

m_i == 1

Density:

[rho] = 1/4/pi (normalization is done in EMfields Init* method)

Energy:

[Energy] = m_i * c^2

---------------------------------------------------------------------------------------------------
2) Pressures.

If you need to compute, e.g., plasma beta you have to compute the gas and the magnetic pressures:

p_{gas} = u_{th,i}^2 * \rho_i / (4*pi) + (m_e/m_i) * u_{th,e}^2 * \rho_e / (4*pi)
(where the first term in rhs is the ion pressure, and the second term is the electron pressure).
Note, that you should take the value of a single (x, y, or z) component of the thermal velocity!

p_{mag} = B^2 / (8*pi)


For those who forget, I remind that

\{beta} = p_{gas} / p_{mag}.

---------------------------------------------------------------------------------------------------
3) Magnetic permittivity (permeability) of vacuum

\mu_0 = 1.

---------------------------------------------------------------------------------------------------
4) Alfven speed equals to the B0 in the inputfile

v_A = B_0
---------------------------------------------------------------------------------------------------

5) Currents in iPIC3D (exactly Faraday's law):

j = curl(B)*c/FourPI
---------------------------------------------------------------------------------------------------

6) Velocity distribution

kT/m = vth
where k is Boltzmann constant, T is temperature, m is particle mass for specie;
vth is initial thermal speed for specie (one component!).

So the distribution of the absolute value of velocity (u) should follow the Maxwellian:
F = 4.*pi * (0.5/pi/uth**2)**(1.5) * u**2 * exp(-0.5*u**2/uth**2) * Ns * du,
where uth is thermal speed for the specie, Ns=npcelx*npcely*npcelz, du is velocity bin size.
---------------------------------------------------------------------------------------------------
Units in iPic3D

---------------------------------------------------------------------------------------------------
1) The input file.

Everything is normalized to ion plasma parameters.
So that in the input file Lx, Ly, Lz are in units of ion skin depth:

[L] == d_i

The time unit is reversed ion plasma frequency:

[t] == 1 / f_{p,i}

Hence, the light speed is unity:

c == 1 (given in the inputfile).

Charge is normalized to e:

[e] == 1

Mass:

m_i == 1

Density:

[rho] = 1/(4*pi) (normalization is done in EMfields Init* method).

Energy:

[Energy] = m_i * c^2

---------------------------------------------------------------------------------------------------
2) Pressures.

If you need to compute, e.g., plasma beta you have to compute the gas and the magnetic pressures:

p_{gas} = v_{th,i}^2 * \rho_i / (4*pi) + (m_e/m_i) * v_{th,e}^2 * \rho_e / (4*pi)
(where the first term in rhs is the ion pressure, and the second term is the electron pressure).
Note, that you should take the value of a single (x, y, or z) component of the thermal velocity v_th!

p_{mag} = B^2 / (8*pi)


For those who forget, I remind that

\{beta} = p_{gas} / p_{mag}

---------------------------------------------------------------------------------------------------
3) Magnetic permittivity (permeability) of vacuum

\mu_0 = 1

---------------------------------------------------------------------------------------------------
4) Alfven speed equals to the B0 in the inputfile

v_A = B_0

---------------------------------------------------------------------------------------------------
5) Currents in iPIC3D (exactly Faraday's law):

j = curl(B) * c / (4*pi)

---------------------------------------------------------------------------------------------------
6) Velocity distribution

k_B * T / m = v_th

where k_B is Boltzmann constant, T is temperature, m is particle mass for specie;
v_th is initial thermal speed for specie (one component!).

So the distribution of the absolute value of velocity (u) should follow the Maxwellian:
F = (4*pi) * (1/(2*pi) / v_th^2)^(1.5) * u^2 * exp(-0.5 * (u / v_th)^2) * Ns * du,
where v_th is thermal speed for the specie, Ns=npcelx*npcely*npcelz, du is velocity bin size.

---------------------------------------------------------------------------------------------------

4 changes: 4 additions & 0 deletions H5hut-io/src/H5hut-io.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#ifdef USEH5HUT

#include <mpi.h>
#include <fstream>
#include <cmath>
#include <exception>
Expand Down Expand Up @@ -755,3 +757,5 @@ void H5input::ReadPartDataset(hid_t group, std::string dtset, long long nops, lo
delete [] count;
delete [] start;
}

#endif
Loading