Add BC plotting routine
This commit is contained in:
parent
a26af0d121
commit
13fa6c7efd
3 changed files with 41 additions and 7 deletions
19
scripts_python/plotBC.py
Normal file
19
scripts_python/plotBC.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import matplotlib.pyplot as plt
|
||||
import glob
|
||||
import numpy as np
|
||||
import readBC
|
||||
|
||||
|
||||
fileBC = glob.glob('../2025-02-10_11.14.59/bc.csv')
|
||||
time, n, u, T, TtoZ, Zinj = readBC.read(fileBC[0])
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
|
||||
|
||||
plt.plot(time, n / n[0] , label = f"$n_i$ ($\\times {n[0] * 1e-6} \\; cm^{{-3}})$")
|
||||
plt.plot(time, T / T[0], label = f"$T \\; (\\times{T[0]} \\; eV)$")
|
||||
plt.plot(time, TtoZ, label = "$Z$")
|
||||
plt.plot(time, Zinj, label = "Injection species")
|
||||
plt.semilogy()
|
||||
plt.legend()
|
||||
plt.show()
|
||||
15
scripts_python/readBC.py
Normal file
15
scripts_python/readBC.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import pandas
|
||||
|
||||
def read(filename):
|
||||
# Get time
|
||||
df = pandas.read_csv(filename)
|
||||
time = df['t (s)'].to_numpy()
|
||||
n = df['n (m^-3)'].to_numpy()
|
||||
u = df['u (m s^-1)'].to_numpy()
|
||||
T = df['T (eV)'].to_numpy()
|
||||
TtoZ = df['TtoZ'].to_numpy()
|
||||
Zinj = df['Zinj'].to_numpy()
|
||||
|
||||
return time, n, u, T, TtoZ, Zinj
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue