currents {ResistorArray}R Documentation

Calculates currents in an arbitrary resistor array

Description

Calculates currents in an arbitrary resistor array

Usage

currents(L, earth.node, input.node)
currents.matrix(L, earth.node, input.node)

Arguments

L

Lagrangian conductance matrix

earth.node

Number of node that is earthed (that is, at a potential of zero)

input.node

Number of node that has current put into it (a notional one Amp)

Details

The methods used by the two functions are different; see documentation for resistance() for further details on input args 2 and 3

Value

Function currents() returns a three column matrix, each row of which corresponds to an edge. The first two columns show the node numbers specifying the edge, and the third shows the current flowing along it.

Function current.matrix() uses a different method to return a matrix of the same size as the conductance matrix L. Each element of the returned matrix shows the current flowing along the specified edge.

Note

This function is essentially a simplified version of circuit().

Author(s)

Robin K. S. Hankin

Examples

currents(cube(),1,7)
currents.matrix(cube(),1,7)

 #check above solution: print out the currents flowing into each node:
 zapsmall(apply(currents.matrix(cube(),1,7),1,sum))

[Package ResistorArray version 1.0-32 Index]