|
Dear Danila,
yes you got it right, in `BinEnergyParticles` we just use a more
(float)-stable version of calculating the kinetic Energy for
non-relativistic particles.
(gamma - 1.0) would be a very small number with a singificant bit at the
beginning, long nothing, and then a bad precision for the 2nd
significant digit.
Take care that the two transition bins between non-relativistic and
relativistic regime are one over- and the other underfilled due to the
discretization. The position of it can be taken from
"speciesConstants.param" variable "GAMMA_THRESH" (default: 1.005).
For the HDF5 dump, take care that the momentum we write there is *per
macro particle* and you have to divide it by weighting to get the
individual momentum (for histograms, then again weight count for the
real-particle-momentum-bin with weighting).
https://github.com/openPMD/openPMD-standard/blob/1.0.0/EXT_ED-PIC.md#additional-attributes-for-each-particle-record
I give you more information on our file format "openPMD" after lunch
regarding your second question form yesterday.
Best,
Axel
On 10.01.2017 16:30, Khikhlukha Danila wrote:
> Dear all,
>
> After looking into a pusher code I realized that the relativistic
> correction is applied during the new momentum calculations. So my
> question is irrelevant.
>
> Initially I got confused by the BinEnergyParticles.hpp file where there
> are two branches of code for energy: relativistic and non-relativistic.
> I guess the non-relativistic case represents a limit of low gamma (while
> the momentum is kept to be relativistic) and introduced for the sake of
> accuracy.
>
>
>
> Thanks,
>
> Danila.
>
>
>
> *From:* picongpu-users@hzdr.de [mailto:picongpu-users@hzdr.de] *On
> Behalf Of *Khikhlukha Danila
> *Sent:* Tuesday, January 10, 2017 11:38 AM
> *To:* picongpu-users@hzdr.de
> *Subject:* [PIConGPU-Users] Relativistic momentum
>
>
>
> Dear all,
>
> I have a bit naïve question regarding data in h5 files for the version
> 0.2.2. Am I correct that the moment of particles saved in simulations
> dumps is not relativistic corrected?
>
> And then if I want to calculate the kinetic energy histogram, for
> instance, I need to calculate gamma manually? There is a plugin to
> calculate energy histogram while simulation is running. However I wasn’t
> using it, so I need to calculate it during my post-processing.
>
>
>
> Thanks,
>
> Danila.
>
--
Axel Huebl
Phone +49 351 260 3582
https://www.hzdr.de/crp
Computational Radiation Physics
Laser Particle Acceleration Division
Helmholtz-Zentrum Dresden - Rossendorf e.V.
Bautzner Landstrasse 400, 01328 Dresden
POB 510119, D-01314 Dresden
Vorstand: Prof. Dr.Dr.h.c. R. Sauerbrey
Prof. Dr.Dr.h.c. P. Joehnk
VR 1693 beim Amtsgericht Dresden
|
|