diff --git a/interfaces/cython/cantera/base.pyx b/interfaces/cython/cantera/base.pyx index 1868cabab..af30bb4cc 100644 --- a/interfaces/cython/cantera/base.pyx +++ b/interfaces/cython/cantera/base.pyx @@ -1,6 +1,6 @@ cdef class _SolutionBase: def __cinit__(self, infile='', phaseid='', phases=(), origin=None, - source=None): + source=None, **kwargs): # Shallow copy of an existing Solution (for slicing support) cdef _SolutionBase other if origin is not None: diff --git a/interfaces/cython/cantera/composite.pyx b/interfaces/cython/cantera/composite.pyx index 140f52ab9..dcf5cb93a 100644 --- a/interfaces/cython/cantera/composite.pyx +++ b/interfaces/cython/cantera/composite.pyx @@ -11,6 +11,9 @@ class Solution(ThermoPhase, Kinetics, Transport): `Transport`. It defines very few methods of its own, and is provided so that a single object can be used to compute thermodynamic, kinetic, and transport properties of a solution. + + To skip initialization of the Transport object, pass the argument + `transport_model=None` to the `Solution` constructor. """ class Interface(InterfacePhase, InterfaceKinetics): diff --git a/interfaces/cython/cantera/transport.pyx b/interfaces/cython/cantera/transport.pyx index d37eac166..a6ef5fea1 100644 --- a/interfaces/cython/cantera/transport.pyx +++ b/interfaces/cython/cantera/transport.pyx @@ -25,7 +25,13 @@ cdef class Transport(_SolutionBase): # The signature of this function causes warnings for Sphinx documentation def __init__(self, *args, **kwargs): if self.transport == NULL: - self.transport = newDefaultTransportMgr(self.thermo) + if 'transport_model' not in kwargs: + self.transport = newDefaultTransportMgr(self.thermo) + else: + model = kwargs['transport_model'] + if not model: + model = 'None' + self.transport = newTransportMgr(stringify(model), self.thermo) super().__init__(*args, **kwargs) property transport_model: