diff --git a/Docs/source/usage/parameters.rst b/Docs/source/usage/parameters.rst index 47670c99b9a..c49227d501e 100644 --- a/Docs/source/usage/parameters.rst +++ b/Docs/source/usage/parameters.rst @@ -573,7 +573,12 @@ Particle initialization * ``.species_type`` (`string`) optional (default `unspecified`) Type of physical species. - Currently, the accepted species are ``"electron"``, ``"positron"``, ``"photon"``, ``"hydrogen"`` (or equivalently ``"proton"``), ``"helium"`` (or equivalently ``"alpha"``), ``"boron"``, ``"carbon"``, ``"oxygen"``, ``"nitrogen"``, ``"argon"``, ``"copper"`` and ``"xenon"``. + Currently, the accepted species are ``"electron"``, ``"positron"``, ``"photon"``, + ``"neutron"``, ``"hydrogen"`` (or equivalently ``"proton"``), ``"deuterium"`` + (or equivalently ``"hydrogen2"``), ``"tritium"`` (or equivalently ``"hydrogen3"``), + ``"helium"`` (or equivalently ``"alpha"``), ``"helium3"``, ``"helium4"``, + ``"boron"``, ``"boron10"``, ``"boron11"``, ``"carbon"``, ``"oxygen"``, + ``"nitrogen"``, ``"argon"``, ``"copper"`` and ``"xenon"``. Either this or both ``mass`` and ``charge`` have to be specified. * ``.charge`` (`float`) optional (default `NaN`) diff --git a/Source/Particles/SpeciesPhysicalProperties.H b/Source/Particles/SpeciesPhysicalProperties.H index b70f95c5014..7355ee6cc68 100644 --- a/Source/Particles/SpeciesPhysicalProperties.H +++ b/Source/Particles/SpeciesPhysicalProperties.H @@ -17,8 +17,9 @@ #include #include -enum struct PhysicalSpecies{unspecified=0, electron, positron, photon, hydrogen, helium, boron, - boron10, boron11, carbon, nitrogen, oxygen, argon, copper, xenon}; +enum struct PhysicalSpecies{unspecified=0, electron, positron, photon, neutron, + hydrogen, hydrogen2, hydrogen3, helium, helium3, helium4, boron, boron10, + boron11, carbon, nitrogen, oxygen, argon, copper, xenon}; namespace species { @@ -33,14 +34,20 @@ namespace species return PhysicalSpecies::positron; if( species=="photon" ) return PhysicalSpecies::photon; - if( species=="hydrogen" ) + if( species=="neutron" ) + return PhysicalSpecies::neutron; + if( (species=="hydrogen") || (species=="proton") ) return PhysicalSpecies::hydrogen; - if( species=="proton" ) - return PhysicalSpecies::hydrogen; - if( species=="helium" ) - return PhysicalSpecies::helium; - if( species=="alpha" ) + if( (species=="hydrogen2") || (species=="deuterium") ) + return PhysicalSpecies::hydrogen2; + if( (species=="hydrogen3") || (species=="tritium") ) + return PhysicalSpecies::hydrogen3; + if( (species=="helium") || (species=="alpha") ) return PhysicalSpecies::helium; + if( species=="helium3" ) + return PhysicalSpecies::helium3; + if( species=="helium4" ) + return PhysicalSpecies::helium4; if( species=="boron" ) return PhysicalSpecies::boron; if( species=="boron10" ) @@ -75,10 +82,20 @@ namespace species return PhysConst::q_e; case PhysicalSpecies::photon: return 0.; + case PhysicalSpecies::neutron: + return 0.; case PhysicalSpecies::hydrogen: return PhysConst::q_e; + case PhysicalSpecies::hydrogen2: + return PhysConst::q_e; + case PhysicalSpecies::hydrogen3: + return PhysConst::q_e; case PhysicalSpecies::helium: return PhysConst::q_e * amrex::Real(2.0); + case PhysicalSpecies::helium3: + return PhysConst::q_e * amrex::Real(2.0); + case PhysicalSpecies::helium4: + return PhysConst::q_e * amrex::Real(2.0); case PhysicalSpecies::boron: return PhysConst::q_e * amrex::Real(5.0); case PhysicalSpecies::boron10: @@ -115,10 +132,20 @@ namespace species return PhysConst::m_e; case PhysicalSpecies::photon: return 0.; + case PhysicalSpecies::neutron: + return PhysConst::m_p * amrex::Real(1.0013784193052508); case PhysicalSpecies::hydrogen: return PhysConst::m_p; + case PhysicalSpecies::hydrogen2: + return PhysConst::m_p * amrex::Real(1.99901); + case PhysicalSpecies::hydrogen3: + return PhysConst::m_p * amrex::Real(2.99372); case PhysicalSpecies::helium: return PhysConst::m_p * amrex::Real(3.97369); + case PhysicalSpecies::helium3: + return PhysConst::m_p * amrex::Real(2.99369); + case PhysicalSpecies::helium4: + return PhysConst::m_p * amrex::Real(3.97314); case PhysicalSpecies::boron: return PhysConst::m_p * amrex::Real(10.7319); case PhysicalSpecies::boron10: @@ -157,8 +184,16 @@ namespace species return "photon"; case PhysicalSpecies::hydrogen: return "hydrogen"; + case PhysicalSpecies::hydrogen2: + return "hydrogen2"; + case PhysicalSpecies::hydrogen3: + return "hydrogen3"; case PhysicalSpecies::helium: return "helium"; + case PhysicalSpecies::helium3: + return "helium3"; + case PhysicalSpecies::helium4: + return "helium4"; case PhysicalSpecies::boron: return "boron"; case PhysicalSpecies::boron10: