Beispiel #1
0
    def get_I(self, name):
        """Current through component"""

        result = Isuper()
        for sub in self.sub.values():
            I = sub.get_I(name)
            result.add(I)
        result = result.canonical()
        return result
Beispiel #2
0
    def __init__(self, I, phi=0):

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

        self.omega = symbol('omega', real=True)
        self.i0 = I
        self.phi = phi
        self._Isc = Isuper(
            Iphasor(self.i0 * exp(j * self.phi), ac=True, omega=self.omega))
Beispiel #3
0
 def Voc(self):
     """Open-circuit voltage."""
     if self._Voc is not None:
         return self._Voc
     if self._Isc is not None:
         return self._Isc * self.Z
     if self._Z is not None:
         return Vsuper(0)
     if self._Y is not None:
         return Isuper(0)
     raise ValueError('_Isc, _Voc, _Y, or _Z undefined for %s' % self)
Beispiel #4
0
    def Idict(self):
        """Return dictionary of branch currents for each transform domain"""

        try:
            return self._Idict
        except AttributeError:
            pass

        result = Branchdict()
        for sub in self.sub.values():
            for node, value in sub.Idict.items():
                if node not in result:
                    result[node] = Isuper()
                result[node].add(value)
        self._Idict = result
        return result
Beispiel #5
0
    def __init__(self, ival):

        self.args = (ival, )
        Ival = tExpr(ival)
        self._Isc = Isuper(Ival)
Beispiel #6
0
    def __init__(self, I, nid=None):

        I1 = In(I, nid=nid)
        self._Isc = Isuper(I1)
        self.args = (I, I1.nid)
Beispiel #7
0
    def __init__(self, i):

        self.args = (i, )
        i = cExpr(i)
        self._Isc = Isuper(Iconst(i, dc=True))
        self.i0 = i
Beispiel #8
0
    def __init__(self, i):

        self.args = (i, )
        i = cExpr(i)
        self._Isc = Isuper(tExpr(i) * Heaviside(t), causal=True)
        self.i0 = i
Beispiel #9
0
    def __init__(self, Ival):

        self.args = (Ival, )
        self._Isc = Isuper(Ival)
Beispiel #10
0
    def __init__(self, Ival):

        self.args = (Ival, )
        Ival = sExpr(Ival)
        self._Isc = Isuper(Is(Ival))