Skip to content

Commit

Permalink
Merge pull request #71 from bmad-sim/70-Species_Struct_Doc
Browse files Browse the repository at this point in the history
addressing issue 70
  • Loading branch information
rot4te authored Oct 4, 2024
2 parents ef73b9e + 95eb716 commit 0195d57
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
23 changes: 0 additions & 23 deletions src/physical_constants.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ const __b_N_avogadro = 6.02214076e23











const __b_mu_deuteron = 4.330735087e-27
# deuteron magnetic moment in [eV/T]
const __b_mu_electron = -9.2847646917e-24
Expand All @@ -76,12 +68,6 @@ const __b_mu_triton = 1.5046095178e-26









# values calculated from other constants in this collection


Expand All @@ -103,15 +89,6 @@ const __b_eps_0_vac = 8.8541878188e-12












# constants mysteriously missing from the release
# picked up from PDG
const __b_m_pion_0 = 1.349768277676847e8
Expand Down
15 changes: 11 additions & 4 deletions src/species_initialize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,18 @@ of information specifice to the chosen particle.
# Fields:
1. `name::String': the name of the particle
2. `charge::Int32': the net charge of the particle in units of |e|
- bookkeeping only, thus in internal units
- use the 'charge()' function to get the charge
- in the desired units
3. `mass::Float64': the mass of the particle
4. `spin::Float64': the spin of the particle (multiplied with ħ)
5. `mu::Float64': the magnetic moment of the particle.
- bookkeeping only, thus in internal units
- use the 'mass()' function to get the charge
- in the desired units
4. `spin::Float64': the spin of the particle in eV⋅s
- (half/integer multiplied with ħ)
5. `mu::Float64': the magnetic moment of the particle in eV/T.
5. `iso::Int': if the particle is an atomic isotope, this is the
mass number, otherwise 0
mass number, otherwise -1
The Species Struct also has a constructor called Species,
documentation for which follows.
Expand All @@ -60,7 +67,7 @@ If an anti-particle (subatomic or otherwise) prepend "anti-" to the name.
# Arguments
1. `name::String': the name of the species
* subatomic particle names must be given exactly,
* Atomic symbols may include charge and isotope eg Li#9+1
* Atomic symbols may include charge and isotope eg #9Li+1
* where #[1-999] specifies the isotope and (+/-)[0-999] specifies charge
2. `charge::Int=0': the charge of the particle.
* only affects atoms
Expand Down

0 comments on commit 0195d57

Please sign in to comment.