New input options and fCUm now calculates the number of ions passing by (to plot dN/dE easily
This commit is contained in:
parent
6e07067faa
commit
f25abb3213
15 changed files with 169 additions and 27 deletions
|
|
@ -16,27 +16,30 @@ m_i = 1.9712e-25
|
|||
# paths = ['../2024-12-10_18.45.17/', '../Poisson_50ns_T30Z11/']
|
||||
# paths = ['../2024-12-11_12.38.27/', '../Poisson_polytropic_fa_T30Z11/', '../Poisson_fa_T30Z11/']
|
||||
# paths = ['../Poisson_partialAblation/','../Poisson_partialAblation_lowerT/','../Poisson_partialAblation_lowT/','../Poisson_partialAblation_highT/']
|
||||
paths = ['../polytropic_80ns_T30/']
|
||||
paths = ['../2025-04-17_14.39.34/']
|
||||
labels = [path[3:-1] for path in paths]
|
||||
|
||||
m2s2_to_eV = m_i*0.5/e
|
||||
|
||||
for path, label in zip(paths, labels):
|
||||
Zlist = readZlist.read(path+'ZList.csv')
|
||||
filesCum_i = sorted(glob.glob(path+'time_*_fCum_i.csv'))
|
||||
_, _, v, _ = readF.read(filesCum_i[-1])
|
||||
sumF = np.zeros(len(v))
|
||||
E = v**2*m2s2_to_eV
|
||||
|
||||
for Z in Zlist:
|
||||
filename='time_*_Z_{:.1f}_fCum_i.csv'.format(Z)
|
||||
filesCum_i = sorted(glob.glob(path+filename))
|
||||
time, x, v, f_i = readF.read(filesCum_i[-1])
|
||||
time, rCum, v, f_i = readF.read(filesCum_i[-1])
|
||||
sumF += f_i[0]
|
||||
plt.plot(v**2*m_i*0.5/e, f_i[0]*e/m_i/v, label=Z)
|
||||
plt.plot(E, 4.0*np.pi*rCum[0]**2*f_i[0]/E, label=Z)
|
||||
plt.plot(E, 4.0*np.pi*rCum[0]**2*sumF/E, label='sum', color='k', linestyle='dashed')
|
||||
print(time)
|
||||
plt.plot(v**2*m_i*0.5/e, sumF*e/m_i/v, label='sum', color='k', linestyle='dashed')
|
||||
|
||||
plt.yscale('log')
|
||||
plt.ylim([1e16,5e27])
|
||||
plt.ylabel('Sum f(e) / sqrt(e) (m^-3 eV^-1)')
|
||||
plt.ylim([1e8,5e11])
|
||||
plt.ylabel('dN / dE (eV^-1)')
|
||||
plt.xscale('log')
|
||||
plt.xlim([1e0,1e4])
|
||||
plt.xlabel('e (eV)')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue