picmi-standard / picmi

Standard input format for Particle-In-Cell codes
https://picmi.readthedocs.io
Other
35 stars 25 forks source link

Add class for field ionization #75

Closed NeilZaim closed 1 year ago

NeilZaim commented 2 years ago

We had talked about adding classes for different types of particle interactions. Is this typically what you had in mind @dpgrote?

In any case, we probably should not merge this PR until we have updated this feature in WarpX (and possibly other codes that use picmi). By the way, how much do we care about backward compatibility? Should we do something about it in this PR?

NeilZaim commented 2 years ago

Thanks a lot for your feedback @dpgrote! I tried to do as you proposed in your last suggestion and added a more generic interactions.py file.

The only thing different compared to your suggestion is that we only pass ionized_species and product_species when creating a picmi.FieldIonization object instead of neutral_species, ion_species and product_species as you proposed. This is because I think that in most PIC codes, neutral_species and ion_species are the same species with a different charge state.

ax3l commented 1 year ago

@NeilZaim is this ready and we can remove the [WIP] in the title?

In any case, we probably should not merge this PR until we have updated this feature in WarpX (and possibly other codes that use picmi).

Is there a corresponding PR pending in WarpX or is it time to start one now?

Maybe also relevant for FBPIC @RemiLehe

NeilZaim commented 1 year ago

@ax3l Yes there is a WIP PR in WarpX: https://github.com/ECP-WarpX/WarpX/pull/3298/, although it's not ready yet.

It's probably best to test that both PR work together before merging them.

NeilZaim commented 1 year ago

Looks like the CI test added in the WarpX PR is working so I guess that we can merge this, what do you think @dpgrote?

NeilZaim commented 1 year ago

Thanks, I'm using the numpy style formatting now.