Hello,
I am new to Ngspice and I was using it with Qucs software. I have installed Ngspice and unzipped the package in C:\Spice64
When I do a simulation, specifying any element (source, lumped element, anything) with a variable (let's say a resistor, I called it RL), and then I add an equation statement and name RL= 10 kOhm, when I run any simulation type, Ngspice complains that it can't subsitiute the variable and hence the simulation fails.
I am using ngspice42_64 and Qucs 5.15.8 versions.
I am using Windows 11 as well.
Add { } ?
Hi Marcel, in the netlist, {} are added already. I have appended a netlist example for RL variable.
Log file is added as well.
This appears to work. I have to admit to be rusty with ngspice, so maybe
it can be done better ( .csparam? ) .
I changed some file extensions so that it fitted my plotter and editor.
Please write "rl = 10kOhm" not "rl =10 kOhm" and all will fall into place.
I think you wanted a column with RL values in the output but that won't work.
Don't destroy if you still want a .TRAN (or reparse).
I think "set appendwrite" will work in an unwanted way (?) if there is a file
with that name in the directory already (make sure the host dir is empty for the test).
-marcel
Last edit: marcel hendrix 2024-04-25
Hi Marcel,
I have tried the following: RL= 10kOhm, RL=10k but both didn't work. I have to say that the created netlist is from Qucs itself and I haven't written it myself. So for the commands you have mentioned, I don't know why they will created in the first place. Please have a look at the schematic and let me know if you see anything wrong there.
I'm afraid you will have to take this up with the Qucs maintainers/community.
In this stage it is not at all clear what you want to see happen.
From the shown schematic, I think (I don't use Qucs) that, with my modifications, NGSPICE is doing what it is asked . Thus I must conclude the Qucs script implementation is incorrect and (maybe) the combination of features requested ( "ALL" ) was not yet tested.
Why did you put an AC voltage source between gate and source of the MOS? Didn't you mean a pulse source?
-marcel
You speak about Qucs-S, not Qucs.
I think your equation block is obsolete. Don't know what you really want with your setup but this works for me:
Hi Marcel, Dietmar,
my provided testbench was an example on what I have encountered.
From educational videos about Qucs-S, I have learnt to add a variable on any element (let's say a resistor with R = RL), and then declare the value of this variable in the equation hub. However, it looks like that this was working in older versions of Qucs-s but I am not sure, so I thought that there could be a problem in my setup.
If it works for you it is OK, but I have not ever seen a video about a technical tool that was more useful than its link to the manual at the bottom.