picongpu
picongpu copied to clipboard
[Discussion]Switch boundElectrons particle attribute from float_X to uint32_t
Macro particles in PIC are phase space samples following physical trajectories. As such fractional ion charges are not useful, since physical ions always have integer charges and therefore follow integer charge trajectories, not fractional charge trajectories.
Could you comment on the reasoning given for float_X
choice: https://github.com/ComputationalRadiationPhysics/picongpu/blob/fa0747168cb9e5b09ef83dd065fa09c143d9dc0e/include/picongpu/param/speciesAttributes.param#L104-L114
As far as I understand them they are essentially,
- we might use fractional charges in the future
- boundElectrons is required for ionisation
- all ionisation algorithms need to know the atomic number so, atomicNumber is always present if boundElectrons is present and vice versa, also negation
I would argue that from a physics point of view fractional charges are of little use, since they lead to fundamental errors in the PIC-prediction, and we can save memory and some casts in atomic Physics if we use uint instead.
We should actually be able to use uint8_t, since boundElectrons<=Z<=98(Califonium), everything larger is that short lived that creating a target is next to impossible.
As far as I understand, the fractional charge states are already possible due to the reasons, that in principle shielding can (and should) be considered in ionization processes. This is only possible with fractional charge numbers. However, this makes no sense with respect to the particle pusher. Shielding is currently dealt with by Z_eff values. Thus I think converting to integers should be fine.
Thanks for clarifications @BrianMarre @PrometheusPi .
Is this closed?
Not yet, we currently are still using float_X for boundElectrons and while the consensus is that we should switch, this will only be done after FLYonPIC_v2 goes to mainline.
TLDR: On my ToDo List
Thanks!
TLDR: Thanks! ;D