Introducing Types Voltameter and Galvanometer to CIR

agent on 2005-04-16T06:45:03

=from 2005.4.13.10:25.AM =to ...4.13.11:05.AM

I'm well on my way of learning Thevenin and Norton's theorems. I noticed the CIR script lacks the ability to express the voltage across any pair of circuit nodes, although now we can represent voltages across any circuit wires and circuit elements. From the viewpoint of implementation and practical usage, it is desirable to introduce two new circuit element types Voltammeter and Galvanometer. Voltammeters are those Elem objects whose currents are always zero. Whereas, a Galvanometer is defined to be a special Elem with zero voltage across it.

It is also advisable to treat Wire as a sub-class inherited from Elem, which is exactly identical to Galvanometer. Um, the semantics of such class hierarchy seems not clear enough to me though.

In my opinion, the Galvanometer type is not as useful as Voltammeter, as we can readily get the current through any circuit branches without the former. Galvanometer is introduced only for conceptual completeness. :P

I'm very glad to see CIR's capability of describing complicated problems is growing unfailingly. Wonderful!