Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enthalpy non-conservation in post-flame region #19

Open
speth opened this issue Jun 21, 2024 · 0 comments
Open

Enthalpy non-conservation in post-flame region #19

speth opened this issue Jun 21, 2024 · 0 comments

Comments

@speth
Copy link
Owner

speth commented Jun 21, 2024

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')

enthalpy-vs-r

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant