23.01.2015 Views

Download - Wolfram Research

Download - Wolfram Research

Download - Wolfram Research

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

38 2. Tutorial<br />

{V0, {1, 2}, V0}<br />

Hence, a positive value for the branch current, I$V0 , denotes a current flowing from node 1 to<br />

node 2. So whenever a circuit analysis yields a negative result for I$V0 there is nothing wrong. This<br />

just means that the current is in fact flowing into the opposite direction, i.e. from node 2 to node 1.<br />

Element Values<br />

As opposed to SPICE, the values of circuit elements need not be purely numerical quantities. Since<br />

Mathematica is capable of performing mathematical calculations symbolically, the element values may<br />

also be any symbolic or mixed symbolic/numeric expressions. In the voltage-divider example (see<br />

Figure 2.1) we assigned a numerical value of 10 (Volts) to the voltage source whereas we used the<br />

symbolic values R1 and R2 for the two resistors. (Note that you don’t have to specify any units<br />

like Volts for numerical values.) In this case, the symbols used for the values of the resistors are<br />

identical to the reference designators, but we could also have supplied any other valid Mathematica<br />

expression.<br />

1<br />

R1=R<br />

V0<br />

out<br />

R2=2*R<br />

Figure 2.4: Voltage divider circuit with different node names and resistor values<br />

Let’s make use of some of the facts presented in the preceding paragraphs by renaming node 2 of<br />

the voltage divider to out, arbitrarily making the assignments R1 ⩵ R and R2 ⩵ R, and rewriting<br />

the netlist accordingly (see Figure 2.4):<br />

In[4]:= voltageDivider2 =<br />

Netlist[<br />

{V0, {1, 0}, 10},<br />

{R1, {1, out}, R},<br />

{R2, {out, 0}, 2 R}<br />

]<br />

Out[4]= NetlistRaw, 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!