backup save

This commit is contained in:
Jonas Kellerer
2021-03-04 11:47:03 +01:00
parent e7c298983e
commit 9e5c2f068f
241 changed files with 2354544 additions and 319 deletions
@@ -0,0 +1,60 @@
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')