Exemplo n.º 1
0
    def __init__(self, left, right, name = '',
                 A = 1.0, K = 0.0, U = 0.0,
                 Q = None, velocity = None,
                 kinetics = [None, None]):
        """
        Constructor arguments:
        
        left - Reactor or reservoir on the left. Required.

        right - Reactor or reservoir on the right. Required.

        name - Name string.
        If omitted, the name is 'Wall_n', where 'n' is an integer
        assigned in the order walls are created.

        A - Wall area [m^2]. Defaults to 1.0 m^2.

        K - Wall expansion rate parameter [m/s/Pa]. Defaults to 0.0.

        U - Overall heat transfer coefficient [W/m^2]. Defaults to 0.0
        (adiabbatic wall).

        Q - Heat flux function \f$ q_0(t) \f$ [W/m^2]. Optional. Default:
        \f$ q_0(t) = 0.0 \f$.

        velocity - Wall velocity function \f$ v_0(t) \f$ [m/s].
        Default: \f$ v_0(t) = 0.0 \f$.

        kinetics - Surface reaction mechanisms for the left-facing and
        right-facing surface, respectively. These must be instances of
        class Kinetics, or of a class derived from Kinetics, such as
        Interface. If chemistry occurs on only one side, enter 'None'
        for the non-reactive side.

        """
        typ = 0
        self.__wall_id = _cantera.wall_new(typ)

        global _wallcount
        if name == '':
            _nm = 'Wall_'+`_wallcount`
        else:
            _nm = name
        _wallcount += 1
        
        if left and right:
            self.install(left, right)
        else:
            raise CanteraError('both left and right reactors must be specified.')
        self.setArea(A)
        self.setExpansionRateCoeff(K)
        self.setVelocity(velocity)        
        self.setHeatTransferCoeff(U)
        self.setHeatFlux(Q)

        self.setKinetics(kinetics[0],kinetics[1])

        self._paramid = []
Exemplo n.º 2
0
    def __init__(self, left, right, name = '',
                 A = 1.0, K = 0.0, U = 0.0,
                 Q = None, velocity = None,
                 kinetics = [None, None]):
        """
        Constructor arguments:
        
        left - Reactor or reservoir on the left. Required.

        right - Reactor or reservoir on the right. Required.

        name - Name string.
        If omitted, the name is 'Wall_n', where 'n' is an integer
        assigned in the order walls are created.

        A - Wall area [m^2]. Defaults to 1.0 m^2.

        K - Wall expansion rate parameter [m/s/Pa]. Defaults to 0.0.

        U - Overall heat transfer coefficient [W/m^2]. Defaults to 0.0
        (adiabbatic wall).

        Q - Heat flux function \f$ q_0(t) \f$ [W/m^2]. Optional. Default:
        \f$ q_0(t) = 0.0 \f$.

        velocity - Wall velocity function \f$ v_0(t) \f$ [m/s].
        Default: \f$ v_0(t) = 0.0 \f$.

        kinetics - Surface reaction mechanisms for the left-facing and
        right-facing surface, respectively. These must be instances of
        class Kinetics, or of a class derived from Kinetics, such as
        Interface. If chemistry occurs on only one side, enter 'None'
        for the non-reactive side.

        """
        typ = 0
        self.__wall_id = _cantera.wall_new(typ)

        global _wallcount
        if name == '':
            _nm = 'Wall_'+`_wallcount`
        else:
            _nm = name
        _wallcount += 1
        
        if left and right:
            self.install(left, right)
        else:
            raise CanteraError('both left and right reactors must be specified.')
        self.setArea(A)
        self.setExpansionRateCoeff(K)
        self.setVelocity(velocity)        
        self.setHeatTransferCoeff(U)
        self.setHeatFlux(Q)

        self.setKinetics(kinetics[0],kinetics[1])

        self._paramid = []
