backup save
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
import numpy as np
|
||||
import os
|
||||
import sys
|
||||
from astropy import units as u
|
||||
from astropy import constants as const
|
||||
import matplotlib
|
||||
import matplotlib.pyplot as plt
|
||||
import subprocess
|
||||
|
||||
import matplotlib.colors
|
||||
|
||||
homebase = os.getenv('HOMEBASE')
|
||||
if homebase == None:
|
||||
homebase = "/home/jonas/new_workspace/Coding/ACRONYM/acronym"
|
||||
|
||||
includes = homebase + "/src/grpic/boundaries_3d"
|
||||
|
||||
sys.path.append(includes)
|
||||
|
||||
import precalculation.functions.plasmaFunctions as plasmaFuncs
|
||||
import analysis.plotDataFromAcronym.plot_standards as pltStd
|
||||
|
||||
# Input
|
||||
# =======================
|
||||
|
||||
|
||||
thesis_path = "/home/jonas/new_workspace/notes/katrin-plasma/docs/phd/jkellerer"
|
||||
output_folder = thesis_path+"/fig/Chapter2_KATRIN/ParticleInteractions/"
|
||||
|
||||
|
||||
# Calculation
|
||||
# =======================
|
||||
|
||||
def targetFrameSwitch(energy_eV, m1_eV, m2_eV):
|
||||
return (energies_eV + m1_eV)*m2_eV/m1_eV - m2_eV
|
||||
|
||||
def energyToVelocity(E_eV, mass_eV):
|
||||
return (2*E_eV/mass_eV)**(1/2)*const.c.value
|
||||
|
||||
print(energyToVelocity(2.3E-3*80/30, 3*938.27208816E6))
|
||||
|
||||
class TritiumIon3:
|
||||
def crossSectionElastic_m2(E_eV):
|
||||
sig0c1 = 1.16e-20
|
||||
c2 = -8.12e-1
|
||||
c3 = 4.29e-4
|
||||
c4c2 = (-1.38e-1) - (-8.12e-1)
|
||||
c5 = 1.28e-2
|
||||
c4c6 = (-1.38e-1) + 1.33
|
||||
c7 = 8.67e-2
|
||||
c4c8 = (-1.38e-1) + 2.18
|
||||
ERyd_eV = 13.605693009
|
||||
|
||||
x_keV = E_eV*1E-3
|
||||
fac1 = sig0c1*(E_eV/ERyd_eV)**c2
|
||||
fac2 = 1 + (x_keV/c3)**c4c2
|
||||
div = 1 + (x_keV/c5)**c4c6 + (x_keV/c7)**c4c8
|
||||
return fac1*fac2/div
|
||||
|
||||
def crossSectionRadAsc_m2(E_eV):
|
||||
mass_eV = 3*938.27208816E6 # mass proton
|
||||
v_ms = energyToVelocity(E_eV, mass_eV)
|
||||
return 5E-23 / v_ms
|
||||
|
||||
def crossSectionTerAsc_m2(E_eV, n_T2_m3):
|
||||
mass_eV = 3*938.27208816E6
|
||||
v_ms = energyToVelocity(E_eV, mass_eV)
|
||||
return 2.5E-41 * n_T2_m3 /v_ms
|
||||
|
||||
def crossSectionDis(E_eV):
|
||||
delta_E = 14.75
|
||||
expc = np.exp(- 50.32*(E_eV)**-1.177/(1+1.019e-14*(E_eV)**7.462))
|
||||
cross_section = 82.56e-20*(E_eV)**-0.521*(1-(15.0/E_eV)**5.15) * expc
|
||||
|
||||
return np.where(E_eV < delta_E, 0, cross_section)
|
||||
|
||||
def crossSectionDisRec(E_eV):
|
||||
sigLDR = 3e-20*(E_eV)**(-0.725)/(1+4.45*(E_eV)**1.2)
|
||||
sig_small = 0.0646e-20 * (E_eV)**1.478
|
||||
sig_big = 634.22e-20 * (E_eV)**(-2.605)
|
||||
sigHDR = 1/(1/sig_small + 1/sig_big)
|
||||
return sigLDR + sigHDR;
|
||||
|
||||
def crossSectionCollisionInducedDissociationToTi(E_eV):
|
||||
sig_small = 18.5*np.exp(-54.5/E_eV**(1.65))/(E_eV**0.63*(1 + 4.66E-6*E_eV**1.93))*(1-(4.32/E_eV)**2.32)**4.06 * 1E-20
|
||||
sig_big = 3.84E-20*np.exp(-44.2/E_eV**0.48)/(1 + 7.49E-11*E_eV**1.85+ 7.55E-28*E_eV**4.6)
|
||||
return sig_small + sig_big
|
||||
|
||||
def crossSectionCollisionInducedDissociationToT2i(E_eV):
|
||||
sig_small = 17.35E-20*np.exp(-5.35/(E_eV-6.16)**1.65)/(E_eV**1.08*(1+1.32E-8*E_eV**3.26))
|
||||
sig_big = 9.68E-3*E_eV**(0.602)*np.exp(-1.30E4/E_eV**2.57)/(1+7.95E-6*E_eV**1.25+1.03E-12*E_eV**2.62)*1E-20
|
||||
return sig_big + sig_small
|
||||
|
||||
|
||||
|
||||
density_T2 = 1E21
|
||||
|
||||
energies_eV = np.logspace(-3,4,100)
|
||||
|
||||
|
||||
|
||||
sigma_Ti3_elastic = TritiumIon3.crossSectionElastic_m2(energies_eV)*1E4
|
||||
sigma_Ti3_radasc = TritiumIon3.crossSectionRadAsc_m2(energies_eV)*1E4
|
||||
sigma_Ti3_terasc = TritiumIon3.crossSectionTerAsc_m2(energies_eV,density_T2)*1E4
|
||||
sigma_Ti3_CID_T = TritiumIon3.crossSectionCollisionInducedDissociationToTi(energies_eV)*1E4
|
||||
sigma_Ti3_CID_T2 = TritiumIon3.crossSectionCollisionInducedDissociationToT2i(energies_eV)*1E4
|
||||
|
||||
energies_eV_target = targetFrameSwitch(energies_eV, 511E3, 3*938.272)
|
||||
|
||||
sigma_Ti3_disc = TritiumIon3.crossSectionDis(energies_eV)*1E4
|
||||
sigma_Ti3_discrec = TritiumIon3.crossSectionDisRec(energies_eV)*1E4
|
||||
#sigma_Ti3_disc = TritiumIon3.crossSectionDis(energies_eV_target)*1E4
|
||||
#sigma_Ti3_discrec = TritiumIon3.crossSectionDisRec(energies_eV_target)*1E4
|
||||
|
||||
|
||||
# Plot
|
||||
# =======================
|
||||
pltStd.setRcParams()
|
||||
prop_cycle = plt.rcParams['axes.prop_cycle']
|
||||
colors = prop_cycle.by_key()['color']
|
||||
|
||||
(width, height) = pltStd.set_size('thesis')
|
||||
fig, ax = plt.subplots(1, 1, figsize=(width, height))
|
||||
|
||||
ax.plot(energies_eV, sigma_Ti3_elastic, '-', label=r'elastic sc.')
|
||||
ax.plot(energies_eV, sigma_Ti3_radasc, '--', label=r'radiative ass.')
|
||||
ax.plot(energies_eV, sigma_Ti3_terasc, '--', label=r'ternary ass.')
|
||||
ax.plot(energies_eV, sigma_Ti3_CID_T, linestyle=(0, (3, 1, 1, 1, 1, 1)), label=r'CID to H$^+$')
|
||||
ax.plot(energies_eV, sigma_Ti3_CID_T2, linestyle=(0, (3, 1, 1, 1, 1, 1)), label=r'CID to H$^+_2$')
|
||||
ax.plot(energies_eV, sigma_Ti3_disc, ':', label=r'dissociative exc. (e$^-$)')
|
||||
ax.plot(energies_eV, sigma_Ti3_discrec, '-.', label=r'dissociative rec. (e$^-$)')
|
||||
|
||||
|
||||
ax.set_xscale('log')
|
||||
ax.set_yscale('log')
|
||||
ax.set_ylabel(r'Cross section $\sigma$ [cm$^{2}$]')
|
||||
ax.set_xlabel(r'Energy $E$ [eV]')
|
||||
ax.set_ylim((1E-23, 1E-12))
|
||||
ax.legend(loc='lower left')
|
||||
plt.savefig(output_folder+"T3Iintercactions.pdf",bbox_inches='tight')
|
||||
plt.show()
|
||||
Reference in New Issue
Block a user