Skip to content

Commit

Permalink
[Python] Use UnstrainedFlow for BurnerFlame
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Apr 14, 2023
1 parent ef8c935 commit a1ca8d0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
23 changes: 19 additions & 4 deletions interfaces/cython/cantera/_onedim.pyx
Expand Up @@ -733,6 +733,20 @@ cdef class FreeFlow(_FlowBase):
_domain_type = "free-flow"


cdef class UnstrainedFlow(_FlowBase):
r"""An unstrained flow domain. The equations solved are standard equations for
adiabatic one-dimensional flow. The solution variables are:
*velocity*
axial velocity
*T*
temperature
*Y_k*
species mass fractions
"""
_domain_type = "unstrained-flow"


cdef class AxisymmetricFlow(_FlowBase):
r"""
An axisymmetric flow domain. The equations solved are the similarity equations for
Expand Down Expand Up @@ -794,14 +808,15 @@ cdef class IdealGasFlow(_FlowBase):
.. deprecated:: 3.0
Class to be removed after Cantera 3.0; replaced by `FreeFlow` and
s`AxisymmetricFlow`.
Class to be removed after Cantera 3.0; replaced by `FreeFlow`,
`AxisymmetricFlow` and `UnstrainedFlow`.
"""
_domain_type = "gas-flow"

def __init__(self, *args, **kwargs):
warnings.warn("Class to be removed after Cantera 3.0; use 'FreeFlow' "
"or AxisymmetricFlow' instead.", DeprecationWarning)
warnings.warn("Class to be removed after Cantera 3.0; use 'FreeFlow', "
"'AxisymmetricFlow' or 'UnstrainedFlow' instead.",
DeprecationWarning)
super().__init__(*args, **kwargs)


Expand Down
6 changes: 3 additions & 3 deletions interfaces/cython/cantera/onedim.py
Expand Up @@ -1067,7 +1067,7 @@ def __init__(self, gas, grid=None, width=None):
Defines a grid on the interval [0, width] with internal points
determined automatically by the solver.
A domain of class `AxisymmetricFlow` named ``flame`` will be created to
A domain of class `UnstrainedFlow` named ``flame`` will be created to
represent the flame. The three domains comprising the stack are stored as
``self.burner``, ``self.flame``, and ``self.outlet``.
"""
Expand All @@ -1080,8 +1080,8 @@ def __init__(self, gas, grid=None, width=None):

if not hasattr(self, 'flame'):
# Create flame domain if not already instantiated by a child class
#: `AxisymmetricFlow` domain representing the flame
self.flame = AxisymmetricFlow(gas, name='flame')
#: `UnstrainedFlow` domain representing the flame
self.flame = UnstrainedFlow(gas, name='flame')

if width is not None:
grid = np.array([0.0, 0.1, 0.2, 0.3, 0.5, 0.7, 1.0]) * width
Expand Down

0 comments on commit a1ca8d0

Please sign in to comment.