Esempio n. 1
0
 def __init__(self, n1, n2):
     self.current = util.gensym('i_'+n1+'->'+n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
Esempio n. 2
0
 def __init__(self, n1, n2):
     self.current = util.gensym('i_' + n1 + '->' + n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
Esempio n. 3
0
 def guaranteeName(self):
     """
     Makes sure that this instance has a unique name that can be
     used for tracing.
     """
     if not self.name:
         self.name = util.gensym(self.__class__.__name__)
Esempio n. 4
0
 def __init__(self, nPlus, nMinus, nOut, K=10000):
     """
     @param nPlus: name of positive input node (string)
     @param nMinus: name of negative input node (string)
     @param nOut: name of positive output node (string)
     @param K: constant in op-amp model (number)
     """
     self.K = K
     self.nPlus = nPlus
     self.nMinus = nMinus
     self.nOut = nOut
     self.current = util.gensym('i->'+nOut)
     """
Esempio n. 5
0
 def __init__(self, r, n1, n2):
     """
     @param r: resistance in Ohms (number)
     @param n1: name of node at one end of the resistor (string)
     @param n2: name of node at the other end of the resistor (string)
     """
     self.current = util.gensym('i_'+n1+'->'+n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
     self.r = r
Esempio n. 6
0
 def __init__(self, i, n1, n2):
     """
     @param i: current, in Amperes (number), flowing from C{n1} to C{n2}
     @param n1: name of node at one end of the current source (string)
     @param n2: name of node at the other end of the current source (string)
     """
     self.current = util.gensym('i_'+n1+'->'+n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
     self.i = i
Esempio n. 7
0
 def __init__(self, v, n1, n2):
     """
     @param v: voltage in Volts (number);  equal to voltage at C{n1} minus voltage at C{n2} 
     @param n1: name of node at one end of the voltage source (string)
     @param n2: name of node at the other end of the voltage source (string)
     """
     self.current = util.gensym('i_'+n1+'->'+n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
     self.v = v
Esempio n. 8
0
 def __init__(self, nPlus, nMinus, nOut, K=10000):
     """
     :param nPlus: name of positive input node (string)
     :param nMinus: name of negative input node (string)
     :param nOut: name of positive output node (string)
     :param K: constant in op-amp model (number)
     """
     self.K = K
     self.nPlus = nPlus
     self.nMinus = nMinus
     self.nOut = nOut
     self.current = util.gensym('i->' + nOut)
     """
Esempio n. 9
0
 def __init__(self, r, n1, n2):
     """
     :param r: resistance in Ohms (number)
     :param n1: name of node at one end of the resistor (string)
     :param n2: name of node at the other end of the resistor (string)
     """
     self.current = util.gensym('i_' + n1 + '->' + n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
     self.r = r
Esempio n. 10
0
 def __init__(self, i, n1, n2):
     """
     :param i: current, in Amperes (number), flowing from ``n1`` to ``n2``
     :param n1: name of node at one end of the current source (string)
     :param n2: name of node at the other end of the current source (string)
     """
     self.current = util.gensym('i_' + n1 + '->' + n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
     self.i = i
Esempio n. 11
0
 def __init__(self, v, n1, n2):
     """
     :param v: voltage in Volts (number);  equal to voltage at ``n1`` minus voltage at ``n2`` 
     :param n1: name of node at one end of the voltage source (string)
     :param n2: name of node at the other end of the voltage source (string)
     """
     self.current = util.gensym('i_' + n1 + '->' + n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
     self.v = v
Esempio n. 12
0
 def __init__(self, v, r, n1, n2):
     """
     @param v: voltage in Volts (number)
     @param r: resistance in Ohms (number)
     @param n1: name of node at one end of the resistor (string)
     @param n2: name of node at the other end of the resistor (string)
     Makes a component that is, effectively, a resistor and a
     voltage source in series.
     """
     self.current = util.gensym('i_'+n1+'->'+n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
     self.v = v
     self.r = r
Esempio n. 13
0
 def __init__(self, v, r, n1, n2):
     """
     :param v: voltage in Volts (number)
     :param r: resistance in Ohms (number)
     :param n1: name of node at one end of the resistor (string)
     :param n2: name of node at the other end of the resistor (string)
     Makes a component that is, effectively, a resistor and a
     voltage source in series.
     """
     self.current = util.gensym('i_' + n1 + '->' + n2)
     """
     Name of the current variable for this component
     """
     self.n1 = n1
     self.n2 = n2
     self.v = v
     self.r = r