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,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="15.05625cm"
height="9.305274cm"
viewBox="0 0 150.5625 93.052739"
version="1.1"
id="svg8"
inkscape:version="1.0.2 (1.0.2+r75+1)"
sodipodi:docname="SimulationSketch.svg">
inkscape:version="1.1 (1:1.1+202105261517+ce6663b3b7)"
sodipodi:docname="SimulationSketch.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<marker
@@ -445,8 +445,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.1825653"
inkscape:cx="305.17798"
inkscape:cy="150.84479"
inkscape:cx="304.91642"
inkscape:cy="187.62325"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
@@ -462,7 +462,8 @@
inkscape:object-nodes="true"
inkscape:snap-object-midpoints="true"
inkscape:snap-nodes="true"
inkscape:snap-intersection-paths="false">
inkscape:snap-intersection-paths="false"
inkscape:pagecheckerboard="0">
<inkscape:grid
type="xygrid"
id="grid10"
@@ -494,7 +495,7 @@
id="tspan2893"
x="105.4724"
y="6.5298657"
style="stroke-width:0.264583">pick particle</tspan></text>
style="stroke-width:0.264583">Pick particle</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52777px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
@@ -502,10 +503,10 @@
y="30.488316"
id="text2899"><tspan
sodipodi:role="line"
x="116.75334"
x="116.75333"
y="30.488316"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
id="tspan5122">roll distance </tspan></text>
id="tspan5122">Roll distance </tspan></text>
<text
xml:space="preserve"
style="font-size:3.52777px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
@@ -516,7 +517,7 @@
id="tspan2979"
x="111.36005"
y="44.331512"
style="stroke-width:0.264583">move</tspan></text>
style="stroke-width:0.264583">Move</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52777px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
@@ -527,7 +528,7 @@
id="tspan2983"
x="116.33649"
y="68.84082"
style="text-align:center;text-anchor:middle;stroke-width:0.264583">roll/do</tspan><tspan
style="text-align:center;text-anchor:middle;stroke-width:0.264583">Roll/do</tspan><tspan
sodipodi:role="line"
x="116.33649"
y="73.250534"
@@ -543,7 +544,7 @@
id="tspan5996"
x="59.483707"
y="6.6321483"
style="stroke-width:0.264583">Particle Queue</tspan></text>
style="stroke-width:0.264583">Particle queue</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52777px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
@@ -559,7 +560,7 @@
x="72.307098"
y="33.016407"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
id="tspan6014">Densities</tspan></text>
id="tspan6014">densities</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52777px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
@@ -586,7 +587,7 @@
x="116.32959"
y="87.974632"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
id="tspan6012">Products</tspan></text>
id="tspan6012">products</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52777px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
@@ -679,7 +680,7 @@
x="28.408312"
y="11.391171"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
id="tspan140">Injection</tspan></text>
id="tspan140">injection</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52777px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.264583"
@@ -690,7 +691,7 @@
x="116.23225"
y="55.704231"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
id="tspan180">check</tspan><tspan
id="tspan180">Check</tspan><tspan
sodipodi:role="line"
x="116.23225"
y="60.113945"
@@ -798,7 +799,7 @@
x="72.341835"
y="55.461727"
style="text-align:center;text-anchor:middle;stroke-width:0.264583"
id="tspan2660-6">terminate</tspan><tspan
id="tspan2660-6">Terminate</tspan><tspan
sodipodi:role="line"
x="72.341835"
y="59.871441"

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

