Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update species for H2+ #64

Merged

Conversation

ColwynGulliford
Copy link
Contributor

@ColwynGulliford ColwynGulliford commented Jun 30, 2024

This PR adds the molecular hydrogen ion to the species list(s) for ParticleGroup. The ion consists of two protons and one electron:

mH2pc2 = 2*mpc2 + mec2 # Molecular Hydrogen Ion H2+

e_charge = scipy.constants.e
c_light = scipy.constants.c

CHARGE_OF = {'electron': -e_charge,
            'positron': e_charge,
            'proton': e_charge,
            'H-': -e_charge,
            'H2+': e_charge,
            }

CHARGE_STATE = {
    'electron': -1,
    'positron': 1,
    'proton': 1,
    'H-': -1,
    'H2+': +1,
    }


MASS_OF = {'electron': mec2,
           'positron': mec2,
           'proton': mpc2,
           'H-': mhmc2,
           'H2+': mH2pc2,
           }

This seems to respect the standard:
Screenshot 2024-06-29 at 9 56 46 PM

https://github.com/openPMD/openPMD-standard/blob/upcoming-2.0.0/EXT_SpeciesType.md

@ChristopherMayes ChristopherMayes merged commit 8fe25bd into ChristopherMayes:master Jun 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants