picongpu icon indicating copy to clipboard operation
picongpu copied to clipboard

[Discussion]Switch boundElectrons particle attribute from float_X to uint32_t

Open BrianMarre opened this issue 2 years ago • 7 comments

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.

BrianMarre avatar Jul 20 '22 13:07 BrianMarre

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

sbastrakov avatar Jul 21 '22 08:07 sbastrakov

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.

BrianMarre avatar Jul 23 '22 03:07 BrianMarre

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.

PrometheusPi avatar Jul 28 '22 06:07 PrometheusPi

Thanks for clarifications @BrianMarre @PrometheusPi .

sbastrakov avatar Jul 28 '22 07:07 sbastrakov

Is this closed?

chillenzer avatar Feb 06 '24 10:02 chillenzer

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

BrianMarre avatar Feb 06 '24 10:02 BrianMarre

Thanks!

TLDR: Thanks! ;D

chillenzer avatar Feb 06 '24 10:02 chillenzer