@@ -1,72 +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
import precalculation.functions.importDataFromKarl as karl
# Input
# =======================
thesis_path = "/home/jonas/new_workspace/notes/katrin-plasma/docs/phd/jkellerer"
output_file = thesis_path+"/fig/Chapter4_KARL/ZeroElectricFieldCase/current.pdf"
karl_data_dir = "/home/jonas/new_workspace/Coding/KARL/calcs/thesis_plots/sim_data/sim1/"
karl_filename = "df_part_e.csv"
# Calculation
# =======================
data = karl.KarlParticleData(karl_data_dir, karl_filename)
current_distribution_center = data.getCurrentDistribution(z_pos=3)
current_distribution_rw = data.getCurrentDistribution(z_pos=-3)
energies = current_distribution_center['Emid']
current_center = current_distribution_center['j'] *1E-4
current_center_neg = current_center * -1
current_rw = current_distribution_rw['j'] * 1E-4
# 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))
#data.plotDensityDistribution(fig=fig, ax=ax)
ax.plot(energies, current_rw, label='Rearwall')
ax.plot(energies, current_center, '--', label='Center pos.')
#ax.plot(energies, current_center_neg, 'o', label='Center neg.')
ax.set_xscale('log')
ax.set_yscale('log')
ax.set_xlabel(r'Energy $E$ [eV]')
ax.set_ylabel(r'Current distribution $\frac{\partial j}{\partial E}$ $\left[ \frac{1}{cm^2 eV}\right]$')
ax.legend()
plt.show()
fig.savefig(output_file,bbox_inches='tight')
@@ -1,65 +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
import precalculation.functions.importDataFromKarl as karl
# Input
# =======================
thesis_path = "/home/jonas/new_workspace/notes/katrin-plasma/docs/phd/jkellerer"
output_file = thesis_path+"/fig/Chapter4_KARL/ZeroElectricFieldCase/density.pdf"
karl_data_dir = "/home/jonas/new_workspace/Coding/KARL/calcs/thesis_plots/sim_data/sim1/"
karl_filename = "df_part_e.csv"
# Calculation
# =======================
data = karl.KarlParticleData(karl_data_dir, karl_filename)
density_distribution_center = data.getDensityDistribution(z_pos=5)
density_distribution_rw = data.getDensityDistribution(z_pos=-3)
energies = density_distribution_center['Emid']
densities_center = density_distribution_center['n'] * 1E-6
densities_rw = density_distribution_rw['n'] * 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))
#data.plotDensityDistribution(fig=fig, ax=ax)
ax.plot(energies, densities_center, label='Center')
ax.plot(energies, densities_rw, label='Rearwall')
ax.set_xscale('log')
ax.set_yscale('log')
ax.set_xlabel(r'Energy $E$ [eV]')
ax.set_ylabel(r'Diff. energy spectrum $\frac{\partial n}{\partial E}$ $\left[ \frac{1}{cm^3 eV}\right]$')
ax.legend()
plt.show()
fig.savefig(output_file,bbox_inches='tight')
@@ -1,76 +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
import precalculation.functions.importDataFromKarl as karl
# Input
# =======================
thesis_path = "/home/jonas/new_workspace/notes/katrin-plasma/docs/phd/jkellerer"
output_file = thesis_path+"/fig/Chapter4_KARL/ZeroElectricFieldCase/density_vs_z.pdf"
karl_data_dir = "/home/jonas/new_workspace/Coding/KARL/calcs/thesis_plots/sim_data/sim1/"
karl_filename = "df_part_e.csv"
# Calculation
# =======================
data = karl.KarlParticleData(karl_data_dir, karl_filename)
z_positions = np.arange(-3, 11, 1)
densities_e_total = np.zeros_like(z_positions)
densities_e_beta = np.zeros_like(z_positions)
densities_e_thermal = np.zeros_like(z_positions)
densities_e_nonthermal = np.zeros_like(z_positions)
for i,z_pos in enumerate(z_positions):
densities_e_total[i] = data.getDensity(z_pos=z_pos).value * 1E-6
densities_e_nonthermal[i] = data.getDensity(z_pos=z_pos,energy_range=[1E-1, 1E1]).value * 1E-6
densities_e_beta[i] = data.getDensity(z_pos=z_pos, energy_range=[1E1, 20E4]).value * 1E-6
densities_e_thermal[i] = data.getDensity(z_pos=z_pos, energy_range=[0., 1E-1]).value * 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_positions+3, densities_e_total, label=r'e$^-$')
ax.plot(z_positions+3, densities_e_thermal, label=r'e$^- \left(E<0.1\,eV\right)$')
ax.plot(z_positions+3, densities_e_nonthermal, label=r'e$^- (0.1\, eV < E < 10\,eV)$')
ax.plot(z_positions+3, densities_e_beta, label=r'e$^- (E>10\,eV)$')
ax.plot(z_positions+3, densities_e_thermal*0.5,'--', label=r'T$^+_n$')
ax.set_yscale('log')
ax.set_xlabel(r'Position $z$ [m]')
ax.set_ylabel(r'Density $n$ $\left[ \frac{1}{cm^3}\right]$')
#ax.set_ylim((1E4, 1E8))
ax.legend(loc="lower right")
plt.show()
fig.savefig(output_file,bbox_inches='tight')
@@ -1,72 +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
import precalculation.functions.importDataFromKarl as karl
# Input
# =======================
thesis_path = "/home/jonas/new_workspace/notes/katrin-plasma/docs/phd/jkellerer"
output_file = thesis_path+"/fig/Chapter4_KARL/ZeroElectricFieldCase/energy_density.pdf"
karl_data_dir = "/home/jonas/new_workspace/Coding/KARL/calcs/thesis_plots/sim_data/sim1/"
karl_filename = "df_part_e.csv"
# Calculation
# =======================
data = karl.KarlParticleData(karl_data_dir, karl_filename)
energy_distribution_center = data.getEnergyDensityDistribution(z_pos=3)
energy_distribution_rw = data.getEnergyDensityDistribution(z_pos=-3)
energies = energy_distribution_center['Emid']
energy_center = energy_distribution_center['energydensity'] * 1E-6
energy_rw = energy_distribution_rw['energydensity'] * 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))
#data.plotDensityDistribution(fig=fig, ax=ax)
ax.plot(energies, energy_center, '-', label='Center')
ax.plot(energies, energy_rw, '--', label='Rearwall')
#ax.plot(energies, current_center_neg, 'o', label='Center neg.')
ax.set_xscale('log')
ax.set_yscale('log')
ax.set_xlabel(r'Energy $E$ [eV]')
ax.set_ylabel(r'Energy density distribution $u$ $\left[ \frac{eV}{cm^3 eV}\right]$')
ax.legend()
plt.show()
fig.savefig(output_file,bbox_inches='tight')