ComputationalRadiationPhysics / picongpu

Performance-Portable Particle-in-Cell Simulations for the Exascale Era :sparkles:
https://picongpu.readthedocs.io
Other
703 stars 217 forks source link

[Discussion]Switch boundElectrons particle attribute from float_X to uint32_t #4228

Open BrianMarre opened 2 years ago

BrianMarre commented 2 years ago

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.

sbastrakov commented 2 years ago

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

BrianMarre commented 2 years ago

As far as I understand them they are essentially,

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.

PrometheusPi commented 2 years ago

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.

sbastrakov commented 2 years ago

Thanks for clarifications @BrianMarre @PrometheusPi .

chillenzer commented 8 months ago

Is this closed?

BrianMarre commented 8 months ago

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

chillenzer commented 8 months ago

Thanks!

TLDR: Thanks! ;D