From 3d9112f899cd53d4232544cf2942bed454cff203 Mon Sep 17 00:00:00 2001 From: Ingmar Schoegl Date: Thu, 13 Apr 2023 19:16:32 -0500 Subject: [PATCH] [Python] Use UnstrainedFlow for BurnerFlame --- interfaces/cython/cantera/_onedim.pyx | 23 +++++++++++++++++++---- interfaces/cython/cantera/onedim.py | 6 +++--- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/interfaces/cython/cantera/_onedim.pyx b/interfaces/cython/cantera/_onedim.pyx index 5c87b9c6b9..8eaf3b5aa8 100644 --- a/interfaces/cython/cantera/_onedim.pyx +++ b/interfaces/cython/cantera/_onedim.pyx @@ -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 @@ -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) diff --git a/interfaces/cython/cantera/onedim.py b/interfaces/cython/cantera/onedim.py index 70871a54e0..fea80dab94 100644 --- a/interfaces/cython/cantera/onedim.py +++ b/interfaces/cython/cantera/onedim.py @@ -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``. """ @@ -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