-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_backward.py
30 lines (26 loc) · 1.39 KB
/
main_backward.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import numpy as np
from src.ShockPy.shock_wave_compression.BackwardPropagationFromWindow import BackwardPropagationFromWindow
from src.ShockPy.shock_wave_compression.material_database.Kapton import Kapton
from src.ShockPy.shock_wave_compression.material_database.MgO import MgO
from src.ShockPy.shock_wave_compression.material_database.Quartz import Quartz
# Material.isentrope_calculator = ReflectedHugoniot()
measured_pressure = 315.03 # GPa
backward = BackwardPropagationFromWindow(materials=[Kapton(released=False),
MgO(is_stochastic=False, released=True),
Quartz(is_stochastic=False, released=True)])
backward.propagate(measured_pressure)
backward.plot()
ablator_intersections = np.array(
[(intersection.particle_velocity, intersection.pressure) for intersection in
backward.initial_intersections])
mean_ablator_pressure = np.mean(ablator_intersections[:, 1], dtype=np.float64)
std_ablator_pressure = np.std(ablator_intersections[:, 1], dtype=np.float64)
#
# print(f"Mean pressure: {mean_ablator_pressure}")
# print(f"Std pressure: {std_ablator_pressure}")
#
# plt.style.use('science')
# df = pd.DataFrame(ablator_intersections, columns=['Particle Velocity (km/s)', 'Pressure (GPa)'])
# sns.displot(data=df, x="Pressure (GPa)", kind="kde")
# plt.savefig(f'normal_2D_kde_{datetime.now()}.png')
# a=1