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,70 @@
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/Chapter5_ACRONYM/ParticleInjection/pml_far_field.pdf"
# Calculation
# =======================
zs = np.arange(0,30)
d_inj0 = np.ones_like(zs)
d_inj0[0] = -10
d_inj0[1] = -5
d_inj2_rel = np.ones_like(zs)/d_inj0
d_inj5_rel = 2*np.ones_like(zs)/d_inj0
d_inj8_rel = 3*np.ones_like(zs)/d_inj0
d_inj10_rel = 4*np.ones_like(zs)/d_inj0
# 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) = plt.subplots(2, 1, figsize=(width, height))
ax0.set_ylabel(r'Electric field $E$ $\left[\frac{V}{cm}\right]$')
ax0.plot(zs, d_inj0, '-', label=r'$d_{inj} = 0 dx$')
ax0.legend()
ax1.plot(zs, d_inj2_rel, '--', label=r'$d_{inj} = 2 dx$', color=colors[1])
ax1.plot(zs, d_inj5_rel, '-.', label=r'$d_{inj} = 5 dx$', color=colors[2])
ax1.plot(zs, d_inj8_rel, ':', label=r'$d_{inj} = 8 dx$', color=colors[3])
ax1.plot(zs, d_inj10_rel, linestyle=(0, (3, 5, 1, 5, 1, 5)), label=r'$d_{inj} = 10 dx$', color=colors[4])
ax1.set_xlabel(r'Position $z$ [dx]')
ax1.set_ylabel(r'rel. electric field $\frac{E}{E_0}$')
ax1.legend()
plt.show()
fig.savefig(output_file,bbox_inches='tight')
@@ -0,0 +1,59 @@
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/Chapter5_ACRONYM/ParticleInjection/pml_near_field.pdf"
# Calculation
# =======================
zs = np.arange(180,200)
d_inj0 = np.log(200-zs)*1
d_inj2 = np.log(200-zs)*2
d_inj5 = np.log(200-zs)*3
d_inj8 = np.log(200-zs)*4
d_inj10 = np.log(200-zs)*5
# 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.set_ylabel(r'Electric field $E$ $\left[\frac{V}{cm}\right]$')
ax.set_xlabel(r'Position $z - z_0$ [dx]')
ax.plot(zs - 200, d_inj0, '-', label=r'$d_{inj} = 0 dx$')
ax.plot(zs - 200, d_inj2, '--', label=r'$d_{inj} = 2 dx$')
ax.plot(zs - 200, d_inj5, '-.', label=r'$d_{inj} = 5 dx$')
ax.plot(zs - 200, d_inj8, ':', label=r'$d_{inj} = 8 dx$')
ax.plot(zs - 200, d_inj10, linestyle=(0, (3, 5, 1, 5, 1, 5)), label=r'$d_{inj} = 10 dx$')
ax.legend()
plt.show()
fig.savefig(output_file,bbox_inches='tight')
@@ -0,0 +1,88 @@
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/Chapter5_ACRONYM/Validation/DebyeSheath/longitudinal_comparison.pdf"
# Calculation
# =======================
z = np.linspace(0,1,20)
Ez_r0 = np.zeros_like(z)
Ez_r0[0] = -1
Ez_r0[19] = -1
Ez_2r = np.zeros_like(z)
Ez_2r[0] = -0.5
Ez_2r[19] = -0.5
Ez_dxhalf = Ez_r0 * 1.2
Ez_dxhalf[1] = -0.25
Ez_dxhalf[18] = -0.25
U_r0 = np.ones_like(z)
U_r0[0] = 0
U_r0[19] = 0
U_2r = np.ones_like(z)*0.5
U_2r[0] = 0
U_2r[19] = 0
U_dxhalf = np.ones_like(z)*0.7
U_dxhalf[0] = 0
U_dxhalf[19] = 0
# 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) = plt.subplots(2, 1, figsize=(width, height))
ax0.set_ylabel(r'Electric field $E_r$ $\left[\frac{V}{cm} \right]$')
#ax0.set_xlabel(r'Relative radius $\frac{r}{R}$')
ax0.set_xticklabels([])
ax0.plot(z, Ez_r0, '-', label=r'$R=r_0$')
ax0.plot(z, Ez_2r, '--', label=r'$R=2 r_0$')
ax0.plot(z, Ez_dxhalf, '-.', label=r'$dx = \frac{dx_0}{2}$')
ax1.plot(z, U_r0, '-', label=r'$R=r_0$')
ax1.plot(z, U_2r, '--', label=r'$R=2 r_0$')
ax1.plot(z, U_dxhalf, '-.', label=r'$dx = \frac{dx_0}{2}$')
ax1.set_ylabel(r'Potential $U$ $\left[V \right]$')
ax1.set_xlabel(r'Relative position $\frac{z}{L}$')
ax0.legend()
plt.show()
fig.savefig(output_file,bbox_inches='tight')
@@ -0,0 +1,86 @@
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/Chapter5_ACRONYM/Validation/DebyeSheath/radial_comparison.pdf"
# Calculation
# =======================
radius = np.linspace(-1,1,20)
Er_r0 = np.zeros_like(radius)
Er_r0[0] = -1
Er_r0[19] = -1
Er_2r = np.zeros_like(radius)
Er_2r[0] = -0.5
Er_2r[19] = -0.5
Er_dxhalf = Er_r0 * 1.2
U_r0 = np.ones_like(radius)
U_r0[0] = 0
U_r0[19] = 0
U_2r = np.ones_like(radius)*0.5
U_2r[0] = 0
U_2r[19] = 0
U_dxhalf = np.ones_like(radius)*0.7
U_dxhalf[0] = 0
U_dxhalf[19] = 0
# 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) = plt.subplots(2, 1, figsize=(width, height))
ax0.set_ylabel(r'Electric field $E_r$ $\left[\frac{V}{cm} \right]$')
#ax0.set_xlabel(r'Relative radius $\frac{r}{R}$')
ax0.set_xticklabels([])
ax0.plot(radius, Er_r0, '-', label=r'$R=r_0$')
ax0.plot(radius, Er_2r, '--', label=r'$R=2 r_0$')
ax0.plot(radius, Er_dxhalf, '-.', label=r'$dx = \frac{dx_0}{2}$')
ax0.set_xlim((0,1))
ax1.plot(radius, U_r0, '-', label=r'$R=r_0$')
ax1.plot(radius, U_2r, '--', label=r'$R=2 r_0$')
ax1.plot(radius, U_dxhalf, '-.', label=r'$dx = \frac{dx_0}{2}$')
ax1.set_ylabel(r'Potential $U$ $\left[V \right]$')
ax1.set_xlabel(r'Relative radius $\frac{r}{R}$')
ax1.set_xlim((0,1))
ax0.legend()
plt.show()
fig.savefig(output_file,bbox_inches='tight')