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

Allow user to set flame location #447

Merged
merged 1 commit into from May 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions interfaces/cython/cantera/onedim.py
Expand Up @@ -408,13 +408,16 @@ def __init__(self, gas, grid=None, width=None):
self.inlet.T = gas.T
self.inlet.X = gas.X

def set_initial_guess(self):
def set_initial_guess(self, locs=[0.0, 0.3, 0.5, 1.0]):
"""
Set the initial guess for the solution. The adiabatic flame
temperature and equilibrium composition are computed for the inlet gas
composition. The temperature profile rises linearly over 20% of the
domain width to Tad, then is flat. The mass fraction profiles are set
similarly.
composition.

:param locs:
A list of four locations to define the temperature and mass fraction profiles.
Profiles rise linearly between the second and third location.
Locations are given as a fraction of the entire domain
"""
super(FreeFlame, self).set_initial_guess()
self.gas.TPY = self.inlet.T, self.P, self.inlet.Y
Expand All @@ -433,7 +436,6 @@ def set_initial_guess(self):
Yeq = self.gas.Y
u1 = self.inlet.mdot/self.gas.density

locs = [0.0, 0.3, 0.5, 1.0]
self.set_profile('u', locs, [u0, u0, u1, u1])
self.set_profile('T', locs, [T0, T0, Teq, Teq])

Expand Down