mirror of
https://github.com/Cantera/cantera.git
synced 2026-08-08 12:08:13 -05:00
[Python] Avoid keyword for positional 'phase' parameter
This commit is contained in:
committed by
Ray Speth
parent
c529551aea
commit
a8ddb8d427
@@ -273,11 +273,10 @@ cdef class Reactor(ReactorBase):
|
||||
>>> gas = Solution('gri30.yaml')
|
||||
>>> r1 = Reactor(gas)
|
||||
|
||||
Arguments may be specified using keywords in any order:
|
||||
Arguments may be specified using keywords:
|
||||
|
||||
>>> r2 = Reactor(phase=gas, energy='off',
|
||||
>>> r2 = Reactor(gas, energy='off',
|
||||
... name='isothermal_reactor')
|
||||
>>> r3 = Reactor(name='adiabatic_reactor', phase=gas)
|
||||
|
||||
"""
|
||||
super().__init__(phase, clone=clone, name=name, **kwargs)
|
||||
@@ -883,7 +882,7 @@ cdef class ReactorSurface(ReactorBase):
|
||||
self.rbase = self._rbase.get()
|
||||
self.surface = <CxxReactorSurface*>(self.rbase)
|
||||
|
||||
def __init__(self, phase=None, r=None, clone=None, *,
|
||||
def __init__(self, phase=None, r=None, *, clone=None,
|
||||
name="(none)", A=None, node_attr=None):
|
||||
super().__init__(phase, name=name)
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ for k, m in enumerate(models):
|
||||
gas = ct.Solution(file, name=models[m])
|
||||
X = {'H2O2':X_H2O2, 'H2O':X_H2O, 'O2':X_O2, 'CO2':X_CO2, 'AR':X_Ar}
|
||||
gas.TPX = 1196, 2.127*ct.one_atm, X
|
||||
r = ct.Reactor(phase=gas, energy="on", clone=False)
|
||||
r = ct.Reactor(gas, energy="on", clone=False)
|
||||
reactorNetwork = ct.ReactorNet([r])
|
||||
timeHistory = ct.SolutionArray(gas, extra=['t'])
|
||||
estIgnitDelay = 1
|
||||
|
||||
@@ -117,7 +117,7 @@ real_gas.set_equivalence_ratio(phi=1.0, fuel='c12h26',
|
||||
|
||||
# Create a reactor object and add it to a reactor network
|
||||
# In this example, this will be the only reactor in the network
|
||||
r = ct.Reactor(phase=real_gas, clone=False)
|
||||
r = ct.Reactor(real_gas, clone=False)
|
||||
reactor_network = ct.ReactorNet([r])
|
||||
time_history_RG = ct.SolutionArray(real_gas, extra=['t'])
|
||||
|
||||
@@ -154,7 +154,7 @@ ideal_gas.TP = reactor_temperature, reactor_pressure
|
||||
ideal_gas.set_equivalence_ratio(phi=1.0, fuel='c12h26',
|
||||
oxidizer={'o2': 1.0, 'n2': 3.76})
|
||||
|
||||
r = ct.Reactor(phase=ideal_gas, clone=False)
|
||||
r = ct.Reactor(ideal_gas, clone=False)
|
||||
reactor_network = ct.ReactorNet([r])
|
||||
time_history_IG = ct.SolutionArray(ideal_gas, extra=['t'])
|
||||
|
||||
@@ -231,7 +231,7 @@ for i, temperature in enumerate(T):
|
||||
real_gas.TP = reactor_temperature, reactor_pressure
|
||||
real_gas.set_equivalence_ratio(phi=1.0, fuel='c12h26',
|
||||
oxidizer={'o2': 1.0, 'n2': 3.76})
|
||||
r = ct.Reactor(phase=real_gas, clone=False)
|
||||
r = ct.Reactor(real_gas, clone=False)
|
||||
reactor_network = ct.ReactorNet([r])
|
||||
|
||||
# create an array of solution states
|
||||
@@ -263,7 +263,7 @@ for i, temperature in enumerate(T):
|
||||
ideal_gas.TP = reactor_temperature, reactor_pressure
|
||||
ideal_gas.set_equivalence_ratio(phi=1.0, fuel='c12h26',
|
||||
oxidizer={'o2': 1.0, 'n2': 3.76})
|
||||
r = ct.Reactor(phase=ideal_gas, clone=False)
|
||||
r = ct.Reactor(ideal_gas, clone=False)
|
||||
reactor_network = ct.ReactorNet([r])
|
||||
|
||||
# create an array of solution states
|
||||
|
||||
Reference in New Issue
Block a user