Module circ :: Class Circuit
[frames] | no frames]

Class Circuit

Instance Methods
 
__init__(self, components)
 
solve(self, gnd)
Returns: instance of le.Solution, mapping node names to values
 
addComponent(self, component)
 
voc(self, nPlus, nMinus)
Find the open-circuit voltage by setting nMinus to ground and finding the voltage at nPlus
 
isc(self, nPlus, nMinus)
Find the short-circuit current: Add a wire across the positive and negative terminals and measure the current there
 
theveninEquivalent(self, nPlus, nMinus)
 
__str__(self)
Method Details

__init__(self, components)
(Constructor)

 
Parameters:
  • components - list of instances of Component that make up this circuit

solve(self, gnd)

 
Parameters:
  • gnd - Name of the node to set to ground (string)
Returns:
instance of le.Solution, mapping node names to values