As I told few days ago I installed V8 to do some Spice.
I need to be able to set initial voltages. In PSpice to set net initial voltage I was connecting to net something like KiCad PWR_FLAG but with voltage inside and done. Unfortunately PSpice I have (version from 90s) doesn’t work at Win10.
Looking through KiCad Spice library I didn’t found anything to set initial net voltage. So I looked through long list of examples:
I noticed that something have to be done by adding text to file. In MAX9000 example I found .ic commad. I understood “ic” as setting initial conditions.
But it doesn’t work:
It would be easier to say what I have not done to find how to make it working. When you do something for the first time you are sure of nothing what you are doing. You are even not sure if the way you add text to schematic may be is not the right one.
At the beginning I used global label (like at my screen shot) and tried to use it in .ic with ‘/’ and without ‘/’. Nothing.
So as in MAX9000 example there are labels and not global labels I have tried also with them using in .ic v(/V1)=0.5. Not working. So may be .ic v(V1)=0.5. Also nothing. There were comments in that example so I have also made my text being 2 lines, with comment line before .ic line. - nothing. During that I noticed that my texts are by default centered (until I had only one line I didn’t noticed it). So may be it have to be left justified as may be .ic have to be understood as starting from first text column - didn’t helped.
I found some other example with changing the capacitor value to “10p ic=0.5”. Nothing.
New idea. May be Spice in KiCad uses local setting and I should use ‘,’ and not ‘.’ in my value. I have checked it and to be sure also with using simple 1 instead of 0.5. Nothing could made these initial condition to work.
Here is the V8 project:
Ic_Init_Tst.zip (5.6 KB)
Here is my version info:
Application: KiCad x64 on x64
Version: 8.0.2-153-g3e5ceaa319, release build
Libraries:
wxWidgets 3.2.4
FreeType 2.12.1
HarfBuzz 8.3.0
FontConfig 2.14.2
libcurl/8.5.0-DEV Schannel zlib/1.3
Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: May 22 2024 05:22:34
wxWidgets: 3.2.4 (wchar_t,wx containers)
Boost: 1.83.0
OCC: 7.8.1
Curl: 8.5.0-DEV
ngspice: 42
Compiler: Visual C++ 1939 without C++ ABI
Build settings:
It took me 2 hours to find how to make Spice to use initial conditions in transient simulation.
Am I so stupid?
I believe you will find it much faster than me.