Hello
I'm trying to plot flammability limits (and expected pressure rise) for hydrogen ingress into a reduced oxygen environment that will be saturated in both steam and HF. I have a YAML file with the relevant kinetics (H2 and HF). I am using a constant volume reactor but the calculated pressure is less than initial! Code below. I'm using Cantera 3.2.0
import cantera as ct
import numpy as np
gas = ct.Solution('h2o2.yaml')
gas.TP = 283.15, ct.one_atm
gas.X = {"H2": 0.20, "O2": 0.15, "N2": 0.65}
P_start = gas.P
r = ct.IdealGasReactor(gas, clone=False)
sim = ct.ReactorNet([r])
# Apply a spark
state = r.phase.state # Capture current state (density/mass)
r.phase.TP = 1500.0, None
print(f"Spark Pressure: {r.phase.P/1e5:.2f} bar")
states = ct.SolutionArray(gas, extra=['t'])
time = 0.0
for n in range(1000):
time += 1e-5
sim.advance(time)
states.append(r.phase.state, t=time)
p_max = np.max(states.P) / 1e5
print(f"Initial Pressure: {P_start/1e5:.2f} bar")
print(f"Peak Explosion Pressure: {p_max:.2f} bar")