Final Version of Phd Thesis

This commit is contained in:
Jonas Kellerer
2022-02-17 11:05:42 +01:00
parent 30e95bebee
commit 3371b4c48b
147 changed files with 77115 additions and 17244 deletions
@@ -1,70 +0,0 @@
import numpy as np
import os
import sys
from astropy import units as u
import matplotlib
import matplotlib.pyplot as plt
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_file = thesis_path+"/fig/Chapter6_Results/FullKatrinSimulation/backgrounds.pdf"
# Calculation
# =======================
z_neutrals = np.array([0, 3, 8, 13])
neutrals = np.array([1E11, 1E12, 1E15, 1E12])
z_current_left = np.array([0,3,8])
current_left = np.array([-19, -20, -30])
z_current_right = np.array([8, 13])
current_right = np.array([30, 20])
z_thermal = np.array([0, 3, 8, 13])
thermal_e = np.array([1E5, 3E5, 1E6, 3E5])
# Plot
# =======================
pltStd.setRcParams()
prop_cycle = plt.rcParams['axes.prop_cycle']
colors = prop_cycle.by_key()['color']
(width, height) = pltStd.set_size('thesis')
fig, (ax0, ax1, ax2) = plt.subplots(3, 1, figsize=(width, height*1.5))
ax0.plot(z_neutrals, neutrals, '-', label=r'no Bg.', color=colors[0])
ax0.set_ylabel(r'Gas density $n_{T_2}$ $\left[ \frac{1}{cm^3} \right]$')
ax0.set_yscale('log')
ax1.plot(z_current_left, current_left, color=colors[1])
ax1.plot(z_current_right, current_right, color=colors[1])
ax1.hlines(0, 0, 13, linestyles='--', color='tab:gray')
ax1.vlines(8, -30, 30, linestyles=':', color=colors[1])
ax1.set_ylabel(r'Current $j_{z}$ $\left[ \frac{statC}{cm^2 s} \right]$')
ax2.plot(z_thermal, thermal_e, color=colors[2])
ax2.set_ylabel(r'Density $n_{e,th}$ $\left[ \frac{1}{cm^3} \right]$')
ax2.set_xlabel(r'Position $z$ [m]')
plt.show()
fig.savefig(output_file,bbox_inches='tight')
@@ -1,60 +0,0 @@
import numpy as np
import os
import sys
from astropy import units as u
import matplotlib
import matplotlib.pyplot as plt
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_file = thesis_path+"/fig/Chapter6_Results/RearwallSection/thermalElectrons/potential_comparison.pdf"
# Calculation
# =======================
z = np.array([0, 1, 2, 3, 4, 5, 6, 7])
pot_th = np.array([0, -1, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5])*1E-6
pot_th_B = np.array([0, -1, 0., 0., 0., 0., 0., 0.])*1E-6
pot_th_B_j = np.array([0, -2, 0., 0., 0., 0., 0., 0.])*1E-6
pot_th_B_j_E = np.array([-3, -3, -1, -2, 0., 0., 0., 0.])*1E-6
pot_th_B_E = np.array([-1, -1, -1, 0., 0., 0., 0., 0.])*1E-6
# 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(z, pot_th, '-', label=r'no Bg.')
ax.plot(z, pot_th_B, '--', label=r'B')
ax.plot(z, pot_th_B_j, '-.', label=r'B, j')
ax.plot(z, pot_th_B_j_E, ':', label=r'B, j, E')
ax.plot(z, pot_th_B_E, linestyle=(0, (3, 5, 1, 5, 1, 5)), label=r'B, E')
ax.legend()
ax.set_ylabel(r'Potential $U$ $\left[V \right]$')
ax.set_xlabel(r'Position z [cm]')
plt.show()
fig.savefig(output_file,bbox_inches='tight')
@@ -0,0 +1,43 @@
import os
import sys
from astropy import constants as const
from astropy import units as u
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
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
import analysis.plotDataFromAcronym.calculation.import_dings as impding
import precalculation.functions.simulationParameter as simulationParameter
import precalculation.functions.importDataFromKarl as importDataFromKarl
ne_max = 3E6
sim_params = simulationParameter.SimulationParameter(
n_e = ne_max/(u.cm**3), nz_min = 48,\
partition_x=6, partition_y=6, ppc=20,\
h_wgts=1600*u.cm, pups=3.3E5, T=80*u.K, B=2.5*u.T)
omega_pe = plasmaFuncs.plasmaFrequency(ne_max*u.cm**(-3))
lambda_d = plasmaFuncs.debyeLength(ne_max*u.cm**(-3), 80*u.K)
print(sim_params)
print("Rounded nodes: ")
print(np.ceil(sim_params.nodes))
print("Rounded cpus: ")
print(np.ceil(sim_params.nodes)*48)
print("Omega_pe: {:e}".format(omega_pe))
print("lambda_d: {:e}".format(lambda_d))