Originally Posted by towheedm
All that you said is true, but it still soes not explain why reversing the resistor gives a different result. Also, what version of gschem are you using and which resistor symbol did you use? I've noticed that resistor-2.sym from the Basic library does not simulate. I'm using 188.8.131.5200214 from the Debian repos. I think I'll build the latest and give that a try.
I am also using 184.108.40.20600214 from the Debian repos. Although I am having no trouble with either resistor-1.sym or resistor-2.sym, both simulate fine. I think my previous point does explain whats going on. GNUCap define V(R) as:
V(R) = V_Rp1 - VRp2
which in your case gives
V(R1) = V(GND) - V(op) or V(R1) = - V(op).
which is both what you expected and what you got, when you rotated the the resistor 180' you reversed the pins so you had:
V(R1) = V(op) - V(GND) or V(R1) = V(op).
To me this behaviour seems exactley as expected.
Also, consider this: Why doesn't the simulation run with NGSpice?
Sorry I cannot help here I do not have NGSPICE installed and it's not in my repos, I will try to install it later to see if I can track down the problem. Although maybe the answer lies in the simulation file.
Another point: Consider the circuit shown in this screenshot. It's your basic precision half wave rectifier. With the given configuration of the diodes, the circuit should give a positive half-wave rectified signal at the net labeled Half. Instead, it gives a negative half-wave rectified signal. I've also tried this with KTechLab and the circuit simulates as expected. What gives?
This I do not know, the screen shot is not great and there seems to be more of it than pictured. The OP-AMP does seem to be in inverting configuration though. It's been a while since I have worked with rectifier circuits. Key question does the rectified wave line up with the positive or the negative part of the input? i.e. is V(Half) = rect(V(in) * -1, or is it V(Half) = n_rect(V(in)).
where rect() passes all positive value and filters all negative; and n_rect() passes all negative values and filters all positive values.
Would it be possible for you to upload the *.sch file for the half wave rectifier only. and the diode and op-amp models (I have been using the 1N4007 diode so far as thats what I had on my sysytem).
I'm afraid my experiance with gEDA is limited, I am more used to PSICE/LTSPICE/cadence (in order I started using them). I have only really used the gEDA suite quickley to see how it works.