Chapter1 half corr., Chapter2 no corr.

This commit is contained in:
Jonas Kellerer
2021-03-16 16:10:28 +01:00
parent 9e5c2f068f
commit e65e5a8a55
34 changed files with 76033 additions and 1700 deletions
@@ -0,0 +1,39 @@
#!/bin/python3
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
# Specific includes
# =======================
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
# =======================
p_inlet_knm4 = 0.7 *u.Pa
T_knm4 = 80 *u.K
n_inlet_knm4 = p_inlet_knm4/(const.k_B *T_knm4)
print("80K: {:e}".format(n_inlet_knm4.to(1/u.cm**3)))
p_inlet_design = 0.337 * u.Pa
T_design = 30 * u.K
n_inlet_design = p_inlet_design/(const.k_B *T_design)
print("30K: {:e}".format(n_inlet_design.to(1/u.cm**3)))
print("Relation {:e}".format(n_inlet_knm4/n_inlet_design))
@@ -63,8 +63,6 @@ prop_cycle = plt.rcParams['axes.prop_cycle']
colors = prop_cycle.by_key()['color']
(width, height) = pltStd.set_size('thesis')
print(width)
print(height)
fig, (ax, ax1) = plt.subplots(2, 1, figsize=(width, height),sharex=True)
ax1.set_xlabel(r'Length $z$ [cm]')
@@ -82,7 +80,7 @@ plt.show()
(width, height) = pltStd.set_size('thesis')
fig, ax = plt.subplots(1, 1, figsize=(width, height))
fig, ax = plt.subplots(1, 1, figsize=(width, height*0.5))
len_x = np.size(potential,0)
len_y = np.size(potential,1)
@@ -97,8 +95,32 @@ cbar = fig.colorbar(cs, ax=ax)
cbar.ax.set_ylabel(r'Potential $U$ [V]')
ax.set_ylim((0,4.5))
ax.set_xlim((0,6))
#ax.set_xlim((0,6))
ax.set_ylabel(r'Radius $r$ [cm]')
ax.set_xlabel(r'Height $z$ [cm]')
plt.savefig(output_folder+"potential_2d.pdf",bbox_inches='tight')
plt.show()
(width, height) = pltStd.set_size('thesis')
fig, (ax0, ax1, ax2) = plt.subplots(3, 1, figsize=(width, height*1.4))
ax2.set_xlabel(r'Length $z$ [cm]')
ax2.plot(z, Er[20],"--", label=r'$E_r$', color=colors[1])
ax2.plot(z, Ez[20],"-.", label=r'$E_z$',color=colors[2])
ax2.set_ylabel(r'Eletric Field $E$ [V/cm]')
ax2.set_xlabel(r'Height $z$ [cm]')
ax2.legend()
ax2.set_xlim((0,18))
ax1.plot(z,potential[20],label=r'$\phi$')
ax1.set_ylabel(r'Potential $U$ [V]')
ax1.set_xlim((0,18))
cs = ax0.contourf(X,Y,potential,cmap=plt.get_cmap('Purples'),levels=10)
ax0.set_xlim((0,14))
ax0.set_ylabel(r'Radius $r$ [cm]')
cbar = fig.colorbar(cs, ax=ax0)
cbar.ax.set_ylabel(r'Potential $U$ [V]')
plt.savefig(output_folder+"potential_Er_Ez_combined.pdf",bbox_inches='tight')
plt.show()
File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 778 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 279 KiB

@@ -167,7 +167,7 @@ ax.plot(energies_eV, sigma_Ti_elastic, '-',label=r'elastic scattering')
ax.plot(energies_eV, sigma_Ti_radasc, '--',label=r'radiative association')
ax.plot(energies_eV, sigma_Ti_terasc, '--', label=r'ternary association')
ax.plot(energies_eV, sigma_Ti_ctrans, ':', label=r'charge. trans $\nu =0$')
ax.plot(energies_eV, sigma_Ti_ctrans7, ':', label=r'charge. trans $\nu =8$')
ax.plot(energies_eV, sigma_Ti_ctrans7, ':', label=r'charge. trans $\nu =7$')
#ax.plot(energies_eV, sigma_Ti_h2production, ':', label=r'H$_2^+$ and fast H')
#ax.plot(energies_eV, sigma_Ti_radiative_recombination_low, label="low")
@@ -67,9 +67,9 @@ n_1 = beta_dist_mass(Eend_eV, 1)
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))
fig, ax = plt.subplots(1, 1, figsize=(width, 0.5*height))
ax.plot(E_eV, n, linewidth=2)
ax.set_xlabel(r'Electron energy $E$ [$E_0$]')
@@ -98,5 +98,40 @@ axins.text(end_point_eV-0.95, 0.4e-4, r'$m_{\nu}=0\,$eV', color=colors[0], size=
axins.text(end_point_eV-1.8, 0.1e-4, r'$m_{\nu}=1\,$eV', color=colors[1], size=10, ha='left')
axins.set_xlabel(r'$E - E_0$ [eV]',size=8, ha='right', x=0.64, alpha=1, y=0.2)
#plt.show()
plt.savefig(output_file,bbox_inches='tight')
plt.show()
#plt.savefig(output_file,bbox_inches='tight')
"""
(width, height) = pltStd.set_size('thesis')
fig, (ax, ax1) = plt.subplots(1, 2, figsize=(width, 0.6*height))
ax.plot(E_eV, n, linewidth=2)
ax.set_xlabel(r'Electron energy $E$ [$E_0$]')
ax.set_xlim (0,2.5e4)
ax.set_xticks([0,end_point_eV/2,end_point_eV])
ax.set_xticklabels(['0','0.5','1'])
ax.set_ylim (0,1.5)
ax.set_ylabel('Intensity $I$ [arb. u]')
ax.set_yticks([])
ax.set_yticklabels([])
ax1.plot(Eend_eV,n_0*4e3,linewidth=2)
ax1.plot(Eend_eV,n_1*4e3,linewidth=2)
ax1.set_xlim(end_point_eV-2.2, end_point_eV+0.25)
ax1.set_ylabel('Intensity $I$ [arb. u]')
ax1.set_ylim(0, 0.15e-3)
ax1.set_xticks([end_point_eV-2, end_point_eV-1, end_point_eV])
ax1.set_xticklabels([-2, -1, 0])
ax1.set_yticks([])
ax1.set_yticklabels([])
ax1.text(end_point_eV-0.95, 0.4e-4, r'$m_{\nu}=0\,$eV', color=colors[0], size=10, ha='left')
ax1.text(end_point_eV-1.8, 0.1e-4, r'$m_{\nu}=1\,$eV', color=colors[1], size=10, ha='left')
ax1.set_xlabel(r'Electron Energy $E - E_0$ [eV]')
plt.savefig(output_file,bbox_inches='tight')
plt.show()