Enthalpy non-conservation in post-flame region
speth opened this issue · 0 comments
speth commented
Running with c0ed397, the following configuration:
from ember import *
import cantera as ct
# params
phi = 2.0
mech = "h2o2.yaml"
fuel = "H2:1.0"
oxid = "N2:3.76, O2:1.0"
T0 = 300
p = ct.one_atm
npoints_ini = 100
output = f"./run/phi{phi * 10}b"
conf = Config(
Paths(
outputDir=output,
),
Chemistry(mechanismFile=mech),
General(
flameGeometry="cylindrical",
unburnedLeft=False,
fixedLeftLocation=True,
nThreads=4,
),
InitialCondition(
fuel=fuel,
oxidizer=oxid,
pressure=p,
Tu=T0,
equivalenceRatio=phi,
xLeft=0.0,
xRight=0.005,
nPoints=npoints_ini,
),
StrainParameters(initial=0.0, final=0.0),
TerminationCondition(tEnd=0.025, measurement="dTdt"),
Times(globalTimestep=1e-6, profileStepInterval=100, regridStepInterval=2),
Grid(rmTol=0.8, vtol=0.1, dvtol=0.16, uniformityTol=3.5),
Debug(adaptation=False, regridding=False),
OutputFiles(fileExtension="h5"),
)
# simulation
if __name__ == "__main__":
conf.run()
Demonstrates some issues with conserving enthalpy in the post-flame region, which can be seen by superadiabatic temperatures that persist even as the flame's curvature decreases:
import cantera as ct
import ember
from pathlib import Path
import matplotlib.pyplot as plt
gas = ct.Solution('h2o2.yaml')
Pb = [ember.utils.load(str(pth)) for pth in Path('run/phi20b').glob('prof*.h5')]
Pb = sorted(Pb, key=lambda p: p.t)
fig, ax = plt.subplots()
for prof in Pb[::20]:
states = ct.SolutionArray(gas, len(prof.x))
states.TPY = prof.T, ct.one_atm, prof.Y.T
ax.plot(prof.x, states.enthalpy_mass, label=f't = {prof.t*1000:.4} ms')