30 KiB
30 KiB
In [3]:
import numpy as np
import os
import sysIn [4]:
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
NEJM = sns.color_palette(palette = ['#bc3c29',
'#0072bf',
'#e18727',
'#20854e',
'#7876b1',
'#6f99ad',
'#ffdc91',
'#ee4c97'])
sns.set(
context='paper',
style='white',
palette=NEJM,
font='sans-serif',
font_scale=1,
color_codes=False,
rc = {'figure.dpi' : 100,
'text.usetex' : True,
'axes.labelsize' : 10,
'xtick.labelsize' : 10,
'ytick.labelsize' : 10,
'legend.fontsize' : 10,
'xtick.bottom' : True,
'xtick.minor.bottom' : False,
'ytick.left' : True,
'ytick.minor.left' : False
})In [5]:
#style_path = "/Users/ChristianReiling/Documents/Masterarbeit/mcelectron-analysis/science.mplstyle"
latex_path = "/Users/ChristianReiling/Documents/Masterarbeit/docs/LaTeX/pics"
#plt.style.use(style_path)In [9]:
fig, ax = plt.subplots(figsize=[(15/2.54),(4/2.54)])
label_y = 60
ax.vlines(-3, -45, 45, linestyles='solid', linewidth=3, linestyle = '-', color = NEJM[0] )
ax.text(-3, label_y, 'rear wall', fontsize = 12, color = NEJM[0], horizontalalignment='center')
ax.vlines(10, -45, 45, linestyles='solid', linewidth=1, linestyle = '--' )
ax.text(10, label_y, 'TMPs', fontsize = 12, horizontalalignment='center')
ax.hlines( -45, -3, 10, linestyles='solid', linewidth=3, linestyle = '-' )
ax.hlines( 45, -3, 10, linestyles='solid', linewidth=3, linestyle = '-' )
ax.vlines(0, -45, 45, linestyles='solid', linewidth=1, linestyle = '--' )
ax.text(0, label_y, 'TMPs', fontsize = 12, horizontalalignment='center')
ax.vlines(5, -45, 45, linestyles='solid', linewidth=1, linestyle = '--' , color = NEJM[1])
ax.text(5, label_y, 'tritium inlet', fontsize = 12, horizontalalignment='center', color = NEJM[1])
ax.hlines( -45, 10, 13, linestyles='solid', linewidth=1, linestyle = '--' )
ax.hlines( 45, 10, 13, linestyles='solid', linewidth=1, linestyle = '--' )
ax.text(11.5, 0, 'to DPS', fontsize = 12, horizontalalignment='center', verticalalignment='center')
#ax.arrow(10, 0, 2, 0, width=1, head_width=20, head_length=0.5)
ax.fill_between([-3, 10], -45, 45, color = 'grey', alpha = 0.3)
ax.set_xlim([-4.3,13])
ax.set_ylim(-60,100)
ax.set_xlabel(r'$z$ (m)', size = 12)
ax.set_ylabel(r'$r$ (mm)', size = 12)
ax.set_xticks([-3, 0 , 5, 10])
ax.set_xticklabels(['-3', '0', '5','10'], size = 12)
ax.set_yticks([-45, 0, 45])
ax.set_yticklabels(['-45', '0', '45'], size = 12)
ax.grid(False)
fig.tight_layout()
#fig.show()
fig.savefig(latex_path + "/model/geometry.pdf", bbox_inches='tight')
fig.savefig(latex_path + "/model/geometry.pgf", bbox_inches='tight')In [47]:
x = [-3, 0, 5, 10]
y = [5e-4, 0.033, 1, 0.034]
fig, ax = plt.subplots(figsize=[9/2.54,5/2.54])
ax.plot(x,y, color= 'black')
ax.set_yscale('log')
ax.set_xlim([-3,10])
ax.set_ylim(9e-5,3)
ax.set_xlabel(r'$z$ (m)', size = 12)
ax.set_ylabel(r'$n$ (n$_0$)', size = 12)
ax.set_xticks([-3, 0 , 5, 10])
#ax.set_xticklabels([], size = 12)
ax.set_yticks([5e-4, 0.033, 1])
ax.set_yticklabels(["5e-4", 0.033, 1], size = 12)
ax.grid(True)
fig.tight_layout()
#fig.show()
fig.savefig(latex_path + "/model/T2_density.pdf", bbox_inches='tight')
fig.savefig(latex_path + "/model/T2_density.pgf", bbox_inches='tight')In [105]:
A = 2 * np.pi * 0.045 * 16
e = 1.6e-19
B = 2.5
n = 1e11In [106]:
I = 300e-9In [107]:
j = I/AIn [108]:
v = j/n/eIn [109]:
E = v*BIn [110]:
E*0.045Out [110]:
0.46627424733953715
In [112]:
Ac = 1e11In [113]:
I = e*AcIn [114]:
IOut [114]:
1.5999999999999998e-08
In [116]:
250e-9/IOut [116]:
15.625000000000002
In [ ]: