From bce32ef6fb7df36676a9670306a1f3cd852bb2f9 Mon Sep 17 00:00:00 2001 From: Weijian Lin <84821747+wlin6927@users.noreply.github.com> Date: Mon, 20 Nov 2023 18:10:04 -0500 Subject: [PATCH] Update species.py to include H- as a species --- pmd_beamphysics/species.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pmd_beamphysics/species.py b/pmd_beamphysics/species.py index 65bd004..9cd9f4b 100644 --- a/pmd_beamphysics/species.py +++ b/pmd_beamphysics/species.py @@ -9,22 +9,27 @@ mec2 = scipy.constants.value('electron mass energy equivalent in MeV')*1e6 mpc2 = scipy.constants.value('proton mass energy equivalent in MeV')*1e6 +mhmc2 = mpc2 + mec2 * 2 # H- mass energy equivalent in MeV + e_charge = scipy.constants.e c_light = scipy.constants.c CHARGE_OF = {'electron': -e_charge, 'positron': e_charge, - 'proton': e_charge} + 'proton': e_charge, + 'H-': -e_charge} CHARGE_STATE = { 'electron': -1, 'positron': 1, - 'proton': 1} + 'proton': 1, + 'H-': -1} MASS_OF = {'electron': mec2, 'positron': mec2, - 'proton': mpc2} + 'proton': mpc2, + 'H-': mhmc2} @@ -51,4 +56,4 @@ def charge_state(species): raise ValueError(f'Species not available: {species}') - \ No newline at end of file +