Exemplo n.º 3
0
    def __init__(self, left, right, name = '',
                 A = 1.0, K = 0.0, U = 0.0,
                 Q = None, velocity = None,
                 kinetics = [None, None]):
        """
        :param left:
            Reactor or reservoir on the left. Required.
        :param right:
            Reactor or reservoir on the right. Required.
        :param name:
            Name string. If omitted, the name is ``'Wall_n'``, where ``'n'``
            is an integer assigned in the order walls are created.
        :param A:
            Wall area [m^2]. Defaults to 1.0 m^2.
        :param K:
            Wall expansion rate parameter [m/s/Pa]. Defaults to 0.0.
        :param U:
            Overall heat transfer coefficient [W/m^2]. Defaults to 0.0
            (adiabatic wall).
        :param Q:
            Heat flux function :math:`q_0(t)` [W/m^2]. Optional. Default:
            :math:`q_0(t) = 0.0`.
        :param velocity:
            Wall velocity function :math:`v_0(t)` [m/s].
            Default: :math:`v_0(t) = 0.0`.
        :param kinetics:
            Surface reaction mechanisms for the left-facing and right-facing
            surface, respectively. These must be instances of class Kinetics,
            or of a class derived from Kinetics, such as Interface. If
            chemistry occurs on only one side, enter ``None`` for the
            non-reactive side.
        """
        typ = 0
        self.__wall_id = _cantera.wall_new(typ)

        global _wallcount
        if name == '':
            _nm = 'Wall_'+`_wallcount`
        else:
            _nm = name
        _wallcount += 1

        if left and right:
            self.install(left, right)
        else:
            raise CanteraError('both left and right reactors must be specified.')
        self.setArea(A)
        self.setExpansionRateCoeff(K)
        self.setVelocity(velocity)
        self.setHeatTransferCoeff(U)
        self.setHeatFlux(Q)

        self.setKinetics(kinetics[0],kinetics[1])

        self._paramid = []
Exemplo n.º 4
0
    def __init__(self,
                 left,
                 right,
                 name='',
                 A=1.0,
                 K=0.0,
                 U=0.0,
                 Q=None,
                 velocity=None,
                 kinetics=[None, None]):
        """
        :param left:
            Reactor or reservoir on the left. Required.
        :param right:
            Reactor or reservoir on the right. Required.
        :param name:
            Name string. If omitted, the name is ``'Wall_n'``, where ``'n'``
            is an integer assigned in the order walls are created.
        :param A:
            Wall area [m^2]. Defaults to 1.0 m^2.
        :param K:
            Wall expansion rate parameter [m/s/Pa]. Defaults to 0.0.
        :param U:
            Overall heat transfer coefficient [W/m^2]. Defaults to 0.0
            (adiabatic wall).
        :param Q:
            Heat flux function :math:`q_0(t)` [W/m^2]. Optional. Default:
            :math:`q_0(t) = 0.0`.
        :param velocity:
            Wall velocity function :math:`v_0(t)` [m/s].
            Default: :math:`v_0(t) = 0.0`.
        :param kinetics:
            Surface reaction mechanisms for the left-facing and right-facing
            surface, respectively. These must be instances of class Kinetics,
            or of a class derived from Kinetics, such as Interface. If
            chemistry occurs on only one side, enter ``None`` for the
            non-reactive side.
        """
        typ = 0
        self.__wall_id = _cantera.wall_new(typ)

        global _wallcount
        if name == '':
            _nm = 'Wall_' + ` _wallcount `
        else:
            _nm = name
        _wallcount += 1

        if left and right:
            self.install(left, right)
        else:
            raise CanteraError(
                'both left and right reactors must be specified.')
        self.setArea(A)
        self.setExpansionRateCoeff(K)
        self.setVelocity(velocity)
        self.setHeatTransferCoeff(U)
        self.setHeatFlux(Q)

        self.setKinetics(kinetics[0], kinetics[1])

        self._paramid = []