Example #1
0
    def __init__(self, i):

        self.args = (i, )
        i = cExpr(i)
        super(Idc, self).__init__(Is(i, dc=True) / s)
        # This is not needed when assumptions propagated.
        self.Isc.is_dc = True
        self.i0 = i
Example #2
0
    def __init__(self, Yval=Ys(0), Ival=Is(0)):

        # print('<N> Y:', Yval, 'I:', Ival)
        if not isinstance(Yval, Ys):
            raise ValueError('Yval not Ys')
        if not isinstance(Ival, Is):
            raise ValueError('Ival not Is')
        self.Y = Yval
        self.Isc = Ival

        super(Norton, self).__init__()
Example #3
0
    def Iresponse(self, I, inport=1, outport=2):
        """Return current response for specified current voltage and
        specified ports"""

        self._portcheck(inport)
        self._portcheck(outport)

        p1 = inport - 1
        p2 = outport - 1

        Y = self.Y
        Isc = self.Isc

        return Is(Isc[p2] + (I - Isc[p1]) * Y[p2, p1] / Y[p1, p1])
Example #4
0
    def __init__(self, I, phi=0):

        self.args = (I, phi)
        I = cExpr(I)
        phi = cExpr(phi)

        self.omega = symbol('omega_1', real=True)
        foo = (s * sym.cos(phi) + self.omega * sym.sin(phi)) / (s**2 +
                                                                self.omega**2)
        super(Iac, self).__init__(Is(foo * I, ac=True))
        # This is not needed when assumptions propagated.
        self.Isc.is_ac = True
        self.i0 = I
        self.phi = phi
Example #5
0
    def __init__(self, Ival):

        self.args = (Ival, )
        Ival = sExpr(Ival)
        self._Isc = Isuper(Is(Ival))
Example #6
0
 def I(self):
     return Is(0)
Example #7
0
    def __init__(self, ival):

        self.args = (ival, )
        Ival = tExpr(ival)
        super(I, self).__init__(Is(Ival.laplace()))
        self.assumptions_infer(Ival)
Example #8
0
    def __init__(self, Ival):

        self.args = (Ival, )
        Isym = tsExpr(Ival)
        super(I, self).__init__(Is(Isym))
Example #9
0
    def __init__(self, Ival):

        self.args = (Ival, )
        Ival = sExpr(Ival)
        super(sI, self).__init__(Ys(0), Is(Ival))
Example #10
0
    def __init__(self, Ival):

        super(CurrentSource, self).__init__(Ys(0), Is(Ival))