Menu

#37 How to flip polarity of V ?

v1.0 (example)
open
nobody
None
5
2019-06-23
2019-06-22
Samir Sabri
No

Hello

How would I create a netlist that has one voltage sources ( DC battery ) and a resistor, then to be able to flip the voltage source polarity and see effect on current at resistor? (negative or positive)

I've noticed that current sign of resistor depends only at n+ n- of resistor entry, regardless how V is connected.

An exampe with V source flipped and un-flipped would be highly appreciated.

Please advice, thanks.

Discussion

  • Samir Sabri

    Samir Sabri - 2019-06-22

    Here is what I have:

    R1 0 1 0.00001
    R2 3 1 1
    V1 5 2 1.5v
    R3 7 6 0.00001
    VR1 0 2 dc 0
    VR2 4 3 dc 0
    VV1 6 5 dc 0
    VR3 4 7 dc 0

    Where R1, R3 are wires, and R2 is resistor, VR1, VR2, VR3, VV1 are ameters.
    I tried to flip n+ n- of V1 as:
    V1 5 2 1.5v
    and
    V1 2 5 1.5v

    but that did not change current sign applied on VR1, VR2, VR3, Only current at VV1 got flipped from 1.49997 to -1.49997

    here is how I analyze:

    .dc V1 1.5 1.5 1
    .print dc
    .print dc i(VR1) i(VR2) i(VV1) i(VR3)

    what I expect that current sign at VR1, VR2, VR3 is affected too when flipping V, please explain.
    Thanks

     
  • Holger Vogt

    Holger Vogt - 2019-06-22

    .dc V1 1.5 1.5 1
    has wrong syntax (start and stop the same?, step does not fit)

    For a single dc operating point use
    .op

    you may sweep V1 from -1.5 to 1.5 in one step (yielding two values for V1) by
    .dc V1 -1.5 1.5 3

     
  • Samir Sabri

    Samir Sabri - 2019-06-23

    Thanks, but how would I actually apply the flip of dc voltage source? kindly have alook at the attached snapshot, what wolud be the netlist for such circuit? how would I get simulation results without using .op ? (notice the flipped battery)

     

    Last edit: Samir Sabri 2019-06-23

Log in to post a comment.