Skip to content

Commit ad4d50e

Browse files
committed
DEV add CGS-SI unit conversion factors.
1 parent 343ed43 commit ad4d50e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/constants.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const m_e = 9.1093837015e-31 # Kg ........................ Electron mass
2323
const m_p = 1.67262192369e-27 # Kg ......................... Proton mass
2424

2525
# CGS units
26+
const c_cgs = 1e2c # cm/s
2627
const k_B_cgs = 1.380649e-16 # erg/K
2728
const e_cgs = 4.8032047e-10 # statcoulombs
2829
const m_e_cgs = m_e * 1e3 # grams
@@ -34,3 +35,12 @@ const csqrdinv = 1 / csqrd # s^2 m^-2 ........ Inverse of the light speed square
3435

3536
# Unit conversion
3637
const J2eV = 6.24150907e18 # 1 J * 6.24e12 eV/J........................energy
38+
const si2cgs_mass = 1e3
39+
const si2cgs_numberdensity = 1e-6
40+
const si2cgs_velocity = 1e2
41+
const si2cgs_charge = 1e-1c_cgs # = 2.99792458e9. C => statC
42+
const si2cgs_electriccurrent = 1e-1c_cgs # - 2.99792458e9. A => StatC/s = StatA
43+
const si2cgs_currentdensity = 1e-5c_cgs # = 2.99792458e5. A/m^2 => StatA/cm^2
44+
const si2cgs_electricfield = 1e6 / c_cgs # 3.33564095e-5. V/m => StatV/cm
45+
const cgs2si_electricfield = 1/si2cgs_electricfield # = 2.99792458e4. To V/m
46+
const cgs2si_velocity = 1e-2

0 commit comments

Comments
 (0)